diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 4df34da..ef3fad8 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -22,7 +22,7 @@ body: label: 前置阅读 | Pre-reading description: 我已经自行查找、阅读以下内容(阅读了请打勾) | I have searched and read the following on my own (Please tick after reading) options: - - label: "[文档/Doc](https://picgo.github.io/PicGo-Doc/)" + - label: "[文档/Doc](https://docs.picgo.app/gui/)" required: true - label: "[Issues](https://github.com/Molunerfinn/PicGo/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed)" required: true @@ -60,4 +60,4 @@ body: 最后,喜欢 PicGo 的话不妨给它点个 star~ 如果可以的话,请我喝杯咖啡?首页有赞助二维码,谢谢你的支持! Finally, if you like PicGo, give it a star~ - Buy me a cup of coffee if you can? There is a sponsorship QR code on the homepage, thank you for your support! \ No newline at end of file + Buy me a cup of coffee if you can? There is a sponsorship QR code on the homepage, thank you for your support! diff --git a/.gitignore b/.gitignore index dd13f3e..aadc1a3 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ test.js specs/ .cache/ openspec/ +bug* \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index c4ee24b..4bf56a5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,12 +12,20 @@ PicGo is an Electron + Vue 3 desktop client. Source lives in `src/`: `src/main` - `pnpm lint` / `pnpm lint:fix` — run or auto-fix ESLint (Standard, TypeScript, Vue rules). - `pnpm lint:dpdm` — fail fast on circular dependencies in `src/`. - `pnpm check` — run `tsc` + `lint` (run once before finishing a task). +- Before completing a task, always run `pnpm check` and resolve any issues it reports. - `pnpm gen-i18n` — regenerate typed locales after touching `public/i18n/*.yml`. ## Coding Style & Naming Conventions Follow ESLint Standard defaults: two-space indentation, single quotes, trailing commas where allowed, and no stray semicolons. Author new modules in TypeScript. Keep renderer files browser-safe; route Node APIs through IPC helpers such as `src/main/events/picgoCoreIPC.ts`. Name Vue components in PascalCase (`UploadPanel.vue`) and use camelCase for utilities. Centralize IPC event names inside `src/universal/events/constants.ts`, and store enums/types under `src/universal/types/` so they stay reusable. Static assets are served from `public/` and resolved via `getStaticPath`/`getStaticFileUrl` (`src/universal/utils/staticPath.ts`); avoid using `__static` directly. Static assets are served from `public/`. In the main process use `getStaticPath`/`getStaticFileUrl` (`src/universal/utils/staticPath.ts`). In the renderer, place assets under `public/` and resolve them via `import.meta.env.BASE_URL + filename` (helper: `src/renderer/utils/static.ts`); do not rely on `__static` in renderer code. - Do not use `as any` under any circumstances; keep typings explicit and safe. +- Avoid `as any` in tests as well; build concrete typed stubs (e.g., `IpcMainInvokeEvent`) instead. +- Do not prefix method calls with `void` (e.g. use `store?.refreshPicBeds()` rather than `void store?.refreshPicBeds()`). +- If a renderer → main request mutates persisted config/state without using `saveConfig`, call `notifyAppConfigUpdated()` in main to inform renderers. +- 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 ` diff --git a/docs/main.js b/docs/main.js deleted file mode 100644 index 903e5e1..0000000 --- a/docs/main.js +++ /dev/null @@ -1,10 +0,0 @@ -import Vue from 'vue' -import App from './APP.vue' -import 'melody.css' -import axios from 'axios' - -Vue.prototype.$http = axios - -new Vue({ - render: h => h(App) -}).$mount('#app') diff --git a/docs/template.html b/docs/template.html deleted file mode 100644 index 88af599..0000000 --- a/docs/template.html +++ /dev/null @@ -1,12 +0,0 @@ - - -
- - - -