From 0b893f9f2b01196b583222df072ae51631457649 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Mon, 16 May 2022 20:09:43 +0200 Subject: a lot of stuff, but mainly a "Load more..." button In the past when more than 50 packages was loaded it'd simply display a "Maximum packages loaded" message, and it wasn't actually 50, as it just took the first 50 packages loaded, whether or not they were filtered out, so now that's fixed and a "Load more..." button has been added. With that comes some changes to the lang strings for "gui.browser.endoflist" and a new one "gui.browser.loadmore". I also fixed the filtered packages issue also occurring in searches. This will overall allow a user to more easily find the maximum amount of packages without loading literally over a hundred packages at once, not good for performance... --- src/lang/en.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lang') diff --git a/src/lang/en.json b/src/lang/en.json index 024b44a..345a83c 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -77,7 +77,8 @@ "gui.browser.install": "Install", "gui.browser.reinstall": "Re-Install", "gui.browser.loading": "Loading mods...", - "gui.browser.endoflist": "Maximum packages has been loaded.
Use the search for finding other packages!", + "gui.browser.loadmore": "Load more...", + "gui.browser.endoflist": "All packages have been loaded.", "gui.browser.noresults": "No results...", "gui.browser.filter.mods": "Mods", "gui.browser.filter.skins": "Skins", -- cgit v1.2.3 From bb5446be8164176219784290f18751c6f35c4047 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Tue, 17 May 2022 01:11:25 +0200 Subject: added external link button and changed string "Info" -> "View", along with a button in the previewer to open the mod page in the browser if you so choose. --- src/app/browser.js | 7 ++++++- src/app/icons/external.png | Bin 0 -> 9764 bytes src/app/index.html | 5 ++++- src/app/main.css | 13 +++++++++---- src/lang/en.json | 1 + 5 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 src/app/icons/external.png (limited to 'src/lang') diff --git a/src/app/browser.js b/src/app/browser.js index 5a5a752..138aef8 100644 --- a/src/app/browser.js +++ b/src/app/browser.js @@ -244,6 +244,10 @@ var Browser = { } } +function openExternal(url) { + require("electron").shell.openExternal(url); +} + var view = document.querySelector(".popup#preview webview"); var Preview = { show: () => { @@ -255,6 +259,7 @@ var Preview = { set: (url, autoshow) => { if (autoshow != false) {Preview.show()} view.src = url; + document.querySelector("#preview #external").setAttribute("onclick", `openExternal("${url}")`); } } @@ -340,7 +345,7 @@ function BrowserEl(properties) {
${properties.title}
${properties.description}
- + diff --git a/src/app/icons/external.png b/src/app/icons/external.png new file mode 100644 index 0000000..0b4f99e Binary files /dev/null and b/src/app/icons/external.png differ diff --git a/src/app/index.html b/src/app/index.html index b146ba3..f67a7a8 100644 --- a/src/app/index.html +++ b/src/app/index.html @@ -134,10 +134,13 @@