|
@@ -99,6 +99,11 @@ const renderProvider = (provider: number) => {
|
|
<option ${window.siyuan.config.sync.s3.skipTlsVerify ? "selected" : ""} value="true">Skip</option>
|
|
<option ${window.siyuan.config.sync.s3.skipTlsVerify ? "selected" : ""} value="true">Skip</option>
|
|
</select>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
+<div class="b3-label b3-label--inner fn__flex">
|
|
|
|
+ <div class="fn__flex-center fn__size200">Concurrent Reqs</div>
|
|
|
|
+ <div class="fn__space"></div>
|
|
|
|
+ <input id="s3ConcurrentReqs" class="b3-text-field fn__block" type="number" min="1" max="16" value="${window.siyuan.config.sync.s3.concurrentReqs}">
|
|
|
|
+</div>
|
|
<div class="b3-label b3-label--inner fn__flex">
|
|
<div class="b3-label b3-label--inner fn__flex">
|
|
<div class="fn__flex-1"></div>
|
|
<div class="fn__flex-1"></div>
|
|
<button class="b3-button b3-button--outline fn__size200" data-action="purgeData">
|
|
<button class="b3-button b3-button--outline fn__size200" data-action="purgeData">
|
|
@@ -153,6 +158,11 @@ const renderProvider = (provider: number) => {
|
|
<option ${window.siyuan.config.sync.webdav.skipTlsVerify ? "selected" : ""} value="true">Skip</option>
|
|
<option ${window.siyuan.config.sync.webdav.skipTlsVerify ? "selected" : ""} value="true">Skip</option>
|
|
</select>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
+<div class="b3-label b3-label--inner fn__flex">
|
|
|
|
+ <div class="fn__flex-center fn__size200">Concurrent Reqs</div>
|
|
|
|
+ <div class="fn__space"></div>
|
|
|
|
+ <input id="webdavConcurrentReqs" class="b3-text-field fn__block" type="number" min="1" max="16" value="${window.siyuan.config.sync.webdav.concurrentReqs}">
|
|
|
|
+</div>
|
|
<div class="b3-label b3-label--inner fn__flex">
|
|
<div class="b3-label b3-label--inner fn__flex">
|
|
<div class="fn__flex-1"></div>
|
|
<div class="fn__flex-1"></div>
|
|
<button class="b3-button b3-button--outline fn__size200" data-action="purgeData">
|
|
<button class="b3-button b3-button--outline fn__size200" data-action="purgeData">
|
|
@@ -267,6 +277,13 @@ const bindProviderEvent = () => {
|
|
if (300 < timeout) {
|
|
if (300 < timeout) {
|
|
timeout = 300;
|
|
timeout = 300;
|
|
}
|
|
}
|
|
|
|
+ let concurrentReqs = parseInt((providerPanelElement.querySelector("#s3ConcurrentReqs") as HTMLInputElement).value, 10);
|
|
|
|
+ if (1 > concurrentReqs) {
|
|
|
|
+ concurrentReqs = 1;
|
|
|
|
+ }
|
|
|
|
+ if (16 < concurrentReqs) {
|
|
|
|
+ concurrentReqs = 16;
|
|
|
|
+ }
|
|
(providerPanelElement.querySelector("#timeout") as HTMLInputElement).value = timeout.toString();
|
|
(providerPanelElement.querySelector("#timeout") as HTMLInputElement).value = timeout.toString();
|
|
const s3 = {
|
|
const s3 = {
|
|
endpoint: (providerPanelElement.querySelector("#endpoint") as HTMLInputElement).value,
|
|
endpoint: (providerPanelElement.querySelector("#endpoint") as HTMLInputElement).value,
|
|
@@ -277,6 +294,7 @@ const bindProviderEvent = () => {
|
|
region: (providerPanelElement.querySelector("#region") as HTMLInputElement).value,
|
|
region: (providerPanelElement.querySelector("#region") as HTMLInputElement).value,
|
|
skipTlsVerify: (providerPanelElement.querySelector("#s3SkipTlsVerify") as HTMLInputElement).value === "true",
|
|
skipTlsVerify: (providerPanelElement.querySelector("#s3SkipTlsVerify") as HTMLInputElement).value === "true",
|
|
timeout: timeout,
|
|
timeout: timeout,
|
|
|
|
+ concurrentReqs: concurrentReqs,
|
|
};
|
|
};
|
|
fetchPost("/api/sync/setSyncProviderS3", {s3}, () => {
|
|
fetchPost("/api/sync/setSyncProviderS3", {s3}, () => {
|
|
window.siyuan.config.sync.s3 = s3;
|
|
window.siyuan.config.sync.s3 = s3;
|
|
@@ -289,6 +307,13 @@ const bindProviderEvent = () => {
|
|
if (300 < timeout) {
|
|
if (300 < timeout) {
|
|
timeout = 300;
|
|
timeout = 300;
|
|
}
|
|
}
|
|
|
|
+ let concurrentReqs = parseInt((providerPanelElement.querySelector("#webdavConcurrentReqs") as HTMLInputElement).value, 10);
|
|
|
|
+ if (1 > concurrentReqs) {
|
|
|
|
+ concurrentReqs = 1;
|
|
|
|
+ }
|
|
|
|
+ if (16 < concurrentReqs) {
|
|
|
|
+ concurrentReqs = 16;
|
|
|
|
+ }
|
|
(providerPanelElement.querySelector("#timeout") as HTMLInputElement).value = timeout.toString();
|
|
(providerPanelElement.querySelector("#timeout") as HTMLInputElement).value = timeout.toString();
|
|
const webdav = {
|
|
const webdav = {
|
|
endpoint: (providerPanelElement.querySelector("#endpoint") as HTMLInputElement).value,
|
|
endpoint: (providerPanelElement.querySelector("#endpoint") as HTMLInputElement).value,
|
|
@@ -296,6 +321,7 @@ const bindProviderEvent = () => {
|
|
password: (providerPanelElement.querySelector("#password") as HTMLInputElement).value,
|
|
password: (providerPanelElement.querySelector("#password") as HTMLInputElement).value,
|
|
skipTlsVerify: (providerPanelElement.querySelector("#webdavSkipTlsVerify") as HTMLInputElement).value === "true",
|
|
skipTlsVerify: (providerPanelElement.querySelector("#webdavSkipTlsVerify") as HTMLInputElement).value === "true",
|
|
timeout: timeout,
|
|
timeout: timeout,
|
|
|
|
+ concurrentReqs: concurrentReqs,
|
|
};
|
|
};
|
|
fetchPost("/api/sync/setSyncProviderWebDAV", {webdav}, () => {
|
|
fetchPost("/api/sync/setSyncProviderWebDAV", {webdav}, () => {
|
|
window.siyuan.config.sync.webdav = webdav;
|
|
window.siyuan.config.sync.webdav = webdav;
|