Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @Molunerfinn
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ on:
- test-signing

env:
NODE_VERSION: 22.x
NODE_VERSION: 24.x

jobs:
# ============== macOS Builds ==============
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22
24
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Static assets are served from `public/`. In the main process use `getStaticPath`
- Renderer-side date/time formatting should use `dayjs` and shared format constants from `src/renderer/utils/consts.ts` (for example `DEFAULT_DATE_TIME_FORMAT`) instead of `Intl.DateTimeFormat` or ad-hoc inline format strings.
- Enum-like object constants declared with `as const` (for example status maps, option maps, and value registries) must use PascalCase names, not camelCase. Prefer names like `PicGoCloudRequestStatusValues`, `SettingsAppearanceValues`, or `AppPlatformValues`.
- If a renderer → main request mutates persisted config/state without using `saveConfig`, call `notifyAppConfigUpdated()` in main to inform renderers.
- Renderer config normalization is a whitelist: `normalizeAppConfig` / `normalizeSettingsConfig` in `src/renderer/store/utils.ts` copy only the fields they list (for example `settings.server` → `host`, `port`, `enable`, `secret`), and anything not listed is silently dropped from renderer state after every reload. When adding a new persisted config field, update all of: the shared types (`src/universal/types/types.d.ts` / `view.d.ts`), the renderer state type (e.g. `SettingsConfigState` in `src/renderer/components/main/settings/utils.ts`), its default value, and the normalizer. Settings dialogs re-save the whole object (e.g. `settings.server`), so a field missing from the normalizer is not just invisible in the UI but gets overwritten with an empty value on the next save. Add a round-trip test (raw config → normalizer → field still present) next to `src/__tests__/renderer/store/settings-normalize.spec.ts`; a component test that feeds drafts directly will not catch this.
- Prefer enums over union types for discrete value sets (e.g., encryption methods). Avoid introducing new string literal union types.
- Renderer page/component styles should prefer Tailwind utility classes; avoid adding new Vue `<style>` blocks unless there's no reasonable Tailwind equivalent.
- New renderer ↔ main request/response APIs should be implemented via RPC routes (see `src/main/events/rpc/routes/system.ts`) with `RPCRouter` + `IRPCActionType` rather than adding ad-hoc IPC modules (e.g. `picgoCloudIPC`).
Expand All @@ -61,6 +62,8 @@ Place renderer unit specs in `test/unit/specs` with the `.spec.js` suffix; Karma

## Commit & Pull Request Guidelines
Commits follow the PicGo conventional preset enforced by Husky (`pnpm lint:dpdm` + Commitlint). Stage your changes and run `pnpm cz` to craft messages that pass CI. Pull requests should explain the change, link related issues, and attach UI screenshots or recordings. Note how you validated the work (dev server, build, Karma, Spectron) and call out migration or configuration steps reviewers must perform.
- Write pull request titles, descriptions, and review comments in English, even when the conversation with the maintainer is in another language.
- Merge pull requests with squash merge (`gh pr merge <number> --squash`), using the PR title as the squash commit subject. Do not use merge commits or rebase merges, and only merge after all required CI checks have passed.

## Internationalization Tips
Add locales by creating `public/i18n/<locale>.yml`, exposing its `LANG_DISPLAY_LABEL`, and registering it in `src/universal/i18n/index.ts`. Typed i18n declarations are generated automatically from `public/i18n/en.yml` into `src/universal/types/i18n.d.ts` and `src/renderer/i18n/i18next.d.ts`.
Expand Down
6 changes: 6 additions & 0 deletions public/i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ SETTINGS_SET_SERVER_HOST: Set Server Host
SETTINGS_SET_SERVER_PORT: Set Server Port
SETTINGS_TIP_PLACEHOLDER_HOST: Default:127.0.0.1
SETTINGS_TIP_PLACEHOLDER_PORT: Default:36677
SETTINGS_SET_SERVER_SECRET: Set Server Secret
SETTINGS_TIP_PLACEHOLDER_SECRET: Leave empty to disable authentication
SETTINGS_TIPS_SERVER_SECRET: "When set, POST /upload requests must send the header Authorization: Bearer <secret> (or X-PicGo-Secret: <secret>). Leave empty to allow uploads without authentication."
SETTINGS_SHOW_SECRET: Show secret
SETTINGS_HIDE_SECRET: Hide secret
SETTINGS_LOG_LEVEL_ALL: All
SETTINGS_LOG_LEVEL_SUCCESS: Success
SETTINGS_LOG_LEVEL_ERROR: Error
Expand Down Expand Up @@ -444,6 +449,7 @@ PRIVACY: "Please read and agree to the Privacy Policy ${privacyUrl} and Terms of
PRIVACY_TIPS: Please agree the privacy policy to upload
QUIT: Quit
ALBUM_ALL_PHOTOS: All Photos
ALBUM_CONFIG_UNKNOWN: Unsorted
ALBUM_COLLECTIONS: Collections
ALBUM_TAGS: Tags
ALBUM_MENU: Menu
Expand Down
6 changes: 6 additions & 0 deletions public/i18n/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ SETTINGS_SET_SERVER_HOST: サーバーホストを設定
SETTINGS_SET_SERVER_PORT: サーバーポートを設定
SETTINGS_TIP_PLACEHOLDER_HOST: デフォルト:127.0.0.1
SETTINGS_TIP_PLACEHOLDER_PORT: デフォルト:36677
SETTINGS_SET_SERVER_SECRET: サーバーシークレットを設定
SETTINGS_TIP_PLACEHOLDER_SECRET: 空欄の場合は認証を無効にします
SETTINGS_TIPS_SERVER_SECRET: "設定すると、POST /upload リクエストには Authorization: Bearer <secret>(または X-PicGo-Secret: <secret>)ヘッダーが必要になります。空欄の場合は認証なしでアップロードできます。"
SETTINGS_SHOW_SECRET: シークレットを表示
SETTINGS_HIDE_SECRET: シークレットを隠す
SETTINGS_LOG_LEVEL_ALL: すべて
SETTINGS_LOG_LEVEL_SUCCESS: 成功
SETTINGS_LOG_LEVEL_ERROR: エラー
Expand Down Expand Up @@ -444,6 +449,7 @@ PRIVACY: "ご利用の前にプライバシーポリシー${privacyUrl}と利用
PRIVACY_TIPS: アップロードするにはプライバシーポリシーに同意してください
QUIT: 終了
ALBUM_ALL_PHOTOS: すべての写真
ALBUM_CONFIG_UNKNOWN: 未分類
ALBUM_COLLECTIONS: コレクション
ALBUM_TAGS: タグ
ALBUM_MENU: メニュー
Expand Down
6 changes: 6 additions & 0 deletions public/i18n/ko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ SETTINGS_SET_SERVER_HOST: 서버 호스트 설정
SETTINGS_SET_SERVER_PORT: 서버 포트 설정
SETTINGS_TIP_PLACEHOLDER_HOST: 기본값:127.0.0.1
SETTINGS_TIP_PLACEHOLDER_PORT: 기본값:36677
SETTINGS_SET_SERVER_SECRET: 서버 시크릿 설정
SETTINGS_TIP_PLACEHOLDER_SECRET: 비워 두면 인증을 사용하지 않습니다
SETTINGS_TIPS_SERVER_SECRET: "설정하면 POST /upload 요청에 Authorization: Bearer <secret> (또는 X-PicGo-Secret: <secret>) 헤더가 필요합니다. 비워 두면 인증 없이 업로드할 수 있습니다."
SETTINGS_SHOW_SECRET: 시크릿 표시
SETTINGS_HIDE_SECRET: 시크릿 숨기기
SETTINGS_LOG_LEVEL_ALL: 전체
SETTINGS_LOG_LEVEL_SUCCESS: 성공
SETTINGS_LOG_LEVEL_ERROR: 오류
Expand Down Expand Up @@ -444,6 +449,7 @@ PRIVACY: "이용하기 전에 개인정보 처리방침 ${privacyUrl} 및 이용
PRIVACY_TIPS: 업로드하려면 개인정보 처리방침에 동의해 주세요
QUIT: 종료
ALBUM_ALL_PHOTOS: 전체 사진
ALBUM_CONFIG_UNKNOWN: 미분류
ALBUM_COLLECTIONS: 컬렉션
ALBUM_TAGS: 태그
ALBUM_MENU: 메뉴
Expand Down
6 changes: 6 additions & 0 deletions public/i18n/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ SETTINGS_SET_SERVER_HOST: 设置监听地址
SETTINGS_SET_SERVER_PORT: 设置监听端口
SETTINGS_TIP_PLACEHOLDER_HOST: 推荐默认地址:127.0.0.1
SETTINGS_TIP_PLACEHOLDER_PORT: 推荐默认端口:36677
SETTINGS_SET_SERVER_SECRET: 设置上传鉴权密钥
SETTINGS_TIP_PLACEHOLDER_SECRET: 留空则不开启鉴权
SETTINGS_TIPS_SERVER_SECRET: "设置后,调用 POST /upload 需要带上请求头 Authorization: Bearer <密钥>(或 X-PicGo-Secret: <密钥>)。留空则无需鉴权即可上传。"
SETTINGS_SHOW_SECRET: 显示密钥
SETTINGS_HIDE_SECRET: 隐藏密钥
SETTINGS_LOG_LEVEL_ALL: 全部-All
SETTINGS_LOG_LEVEL_SUCCESS: 成功-Success
SETTINGS_LOG_LEVEL_ERROR: 错误-Error
Expand Down Expand Up @@ -444,6 +449,7 @@ PRIVACY: "使用前请阅读并同意隐私政策 ${privacyUrl} 与服务条款
PRIVACY_TIPS: 请同意隐私协议,否则无法上传。
QUIT: 退出
ALBUM_ALL_PHOTOS: 全部照片
ALBUM_CONFIG_UNKNOWN: 未分类
ALBUM_COLLECTIONS: 合集
ALBUM_TAGS: 标签
ALBUM_MENU: 菜单
Expand Down
6 changes: 6 additions & 0 deletions public/i18n/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ SETTINGS_SET_SERVER_HOST: 設定監聽地址
SETTINGS_SET_SERVER_PORT: 設定監聽端口
SETTINGS_TIP_PLACEHOLDER_HOST: 推薦預設地址:127.0.0.1
SETTINGS_TIP_PLACEHOLDER_PORT: 推薦預設端口:36677
SETTINGS_SET_SERVER_SECRET: 設定上傳驗證金鑰
SETTINGS_TIP_PLACEHOLDER_SECRET: 留空則不啟用驗證
SETTINGS_TIPS_SERVER_SECRET: "設定後,呼叫 POST /upload 需要帶上請求標頭 Authorization: Bearer <金鑰>(或 X-PicGo-Secret: <金鑰>)。留空則無需驗證即可上傳。"
SETTINGS_SHOW_SECRET: 顯示金鑰
SETTINGS_HIDE_SECRET: 隱藏金鑰
SETTINGS_LOG_LEVEL_ALL: 全部-All
SETTINGS_LOG_LEVEL_SUCCESS: 成功-Success
SETTINGS_LOG_LEVEL_ERROR: 錯誤-Error
Expand Down Expand Up @@ -444,6 +449,7 @@ PRIVACY: "使用前請閱讀並同意隱私政策 ${privacyUrl} 與服務條款
PRIVACY_TIPS: 請同意隱私協議,否則無法上傳。
QUIT: 退出
ALBUM_ALL_PHOTOS: 全部相片
ALBUM_CONFIG_UNKNOWN: 未分類
ALBUM_COLLECTIONS: 合輯
ALBUM_TAGS: 標籤
ALBUM_MENU: 選單
Expand Down
Loading