From 3215714e6a8fd9f808f34b37cd7e73d96a9849b7 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Mon, 26 Jun 2017 20:37:04 +0200 Subject: [PATCH] Fixed UI border color and missing credentials --- scripts/AnimeNotifier.ts | 18 ++++++------------ scripts/Application.ts | 2 +- styles/include/config.scarlet | 2 ++ 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/scripts/AnimeNotifier.ts b/scripts/AnimeNotifier.ts index 0ce65f84..d0fc6907 100644 --- a/scripts/AnimeNotifier.ts +++ b/scripts/AnimeNotifier.ts @@ -154,27 +154,21 @@ export class AnimeNotifier { } diffURL(url: string) { - let request = fetch("/_" + url).then(response => response.text()) - + let request = fetch("/_" + url, { + credentials: "same-origin" + }) + .then(response => response.text()) + history.pushState(url, null, url) this.app.currentPath = url this.app.markActiveLinks() - this.loading(true) this.unmountMountables() - - // for(let element of findAll("mountable")) { - // element.classList.remove("mountable") - // } + this.loading(true) delay(300).then(() => { request .then(html => this.app.setContent(html, true)) .then(() => this.app.markActiveLinks()) - // .then(() => { - // for(let element of findAll("mountable")) { - // element.classList.remove("mountable") - // } - // }) .then(() => this.app.emit("DOMContentLoaded")) .then(() => this.loading(false)) .catch(console.error) diff --git a/scripts/Application.ts b/scripts/Application.ts index a11f3f06..04c0d13d 100644 --- a/scripts/Application.ts +++ b/scripts/Application.ts @@ -92,6 +92,7 @@ export class Application { request.then(html => { // Set content this.setContent(html, false) + this.scrollToTop() // Fade animations this.content.classList.remove(this.fadeOutClass) @@ -120,7 +121,6 @@ export class Application { this.ajaxify(this.content) this.markActiveLinks(this.content) - this.scrollToTop() } markActiveLinks(element?: HTMLElement) { diff --git a/styles/include/config.scarlet b/styles/include/config.scarlet index 08c869ec..7359ff69 100644 --- a/styles/include/config.scarlet +++ b/styles/include/config.scarlet @@ -9,7 +9,9 @@ bg-color = rgb(246, 246, 246) // UI ui-border-color = rgba(0, 0, 0, 0.1) +ui-border = 1px solid ui-border-color ui-hover-border-color = rgba(0, 0, 0, 0.15) +ui-hover-border-color = 1px solid ui-hover-border-color ui-background = rgb(254, 254, 254) // ui-hover-background = rgb(254, 254, 254) // ui-background = linear-gradient(to bottom, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.037) 100%)