Skip to content

Commit

Permalink
New: Navigation via gamepad/keyboard has been improved, you can navig…
Browse files Browse the repository at this point in the history
…ate in settings, theme, language, menus in reading, etc.
  • Loading branch information
ollm committed Sep 3, 2023
1 parent b7d4e90 commit d1290f5
Show file tree
Hide file tree
Showing 24 changed files with 845 additions and 228 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Reload button in file list [`31675a5`](https://github.com/ollm/OpenComic/commit/31675a5a8334abedc056a09a5107f718dc5304e0)
- Check if there is a new version when starting OpenComic [`82f1abd`](https://github.com/ollm/OpenComic/commit/82f1abdac5c1ae6f26e88f5f2374c54edcfcaae7)
- Custom keyboard and gamepad shortcuts [`0a4a459`](https://github.com/ollm/OpenComic/commit/0a4a4597883c7c6c837acdd61e4d80dc8c0a0ec1)
- Navigation via gamepad/keyboard has been improved, you can navigate in settings, theme, language, menus in reading, etc.

### 🐛 Bug Fixes

Expand Down
4 changes: 3 additions & 1 deletion languages/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"list": "Llista"
},
"contextMenu": {
"remove": "Retirar"
"remove": "Retirar",
"closeApp": "Tancar OpenComic"
},
"back": "Enrere",
"open": "Obrir",
Expand All @@ -46,6 +47,7 @@
"lastPage": "Última pàgina",
"pages": {
"main": "Pàgines",
"pageLayout": "Maquetació de les pàgines",
"slide": "Lectura horitzontal",
"scroll": "Lectura vertical",
"adjustToWidth": "Ajustar a l'ample",
Expand Down
4 changes: 3 additions & 1 deletion languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"list": "List"
},
"contextMenu": {
"remove": "Remove"
"remove": "Remove",
"closeApp": "Close OpenComic"
},
"back": "Back",
"open": "Open",
Expand All @@ -46,6 +47,7 @@
"lastPage": "Last page",
"pages": {
"main": "Pages",
"pageLayout": "Page layout",
"slide": "Slide Reader",
"scroll": "Vertical Reader",
"adjustToWidth": "Adjust to width",
Expand Down
4 changes: 3 additions & 1 deletion languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"list": "Lista"
},
"contextMenu": {
"remove": "Retirar"
"remove": "Retirar",
"closeApp": "Cerrar OpenComic"
},
"back": "Atrás",
"open": "Abrir",
Expand All @@ -46,6 +47,7 @@
"lastPage": "Última página",
"pages": {
"main": "Páginas",
"pageLayout": "Maquetación de las páginas",
"slide": "Lectura horizontal",
"scroll": "Lectura vertical",
"adjustToWidth": "Ajustar a lo ancho",
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"start": "npm run prebuild && electron --trace-warnings --enable-logging scripts/main.js",
"rebuild": "electron-rebuild -f -w sharp",
"rebuild2": "electron-builder node-gyp-rebuild",
"prebuild": "node scripts/build.js; node themes/material-design/colors/generate-colors.js",
"prebuild": "node scripts/build.js && node themes/material-design/colors/generate-colors.js",
"watch": "nodemon --ignore 'dist/' --ignore scripts/builded --watch * --exec npm run start",
"build": "npm run prebuild && electron-builder build",
"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",
"build-dist": "npm run prebuild && electron-builder --x64 --linux deb rpm AppImage 7z && electron-builder --arm64 --linux deb rpm AppImage 7z",
"build-linux": "npm run prebuild && electron-builder --x64 --linux deb rpm AppImage 7z",
"build-deb": "npm run prebuild && electron-builder --x64 --linux deb",
"build-rpm": "npm run prebuild && electron-builder --x64 --linux rpm",
Expand All @@ -39,9 +39,9 @@
"build-zip": "npm run prebuild && electron-builder --x64 --linux zip",
"build-7z": "npm run prebuild && electron-builder --x64 --linux 7z",
"build-nsis": "npm run prebuild && electron-builder --win nsis",
"build-mac": "npm run prebuild && electron-builder --mac 7z",
"build-mac-tar": "npm run prebuild && electron-builder --mac tar.gz",
"build-mac-zip": "npm run prebuild && electron-builder --mac zip",
"build-mac-7z": "npm run prebuild && electron-builder --mac 7z",
"build-linux-arm": "npm run prebuild && electron-builder --arm64 --linux deb rpm AppImage 7z",
"build-deb-arm": "npm run prebuild && electron-builder --arm64 --linux deb",
"build-rpm-arm": "npm run prebuild && electron-builder --arm64 --linux rpm",
Expand Down Expand Up @@ -103,6 +103,7 @@
"node_modules/sharp",
"node_modules/node-7z",
"node_modules/7zip-bin",
"node_modules/shosho",
"unrar",
"Pepper & Carrot"
],
Expand Down
5 changes: 4 additions & 1 deletion scripts/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,7 @@ function loadLanguagesPage(animation = true)

template.loadContentRight('languages.content.right.html', animation);
template.loadHeader('languages.header.html', animation);
template.loadGlobalElement('general.elements.menus.html', 'menus');
floatingActionButton(false);

events.events();
Expand Down Expand Up @@ -1095,6 +1096,7 @@ function loadSettingsPage(animation = true)

template.loadContentRight('settings.content.right.html', animation);
template.loadHeader('settings.header.html', animation);
template.loadGlobalElement('general.elements.menus.html', 'menus');
floatingActionButton(false);

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

//template.loadContentRight('theme.content.right.html', animation);
template.loadHeader('theme.header.html', animation);
template.loadGlobalElement('general.elements.menus.html', 'menus');
floatingActionButton(false);

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

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

});
Expand Down

0 comments on commit d1290f5

Please sign in to comment.