General improvements
This commit is contained in:
parent
bb39234f2d
commit
6c641c3632
@ -122,27 +122,3 @@ component Dashboard(schedule []*arn.UpcomingEpisode, posts []arn.Postable, sound
|
|||||||
//- .widget-element-text
|
//- .widget-element-text
|
||||||
//- Icon("github")
|
//- Icon("github")
|
||||||
//- span GitHub
|
//- span GitHub
|
||||||
|
|
||||||
component Footer
|
|
||||||
.footer.text-center
|
|
||||||
span.footer-element Anime Notifier
|
|
||||||
|
|
||||||
a.footer-element(href="https://discord.gg/0kimAmMCeXGXuzNF", target="_blank", rel="noopener")
|
|
||||||
Icon("microphone")
|
|
||||||
span Discord
|
|
||||||
|
|
||||||
a.footer-element(href="https://www.facebook.com/animenotifier", target="_blank", rel="noopener")
|
|
||||||
Icon("facebook")
|
|
||||||
span Facebook
|
|
||||||
|
|
||||||
a.footer-element(href="https://twitter.com/animenotifier", target="_blank", rel="noopener")
|
|
||||||
Icon("twitter")
|
|
||||||
span Twitter
|
|
||||||
|
|
||||||
a.footer-element(href="https://plus.google.com/+AnimeReleaseNotifierOfficial", target="_blank", rel="noopener")
|
|
||||||
Icon("google-plus")
|
|
||||||
span Google+
|
|
||||||
|
|
||||||
a.footer-element(href="https://github.com/animenotifier/notify.moe", target="_blank", rel="noopener")
|
|
||||||
Icon("github")
|
|
||||||
span GitHub
|
|
||||||
|
@ -1,16 +1,23 @@
|
|||||||
component FrontPage
|
component FrontPage
|
||||||
.frontpage-background
|
.frontpage-background
|
||||||
|
|
||||||
.frontpage.mountable
|
.frontpage
|
||||||
h1 notify.moe
|
h1.mountable notify.moe
|
||||||
|
|
||||||
h2 Your home for everything about anime.
|
h2.mountable Your home for everything about anime.
|
||||||
|
|
||||||
//- img.action.screenshot(src="/images/elements/extension-screenshot.png", alt="Screenshot of the browser extension", title="Click to install the Chrome Extension", data-action="installExtension", data-trigger="click")
|
|
||||||
|
|
||||||
Login
|
Login
|
||||||
|
Footer
|
||||||
|
|
||||||
.footer
|
video.bg-video(autoplay="autoplay", loop="loop")
|
||||||
|
source(src="//s1.webmshare.com/nZVby.webm", type="video/webm")
|
||||||
|
source(src="//cdn-e2.streamable.com/video/mp4/e5mx7.mp4?token=1500414089_8b2b3b0665984dcf4dc8d33e534bc1c8881b2da1", type="video/mp4")
|
||||||
|
|
||||||
|
component Footer
|
||||||
|
.footer.text-center.mountable
|
||||||
|
SocialMediaLinks
|
||||||
|
|
||||||
|
component SocialMediaLinks
|
||||||
a.footer-element(href="https://discord.gg/0kimAmMCeXGXuzNF", target="_blank", rel="noopener")
|
a.footer-element(href="https://discord.gg/0kimAmMCeXGXuzNF", target="_blank", rel="noopener")
|
||||||
Icon("microphone")
|
Icon("microphone")
|
||||||
span Discord
|
span Discord
|
||||||
@ -30,7 +37,3 @@ component FrontPage
|
|||||||
a.footer-element(href="https://github.com/animenotifier/notify.moe", target="_blank", rel="noopener")
|
a.footer-element(href="https://github.com/animenotifier/notify.moe", target="_blank", rel="noopener")
|
||||||
Icon("github")
|
Icon("github")
|
||||||
span GitHub
|
span GitHub
|
||||||
|
|
||||||
video.bg-video(autoplay="autoplay", loop="loop")
|
|
||||||
source(src="//s1.webmshare.com/nZVby.webm", type="video/webm")
|
|
||||||
source(src="//cdn-e2.streamable.com/video/mp4/e5mx7.mp4?token=1500414089_8b2b3b0665984dcf4dc8d33e534bc1c8881b2da1", type="video/mp4")
|
|
@ -1,5 +1,5 @@
|
|||||||
component Login
|
component Login
|
||||||
.login-buttons
|
.login-buttons.mountable
|
||||||
a.login-button.login-button-google(href="/auth/google")
|
a.login-button.login-button-google(href="/auth/google")
|
||||||
Icon("google")
|
Icon("google")
|
||||||
span Sign in via Google
|
span Sign in via Google
|
||||||
|
43
patches/add-item/add-item.go
Normal file
43
patches/add-item/add-item.go
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"flag"
|
||||||
|
|
||||||
|
"github.com/animenotifier/arn"
|
||||||
|
"github.com/fatih/color"
|
||||||
|
)
|
||||||
|
|
||||||
|
var nick string
|
||||||
|
var itemID string
|
||||||
|
var quantity int
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
flag.StringVar(&nick, "nick", "", "Name of the user.")
|
||||||
|
flag.StringVar(&itemID, "item", "", "ID of the item.")
|
||||||
|
flag.IntVar(&quantity, "q", 1, "Item quantity.")
|
||||||
|
flag.Parse()
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
if nick == "" || itemID == "" {
|
||||||
|
color.Red("Missing parameters")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
user, err := arn.GetUserByNick(nick)
|
||||||
|
arn.PanicOnError(err)
|
||||||
|
|
||||||
|
item, err := arn.GetItem(itemID)
|
||||||
|
arn.PanicOnError(err)
|
||||||
|
|
||||||
|
if item == nil {
|
||||||
|
color.Red("Unknown item")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add to user inventory
|
||||||
|
inventory := user.Inventory()
|
||||||
|
inventory.AddItem(itemID, uint(quantity))
|
||||||
|
err = inventory.Save()
|
||||||
|
arn.PanicOnError(err)
|
||||||
|
}
|
@ -24,13 +24,8 @@ func main() {
|
|||||||
|
|
||||||
color.Yellow("Deleting all pro subscriptions")
|
color.Yellow("Deleting all pro subscriptions")
|
||||||
|
|
||||||
// Get a stream of all users
|
for user := range arn.MustStreamUsers() {
|
||||||
allUsers, err := arn.StreamUsers()
|
user.ProExpires = ""
|
||||||
arn.PanicOnError(err)
|
|
||||||
|
|
||||||
// Iterate over the stream
|
|
||||||
for user := range allUsers {
|
|
||||||
user.Balance = 0
|
|
||||||
arn.PanicOnError(user.Save())
|
arn.PanicOnError(user.Save())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user