mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-30 04:05:16 +01:00
🎨 Use Endpoint for network connectivity checks when syncing with third-party cloud providers https://github.com/siyuan-note/siyuan/issues/7805
This commit is contained in:
parent
bdf621f8c5
commit
05daece0d1
7 changed files with 43 additions and 61 deletions
|
|
@ -93,11 +93,6 @@ const renderProvider = (provider: number) => {
|
|||
<option ${window.siyuan.config.sync.s3.skipTlsVerify ? "" : "selected"} value="false">Verify</option>
|
||||
<option ${window.siyuan.config.sync.s3.skipTlsVerify ? "selected" : ""} value="true">Skip</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="b3-label b3-label--noborder fn__flex config__item">
|
||||
<div class="fn__flex-center fn__size200">Connectivity Check URL</div>
|
||||
<div class="fn__space"></div>
|
||||
<input id="checkURL" class="b3-text-field fn__block" value="${window.siyuan.config.sync.s3.checkURL}">
|
||||
</label>`;
|
||||
} else if (provider === 3) {
|
||||
const tip = `<div class="b3-label b3-label--inner">
|
||||
|
|
@ -138,11 +133,6 @@ const renderProvider = (provider: number) => {
|
|||
<option ${window.siyuan.config.sync.webdav.skipTlsVerify ? "" : "selected"} value="false">Verify</option>
|
||||
<option ${window.siyuan.config.sync.webdav.skipTlsVerify ? "selected" : ""} value="true">Skip</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="b3-label b3-label--noborder fn__flex config__item">
|
||||
<div class="fn__flex-center fn__size200">Connectivity Check URL</div>
|
||||
<div class="fn__space"></div>
|
||||
<input id="checkURL" class="b3-text-field fn__block" value="${window.siyuan.config.sync.webdav.checkURL}">
|
||||
</label>`;
|
||||
}
|
||||
return "";
|
||||
|
|
@ -227,7 +217,6 @@ const bindProviderEvent = () => {
|
|||
region: (providerPanelElement.querySelector("#region") as HTMLInputElement).value,
|
||||
skipTlsVerify: (providerPanelElement.querySelector("#s3SkipTlsVerify") as HTMLInputElement).value === "true",
|
||||
timeout: timeout,
|
||||
checkURL: (providerPanelElement.querySelector("#checkURL") as HTMLInputElement).value,
|
||||
};
|
||||
fetchPost("/api/sync/setSyncProviderS3", {s3}, () => {
|
||||
window.siyuan.config.sync.s3 = s3;
|
||||
|
|
@ -247,7 +236,6 @@ const bindProviderEvent = () => {
|
|||
password: (providerPanelElement.querySelector("#password") as HTMLInputElement).value,
|
||||
skipTlsVerify: (providerPanelElement.querySelector("#webdavSkipTlsVerify") as HTMLInputElement).value === "true",
|
||||
timeout: timeout,
|
||||
checkURL: (providerPanelElement.querySelector("#checkURL") as HTMLInputElement).value,
|
||||
};
|
||||
fetchPost("/api/sync/setSyncProviderWebDAV", {webdav}, () => {
|
||||
window.siyuan.config.sync.webdav = webdav;
|
||||
|
|
|
|||
2
app/src/types/index.d.ts
vendored
2
app/src/types/index.d.ts
vendored
|
|
@ -433,7 +433,6 @@ declare interface IConfig {
|
|||
region: string
|
||||
skipTlsVerify: boolean
|
||||
timeout: number
|
||||
checkURL: string
|
||||
}
|
||||
webdav: {
|
||||
endpoint: string
|
||||
|
|
@ -441,7 +440,6 @@ declare interface IConfig {
|
|||
password: string
|
||||
skipTlsVerify: boolean
|
||||
timeout: number
|
||||
checkURL: string
|
||||
}
|
||||
},
|
||||
lang: string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue