Compare commits

...
4 Commits
Author SHA1 Message Date
dependabot[bot] 0d20e96a84 chore(deps): bump the npm-minor-and-patch group across 1 directory with 14 updates
Bumps the npm-minor-and-patch group with 14 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@noble/hashes](https://github.com/paulmillr/noble-hashes) | `2.2.0` | `2.4.0` |
| [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.101.2` | `5.103.2` |
| [@zip.js/zip.js](https://github.com/gildas-lormeau/zip.js) | `2.8.26` | `2.17.0` |
| [lucide-preact](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-preact) | `1.22.0` | `1.47.0` |
| [preact](https://github.com/preactjs/preact) | `10.29.3` | `10.29.8` |
| [wouter](https://github.com/molefrog/wouter) | `3.10.0` | `3.11.0` |
| [@preact/preset-vite](https://github.com/preactjs/preset-vite) | `2.10.5` | `2.10.6` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.0.1` | `26.6.2` |
| [autoprefixer](https://github.com/postcss/autoprefixer) | `10.5.2` | `10.6.1` |
| [opencc-js](https://github.com/nk2028/opencc-js) | `1.3.2` | `1.4.2` |
| [postcss](https://github.com/postcss/postcss) | `8.5.23` | `8.5.28` |
| [tsx](https://github.com/privatenumber/tsx) | `4.22.4` | `4.23.15` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `8.1.3` | `8.3.0` |
| [wrangler](https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler) | `4.105.0` | `4.136.3` |



Updates `@noble/hashes` from 2.2.0 to 2.4.0
- [Release notes](https://github.com/paulmillr/noble-hashes/releases)
- [Changelog](https://github.com/paulmillr/noble-hashes/blob/main/CHANGELOG.md)
- [Commits](https://github.com/paulmillr/noble-hashes/compare/2.2.0...2.4.0)

Updates `@tanstack/react-query` from 5.101.2 to 5.103.2
- [Release notes](https://github.com/TanStack/query/releases)
- [Changelog](https://github.com/TanStack/query/blob/main/packages/react-query/CHANGELOG.md)
- [Commits](https://github.com/TanStack/query/commits/@tanstack/react-query@5.103.2/packages/react-query)

Updates `@zip.js/zip.js` from 2.8.26 to 2.17.0
- [Release notes](https://github.com/gildas-lormeau/zip.js/releases)
- [Commits](https://github.com/gildas-lormeau/zip.js/compare/v2.8.26...v2.17.0)

Updates `lucide-preact` from 1.22.0 to 1.47.0
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/1.47.0/packages/lucide-preact)

Updates `preact` from 10.29.3 to 10.29.8
- [Release notes](https://github.com/preactjs/preact/releases)
- [Commits](https://github.com/preactjs/preact/compare/10.29.3...10.29.8)

Updates `wouter` from 3.10.0 to 3.11.0
- [Release notes](https://github.com/molefrog/wouter/releases)
- [Commits](https://github.com/molefrog/wouter/commits/v3.11.0)

Updates `@preact/preset-vite` from 2.10.5 to 2.10.6
- [Release notes](https://github.com/preactjs/preset-vite/releases)
- [Changelog](https://github.com/preactjs/preset-vite/blob/main/CHANGELOG.md)
- [Commits](https://github.com/preactjs/preset-vite/commits)

Updates `@types/node` from 26.0.1 to 26.6.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `autoprefixer` from 10.5.2 to 10.6.1
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.5.2...10.6.1)

Updates `opencc-js` from 1.3.2 to 1.4.2
- [Release notes](https://github.com/nk2028/opencc-js/releases)
- [Changelog](https://github.com/nk2028/opencc-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nk2028/opencc-js/compare/v1.3.2...v1.4.2)

Updates `postcss` from 8.5.23 to 8.5.28
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.5.23...8.5.28)

Updates `tsx` from 4.22.4 to 4.23.15
- [Release notes](https://github.com/privatenumber/tsx/releases)
- [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs)
- [Commits](https://github.com/privatenumber/tsx/compare/v4.22.4...v4.23.15)

Updates `vite` from 8.1.3 to 8.3.0
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@8.3.0/packages/vite)

Updates `wrangler` from 4.105.0 to 4.136.3
- [Release notes](https://github.com/cloudflare/workers-sdk/releases)
- [Commits](https://github.com/cloudflare/workers-sdk/commits/wrangler@4.136.3/packages/wrangler)

---
updated-dependencies:
- dependency-name: "@noble/hashes"
  dependency-version: 2.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-and-patch
- dependency-name: "@preact/preset-vite"
  dependency-version: 2.10.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-and-patch
- dependency-name: "@tanstack/react-query"
  dependency-version: 5.102.8
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-and-patch
- dependency-name: "@types/node"
  dependency-version: 26.5.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-and-patch
- dependency-name: "@zip.js/zip.js"
  dependency-version: 2.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-and-patch
- dependency-name: autoprefixer
  dependency-version: 10.5.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-and-patch
- dependency-name: lucide-preact
  dependency-version: 1.44.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-and-patch
- dependency-name: opencc-js
  dependency-version: 1.4.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-and-patch
- dependency-name: postcss
  dependency-version: 8.5.28
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-and-patch
- dependency-name: preact
  dependency-version: 10.29.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor-and-patch
- dependency-name: tsx
  dependency-version: 4.23.13
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-and-patch
- dependency-name: vite
  dependency-version: 8.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-and-patch
- dependency-name: wouter
  dependency-version: 3.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-and-patch
- dependency-name: wrangler
  dependency-version: 4.131.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-25 16:54:32 +00:00
shuaiplus 588dce6a0a chore: update sharp to 0.35.4 and add new dependencies for improved functionality 2026-09-26 00:50:43 +08:00
EggRoll 589557a757 fix(webapp): reflow remote backup list by container width (#387)
* fix(webapp): reflow remote backup table by container width, not viewport

The remote backup list is a four-track grid with a 642px hard minimum plus
gaps and padding, but its detail panel is only as wide as the viewport minus
roughly 858px of app and backup sidebars. Single-column reflow was keyed to
viewport media queries only, so between about 1181px and 1600px no breakpoint
fired while the panel was already too narrow: .backup-browser-list's
overflow:hidden silently clipped Download, Restore and Delete, and because the
list was itself the clipping box the outer scroll container could not recover
them. Common laptop widths were all affected.

Query the panel's own width instead, since that is what actually decides
whether the table fits. Also let the action buttons wrap rather than overflow
their 220px track, and keep a horizontal scroll fallback on the list so a
future overflow degrades to a scrollbar instead of losing content.

The reflow rules were duplicated across two media queries in responsive.css;
they now live only in the container query.

* fix(webapp): keep the vault grid inside the page on narrow viewports

The vault grid required 270px + 400px + 400px, so it needed a 1362px viewport
before the viewport-based fallback at 1180px took over, leaving a horizontal
page scrollbar across those widths.

The list and detail panes already scroll internally, which zeroes their
automatic minimum size, so dropping the track minimums to 0 lets the grid fit
the content area at any width. Wide viewports are unaffected because 36%/1fr
were never binding there.
2026-09-25 23:17:24 +08:00
Cerarin 99d404f7cb docs(readme): add deployment FAQ (#379)
* docs(readme): add deployment FAQ

Add a FAQ section right after the deploy steps, covering the four most
commonly asked deployment questions:

- GitHub flags the account when the fork reuses this project's name, so
  Cloudflare cannot list the repository (404)
- redeploy after deleting the Worker still asks for an invite code,
  because D1 / KV were not deleted
- JWT_SECRET set as a build variable instead of a runtime secret
- JWT_SECRET stored as a plain text variable, so it is lost on upgrade

* docs(readme): clarify FAQ and deployment instructions
2026-09-23 22:36:39 +08:00
7 changed files with 517 additions and 547 deletions

No files matched your search

+19
View File
@@ -91,6 +91,25 @@
> | KV | No | 25 MiB (Cloudflare limit) | 1 GB | > | KV | No | 25 MiB (Cloudflare limit) | 1 GB |
## FAQ
- **After forking the repository, why can't I see my repository when connecting GitHub to Cloudflare, or why do I get a 404 after selecting it?**
This is usually related to how the GitHub fork is identified or how Cloudflare handles repository authorization and synchronization. If the fork keeps a repository name, description, or other information that is very similar to the upstream project, it may be more likely to trigger related restrictions or issues. It is recommended to rename the repository to something different from the upstream project when creating the fork, and change the repository description as well. For example, you can rename it to `2233warden`. If you have already created the fork, you can rename the repository and update its description in the GitHub repository settings, then try connecting it to Cloudflare again.
- **I deleted my deployment and redeployed it. Why does registration require an invite code again?**
Deleting the Worker or redeploying it does not automatically delete the persistent data that was already created. The users, invite codes, and related configuration stored in the D1 database and KV namespace are still there, so the newly deployed Worker continues to read the existing data and enforce the invite-code requirement.
If you want to start completely from scratch, you need to delete the corresponding **D1 database and KV namespace** as well.
- **I configured `JWT_SECRET`, but the page still says it is missing. Why?**
Make sure `JWT_SECRET` is configured under **Workers → Settings → Variables and Secrets**, specifically as a **Runtime variable or Secret**, rather than under **Build variables**.
Build-time variables are only available during the build process. They are not available to the Worker at runtime, so the build may succeed while the application still reports that `JWT_SECRET` is missing.
- **Why does `JWT_SECRET` seem to disappear after an upgrade or redeployment?**
It is recommended to store `JWT_SECRET` as a **Secret** rather than as a plain-text variable. `JWT_SECRET` is a sensitive runtime credential and should not be committed to the repository.
If your deployment process recreates or overwrites the Worker variable configuration, ordinary variables may be affected. Secrets are more appropriate for sensitive configuration that needs to remain available across multiple deployments. If the application still reports that `JWT_SECRET` is missing after a redeployment, check **Variables and Secrets** for the current Worker and make sure the Secret is still configured.
---
## How to update ## How to update
- Manual: open your fork on GitHub; when the sync banner appears, click **Sync fork** → **Update branch** - Manual: open your fork on GitHub; when the sync banner appears, click **Sync fork** → **Update branch**
+18
View File
@@ -91,6 +91,24 @@
> | KV | 不需要 | 25 MiB(Cloudflare限制) | 1 GB | > | KV | 不需要 | 25 MiB(Cloudflare限制) | 1 GB |
## 常见问题:
- **Fork 完仓库后,在 Cloudflare 连接 GitHub 账户时看不到自己的仓库,或者选择仓库后返回 404?**
这通常与 GitHub Fork 仓库的识别或 Cloudflare 对仓库的授权/同步有关。如果 Fork 后仓库名称、描述等信息与上游项目高度一致,可能更容易触发相关限制或异常。建议在 Fork 时就将仓库名称修改为与上游不同的名称,并同时修改仓库描述,例如改为 `2233warden`。如果已经完成 Fork,也可以直接在 GitHub 仓库设置中修改名称和描述,然后重新尝试在 Cloudflare 中连接。
- **我删掉部署后重新部署,为什么注册又开始要求邀请码了?**
因为删除 Worker 或重新部署并不会自动删除已经创建的持久化数据。D1 数据库和 KV 命名空间中的用户、邀请码及相关配置仍然存在,因此重新部署后仍会读取原来的数据,并继续要求邀请码。
如果希望完全重新开始,需要同时删除对应的 **D1 数据库和 KV 命名空间**。
- **我配置了 `JWT_SECRET`,为什么页面仍然提示缺少?**
请将 `JWT_SECRET` 配置在 Cloudflare Workers 的 **Settings → Variables and Secrets** 中,并确保它属于 **Runtime variables and secrets**,而不是 **Build variables**。
Build 阶段的变量只在项目构建过程中可用,Worker 实际运行时无法通过运行时环境读取,因此即使构建能够正常完成,页面仍可能提示 `JWT_SECRET` 缺失。
- **为什么升级或重新部署后,`JWT_SECRET` 好像消失了?**
建议将 `JWT_SECRET` 配置为 **Secret**,而不是普通的明文变量。`JWT_SECRET` 属于敏感的运行时凭据,也不应该出现在代码仓库中。
如果部署流程会重新生成或覆盖 Worker 的变量配置,普通变量可能受到影响;使用 Secret 更适合保存这类需要在多次部署之间持续存在的敏感配置。重新部署后如果仍提示缺失,请检查当前 Worker 的 **Variables and Secrets** 中是否仍存在该 Secret。
---
## 更新方法: ## 更新方法:
- 手动:打开你 Fork 的 GitHub 仓库,看到顶部同步提示后,点击 `Sync fork` ➜ `Update branch` - 手动:打开你 Fork 的 GitHub 仓库,看到顶部同步提示后,点击 `Sync fork` ➜ `Update branch`
+402 -488
View File
File diff suppressed because it is too large. Load diff
+18 -15
View File
@@ -54,31 +54,34 @@
"@babel/core": ">=7.29.6", "@babel/core": ">=7.29.6",
"esbuild": ">=0.28.1", "esbuild": ">=0.28.1",
"ws": "8.21.0", "ws": "8.21.0",
"sharp": "0.35.0" "sharp": "0.35.4",
"browserslist": "4.28.7",
"baseline-browser-mapping": "2.11.0",
"postcss-selector-parser": "6.1.3"
}, },
"devDependencies": { "devDependencies": {
"@cloudflare/workers-types": "^4.20260630.1", "@cloudflare/workers-types": "^4.20260630.1",
"@preact/preset-vite": "^2.10.5", "@preact/preset-vite": "^2.10.6",
"@types/node": "^26.0.1", "@types/node": "^26.6.2",
"autoprefixer": "^10.5.2", "autoprefixer": "^10.6.1",
"opencc-js": "^1.3.2", "opencc-js": "^1.4.2",
"postcss": "^8.5.23", "postcss": "^8.5.28",
"tailwindcss": "^3.4.19", "tailwindcss": "^3.4.19",
"tsx": "^4.22.4", "tsx": "^4.23.15",
"typescript": "^6.0.3", "typescript": "^6.0.3",
"vite": "^8.1.3", "vite": "^8.3.0",
"wrangler": "^4.105.0" "wrangler": "^4.136.3"
}, },
"dependencies": { "dependencies": {
"@noble/hashes": "^2.2.0", "@noble/hashes": "^2.4.0",
"@simplewebauthn/server": "^13.3.2", "@simplewebauthn/server": "^13.3.2",
"@tanstack/react-query": "^5.101.2", "@tanstack/react-query": "^5.103.2",
"@zip.js/zip.js": "^2.8.26", "@zip.js/zip.js": "^2.17.0",
"fflate": "^0.8.3", "fflate": "^0.8.3",
"jsqr": "1.4.0", "jsqr": "1.4.0",
"lucide-preact": "^1.22.0", "lucide-preact": "^1.47.0",
"preact": "^10.29.3", "preact": "^10.29.8",
"qrcode-generator": "^2.0.4", "qrcode-generator": "^2.0.4",
"wouter": "^3.10.0" "wouter": "^3.11.0"
} }
} }
+54 -4
View File
@@ -30,6 +30,14 @@
border-color: var(--line); border-color: var(--line);
} }
/* The detail panel is only as wide as the viewport minus the app sidebar and the
two backup sidebars (~858px of chrome), so viewport breakpoints cannot tell when
the remote backup list no longer fits. Query the panel's own width instead. */
.backup-detail-panel {
container-type: inline-size;
container-name: backup-detail;
}
.backup-actions-stack { .backup-actions-stack {
@apply grid gap-2.5; @apply grid gap-2.5;
} }
@@ -371,13 +379,21 @@
} }
.backup-browser-list { .backup-browser-list {
@apply overflow-hidden rounded-lg border bg-white; @apply rounded-lg border bg-white;
border: 1px solid var(--line); border: 1px solid var(--line);
/* Never clip silently: if a row still overflows (long locale labels, different
font metrics), scroll instead of hiding the action buttons. */
overflow-x: auto;
overflow-y: hidden;
}
.backup-browser-head,
.backup-browser-row {
grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.75fr) minmax(92px, 0.4fr) minmax(220px, auto);
} }
.backup-browser-head { .backup-browser-head {
@apply grid items-center gap-3 px-3 py-2 text-[11px] font-bold uppercase tracking-[0.08em]; @apply grid items-center gap-3 px-3 py-2 text-[11px] font-bold uppercase tracking-[0.08em];
grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.75fr) minmax(92px, 0.4fr) minmax(220px, auto);
border-bottom: 1px solid var(--line); border-bottom: 1px solid var(--line);
color: #64748b; color: #64748b;
background: #f8fafc; background: #f8fafc;
@@ -404,7 +420,6 @@
.backup-browser-row { .backup-browser-row {
@apply grid items-center gap-3 px-3 py-2; @apply grid items-center gap-3 px-3 py-2;
grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.75fr) minmax(92px, 0.4fr) minmax(220px, auto);
min-height: 48px; min-height: 48px;
} }
@@ -434,7 +449,42 @@
.backup-browser-actions { .backup-browser-actions {
justify-content: flex-end; justify-content: flex-end;
flex-wrap: nowrap; /* Wrap instead of clipping: three non-shrinking buttons overflow the 220px
actions track once the panel is narrow, hiding Delete entirely. */
flex-wrap: wrap;
}
.backup-browser-actions .btn.small {
flex: 0 0 auto;
white-space: nowrap;
}
/* Must stay after every base .backup-browser-* rule above: container queries add
no specificity, so source order decides which declaration wins.
The four tracks need ~702px, plus headroom for the widest locale label
(fr "Restauration en cours..." pushes a button past the 220px actions track).
Below that, stack the row into a card and drop the column header. */
@container backup-detail (max-width: 820px) {
.backup-browser-row {
grid-template-columns: minmax(0, 1fr);
}
.backup-browser-head {
display: none;
}
.backup-browser-meta {
text-align: left;
}
.backup-browser-actions {
justify-content: flex-start;
}
.backup-browser-nav {
align-items: flex-start;
flex-direction: column;
}
} }
.backup-browser-empty { .backup-browser-empty {
+1 -39
View File
@@ -41,29 +41,10 @@
justify-self: start; justify-self: start;
} }
.import-export-panels, .import-export-panels {
.backup-browser-row {
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }
.backup-browser-head {
display: none;
}
.backup-browser-meta {
text-align: left;
}
.backup-browser-actions {
justify-content: flex-start;
flex-wrap: wrap;
}
.backup-browser-nav {
align-items: flex-start;
flex-direction: column;
}
.settings-twofactor-grid { .settings-twofactor-grid {
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }
@@ -1248,29 +1229,10 @@
gap: 7px; gap: 7px;
} }
.backup-browser-row,
.field-grid { .field-grid {
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }
.backup-browser-head {
display: none;
}
.backup-browser-meta {
text-align: left;
}
.backup-browser-actions {
justify-content: flex-start;
flex-wrap: wrap;
}
.backup-browser-nav {
align-items: flex-start;
flex-direction: column;
}
.backup-grid { .backup-grid {
gap: 8px; gap: 8px;
padding: 0; padding: 0;
+5 -1
View File
@@ -1,6 +1,10 @@
.vault-grid { .vault-grid {
@apply grid h-full min-h-0 gap-3 p-0.5; @apply grid h-full min-h-0 gap-3 p-0.5;
grid-template-columns: 270px minmax(400px, 36%) minmax(400px, 1fr); /* The list and detail panes already scroll internally (overflow: auto), which
zeroes their automatic minimum size. Keeping the track minimums at 0 lets the
grid fit the content area at any width instead of overflowing the page; wide
viewports are unaffected because 36%/1fr were never binding there. */
grid-template-columns: 270px minmax(0, 36%) minmax(0, 1fr);
} }
.sidebar, .sidebar,