add webdav depth=1

This commit is contained in:
fyears
2022-01-22 17:11:12 +08:00
parent 2bebc7226d
commit 320f91f1a5
5 changed files with 130 additions and 58 deletions
+26
View File
@@ -872,6 +872,32 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
});
});
new Setting(webdavDiv)
.setName("server supports infinity propfind or not")
.setDesc(
"The plugin needs to get all files and folders recursively using probfind. If your webdav server only supports depth='1' (such as NGINX), you need to adjust the setting here, then the plugin consumes more network requests, but better than not working."
)
.addDropdown((dropdown) => {
dropdown.addOption("infinity", "supports depth='infinity'");
dropdown.addOption("1", "only supports depth='1'");
type Depth = "1" | "infinity";
dropdown
.setValue(
this.plugin.settings.webdav.manualRecursive === false
? "infinity"
: "1"
)
.onChange(async (val: Depth) => {
if (val === "1") {
this.plugin.settings.webdav.manualRecursive = true;
} else if (val === "infinity") {
this.plugin.settings.webdav.manualRecursive = false;
}
await this.plugin.saveSettings();
});
});
new Setting(webdavDiv)
.setName("check connectivity")
.setDesc("check connectivity")