🎨 Remove Add and Remove buttons for S3/WebDAV cloud sync directory settings https://github.com/siyuan-note/siyuan/issues/13682

This commit is contained in:
Daniel 2025-01-01 12:00:02 +08:00
parent 9db8b0bfab
commit 47e6e8b74b
No known key found for this signature in database
GPG Key ID: 86211BA83DF03017
4 changed files with 8 additions and 4 deletions

View File

@ -75,7 +75,7 @@ const renderProvider = (provider: number) => {
<input id="bucket" class="b3-text-field fn__block" value="${window.siyuan.config.sync.s3.bucket}">
</div>
<div class="b3-label b3-label--inner fn__flex">
<div class="fn__flex-center fn__size200">Region</div>
<div class="fn__flex-center fn__size200">Region ID</div>
<div class="fn__space"></div>
<input id="region" class="b3-text-field fn__block" value="${window.siyuan.config.sync.s3.region}">
</div>

View File

@ -56,7 +56,7 @@ require (
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/sashabaranov/go-openai v1.29.1
github.com/shirou/gopsutil/v4 v4.24.11
github.com/siyuan-note/dejavu v0.0.0-20241231012438-1b3b69c32ca8
github.com/siyuan-note/dejavu v0.0.0-20250101034610-eb8ad439dce1
github.com/siyuan-note/encryption v0.0.0-20231219001248-1e028a4d13b4
github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97
github.com/siyuan-note/filelock v0.0.0-20241212013445-c66518cdacfa

View File

@ -363,8 +363,8 @@ github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+D
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA=
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=
github.com/simplereach/timeutils v1.2.0/go.mod h1:VVbQDfN/FHRZa1LSqcwo4kNZ62OOyqLLGQKYB3pB0Q8=
github.com/siyuan-note/dejavu v0.0.0-20241231012438-1b3b69c32ca8 h1:76sEch+YA/zAeTGnqUOZNQOQoua+2LGNPxi0zLxzfsg=
github.com/siyuan-note/dejavu v0.0.0-20241231012438-1b3b69c32ca8/go.mod h1:MzsX91uilsrKqH97iXH9A155rZaaCtvQDPusjnmqU4I=
github.com/siyuan-note/dejavu v0.0.0-20250101034610-eb8ad439dce1 h1:dr5YMde+4B6qx8/0FXN/Ur4ruMvWAcNgKCI8T+JSzPg=
github.com/siyuan-note/dejavu v0.0.0-20250101034610-eb8ad439dce1/go.mod h1:MzsX91uilsrKqH97iXH9A155rZaaCtvQDPusjnmqU4I=
github.com/siyuan-note/encryption v0.0.0-20231219001248-1e028a4d13b4 h1:kJaw5L/evyW6LcB9IQT8PR4ppx8JVqOFP9Ix3rfwSrc=
github.com/siyuan-note/encryption v0.0.0-20231219001248-1e028a4d13b4/go.mod h1:UYcCCY+0wh+GmUoDOaO63j1sV5lgy7laLAk1XhEiUis=
github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97 h1:lM5v8BfNtbOL5jYwhCdMYBcYtr06IYBKjjSLAPMKTM8=

View File

@ -612,6 +612,10 @@ func ListCloudSyncDir() (syncDirs []*Sync, hSize string, err error) {
if conf.ProviderSiYuan == Conf.Sync.Provider {
hSize = humanize.BytesCustomCeil(uint64(size), 2)
}
if conf.ProviderS3 == Conf.Sync.Provider {
Conf.Sync.CloudName = syncDirs[0].CloudName
Conf.Save()
}
return
}