Skip to content

Commit d1290f5

Browse files
committed
New: Navigation via gamepad/keyboard has been improved, you can navigate in settings, theme, language, menus in reading, etc.
1 parent b7d4e90 commit d1290f5

24 files changed

+845
-228
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1111
- Reload button in file list [`31675a5`](https://github.com/ollm/OpenComic/commit/31675a5a8334abedc056a09a5107f718dc5304e0)
1212
- Check if there is a new version when starting OpenComic [`82f1abd`](https://github.com/ollm/OpenComic/commit/82f1abdac5c1ae6f26e88f5f2374c54edcfcaae7)
1313
- Custom keyboard and gamepad shortcuts [`0a4a459`](https://github.com/ollm/OpenComic/commit/0a4a4597883c7c6c837acdd61e4d80dc8c0a0ec1)
14+
- Navigation via gamepad/keyboard has been improved, you can navigate in settings, theme, language, menus in reading, etc.
1415

1516
### 🐛 Bug Fixes
1617

languages/ca.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"list": "Llista"
2121
},
2222
"contextMenu": {
23-
"remove": "Retirar"
23+
"remove": "Retirar",
24+
"closeApp": "Tancar OpenComic"
2425
},
2526
"back": "Enrere",
2627
"open": "Obrir",
@@ -46,6 +47,7 @@
4647
"lastPage": "Última pàgina",
4748
"pages": {
4849
"main": "Pàgines",
50+
"pageLayout": "Maquetació de les pàgines",
4951
"slide": "Lectura horitzontal",
5052
"scroll": "Lectura vertical",
5153
"adjustToWidth": "Ajustar a l'ample",

languages/en.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"list": "List"
2121
},
2222
"contextMenu": {
23-
"remove": "Remove"
23+
"remove": "Remove",
24+
"closeApp": "Close OpenComic"
2425
},
2526
"back": "Back",
2627
"open": "Open",
@@ -46,6 +47,7 @@
4647
"lastPage": "Last page",
4748
"pages": {
4849
"main": "Pages",
50+
"pageLayout": "Page layout",
4951
"slide": "Slide Reader",
5052
"scroll": "Vertical Reader",
5153
"adjustToWidth": "Adjust to width",

languages/es.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"list": "Lista"
2121
},
2222
"contextMenu": {
23-
"remove": "Retirar"
23+
"remove": "Retirar",
24+
"closeApp": "Cerrar OpenComic"
2425
},
2526
"back": "Atrás",
2627
"open": "Abrir",
@@ -46,6 +47,7 @@
4647
"lastPage": "Última página",
4748
"pages": {
4849
"main": "Páginas",
50+
"pageLayout": "Maquetación de las páginas",
4951
"slide": "Lectura horizontal",
5052
"scroll": "Lectura vertical",
5153
"adjustToWidth": "Ajustar a lo ancho",

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
"start": "npm run prebuild && electron --trace-warnings --enable-logging scripts/main.js",
2727
"rebuild": "electron-rebuild -f -w sharp",
2828
"rebuild2": "electron-builder node-gyp-rebuild",
29-
"prebuild": "node scripts/build.js; node themes/material-design/colors/generate-colors.js",
29+
"prebuild": "node scripts/build.js && node themes/material-design/colors/generate-colors.js",
3030
"watch": "nodemon --ignore 'dist/' --ignore scripts/builded --watch * --exec npm run start",
3131
"build": "npm run prebuild && electron-builder build",
32-
"build-dist": "npm run prebuild && electron-builder --x64 --linux deb rpm AppImage 7z && electron-builder --arm64 --linux deb rpm AppImage 7z && electron-builder --mac 7z",
32+
"build-dist": "npm run prebuild && electron-builder --x64 --linux deb rpm AppImage 7z && electron-builder --arm64 --linux deb rpm AppImage 7z",
3333
"build-linux": "npm run prebuild && electron-builder --x64 --linux deb rpm AppImage 7z",
3434
"build-deb": "npm run prebuild && electron-builder --x64 --linux deb",
3535
"build-rpm": "npm run prebuild && electron-builder --x64 --linux rpm",
@@ -39,9 +39,9 @@
3939
"build-zip": "npm run prebuild && electron-builder --x64 --linux zip",
4040
"build-7z": "npm run prebuild && electron-builder --x64 --linux 7z",
4141
"build-nsis": "npm run prebuild && electron-builder --win nsis",
42+
"build-mac": "npm run prebuild && electron-builder --mac 7z",
4243
"build-mac-tar": "npm run prebuild && electron-builder --mac tar.gz",
4344
"build-mac-zip": "npm run prebuild && electron-builder --mac zip",
44-
"build-mac-7z": "npm run prebuild && electron-builder --mac 7z",
4545
"build-linux-arm": "npm run prebuild && electron-builder --arm64 --linux deb rpm AppImage 7z",
4646
"build-deb-arm": "npm run prebuild && electron-builder --arm64 --linux deb",
4747
"build-rpm-arm": "npm run prebuild && electron-builder --arm64 --linux rpm",
@@ -103,6 +103,7 @@
103103
"node_modules/sharp",
104104
"node_modules/node-7z",
105105
"node_modules/7zip-bin",
106+
"node_modules/shosho",
106107
"unrar",
107108
"Pepper & Carrot"
108109
],

scripts/dom.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,7 @@ function loadLanguagesPage(animation = true)
10591059

10601060
template.loadContentRight('languages.content.right.html', animation);
10611061
template.loadHeader('languages.header.html', animation);
1062+
template.loadGlobalElement('general.elements.menus.html', 'menus');
10621063
floatingActionButton(false);
10631064

10641065
events.events();
@@ -1095,6 +1096,7 @@ function loadSettingsPage(animation = true)
10951096

10961097
template.loadContentRight('settings.content.right.html', animation);
10971098
template.loadHeader('settings.header.html', animation);
1099+
template.loadGlobalElement('general.elements.menus.html', 'menus');
10981100
floatingActionButton(false);
10991101

11001102
settings.start();
@@ -1118,6 +1120,7 @@ function loadThemePage(animation = true)
11181120

11191121
//template.loadContentRight('theme.content.right.html', animation);
11201122
template.loadHeader('theme.header.html', animation);
1123+
template.loadGlobalElement('general.elements.menus.html', 'menus');
11211124
floatingActionButton(false);
11221125

11231126
theme.start();
@@ -1533,7 +1536,7 @@ async function openComic(animation = true, path = true, mainPath = true, end = f
15331536
// Gamepad events
15341537
gamepad.setButtonEvent('reading', 1, function(key, button) {
15351538

1536-
if(key == 1 && !onReading)
1539+
if(key == 1 && (!onReading || document.querySelector('.menu-simple.a')))
15371540
gamepad.goBack();
15381541

15391542
});

0 commit comments

Comments
 (0)