Skip to content

Commit 339bcc0

Browse files
committed
New: Open file location in context menu
1 parent b2719e5 commit 339bcc0

14 files changed

+92
-52
lines changed

.github/FUNDING.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These are supported funding model platforms
22

3-
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
3+
github: ["ollm"]
44
patreon: # Replace with a single Patreon username
55
open_collective: # Replace with a single Open Collective username
66
ko_fi: # Replace with a single Ko-fi username

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
### 🚀 New Features
1010

11+
- Open file location in context menu
1112

1213
### 🐛 Bug Fixes
1314

1415
- Gamepad icons not showing in distribution version [`249640d`](https://github.com/ollm/OpenComic/commit/249640d57f3d5768661b63c0ddf8525a02e44d25)
15-
- Go back in gamepad menus
16+
- Go back in gamepad menus [`b2719e5`](https://github.com/ollm/OpenComic/commit/b2719e5e782659f249ce7a6ba6c8b94fe40a3407)
1617

1718
## [v1.0.0-beta.2](https://github.com/ollm/OpenComic/releases/tag/v1.0.0-beta.2) (03-09-2023)
1819

README.md

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
## Download beta `v1.0.0-beta.2`
22

33
###### All packages
4-
* [v1.0.0-beta.2](https://github.com/ollm/OpenComic/releases/tag/v1.0.0-beta.2)
4+
- [v1.0.0-beta.2](https://github.com/ollm/OpenComic/releases/tag/v1.0.0-beta.2)
55

66
## Download `v0.2.1`
77
###### Windows
8-
* [.exe](https://github.com/ollm/OpenComic/releases/download/v0.2.1/OpenComic.Setup.0.2.1.exe)
8+
- [.exe](https://github.com/ollm/OpenComic/releases/download/v0.2.1/OpenComic.Setup.0.2.1.exe)
99
###### macOS
10-
* [.7z](https://github.com/ollm/OpenComic/releases/download/v0.2.1/OpenComic-0.2.1-mac-build2.7z)
10+
- [.7z](https://github.com/ollm/OpenComic/releases/download/v0.2.1/OpenComic-0.2.1-mac-build2.7z)
1111
###### Linux
12-
* [.deb](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic_0.2.1_amd64.deb)
13-
* [.rpm](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic-0.2.1.x86_64.rpm)
14-
* [.snap](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic_0.2.1_amd64.snap)
15-
* [.7z](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic-0.2.1.7z)
16-
* [.AppImage](https://github.com/ollm/OpenComic/releases/download/v0.2.1/OpenComic-0.2.1.AppImage)
17-
* `snap install opencomic`
18-
* [AUR](https://aur.archlinux.org/packages/opencomic-bin/)
12+
- [.deb](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic_0.2.1_amd64.deb)
13+
- [.rpm](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic-0.2.1.x86_64.rpm)
14+
- [.snap](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic_0.2.1_amd64.snap)
15+
- [.7z](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic-0.2.1.7z)
16+
- [.AppImage](https://github.com/ollm/OpenComic/releases/download/v0.2.1/OpenComic-0.2.1.AppImage)
17+
- `snap install opencomic`
18+
- [AUR](https://aur.archlinux.org/packages/opencomic-bin/)
1919
###### Linux Arm64
20-
* [arm64.deb](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic_0.2.1_arm64.deb)
21-
* [arm64.rpm](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic-0.2.1.aarch64.rpm)
22-
* [arm64.7z](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic-0.2.1-arm64.7z)
23-
* [arm64.AppImage](https://github.com/ollm/OpenComic/releases/download/v0.2.1/OpenComic-0.2.1-arm64.AppImage)
20+
- [arm64.deb](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic_0.2.1_arm64.deb)
21+
- [arm64.rpm](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic-0.2.1.aarch64.rpm)
22+
- [arm64.7z](https://github.com/ollm/OpenComic/releases/download/v0.2.1/opencomic-0.2.1-arm64.7z)
23+
- [arm64.AppImage](https://github.com/ollm/OpenComic/releases/download/v0.2.1/OpenComic-0.2.1-arm64.AppImage)
2424

2525
## ScreenShot
2626

2727
![Screenshot](https://i.ibb.co/vPKbpyQ/Open-Comic-Screen-Shot.png "Screenshot")
2828

2929
## Features
3030

31-
* Support this image formats: JPG, PNG, APNG, AVIF, WEBP, GIF, SVG, BMP, ICO
32-
* Support this compressed formats: PDF, RAR, ZIP, 7Z, TAR, CBR, CBZ, CB7, CBT
33-
* Manga read mode
34-
* Webtoon read mode
35-
* Double page view
36-
* Bookmarks and continue reading
37-
* Floating magnifying glass
38-
* Reading in scroll or slide
39-
* 🎮 Gamepad navigation
40-
41-
You can see the changes between versions in the [Changelog](https://github.com/ollm/OpenComic/blob/master/CHANGELOG.md)
31+
- 🖼 Support this image formats: `JPG`, `PNG`, `APNG`, `AVIF`, `WEBP`, `GIF`, `SVG`, `BMP`, `ICO`
32+
- 🗄 Support this compressed formats: `PDF`, `RAR`, `ZIP`, `7Z`, `TAR`, `CBR`, `CBZ`, `CB7`, `CBT`
33+
- 🇯🇵 Manga read mode
34+
- 🇰🇷 Webtoon read mode
35+
- 📖 Double page view
36+
- 🔖 Bookmarks and continue reading
37+
- 🔍 Floating magnifying glass
38+
- 🖱 Reading in scroll or slide
39+
- 🎮 Gamepad navigation
40+
41+
You can see the changes between versions in the [Changelog 📝](https://github.com/ollm/OpenComic/blob/master/CHANGELOG.md)
4242

4343
## Installation and Starting for development
4444
__Requirements__: Git, Node and NPM

languages/ca.json

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
},
2222
"contextMenu": {
2323
"remove": "Retirar",
24+
"openFileLocation": "Obre la ubicació del fitxer",
2425
"closeApp": "Tancar OpenComic"
2526
},
2627
"back": "Enrere",

languages/en.json

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
},
2222
"contextMenu": {
2323
"remove": "Remove",
24+
"openFileLocation": "Open file location",
2425
"closeApp": "Close OpenComic"
2526
},
2627
"back": "Back",

languages/es.json

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
},
2222
"contextMenu": {
2323
"remove": "Retirar",
24+
"openFileLocation": "Abrir localización de archivo",
2425
"closeApp": "Cerrar OpenComic"
2526
},
2627
"back": "Atrás",

scripts/dom.js

+17-2
Original file line numberDiff line numberDiff line change
@@ -1079,6 +1079,8 @@ function changeLanguage(lan)
10791079
template.loadContentLeft('index.content.left.html', false);
10801080
template.loadHeader('languages.header.html', false);
10811081
storage.updateVar('config', 'language', lan);
1082+
1083+
gamepad.updateBrowsableItems(gamepad.currentKey());
10821084
}
10831085

10841086
/* Page - Settings */
@@ -1363,9 +1365,22 @@ function nightMode()
13631365
}
13641366

13651367
// Show the comic contet menu
1366-
function comicContextMenu(path)
1368+
function comicContextMenu(path, fromIndex = true)
13671369
{
1368-
$('#index-context-menu .context-menu-remove').attr('onclick', 'dom.removeComic(\''+escapeQuotes(escapeBackSlash(path), 'simples')+'\');');
1370+
// Remove
1371+
let remove = document.querySelector('#index-context-menu .context-menu-remove');
1372+
1373+
if(fromIndex)
1374+
remove.style.display = 'block';
1375+
else
1376+
remove.style.display = 'none';
1377+
1378+
remove.setAttribute('onclick', 'dom.removeComic(\''+escapeQuotes(escapeBackSlash(path), 'simples')+'\');');
1379+
1380+
// Open file location
1381+
let openFileLocation = document.querySelector('#index-context-menu .context-menu-open-file-location');
1382+
openFileLocation.setAttribute('onclick', 'electron.shell.showItemInFolder(\''+escapeQuotes(escapeBackSlash(fileManager.firstCompressedFile(path)), 'simples')+'\');');
1383+
13691384
events.activeContextMenu('#index-context-menu');
13701385
}
13711386

templates/index.content.right.list.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{{/if}}
99
<div class="content-view-list">
1010
{{#each comics}}
11-
<div class="medium-list body-medium{{#unless folder}} sha-{{sha}}{{/unless}} gamepad-item{{#if @first}} gamepad-to-highlight{{/if}}" onclick="{{#if folder}}dom.loadIndexPage(true, '{{chain 'escapeBackSlash' 'escapeQuotesSimples' path}}', false, false, '{{chain 'escapeBackSlash' 'escapeQuotesSimples' mainPath}}'){{else}}dom.openComic(true, '{{chain 'escapeBackSlash' 'escapeQuotesSimples' path}}', '{{chain 'escapeBackSlash' 'escapeQuotesSimples' mainPath}}');{{/if}}"{{#if @root.comicsIndex}} oncontextmenu="dom.comicContextMenu('{{chain 'escapeBackSlash' 'escapeQuotesSimples' mainPath}}')"{{/if}}>
11+
<div class="medium-list body-medium{{#unless folder}} sha-{{sha}}{{/unless}} gamepad-item{{#if @first}} gamepad-to-highlight{{/if}}" onclick="{{#if folder}}dom.loadIndexPage(true, '{{chain 'escapeBackSlash' 'escapeQuotesSimples' path}}', false, false, '{{chain 'escapeBackSlash' 'escapeQuotesSimples' mainPath}}'){{else}}dom.openComic(true, '{{chain 'escapeBackSlash' 'escapeQuotesSimples' path}}', '{{chain 'escapeBackSlash' 'escapeQuotesSimples' mainPath}}');{{/if}}" oncontextmenu="dom.comicContextMenu('{{chain 'escapeBackSlash' 'escapeQuotesSimples' path}}', {{#if @root.comicsIndex}}true{{else}}false{{/if}})">
1212
<div class="{{#if folder}}icon-24 material-icon{{else}}medium-list-image{{/if}} item-image"{{#unless folder}} style="background-image: url({{chain 'escapeBackSlash' 'escapeQuotesSimples' thumbnail}});"{{/unless}}>{{#if folder}}folder{{/if}}</div>
1313
<div class="medium-list-text">{{name}}</div>
1414
</div>

templates/index.content.right.module.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{{/if}}
99
<div class="content-view-module">
1010
{{#each comics}}
11-
<div class="sha-{{sha}} gamepad-item{{#if @first}} gamepad-to-highlight{{/if}}" onclick="{{#if folder}}dom.loadIndexPage(true, '{{chain 'escapeBackSlash' 'escapeQuotesSimples' path}}', false, false, '{{chain 'escapeBackSlash' 'escapeQuotesSimples' mainPath}}'){{else}}dom.openComic(true, '{{chain 'escapeBackSlash' 'escapeQuotesSimples' path}}', '{{chain 'escapeBackSlash' 'escapeQuotesSimples' mainPath}}');{{/if}}"{{#if @root.comicsIndex}} oncontextmenu="dom.comicContextMenu('{{chain 'escapeBackSlash' 'escapeQuotesSimples' mainPath}}')"{{/if}}>
11+
<div class="sha-{{sha}} gamepad-item{{#if @first}} gamepad-to-highlight{{/if}}" onclick="{{#if folder}}dom.loadIndexPage(true, '{{chain 'escapeBackSlash' 'escapeQuotesSimples' path}}', false, false, '{{chain 'escapeBackSlash' 'escapeQuotesSimples' mainPath}}'){{else}}dom.openComic(true, '{{chain 'escapeBackSlash' 'escapeQuotesSimples' path}}', '{{chain 'escapeBackSlash' 'escapeQuotesSimples' mainPath}}');{{/if}}" oncontextmenu="dom.comicContextMenu('{{chain 'escapeBackSlash' 'escapeQuotesSimples' path}}', {{#if @root.comicsIndex}}true{{else}}false{{/if}})">
1212
{{#if folder}}
1313
<div class="v-folder item-image">
1414
{{#if poster}}

templates/index.elements.menus.html

+8-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,15 @@
3939
</div>
4040

4141
<div class="menu" id="index-context-menu">
42-
<div class="menu-simple elevation-2" style="width: 164px;" onclick="events.desactiveMenu('#index-context-menu');">
42+
<div class="menu-simple elevation-2" onclick="events.desactiveMenu('#index-context-menu');">
4343
<div class="menu-simple-content">
44-
<div class="menu-simple-element context-menu-remove">
44+
45+
<div class="menu-simple-element menu-simple-element-little context-menu-open-file-location">
46+
<i class="material-icon menu-simple-icon-first">folder_open</i>
47+
{{language.global.contextMenu.openFileLocation}}
48+
</div>
49+
50+
<div class="menu-simple-element menu-simple-element-little context-menu-remove">
4551
<i class="material-icon menu-simple-icon-first">delete</i>
4652
{{language.global.contextMenu.remove}}
4753
</div>

templates/reading.elements.menus.tracking.sites.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<span>{{language.reading.tracking.favoriteSites}}</span>
1111
</div>
1212
{{#each favoriteTrackingSites}}
13-
<div class="menu-tracking-sites menu-simple-element menu-simple-element-medium gamepad-item" onclick="tracking.configTracking('{{key}}')">
13+
<div class="menu-tracking-sites menu-simple-element menu-simple-element-medium gamepad-item{{#if config.favorite}} favorite{{/if}}" onclick="tracking.configTracking('{{key}}')">
1414
<div class="menu-simple-element-image" style="background-image: url({{logo}})"></div>
1515
<span>{{name}}</span>
16-
<i class="material-icon menu-simple-icon-last" onclick="reading.trackingSiteToFavorite('{{key}}'); event.stopPropagation();">{{#if config.favorite}}favorite{{else}}favorite_border{{/if}}</i>
16+
<i class="material-icon menu-simple-icon-last" onclick="reading.trackingSiteToFavorite('{{key}}'); event.stopPropagation();">favorite</i>
1717
{{#if tracking.id}}<i class="material-icon">{{#if tracking.active}}sync{{else}}sync_disabled{{/if}}</i>{{/if}}
1818
</div>
1919
{{else}}
@@ -24,10 +24,10 @@
2424
<span>{{language.reading.tracking.sites}}</span>
2525
</div>
2626
{{#each trackingSites}}
27-
<div class="menu-tracking-sites menu-tracking-sites--{{key}} menu-simple-element menu-simple-element-medium gamepad-item" onclick="tracking.configTracking('{{key}}')">
27+
<div class="menu-tracking-sites menu-tracking-sites--{{key}} menu-simple-element menu-simple-element-medium gamepad-item{{#if config.favorite}} favorite{{/if}}" onclick="tracking.configTracking('{{key}}')">
2828
<div class="menu-simple-element-image" style="background-image: url({{logo}})"></div>
2929
<span>{{name}}</span>
30-
<i class="material-icon menu-simple-icon-last" onclick="reading.trackingSiteToFavorite('{{key}}'); event.stopPropagation();">{{#if config.favorite}}favorite{{else}}favorite_border{{/if}}</i>
30+
<i class="material-icon menu-simple-icon-last" onclick="reading.trackingSiteToFavorite('{{key}}'); event.stopPropagation();">favorite</i>
3131
{{#if tracking.id}}<i class="material-icon">{{#if tracking.active}}sync{{else}}sync_disabled{{/if}}</i>{{/if}}
3232
</div>
3333
{{/each}}

themes/material-design/actions.css

+16-11
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@
359359
z-index: 12;
360360
/*box-shadow: 0 0px 3px 1px rgba(0,0,0,0.14), 0 2px 3px rgba(0,0,0,0.14);*/
361361
display: none;
362-
padding: 12px 0px;
362+
padding: 8px 0px;
363363
font-size: 15px;
364364
overflow: auto;
365365
overflow-x: hidden;
@@ -416,9 +416,9 @@
416416

417417
.menu-simple-element
418418
{
419-
height: 32px;
419+
height: 40px;
420420
padding: 0px 24px;
421-
line-height: 32px;
421+
line-height: 40px;
422422
cursor: pointer;
423423
transition: 0.2s;
424424
text-overflow: ellipsis;
@@ -431,19 +431,23 @@
431431
.menu-simple-element i
432432
{
433433
float: right;
434-
padding: 4px 0px 4px 8px;
434+
padding: 8px 0px 8px 8px;
435435
}
436436

437437
.menu-simple-element i.menu-simple-icon-last
438438
{
439439
margin-right: -8px;
440+
position: relative;
441+
z-index: 2;
440442
}
441443

442444
.menu-simple-element i.menu-simple-icon-first
443445
{
444446
margin: 0px 0px 0px -2px;
445-
padding: 4px 20px 4px 0px;
447+
padding: 8px 12px 8px 0px;
446448
float: left;
449+
position: relative;
450+
z-index: 2;
447451
}
448452

449453
.menu-simple-element-icon2
@@ -500,11 +504,11 @@
500504
{
501505
height: 24px;
502506
width: 24px;
503-
border-radius: 4px;
507+
border-radius: 6px;
504508
background-repeat: no-repeat;
505509
background-position: center;
506510
background-size: cover;
507-
margin: 4px 6px 0px 0px;
511+
margin: 8px 6px 0px 0px;
508512
float: left;
509513
}
510514

@@ -522,11 +526,11 @@
522526
{
523527
height: 32px;
524528
width: 32px;
525-
border-radius: 4px;
529+
border-radius: 8px;
526530
background-repeat: no-repeat;
527531
background-position: center;
528532
background-size: cover;
529-
margin: 0px 6px 0px 0px;
533+
margin: 4px 6px 0px 0px;
530534
float: left;
531535
}
532536

@@ -822,7 +826,7 @@
822826
font-size: 20px;
823827
line-height: 28px;
824828
padding: 0px 0px;
825-
color: rgba(0, 0, 0, 0.87);
829+
color: var(--md-sys-color-on-surface);
826830
font-weight: 500;
827831
padding: 24px 24px 16px 24px;
828832
}
@@ -832,7 +836,7 @@
832836
font-size: 16px;
833837
line-height: 24px;
834838
padding: 0px 0px;
835-
color: rgba(0, 0, 0, 0.6);
839+
color: var(--md-sys-color-on-surface);
836840
font-weight: 500;
837841
padding: 0px 24px 0px 24px;
838842
}
@@ -1043,6 +1047,7 @@
10431047
transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
10441048
outline: none;
10451049
background-color: transparent;
1050+
color: var(--md-sys-color-on-surface);
10461051
}
10471052

10481053
.input:focus

themes/material-design/reading.css

+13-3
Original file line numberDiff line numberDiff line change
@@ -321,22 +321,27 @@
321321
.reading-bookmark, .menu-tracking-sites, .menu-tracking-sites-empty
322322
{
323323
padding: 0px 24px;
324-
color: #777;
324+
color: color-mix(in srgb, var(--md-sys-color-on-surface), transparent 50%);
325325
text-overflow: ellipsis;
326326
overflow: hidden;
327327
white-space: nowrap;
328328
word-wrap: normal;
329329
}
330330

331+
.reading-bookmark
332+
{
333+
padding: 4px 24px;
334+
}
335+
331336
.menu-tracking-sites
332337
{
333-
padding: 8px 24px;
338+
padding: 6px 24px;
334339
}
335340

336341
.reading-bookmark > span, .menu-tracking-sites > span, .menu-tracking-sites-empty > span
337342
{
338343
padding-right: 6px;
339-
color: #333;
344+
color: var(--md-sys-color-on-surface);
340345
}
341346

342347
.menu-tracking-sites > span
@@ -365,6 +370,11 @@
365370
float: left;
366371
}
367372

373+
.menu-tracking-sites.favorite i.menu-simple-icon-last
374+
{
375+
font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
376+
}
377+
368378
/* Tracking */
369379

370380
.tracking-search

themes/material-design/theme.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ body .preload
882882
.menu-simple-separator-min
883883
{
884884
margin-left: 24px;
885-
width: calc(100% - 24px)
885+
width: calc(100% - 48px)
886886
}
887887

888888
.dialog-text .menu-simple-separator

0 commit comments

Comments
 (0)