Disabled datalist (too many entries displayed, bad UI)
This commit is contained in:
parent
0d0ae75bd4
commit
3d53dc7cb4
@ -2,7 +2,6 @@ package popular
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
@ -25,7 +24,7 @@ func AnimeTitles(ctx *aero.Context) string {
|
||||
}
|
||||
|
||||
for _, anime := range popularAnime {
|
||||
popularAnimeTitles = append(popularAnimeTitles, strings.ToLower(anime.Title.Canonical))
|
||||
popularAnimeTitles = append(popularAnimeTitles, anime.Title.Canonical)
|
||||
|
||||
if arn.ContainsUnicodeLetters(anime.Title.Japanese) {
|
||||
popularAnimeTitles = append(popularAnimeTitles, anime.Title.Japanese)
|
@ -164,7 +164,7 @@ export class AnimeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
onIdle() {
|
||||
async onIdle() {
|
||||
// Service worker
|
||||
this.serviceWorkerManager = new ServiceWorkerManager(this, "/service-worker")
|
||||
this.serviceWorkerManager.register()
|
||||
@ -178,6 +178,23 @@ export class AnimeNotifier {
|
||||
if(navigator.onLine === false) {
|
||||
this.statusMessage.showError("You are viewing an offline version of the site now.")
|
||||
}
|
||||
|
||||
// Download popular anime titles for the search
|
||||
// let response = await fetch("/api/popular/anime/titles/500")
|
||||
// let titles = await response.json()
|
||||
// let titleList = document.createElement("datalist")
|
||||
// titleList.id = "popular-anime-titles-list"
|
||||
|
||||
// for(let title of titles) {
|
||||
// let option = document.createElement("option")
|
||||
// option.value = title
|
||||
// titleList.appendChild(option)
|
||||
// }
|
||||
|
||||
// document.body.appendChild(titleList)
|
||||
|
||||
// let search = this.app.find("search") as HTMLInputElement
|
||||
// search.setAttribute("list", titleList.id)
|
||||
}
|
||||
|
||||
dragAndDrop() {
|
||||
|
Loading…
Reference in New Issue
Block a user