yy4382 / s3-image-port

A dashboard to manage your images in S3 buckets. Can be used as a image hosting service.
https://iport.yfi.moe
Apache License 2.0
29 stars 14 forks source link

Settings sync #56

Closed yy4382 closed 3 months ago

yy4382 commented 5 months ago

Being able to sync settings between devices. This requires a new authentication system.

In my mind, Setting sync should be a floating panel on the settings page, and all sync should be manually triggered. The source of truth for the data when performing operations should still be those stored in localStorage. Sync only pulls / pushes to change localStorage.

Places to storage data:

Uer modes:

It should be divided into two modes: single-user and multi-user. Single-user mode is actually a multi-user mode with only one user, but it doesn't display the default account name "admin" in the UI.

Each user should have a username and an encryption key. When storing, use the username as the key and the settings content encrypted by the encryption key as the value. The encryption key should not leave the browser; if the encryption key is forgotten, the user will not be able to retrieve the stored information.