diff --git a/core/assets/value/String.js b/core/assets/value/String.js index 2376802..6e1b22b 100644 --- a/core/assets/value/String.js +++ b/core/assets/value/String.js @@ -59,6 +59,16 @@ export default { en: 'If too big, the program will be slow', jp: '大きすぎると、プログラムは遅くなります' }, + reloadNum: { + cn: '重载次数', + en: 'reload quantity', + jp: 'リロード回数', + }, + reloadNumTip: { + cn: '设置过大可能会触发exhentai保护', + jp: '設定値が大きすぎると、エクスエンタイプロテクションが発動する可能性があります。', + en: 'Setting too large may trigger exhentai protection', + }, thumbView: { cn: '缩略图栏', en: 'Thumbnail', diff --git a/core/components/PageView.vue b/core/components/PageView.vue index cb8ea19..98ca36a 100644 --- a/core/components/PageView.vue +++ b/core/components/PageView.vue @@ -87,7 +87,8 @@ export default { reloadTimes: 0, message: '', curLoadStatus: null, - previewStyle: {} + previewStyle: {}, + changeReloadNum: 0, }; }, @@ -104,7 +105,7 @@ export default { }, computed: { - ...mapGetters(['string']), + ...mapGetters(['string', 'reloadNum']), tags: () => tags, loadingInfo() { let reloadInfo = this.reloadTimes ? `[${this.string.reload}-${this.reloadTimes}] ` : ''; @@ -184,6 +185,12 @@ export default { this.imgPageInfo.isFirstLoad = false; Logger.logText('LOADING', 'reloading image'); this.getNewImgSrc(tags.MODE_FAST); + } else if (this.reloadNum && this.changeReloadNum <= this.reloadNum) { + this.changeReloadNum++; + Logger.logText('LOADING', 'change reloading image'); + this.getNewImgSrc(tags.MODE_CHANGE_SOURCE) + } else { + this.changeReloadNum = 0; } } }, diff --git a/core/components/TopBar.vue b/core/components/TopBar.vue index 341ab3a..3ba45da 100644 --- a/core/components/TopBar.vue +++ b/core/components/TopBar.vue @@ -143,7 +143,8 @@ export default { 'wheelSensitivity', 'wheelDirection', 'scrolledPageMargin', - 'oddEven' + 'oddEven', + 'reloadNum' ]), floatBtnStyle() { return { @@ -333,6 +334,28 @@ export default { list: [{ name: this.string.rtl, sname: 'RTL', val: 0 }, { name: this.string.ltr, sname: 'LTR', val: 1 }], change: (val) => SettingService.setBookDirection(val) }); + // reload + const reloadNumConfig = getSliderSelect({ + id: 'reloadNum', + title: this.string.reloadNum, + tip: this.string.reloadNumTip, + show: true, + curValTitle: this.reloadNum + '次', + list: [ + { name: '0次', val: 0 }, + { name: '1次', val: 1 }, + { name: '2次', val: 2 }, + { name: '3次', val: 3 }, + { name: '4次', val: 5 }, + { name: this.string.custom, val: 0 } + ], + sliderMin: 1, + sliderMax: 10, + sliderStep: 1, + isFloat: false, + curVal: this.reloadNum, + change: (val) => SettingService.setReloadNum(val) + }); // pagination const paginationConfig = { title: this.string.pagination, @@ -473,6 +496,7 @@ export default { loadNumConfig, volSizeConfig, thumbViewConfig, + reloadNumConfig, screenSizeConfig, bookDirectionConfig, paginationConfig, diff --git a/core/launcher.js b/core/launcher.js index a1cabd1..0f0ebf5 100644 --- a/core/launcher.js +++ b/core/launcher.js @@ -1,4 +1,4 @@ -import app from './App.vue' +import app from './app.vue' let service = {} let config = {} diff --git a/core/service/SettingService.ts b/core/service/SettingService.ts index 1617621..ed71793 100644 --- a/core/service/SettingService.ts +++ b/core/service/SettingService.ts @@ -19,6 +19,7 @@ class SettingService { toggleEHunter: { val: true }, toggleThumbView: { eventName: 'toggleThumbView', val: true }, loadNum: { eventName: 'setLoadNum', val: 3 }, + reloadNum: { eventName: 'setReloadNum', val: 0 }, volumeSize: { eventName: 'setVolumeSize', val: 50 }, showBookScreenAnimation: { eventName: 'setBookScreenAnimation', val: false }, showBookPagination: { eventName: 'setBookPagination', val: true }, @@ -144,6 +145,14 @@ class SettingService { return await this._getSettingItem('loadNum'); } + async setReloadNum(val) { + await this._setSettingItem('reloadNum', val); + } + + async getReloadNum() { + return await this._getSettingItem('reloadNum'); + } + async setVolumeSize(val) { await this._setSettingItem('volumeSize', val); } diff --git a/core/service/StringService.ts b/core/service/StringService.ts index 1c3c7c2..2e0806c 100644 --- a/core/service/StringService.ts +++ b/core/service/StringService.ts @@ -1,4 +1,4 @@ -import string from '../assets/value/string' +import string from '../assets/value/String' import instruction from '../assets/value/instruction' import bookInstruction from '../assets/value/bookInstruction' import version from '../assets/value/version' diff --git a/core/store/modules/AlbumView.js b/core/store/modules/AlbumView.js index 034d7d5..b699d43 100644 --- a/core/store/modules/AlbumView.js +++ b/core/store/modules/AlbumView.js @@ -19,7 +19,8 @@ const state = { toggleSyncScroll: true, // unused showTopBar: true, loadNum: 3, // the sum of pages per loading - scrolledPageMargin: 70 + scrolledPageMargin: 70, + reloadNum: 0, }, book: { bookIndex: 0, // index of screens @@ -48,6 +49,7 @@ const getters = { showTopBar: state => state.album.showTopBar, topBarHeight: state => state.topBarHeight, loadNum: state => state.album.loadNum, + reloadNum: state => state.album.reloadNum, volumeSize: state => state.volumeSize, curVolume: state => { let remainder = state.curIndex.val % state.volumeSize; @@ -96,6 +98,7 @@ const actions = { toggleSyncScroll: ({ commit }, isActive) => commit(types.TOGGLE_SYNC_SCROLL, { isActive }), toggleTopBar: ({ commit }, show) => commit(types.TOGGLE_SHOW_TOP_BAR, { show }), setLoadNum: ({ commit }, num) => commit(types.SET_LOAD_NUM, { num }), + setReloadNum: ({ commit }, num) => commit(types.SET_RELOAD_NUM, { num }), setVolumeSize: ({ commit }, num) => commit(types.SET_VOLUME_SIZE, { num }), setBookIndex: ({ commit }, index) => commit(types.SET_BOOK_INDEX, { index }), setReadingMode: ({ commit }, mode) => commit(types.SET_READING_MODE, { mode }), @@ -147,6 +150,9 @@ const mutations = { [types.SET_LOAD_NUM](state, { num }) { state.album.loadNum = num; }, + [types.SET_RELOAD_NUM](state, { num }) { + state.album.reloadNum = num; + }, [types.SET_VOLUME_SIZE](state, { num }) { state.volumeSize = num; state.curIndex.val = 0; diff --git a/core/store/mutation-types.js b/core/store/mutation-types.js index 8f8a13d..a4484a0 100644 --- a/core/store/mutation-types.js +++ b/core/store/mutation-types.js @@ -18,6 +18,7 @@ export const TOGGLE_THUMB_VIEW = 'TOGGLE_THUMB_VIEW' export const TOGGLE_SYNC_SCROLL = 'TOGGLE_SYNC_SCROLL' export const TOGGLE_SHOW_TOP_BAR = 'TOGGLE_SHOW_TOP_BAR' export const SET_LOAD_NUM = 'SET_LOAD_NUM' +export const SET_RELOAD_NUM = 'SET_REOAD_NUM' export const SET_VOLUME_SIZE = 'SET_VOLUME_SIZE' export const SET_BOOK_INDEX = 'SET_BOOK_INDEX' export const SET_READING_MODE = 'SET_READING_MODE' diff --git a/package.json b/package.json index dc4adef..5cddc4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ehunter", - "version": "2.6.1", + "version": "2.7.3", "description": "A Vue.js project", "author": "Alex Chen ", "private": true, diff --git a/src/config.js b/src/config.js index f284ee0..072f22c 100644 --- a/src/config.js +++ b/src/config.js @@ -1,5 +1,5 @@ module.exports = { - version: '2.7.2', + version: '2.7.3', homePage: 'https://github.com/hanFengSan/eHunter', email: 'c360785655@gmail.com', updateServer1: 'https://jp.animesales.xyz/ehunter/update.json', diff --git a/update.json b/update.json index dfc76f9..4ead420 100644 --- a/update.json +++ b/update.json @@ -1,9 +1,9 @@ { "cn":{ - "title":"新版本: v2.7.2", - "version":"2.7.2", - "text":"1. 修复图片比例问题(韩漫最为明显),可能会有些页面抖动 2. 修复对nhentai的支持", - "time":1571736652834, + "title":"新版本: v2.7.3", + "version":"2.7.3", + "text":"1. 增加重载次数支持", + "time":1684652364348, "duration":604800000, "always":true, "operations":[ @@ -14,10 +14,10 @@ ] }, "en":{ - "title":"New version: v2.7.2", - "version":"2.7.2", - "text":"1. Fixed image ratio problems 2. Fixed the support of nhentai", - "time":1571736652834, + "title":"New version: v2.7.3", + "version":"2.7.3", + "text":"1. add setting reload num", + "time":1684652364348, "duration":604800000, "always":true, "operations":[ @@ -28,10 +28,10 @@ ] }, "jp":{ - "title":"新しいバージョン: v2.7.2", - "version":"2.7.2", - "text":"1. Fixed image ratio problems 2. Fixed the support of nhentai", - "time":1571736652834, + "title":"新しいバージョン: v2.7.3", + "version":"2.7.3", + "text":"1. リロード回数サポートの追加", + "time":1684652364348, "duration":604800000, "always":true, "operations":[