From 03c79e29326051a7848812d16a27895bc07f9710 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Thu, 5 Oct 2017 21:27:49 +0200 Subject: [PATCH] Started working on pro features --- mixins/Postable.pixy | 2 +- pages/admin/webdev.pixy | 12 ++++++------ pages/threads/threads.scarlet | 4 ++++ scripts/AnimeNotifier.ts | 6 ++++++ styles/include/config.scarlet | 2 +- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/mixins/Postable.pixy b/mixins/Postable.pixy index c0c8e366..9fd02261 100644 --- a/mixins/Postable.pixy +++ b/mixins/Postable.pixy @@ -1,5 +1,5 @@ component Postable(post arn.Postable, user *arn.User, highlightAuthorID string) - .post.mountable(id=strings.ToLower(post.Type()) + "-" + toString(post.ID()), data-highlight=post.Author().ID == highlightAuthorID, data-api="/api/" + strings.ToLower(post.Type()) + "/" + post.ID()) + .post.mountable(id=strings.ToLower(post.Type()) + "-" + toString(post.ID()), data-highlight=post.Author().ID == highlightAuthorID, data-pro=post.Author().IsPro(), data-api="/api/" + strings.ToLower(post.Type()) + "/" + post.ID()) .post-author Avatar(post.Author()) diff --git a/pages/admin/webdev.pixy b/pages/admin/webdev.pixy index ffe3db70..0284a844 100644 --- a/pages/admin/webdev.pixy +++ b/pages/admin/webdev.pixy @@ -1,15 +1,15 @@ component WebDev - h1.page-title WebDev - AdminTabs - .light-button-group - a.light-button(href="https://developers.google.com/speed/pagespeed/insights/?url=https://notify.moe/&tab=desktop", target="_blank", rel="noopener") + h1.page-title WebDev + + .buttons + a.button.mountable(href="https://developers.google.com/speed/pagespeed/insights/?url=https://notify.moe/&tab=desktop", target="_blank", rel="noopener") Icon("external-link") span Google PageSpeed - a.light-button(href="https://observatory.mozilla.org/analyze.html?host=notify.moe", target="_blank", rel="noopener") + a.button.mountable(href="https://observatory.mozilla.org/analyze.html?host=notify.moe", target="_blank", rel="noopener") Icon("external-link") span Mozilla Observatory - a.light-button(href="https://html5.validator.nu/?doc=https://notify.moe", target="_blank", rel="noopener") + a.button.mountable(href="https://html5.validator.nu/?doc=https://notify.moe", target="_blank", rel="noopener") Icon("external-link") span HTML5 Validator \ No newline at end of file diff --git a/pages/threads/threads.scarlet b/pages/threads/threads.scarlet index da44d2d9..14c349d2 100644 --- a/pages/threads/threads.scarlet +++ b/pages/threads/threads.scarlet @@ -17,6 +17,10 @@ [data-highlight="true"] .post-content border 2px solid post-highlight-color + + [data-pro="true"] + .post-content + border 2px solid pro-color > 600px .post diff --git a/scripts/AnimeNotifier.ts b/scripts/AnimeNotifier.ts index 606e8cb5..17b8a6c8 100644 --- a/scripts/AnimeNotifier.ts +++ b/scripts/AnimeNotifier.ts @@ -461,6 +461,10 @@ export class AnimeNotifier { let actionTrigger = element.dataset.trigger let actionName = element.dataset.action + if(!actionTrigger || !actionName) { + continue + } + let oldAction = element["action assigned"] if(oldAction) { @@ -473,6 +477,8 @@ export class AnimeNotifier { if(!(actionName in actions)) { this.statusMessage.showError(`Action '${actionName}' has not been defined`) + console.error(element) + continue } let actionHandler = e => { diff --git a/styles/include/config.scarlet b/styles/include/config.scarlet index a7c21a28..9e87a449 100644 --- a/styles/include/config.scarlet +++ b/styles/include/config.scarlet @@ -4,8 +4,8 @@ main-color = rgb(248, 165, 130) link-color = rgb(215, 38, 15) link-hover-color = rgb(242, 60, 30) link-active-color = link-hover-color - bg-color = rgb(246, 246, 246) +pro-color = hsla(0, 100%, 77%, 0.87) // UI ui-border-color = rgba(0, 0, 0, 0.1)