alist icon indicating copy to clipboard operation
alist copied to clipboard

關於"備份 & 恢復"會因名稱相同而發生的恢復備份失敗的狀況,針對該狀況而提出的功能建議

Open 1476523 opened this issue 2 years ago • 1 comments

Please make sure of the following things

  • [X] I have read the documentation.
  • [X] I'm sure there are no duplicate issues or discussions.
  • [X] I'm sure this feature is not implemented.
  • [X] I'm sure it's a reasonable and popular requirement.

Description of the feature / 需求描述

希望在用戶、存儲與元信息這三個頁面中新增各一個按鈕

  1. 刪除所有用戶(除了admin權限帳號與guest帳號兩者不移除並且有二次確認是否刪除的選項)的按鈕
  2. 刪除所有存儲(與單次刪除存儲的功能一樣並且有二次確認是否刪除的選項)的按鈕
  3. 刪除所有元信息(希望而外有二次確認是否刪除的選項)的按紐

Suggested solution / 实现思路

  • 實現功能的位置(用戶)

image 位於"添加"按鈕旁新增"刪除所有用戶"按鈕

image 當點擊"刪除所有用戶"後就會出現再次確認按紐(與刪除存儲相同) 再次確認按紐上會備註不刪除admin權限的訊息 admin權限包含admin名稱用戶或後來更改名稱的admin帳號

希望與存儲一樣顯示相關的名稱 image 例如admin帳號名稱為XXX;及預設的訪客帳號guest

  • 實現功能的位置(存儲)

image 位於"重新加載全部"按鈕旁新增"刪除所有存儲"按鈕

image 這邊則是不用其他多餘的顯示,而是再次詢問是否刪除

  • 實現功能的位置(元信息)

image 位於"添加"按鈕旁新增"刪除所有元信息"按鈕

image 當點擊"刪除所有元信息"後就會出現再次確認按紐(與刪除存儲相同)

  • 若不要太多要實現功能的話(個人希望不會這樣)

image 將按鈕一次全部新增於"備份 & 恢復"頁面中的"恢復"按鈕後

image 又或者更簡單的按紐

Additional context / 附件

當前站點若用戶、存儲及元信息與備份檔案中的用戶、存儲及元信息的標題相同時, 即便更改了存檔內的相關配置並於當前站點中使用恢復功能來恢復備份時, 都會出現相關的恢復失敗訊息: 用戶相關(以XXX名稱為例): [用戶] 恢復失敗 [XXX] :admin or guest user can not be created [用戶] 恢復失敗 [XXX] :UNIQUE or guest user can not be created 存儲相關(以/路徑為例): [存儲] 恢復失敗 [ / ] :failed create storage in database: UNIQUE constraint failed: x_storages.mount_path 元信息相關(以/路徑為例): [元信息] 恢復失敗[ / ] :UNIQUE constraint failed: x_meta.path 若沒有相同標題則是顯示恢復成功, 所以這邊建議新增刪除的按鈕來讓恢復備份更加方便。

1476523 avatar Feb 01 '23 10:02 1476523

Thanks for opening your first issue here! Be sure to follow the issue template!

welcome[bot] avatar Feb 01 '23 10:02 welcome[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 17 '23 12:03 stale[bot]

看來還沒有想要修復的打算?

1476523 avatar Mar 17 '23 12:03 1476523

作者应该是无此计划,但是欢迎pr 我猜的

mengguyi avatar Mar 17 '23 13:03 mengguyi

https://github.com/alist-org/alist-web/pull/73 已经是直接允许覆盖了,感觉也可以实现你需要的效果,应该可以close掉了吧?如果是整个重来,那就把database删了重来吧

itsHenry35 avatar Apr 20 '23 13:04 itsHenry35

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 08 '23 09:06 stale[bot]

Hello @, this issue was closed due to inactive more than 52 days. You can reopen or recreate it if you think it should continue. Thank you for your contributions again.

github-actions[bot] avatar Jun 22 '23 00:06 github-actions[bot]