aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/app')
-rw-r--r--src/app/browser.js8
-rw-r--r--src/app/main.css7
2 files changed, 15 insertions, 0 deletions
diff --git a/src/app/browser.js b/src/app/browser.js
index 6d10bfb..c23f217 100644
--- a/src/app/browser.js
+++ b/src/app/browser.js
@@ -3,8 +3,10 @@ var fuse;
var packages = [];
var Browser = {
+ maxentries: 50,
toggle: (state) => {
if (state) {
+ browser.scrollTo(0, 0);
overlay.classList.add("shown")
browser.classList.add("shown")
return
@@ -16,6 +18,7 @@ var Browser = {
}
}
+ browser.scrollTo(0, 0);
overlay.classList.toggle("shown")
browser.classList.toggle("shown")
},
@@ -31,6 +34,7 @@ var Browser = {
}
for (let i in packages) {
+ if (i == Browser.maxentries) {Browser.endoflist();break}
new BrowserElFromObj(packages[i]);
}
},
@@ -43,6 +47,9 @@ var Browser = {
browserEntries.innerHTML = `<div class="loading">${lang('gui.browser.loading')}</div>`;
}
},
+ endoflist: () => {
+ browserEntries.innerHTML += `<div class="message">${lang('gui.browser.endoflist')}</div>`
+ },
search: (string) => {
Browser.loading();
let res = fuse.search(string);
@@ -53,6 +60,7 @@ var Browser = {
}
for (let i = 0; i < res.length; i++) {
+ if (i == Browser.maxentries) {Browser.endoflist();break}
new BrowserElFromObj(res[i].item);
}
},
diff --git a/src/app/main.css b/src/app/main.css
index e48625b..b6a07eb 100644
--- a/src/app/main.css
+++ b/src/app/main.css
@@ -177,6 +177,13 @@ button {
height: calc(100% - var(--mischeight) - var(--height));
}
+#browser .message {
+ color: white;
+ text-align: center;
+ margin: var(--padding);
+ width: calc(100% - var(--padding));
+}
+
#browser .el .image, #browser .el .image img {
width: var(--height);
height: var(--height);