Skip to content

Commit d4906ce

Browse files
authored
0.1.1
1 parent 8441dd3 commit d4906ce

53 files changed

Lines changed: 810 additions & 375 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
.svelte-kit/** linguist-generated
66
src/lib/paraglide/** linguist-generated
77
project.inlang/cache/** linguist-generated
8+
9+
pnpm-lock.yaml text eol=lf
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: 版本发布
3+
about: 用于 Chronos 版本更新与发布的 Pull Request
4+
title: '✨ 发布 v'
5+
labels: release
6+
---
7+
8+
## 版本信息
9+
10+
|| 内容 |
11+
| -------- | ------------ |
12+
| 版本号 | `v` |
13+
| 发布日期 | `YYYY-MM-DD` |
14+
| 上一版本 | `v` |
15+
16+
## 更新摘要
17+
18+
<!-- 简要说明本版本面向用户的主要变更,可与 Release 文档保持一致 -->
19+
20+
-
21+
22+
## 检查清单
23+
24+
- [ ] 已更新 `package.json` 中的 `version`
25+
- [ ] 已新增或更新 `src/lib/content/releases/entries/vX.Y.Z.md`
26+
- [ ] Release 文档中的 `name``publishedAt` 与正文内容已核对
27+
- [ ] 已运行 `vp check``vp test`,结果通过
28+
- [ ] 合并后计划打 tag:`vX.Y.Z`(用于触发 GitHub Pages 部署)
29+
30+
## 合并方式
31+
32+
> **本 PR 必须使用 Squash merge,请勿使用 Merge commit 或 Rebase merge,目标分支为 `master`**
33+
34+
Squash 后的提交标题请使用:
35+
36+
```text
37+
X.Y.Z
38+
```
39+
40+
Squash 提交说明可粘贴「更新摘要」中的要点,或保留 PR 正文摘要。

CONTEXT.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"name": "chronos",
33
"private": true,
4-
"version": "0.1.0",
4+
"version": "0.1.1",
55
"type": "module",
6+
"packageManager": "pnpm@11.20.0",
67
"scripts": {
78
"dev": "vp dev",
89
"build": "vp build",
9-
"build:pages": "CHRONOS_DEPLOY_TARGET=pages vp build",
10+
"build:pages": "CHRONOS_DEPLOY_TARGET=pages vp build && cp build/404.html build/index.html",
1011
"preview": "vp preview",
1112
"prepare": "vp config && svelte-kit sync || echo ''",
1213
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
@@ -56,12 +57,5 @@
5657
"vite": "catalog:",
5758
"vite-plus": "catalog:",
5859
"vitest": "catalog:"
59-
},
60-
"devEngines": {
61-
"packageManager": {
62-
"name": "pnpm",
63-
"version": "11.20.0",
64-
"onFail": "download"
65-
}
6660
}
6761
}

pnpm-lock.yaml

Lines changed: 0 additions & 199 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/app/app-shell.svelte.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { ThemeMode, type AppState, emptyAppState } from '$lib/models/app-state';
1+
import {
2+
ThemeMode,
3+
TimetableLayoutMode,
4+
type AppState,
5+
emptyAppState
6+
} from '$lib/models/app-state';
27
import { createAppServices, type AppServices } from '$lib/client/app-services';
38
import { clearAllAppData } from '$lib/client/repository';
49

@@ -54,6 +59,10 @@ export function createAppShell() {
5459
await getServices().preferences.setThemeMode(mode);
5560
}
5661

62+
async function setTimetableLayoutMode(mode: TimetableLayoutMode) {
63+
await getServices().preferences.setTimetableLayoutMode(mode);
64+
}
65+
5766
async function setWallpaper(wallpaper: Blob | null) {
5867
await getServices().preferences.setWallpaper(wallpaper);
5968
}
@@ -74,6 +83,7 @@ export function createAppShell() {
7483
init,
7584
destroy,
7685
setThemeMode,
86+
setTimetableLayoutMode,
7787
setWallpaper,
7888
clearAllData,
7989
get services() {

src/lib/client/credential-environment.test.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,24 @@ describe('CredentialEnvironmentController', () => {
7777

7878
expect(readOnlineCredentialRecord()).toBeNull();
7979
});
80+
81+
it('keeps PRF credentials when PRF remains available (no WebAuthn probe at startup)', async () => {
82+
writeOnlineCredentialRecord(
83+
{
84+
mode: 'prf',
85+
account: '20240101',
86+
credentialId: 'credential-id',
87+
salt: 'salt',
88+
iv: 'iv',
89+
ciphertext: 'ciphertext'
90+
},
91+
localStorage
92+
);
93+
vi.spyOn(prfSupport, 'isPrfProtectionAvailable').mockResolvedValue(true);
94+
95+
const environment = new CredentialEnvironmentController();
96+
await environment.init();
97+
98+
expect(readOnlineCredentialRecord()).not.toBeNull();
99+
});
80100
});

src/lib/client/onboarding.svelte.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const SEEN_KEY = 'chronos:onboarding-seen';
22

3-
/** First-launch onboarding flow: welcome → highlights → import guide → install → CTA. */
3+
/** First-launch onboarding: welcome → highlights → display style → import → install → CTA. */
44
export class OnboardingController {
55
open = $state(false);
66
step = $state(0);
77

8-
readonly totalSteps = 5;
8+
readonly totalSteps = 6;
99

1010
private hasChecked = false;
1111

0 commit comments

Comments
 (0)