mirror of
https://github.com/go-shiori/shiori.git
synced 2025-09-16 18:05:39 +08:00
Add option for set default archival method
This commit is contained in:
parent
7bdebf3108
commit
fde91e5edd
6 changed files with 20 additions and 7 deletions
File diff suppressed because one or more lines are too long
|
@ -107,12 +107,14 @@
|
||||||
var opts = JSON.parse(localStorage.getItem("shiori-setting")) || {},
|
var opts = JSON.parse(localStorage.getItem("shiori-setting")) || {},
|
||||||
showId = (typeof opts.showId === "boolean") ? opts.showId : false,
|
showId = (typeof opts.showId === "boolean") ? opts.showId : false,
|
||||||
listMode = (typeof opts.listMode === "boolean") ? opts.listMode : false,
|
listMode = (typeof opts.listMode === "boolean") ? opts.listMode : false,
|
||||||
nightMode = (typeof opts.nightMode === "boolean") ? opts.nightMode : false;
|
nightMode = (typeof opts.nightMode === "boolean") ? opts.nightMode : false,
|
||||||
|
useArchive = (typeof opts.useArchive === "boolean") ? opts.useArchive : false;
|
||||||
|
|
||||||
this.displayOptions = {
|
this.displayOptions = {
|
||||||
showId: showId,
|
showId: showId,
|
||||||
listMode: listMode,
|
listMode: listMode,
|
||||||
nightMode: nightMode,
|
nightMode: nightMode,
|
||||||
|
useArchive: useArchive,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,6 +7,7 @@ export default {
|
||||||
showId: false,
|
showId: false,
|
||||||
listMode: false,
|
listMode: false,
|
||||||
nightMode: false,
|
nightMode: false,
|
||||||
|
useArchive: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,7 +266,8 @@ export default {
|
||||||
}, {
|
}, {
|
||||||
name: "createArchive",
|
name: "createArchive",
|
||||||
label: "Create archive",
|
label: "Create archive",
|
||||||
type: "check"
|
type: "check",
|
||||||
|
value: this.displayOptions.useArchive,
|
||||||
}],
|
}],
|
||||||
mainText: "OK",
|
mainText: "OK",
|
||||||
secondText: "Cancel",
|
secondText: "Cancel",
|
||||||
|
@ -499,7 +500,8 @@ export default {
|
||||||
fields: [{
|
fields: [{
|
||||||
name: "createArchive",
|
name: "createArchive",
|
||||||
label: "Update archive as well",
|
label: "Update archive as well",
|
||||||
type: "check"
|
type: "check",
|
||||||
|
value: this.displayOptions.useArchive,
|
||||||
}],
|
}],
|
||||||
mainText: "Yes",
|
mainText: "Yes",
|
||||||
secondText: "No",
|
secondText: "No",
|
||||||
|
|
|
@ -16,6 +16,10 @@ var template = `
|
||||||
<input type="checkbox" v-model="displayOptions.nightMode" @change="saveSetting">
|
<input type="checkbox" v-model="displayOptions.nightMode" @change="saveSetting">
|
||||||
Use dark theme
|
Use dark theme
|
||||||
</label>
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" v-model="displayOptions.useArchive" @change="saveSetting">
|
||||||
|
Create archive by default
|
||||||
|
</label>
|
||||||
</details>
|
</details>
|
||||||
<details open class="setting-group" id="setting-accounts">
|
<details open class="setting-group" id="setting-accounts">
|
||||||
<summary>Accounts</summary>
|
<summary>Accounts</summary>
|
||||||
|
@ -62,6 +66,7 @@ export default {
|
||||||
showId: this.displayOptions.showId,
|
showId: this.displayOptions.showId,
|
||||||
listMode: this.displayOptions.listMode,
|
listMode: this.displayOptions.listMode,
|
||||||
nightMode: this.displayOptions.nightMode,
|
nightMode: this.displayOptions.nightMode,
|
||||||
|
useArchive: this.displayOptions.useArchive,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadAccounts() {
|
loadAccounts() {
|
||||||
|
|
|
@ -584,10 +584,13 @@ body {
|
||||||
#setting-display {
|
#setting-display {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column nowrap;
|
flex-flow: column nowrap;
|
||||||
padding-bottom: 8px;
|
|
||||||
|
|
||||||
summary {
|
&[open] {
|
||||||
margin-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
|
|
||||||
|
summary {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
|
|
Loading…
Add table
Reference in a new issue