feat(ui): streamline workspace settings and remove sharing
Unify compact workspace controls and panel transitions, move directory actions into the context menu, and remove backlink UI. Reorganize settings with searchable sections, per-setting resets, shortcut search, and accurate save feedback. Remove sharing UI, APIs, authentication helpers, and storage code; provide a transactional cleanup script with retirement tests. Reject directories during orphan image cleanup and cover mixed-batch preservation.
This commit is contained in:
1 parent
a716794e41
commit
19aab631ec
63 files changed
+1077
-3343
No files matched your search
@@ -42,10 +42,10 @@ func (h *staticHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
name := strings.TrimPrefix(path.Clean("/"+r.URL.Path), "/")
|
||||
// 分享页 /s/{token} 是独立的入口,只加载渲染器
|
||||
share := strings.HasPrefix(name, "s/")
|
||||
if share {
|
||||
name = "share.html"
|
||||
// 已移除的公开入口不能回退到应用首页。
|
||||
if name == "s" || strings.HasPrefix(name, "s/") || name == "share.html" {
|
||||
writeError(w, 404, "页面不存在")
|
||||
return
|
||||
}
|
||||
f, err := h.load(name)
|
||||
if err != nil {
|
||||
@@ -65,9 +65,6 @@ func (h *staticHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
if strings.HasSuffix(name, ".html") {
|
||||
hd.Set("Content-Security-Policy", appCSP)
|
||||
}
|
||||
if share {
|
||||
hd.Set("X-Robots-Tag", "noindex")
|
||||
}
|
||||
if path.Ext(name) == ".webmanifest" {
|
||||
// Go 的 MIME 表未必包含此扩展名,不能让 ServeContent 对压缩后的数据嗅探类型。
|
||||
hd.Set("Content-Type", "application/manifest+json")
|
||||
|
||||
Reference in new issue
Block a user