Fixed UI border color and missing credentials

This commit is contained in:
Eduard Urbach 2017-06-26 20:37:04 +02:00
parent 3d62ab8305
commit 3215714e6a
3 changed files with 9 additions and 13 deletions

View File

@ -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)

View File

@ -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) {

View File

@ -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%)