feat: Claude
This commit is contained in:
parent
e4c6b14576
commit
b8377cbb80
@ -8,6 +8,7 @@ const Store = (function() {
|
||||
THEME: 'novel_reader_theme',
|
||||
FONT_SIZE: 'novel_reader_font_size',
|
||||
LINE_HEIGHT: 'novel_reader_line_height',
|
||||
READ_MODE: 'novel_reader_read_mode', // 阅读模式: 'page'(翻页) | 'scroll'(滚动)
|
||||
READING_POSITION: 'novel_reader_position_',
|
||||
SHELF_CACHE: 'novel_reader_shelf_cache',
|
||||
HISTORY_CACHE: 'novel_reader_history_cache',
|
||||
@ -21,7 +22,8 @@ const Store = (function() {
|
||||
const DEFAULTS = {
|
||||
theme: 'dark',
|
||||
fontSize: 18,
|
||||
lineHeight: 1.8
|
||||
lineHeight: 1.8,
|
||||
readMode: 'page' // 默认左右翻页模式
|
||||
};
|
||||
|
||||
// ========== 基础存储方法 ==========
|
||||
@ -98,6 +100,20 @@ const Store = (function() {
|
||||
set(KEYS.LINE_HEIGHT, height);
|
||||
}
|
||||
|
||||
// ========== 阅读模式设置 ==========
|
||||
|
||||
function getReadMode() {
|
||||
return get(KEYS.READ_MODE, DEFAULTS.readMode);
|
||||
}
|
||||
|
||||
function setReadMode(mode) {
|
||||
// mode: 'page' (左右翻页) | 'scroll' (上下滚动)
|
||||
if (mode === 'page' || mode === 'scroll') {
|
||||
set(KEYS.READ_MODE, mode);
|
||||
}
|
||||
return getReadMode();
|
||||
}
|
||||
|
||||
// ========== 阅读位置缓存 ==========
|
||||
|
||||
function getReadingPosition(novelId) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user