Skip to content

Commit 6c36715

Browse files
committed
feat: ✨ 增加「重载当前错误图片」快捷键,默认为「R」键
#311
1 parent 4d21e12 commit 6c36715

7 files changed

Lines changed: 13 additions & 1 deletion

File tree

locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"jump_to_home": "Jump to the first page",
5656
"page_down": "Turn the page to the down",
5757
"page_up": "Turn the page to the up",
58+
"reload_current_error_img": "Reload current error image",
5859
"repeat_tip": "This hotkey has been bound to \"{{hotkey}}\"",
5960
"scroll_down": "Scroll down",
6061
"scroll_left": "Scroll left",

locales/hu.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"jump_to_home": "跳至首页",
5656
"page_down": "向下翻页",
5757
"page_up": "向上翻页",
58+
"reload_current_error_img": "Jelenlegi hibás kép újratöltése",
5859
"repeat_tip": "Ez a gyorsbillentyű a \"{{hotkey}}\" gombhoz van rendelve",
5960
"scroll_down": "向下滚动",
6061
"scroll_left": "向左滚动",

locales/ru.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"jump_to_home": "Перейти к первой странице",
5656
"page_down": "Перелистнуть страницу вниз",
5757
"page_up": "Перелистнуть страницу вверх",
58+
"reload_current_error_img": "Перезагрузить текущее ошибочное изображение",
5859
"repeat_tip": "Эта горячая клавиша была назначена на \"{{hotkey}}\"",
5960
"scroll_down": "Прокрутить вниз",
6061
"scroll_left": "Прокрутить влево",

locales/ta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"jump_to_home": "முகப்புப்பக்கத்திற்கு செல்லவும்",
5656
"page_down": "பக்கங்கள் கீழே",
5757
"page_up": "பக்கங்கள் மேலே",
58+
"reload_current_error_img": "தற்போதைய பிழை படத்தை மீண்டும் ஏற்றவும்",
5859
"repeat_tip": "இந்த விரைவு விசை \"{{hotkey}}\" க்கு பிணைக்கப்பட்டுள்ளது",
5960
"scroll_down": "கீழே உருட்டவும்",
6061
"scroll_left": "இடதுபுறத்தில் உருட்டவும்",

locales/zh.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"jump_to_home": "跳至首页",
5656
"page_down": "向下翻页",
5757
"page_up": "向上翻页",
58+
"reload_current_error_img": "重载当前错误图片",
5859
"repeat_tip": "此快捷键已被绑定至「{{hotkey}}」",
5960
"scroll_down": "向下滚动",
6061
"scroll_left": "向左滚动",

src/components/Manga/actions/hotkeys.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export const [defaultHotkeys, setDefaultHotkeys] = createSignal<
2929
auto_scroll: [],
3030
jump_next: [],
3131
jump_prev: [],
32+
reload_current_error_img: ['r'],
3233
});
3334

3435
/** 快捷键配置 */

src/components/Manga/actions/operate.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import { approx, getKeyboardCode } from 'helper';
22

33
import classes from '../index.module.css';
44
import { setState, store } from '../store';
5-
import { openScrollLock, setOption } from './helper';
5+
import { getImg, openScrollLock, setOption } from './helper';
66
import { hotkeysMap } from './hotkeys';
7+
import { reloadImg } from './imageLoad';
78
import {
89
abreastScrollFill,
910
findTopPage,
@@ -16,6 +17,7 @@ import {
1617
setAbreastScrollFill,
1718
} from './memo';
1819
import { handleTrackpadWheel } from './pointer';
20+
import { showImgList } from './renderPage';
1921
import { constantScroll, scrollBy, scrollTo } from './scroll';
2022
import { handleScrollModeZoom } from './scrollMode';
2123
import {
@@ -222,6 +224,10 @@ export const handleHotkey = (hotkey: string, e?: KeyboardEvent) => {
222224
draftOption.disableZoom = !draftOption.disableZoom;
223225
});
224226

227+
case 'reload_current_error_img':
228+
for (const i of showImgList()) reloadImg(getImg(i).src);
229+
return;
230+
225231
case 'exit':
226232
return store.prop.onExit?.();
227233

0 commit comments

Comments
 (0)