Added welcome page

This commit is contained in:
2018-11-15 12:42:10 +09:00
parent 085417edce
commit 1ef1c55e49
19 changed files with 153 additions and 30 deletions

View File

@ -41,9 +41,9 @@ const themes = {
"tip-bg-color": "hsl(0, 0%, 10%)",
// "tip-bg-color": "hsl(var(--bg-color-h), var(--bg-color-s), 10%)",
"post-like-color": "var(--link-color)",
"post-unlike-color": "var(--link-color)",
"post-permalink-color": "var(--link-color)",
"like-color": "var(--link-color)",
"unlike-color": "var(--link-color)",
"permalink-color": "var(--link-color)",
"quote-color": "var(--text-color)",

View File

@ -171,6 +171,12 @@ export default class AnimeNotifier {
// Apply page title
this.applyPageTitle()
// Auto-focus first input element on welcome page.
if(location.pathname === "/welcome") {
let firstInput = this.app.content.getElementsByTagName("input")[0] as HTMLInputElement
firstInput.focus()
}
}
applyPageTitle() {
@ -1118,6 +1124,7 @@ export default class AnimeNotifier {
}
if(!apiObject) {
this.statusMessage.showError("API object not found")
throw "API object not found"
}