Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions core/assets/value/String.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
11 changes: 9 additions & 2 deletions core/components/PageView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ export default {
reloadTimes: 0,
message: '',
curLoadStatus: null,
previewStyle: {}
previewStyle: {},
changeReloadNum: 0,
};
},

Expand All @@ -104,7 +105,7 @@ export default {
},

computed: {
...mapGetters(['string']),
...mapGetters(['string', 'reloadNum']),
tags: () => tags,
loadingInfo() {
let reloadInfo = this.reloadTimes ? `[${this.string.reload}-${this.reloadTimes}] ` : '';
Expand Down Expand Up @@ -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;
}
}
},
Expand Down
26 changes: 25 additions & 1 deletion core/components/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ export default {
'wheelSensitivity',
'wheelDirection',
'scrolledPageMargin',
'oddEven'
'oddEven',
'reloadNum'
]),
floatBtnStyle() {
return {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -473,6 +496,7 @@ export default {
loadNumConfig,
volSizeConfig,
thumbViewConfig,
reloadNumConfig,
screenSizeConfig,
bookDirectionConfig,
paginationConfig,
Expand Down
2 changes: 1 addition & 1 deletion core/launcher.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import app from './App.vue'
import app from './app.vue'

let service = {}
let config = {}
Expand Down
9 changes: 9 additions & 0 deletions core/service/SettingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion core/service/StringService.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
8 changes: 7 additions & 1 deletion core/store/modules/AlbumView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 }),
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions core/store/mutation-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ehunter",
"version": "2.6.1",
"version": "2.7.3",
"description": "A Vue.js project",
"author": "Alex Chen <c360785655@gmail.com>",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
24 changes: 12 additions & 12 deletions update.json
Original file line number Diff line number Diff line change
@@ -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":[
Expand All @@ -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":[
Expand All @@ -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":[
Expand Down