Add image listing and asset management
Show images in asset directories with preview, rename, replacement, and trash recovery. Update local Markdown references when images move and restore original files if related metadata cannot be committed. Refresh image previews after replacement and compare actual contents when deduplicating subsequent uploads.
This commit is contained in:
1 parent
8b54ccba18
commit
d253536009
25 files changed
+801
-103
No files matched your search
@@ -203,6 +203,11 @@ func diff(prev, next map[string]fileState) []events.Event {
|
||||
}
|
||||
case old.dir != cur.dir:
|
||||
structural = true
|
||||
case !cur.dir && cur.rev == "" && (old.size != cur.size || old.mtime != cur.mtime || !os.SameFile(old.info, cur.info)):
|
||||
// 图片没有正文版本号;替换后仍需刷新列表元数据与预览。
|
||||
if vault.IsImage(p) {
|
||||
structural = true
|
||||
}
|
||||
case !cur.dir && old.rev != cur.rev:
|
||||
evs = append(evs, events.Event{Type: "changed", Path: p, Rev: cur.rev})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user