diff --git a/README.md b/README.md index a08c7bc..f7424fb 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,21 @@ For self-hosting, follow [the steps below](#deploy-your-own-5-min). See the [hos 1. Open the [hosted service](https://shotsync-hosted.defiabell.workers.dev), register with an email and password, and save your recovery code. No email verification is required. 2. Choose **+ 图片** to upload an image or **文字** to send text. Sign in to the same account on another device to retrieve it. -3. Open settings to copy the gallery address, check quotas and retention, or generate a device token for the Mac app / iOS Shortcut. +3. On a phone, open **⚙ Settings → 📱 手机快捷入口设置** at the top of settings and follow the home-screen guide. Tap the ShotSync icon to return later; the first launch may require signing in again. + +### Common actions + +| Task | Where to go | +| --- | --- | +| Send images or text | **+ 图片** / **文字** on the gallery; drag or paste images on desktop | +| Retrieve or share content | Open an item → **取回** (download), **复制文字** (copy text) or **分享** (share) | +| Delete several items | **选择** → select items → **删除选中** → confirm; failed items stay selected for retry | +| Add a phone shortcut | **⚙ Settings → 📱 手机快捷入口设置** at the top; iPhone, Android and Shortcuts instructions | +| Open on another device | **Settings → 连接其他设备 → 复制相册地址**; open the copied address and sign in to the same account | +| Connect the Mac app / upload Shortcut | **Settings → 连接其他设备** → enter a device name and generate a token; configure the client with the gallery address and token | +| Check quotas and retention | Account details in settings; new accounts default to 7 days, with the actual policy shown there | + +New device tokens are masked by default and can be revealed/copied again in the current page, even after closing settings. **Reloading the page or signing out clears them**, so save them in a password manager. If an existing token is unavailable, revoke it and generate another. Browser sign-in uses your email and password; it does not require a device token. On a phone, follow the [home-screen shortcut guide](https://shotsync-hosted.defiabell.workers.dev/mobile) for iPhone or Android to open your gallery from an app icon. diff --git a/README.zh-CN.md b/README.zh-CN.md index 21e8bbe..eea9572 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -24,7 +24,21 @@ 1. 打开[在线版](https://shotsync-hosted.defiabell.workers.dev),注册邮箱和密码,无需邮件验证;保存页面给出的恢复码。 2. 点击「+ 图片」上传,或点击「文字」发送;另一台设备登录同一账号即可取回。 -3. 设置中可复制相册地址、查看额度和保留期,或生成设备令牌连接 Mac 客户端/快捷指令。 +3. 手机端点右上角「⚙ 设置」→ 顶部「📱 手机快捷入口设置」,按教程添加到主屏幕。以后点 ShotSync 图标即可打开;首次可能需要重新登录。 + +### 常用操作 + +| 想做什么 | 在哪里操作 | +| --- | --- | +| 上传图片/发送文字 | 首页「+ 图片」/「文字」;电脑也可拖入或粘贴图片 | +| 取回或分享 | 点开内容 →「取回」「复制文字」或「分享」 | +| 批量删除 | 首页「选择」→ 点选内容 →「删除选中」;确认后删除,失败项保留供重试 | +| 手机快捷入口 | 「⚙ 设置」→ 顶部「📱 手机快捷入口设置」;支持 iPhone、Android 与快捷指令引导 | +| 另一台设备使用 | 「⚙ 设置」→「连接其他设备」→「复制相册地址」;浏览器打开后登录同一账号 | +| Mac 客户端/上传快捷指令 | 「⚙ 设置」→「连接其他设备」→ 填设备名并生成令牌;客户端填相册地址和令牌 | +| 查看额度和保留期 | 「⚙ 设置」中的账号信息;新账号默认保留 7 天,以页面实际显示为准 | + +新生成的设备令牌默认遮掩,在当前页面可显示、复制,关闭设置后也可再次查看。**刷新页面或退出后无法再次查看**,请保存到密码管理器;已有令牌不能恢复时,可撤销后重新生成。网页登录只需邮箱和密码,不需要填写设备令牌。 手机用户可打开[手机快捷入口设置](https://shotsync-hosted.defiabell.workers.dev/mobile),按 iPhone / Android 指引添加到主屏幕,以后点图标就能进入相册。 diff --git a/docs/hosted.md b/docs/hosted.md index 3aeaeb7..f3d108e 100644 --- a/docs/hosted.md +++ b/docs/hosted.md @@ -111,3 +111,5 @@ The setting applies to **new uploads**. Existing files keep their stored expiry In `/api/list` and upload responses, `expiresAt: null` means no automatic expiry; `limits.retentionDays: 0` has the same meaning. Internally, only a ready file with `expires_at=0` is permanent; pending reservations always have a short timeout. Cleanup still removes pending/deleting records and expiring share links. Rollback constraint: after migration 0005, keep code that understands `storage_prefix` and permanent `expires_at=0`. Older Workers assume every object is under `users/`, and their cleanup treats zero as expired; rolling back to them can delete permanent files. Suspend uploads and repair forward instead of deploying an old cleanup implementation. + +The **📱 手机快捷入口设置** button is at the top of settings, before account quotas. It opens the phone guide for home-screen and Shortcuts setup. diff --git a/src/hosted/ui.ts b/src/hosted/ui.ts index a8c0316..0c0728b 100644 --- a/src/hosted/ui.ts +++ b/src/hosted/ui.ts @@ -11,7 +11,7 @@ export function hostedHTML(env: HostedEnv): string {

发送文字

最多 100 KiB

-

设置

每日额度按 UTC 零点重置。图片最多 10 MiB,文字最多 100 KiB;每分钟最多上传 10 次。删除不返还当天上传额度。

手机快捷入口

添加到主屏幕 / 快捷指令 →

连接其他设备

其他浏览器打开相册地址后登录。Mac 客户端和快捷指令使用此地址与设备令牌连接。

本次页面中新建的令牌可再次查看、复制;刷新页面或退出后无法再次查看,请保存到密码管理器。服务端仅保存令牌哈希,已有令牌无法恢复,可撤销后重新生成。

自己部署
+

设置

📱 手机快捷入口设置 →

添加到主屏幕,或设置快捷指令,以后点图标就能打开。

每日额度按 UTC 零点重置。图片最多 10 MiB,文字最多 100 KiB;每分钟最多上传 10 次。删除不返还当天上传额度。

连接其他设备

其他浏览器打开相册地址后登录。Mac 客户端和快捷指令使用此地址与设备令牌连接。

本次页面中新建的令牌可再次查看、复制;刷新页面或退出后无法再次查看,请保存到密码管理器。服务端仅保存令牌哈希,已有令牌无法恢复,可撤销后重新生成。

自己部署