mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-19 13:38:06 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
3579a45831
11 changed files with 48 additions and 0 deletions
|
|
@ -307,6 +307,14 @@ export const repos = {
|
|||
<option value="3" ${window.siyuan.config.sync.mode === 3 ? "selected" : ""}>${window.siyuan.languages.syncMode3}</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.syncPerception}
|
||||
<div class="b3-label__text">${window.siyuan.languages.syncPerceptionTip}</div>
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input type="checkbox" id="syncPerception"${window.siyuan.config.sync.perception ? " checked='checked'" : ""} class="b3-switch fn__flex-center">
|
||||
</label>
|
||||
<div class="b3-label">
|
||||
<label class="fn__flex config__item">
|
||||
<div class="fn__flex-center">${window.siyuan.languages.cloudSyncDir}</div>
|
||||
|
|
@ -337,6 +345,13 @@ export const repos = {
|
|||
processSync();
|
||||
});
|
||||
});
|
||||
const syncPerceptionElement = repos.element.querySelector("#syncPerception") as HTMLInputElement;
|
||||
syncPerceptionElement.addEventListener("change", () => {
|
||||
fetchPost("/api/sync/setSyncPerception", {enabled: syncPerceptionElement.checked}, () => {
|
||||
window.siyuan.config.sync.perception = syncPerceptionElement.checked;
|
||||
processSync();
|
||||
});
|
||||
});
|
||||
const switchConflictElement = repos.element.querySelector("#generateConflictDoc") as HTMLInputElement;
|
||||
switchConflictElement.addEventListener("change", () => {
|
||||
fetchPost("/api/sync/setSyncGenerateConflictDoc", {enabled: switchConflictElement.checked}, () => {
|
||||
|
|
|
|||
1
app/src/types/index.d.ts
vendored
1
app/src/types/index.d.ts
vendored
|
|
@ -519,6 +519,7 @@ interface IConfig {
|
|||
sync: {
|
||||
generateConflictDoc: boolean
|
||||
enabled: boolean
|
||||
perception: boolean
|
||||
mode: number
|
||||
synced: number
|
||||
stat: string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue