mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 07:18:49 +01:00
This commit is contained in:
parent
3932d1cf0c
commit
5422bc4ffb
5 changed files with 50 additions and 25 deletions
|
|
@ -83,10 +83,9 @@ export const getSyncCloudList = (cloudPanelElement: Element, reload = false, cb?
|
|||
return;
|
||||
}
|
||||
fetchPost("/api/sync/listCloudSyncDir", {}, (response) => {
|
||||
let syncListHTML = `<div class="fn__hr"></div><ul><li style="padding: 0 16px" class="b3-list--empty">${window.siyuan.languages.emptyCloudSyncList}</li></ul>`;
|
||||
let syncListHTML = `<ul><li style="padding: 0 16px" class="b3-list--empty">${window.siyuan.languages.emptyCloudSyncList}</li></ul>`;
|
||||
if (response.code === 1) {
|
||||
syncListHTML = `<div class="fn__hr"></div>
|
||||
<ul>
|
||||
syncListHTML = `<ul>
|
||||
<li class="b3-list--empty ft__error">
|
||||
${response.msg}
|
||||
</li>
|
||||
|
|
@ -95,7 +94,7 @@ export const getSyncCloudList = (cloudPanelElement: Element, reload = false, cb?
|
|||
</li>
|
||||
</ul>`;
|
||||
} else if (response.code !== 1) {
|
||||
syncListHTML = '<div class="fn__hr"></div><ul class="b3-list b3-list--background fn__flex-1" style="overflow: auto;">';
|
||||
syncListHTML = '<ul class="b3-list b3-list--background fn__flex-1" style="overflow: auto;">';
|
||||
response.data.syncDirs.forEach((item: { hSize: string, cloudName: string, updated: string }) => {
|
||||
/// #if MOBILE
|
||||
syncListHTML += `<li data-type="selectCloud" data-name="${item.cloudName}" class="b3-list-item b3-list-item--two">
|
||||
|
|
@ -115,7 +114,7 @@ export const getSyncCloudList = (cloudPanelElement: Element, reload = false, cb?
|
|||
</div>
|
||||
</li>`;
|
||||
/// #else
|
||||
syncListHTML += `<li data-type="selectCloud" data-name="${item.cloudName}" class="b3-list-item b3-list-item--hide-action">
|
||||
syncListHTML += `<li data-type="selectCloud" data-name="${item.cloudName}" class="b3-list-item b3-list-item--narrow b3-list-item--hide-action">
|
||||
<input type="radio" name="cloudName"${item.cloudName === response.data.checkedSyncDir ? " checked" : ""}/>
|
||||
<span class="fn__space"></span>
|
||||
<span>${item.cloudName}</span>
|
||||
|
|
@ -236,6 +235,7 @@ const setSync = (key?: string, dialog?: Dialog) => {
|
|||
if (!window.siyuan.config.sync.enabled) {
|
||||
const listHTML = `<div class="b3-dialog__content">
|
||||
<div class="ft__on-surface">${window.siyuan.languages.syncConfGuide3}</div>
|
||||
<div class="fn__hr--b"></div>
|
||||
<div style="display: flex;flex-direction: column;height: 40vh;">
|
||||
<img style="margin: 0 auto;display: block;width: 64px;height: 100%" src="/stage/loading-pure.svg">
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue