Skip to content

增量更新#19

Open
4xiaxia wants to merge 36 commits into
TanShilongMario:mainfrom
4xiaxia:main
Open

增量更新#19
4xiaxia wants to merge 36 commits into
TanShilongMario:mainfrom
4xiaxia:main

Conversation

@4xiaxia

@4xiaxia 4xiaxia commented Jun 5, 2026

Copy link
Copy Markdown

新的内容合并到旧的但是不要改旧的基础配置 如果遇到冲突,先判断是内容还是配置 内容的丰富功能的完善可以修改

Copilot AI and others added 30 commits March 2, 2026 02:10
Co-authored-by: 4xiaxia <223680169+4xiaxia@users.noreply.github.com>
Co-authored-by: 4xiaxia <223680169+4xiaxia@users.noreply.github.com>
Fix title typo, corrupted JSDoc, missing ESLint config; add project blueprint
Co-authored-by: 4xiaxia <223680169+4xiaxia@users.noreply.github.com>
Fix lint errors, undefined references, and hardcoded config found in project analysis
Co-authored-by: 4xiaxia <223680169+4xiaxia@users.noreply.github.com>
…ode splitting

Co-authored-by: 4xiaxia <223680169+4xiaxia@users.noreply.github.com>
…d rename isMobileUA to isMobile

Co-authored-by: 4xiaxia <223680169+4xiaxia@users.noreply.github.com>
…d-performance

perf: Dexie.js caching, Vite code splitting, App.jsx modularization
Fix script path issues, simplify imports, handle permissions, and create initial data files.

Co-authored-by: Xia <223680169+4xiaxia@users.noreply.github.com>
Generate and document project health check report, fix issues, and create configuration guide.

Co-authored-by: Xia <223680169+4xiaxia@users.noreply.github.com>
…with local generation

Co-authored-by: 4xiaxia <223680169+4xiaxia@users.noreply.github.com>
Migrate hardcoded URLs, enhance CDN support, and add documentation

Co-authored-by: Xia <223680169+4xiaxia@users.noreply.github.com>
Simplify and rollback recent changes to resolve syntax issues.

Co-authored-by: Xia <223680169+4xiaxia@users.noreply.github.com>
Optimize image loading and improve configuration management
Co-authored-by: Xia <223680169+4xiaxia@users.noreply.github.com>
Co-authored-by: Xia <223680169+4xiaxia@users.noreply.github.com>
Update iOS version requirements and improve Privacy page UI
…e186ffe-c2c5-46b6-b84a-17561cd6dfa8

Replace hardcoded dev config and external QR API with env-configurable, China-accessible alternatives
Copilot AI review requested due to automatic review settings June 5, 2026 14:52
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

@4xiaxia is attempting to deploy a commit to the Tanshilong's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR refactors runtime/config behaviors (dev server hosts, API endpoints), introduces new hooks for data sync and image export, and migrates IndexedDB storage to Dexie, alongside UI/link/content adjustments and substantial documentation additions.

Changes:

  • Make dev server host allowlist configurable via env var and add Rollup manual chunking.
  • Replace manual IndexedDB usage with Dexie and add useDataSync + useImageExport hooks.
  • Remove launcher scripts and several UI links/sections; add new modals and expand docs/env guidance.

Reviewed changes

Copilot reviewed 51 out of 57 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vite.config.js Env-driven allowedHosts + Rollup manual chunk splitting.
src/utils/db.js Switch IndexedDB wrapper to Dexie-based implementation.
src/hooks/useDataSync.js New hook to sync templates/banks from cloud/static sources.
src/hooks/useImageExport.js New hook to export a “preview card” as an image with QR/watermark.
src/hooks/useShareFunctions.js Adjust base URL logic and error logging in share flows.
scripts/sync-data.js Rework sync script behavior and root dir detection.
src/pages/PrivacyPage.jsx Remove large privacy policy section content.
src/components/modals/* Add Notice / ExportTemplates / ImageUrl modals and update exports.
.env.example + docs/* Add/expand environment/config and architecture docs.
Comments suppressed due to low confidence (9)

src/hooks/useDataSync.js:1

  • Object literal has a duplicate cloud key, so the first entry is overwritten and never used. Rename keys (e.g., cloudApi / cloud) and update the selection logic accordingly.
    src/hooks/useDataSync.js:1
  • Version comparison is done with > on strings (e.g., '0.10.0' vs '0.9.9'), which can select the wrong source/version. Use a semantic version comparator (split by '.' and compare numeric parts) or store/compare versions as monotonically increasing numbers.
    src/hooks/useDataSync.js:1
  • Version comparison is done with > on strings (e.g., '0.10.0' vs '0.9.9'), which can select the wrong source/version. Use a semantic version comparator (split by '.' and compare numeric parts) or store/compare versions as monotonically increasing numbers.
    src/hooks/useShareFunctions.js:1
  • isTauri is computed but not used, causing Tauri builds to potentially generate share links based on a tauri: origin/path that won't be usable externally. Either use a public base URL in Tauri (as the earlier logic did) or rely on a dedicated env-driven public URL (e.g., VITE_PUBLIC_URL) for share links.
    src/hooks/useImageExport.js:1
  • In the long-link fallback path (compressed exists but shortCode is missing), displayUrl contains the importable long URL but qrContentUrl is reset to the homepage. This makes the exported QR code inconsistent with the displayed URL and prevents QR-based import. Consider either encoding the long URL into the QR, or explicitly disabling QR generation (and showing a clear message) when no short code is available.
    src/hooks/useImageExport.js:1
  • This uses document.write with unescaped user-controlled strings (activeTemplateName). If template names can contain HTML, this enables injection into a same-origin window. Prefer building DOM nodes and setting textContent/attributes safely, or escape interpolated values before injecting into HTML.
    src/components/modals/NoticeModal.jsx:1
  • Modal markup is missing common dialog accessibility primitives (e.g., role=\"dialog\", aria-modal=\"true\", and an aria-labelledby pointing to the title). Also consider adding an aria-label for the close icon button and ensuring focus is moved into the dialog on open and restored on close.
    src/utils/helpers.js:1
  • Given the ESLint config ignores unused vars prefixed with _, the eslint-disable-next-line no-unused-vars is likely unnecessary noise here. Consider removing it and relying on the _templateId naming convention for clarity.
    src/pages/PrivacyPage.jsx:1
  • The main privacy policy content section was removed, leaving the page with little/no policy text. If this page is intended to serve as a privacy policy, it should still render the actual policy sections (or load them from a maintained source). Consider restoring the removed sections or replacing them with a new authoritative policy content block.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/sync-data.js
Comment on lines +36 to +40
const versionData = {
appVersion: pkg.version,
dataVersion: "0.9.3",
updatedAt: new Date().toISOString()
};
Comment thread scripts/sync-data.js
Comment on lines +44 to +46
fs.writeFileSync(path.join(dataDir, 'version.json'), JSON.stringify(versionData, null, 2));
fs.writeFileSync(path.join(dataDir, 'templates.json'), JSON.stringify({ version: "0.9.3", config: [] }, null, 2));
fs.writeFileSync(path.join(dataDir, 'banks.json'), JSON.stringify({ banks: {}, defaults: {}, categories: {} }, null, 2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants