Skip to content
Merged
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
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@
- **Internationalization**: Supports 19 languages and regional settings worldwide

## Screenshots
**NoteWizard Quick Start**
> Tips: software is continuously updated to enhance performance and user experience. Listed features are for reference only and may evolve with technological advancements and user needs.

![NoteWizard Quick Start](./docs/Quick_Start/QuickStart_enUS.webp)
#### Edit mode
![NoteWizard Edit mode](./docs/Quick_Start/en-US/Edit-mode.jpg)
#### Read mode
![NoteWizard Read mode](./docs/Quick_Start/en-US/Read-mode.jpg)
#### General
![NoteWizard General](./docs/Quick_Start/en-US/General.jpg)
#### Security
![NoteWizard Security](./docs/Quick_Start/en-US/Security.jpg)
#### AI configuration
![NoteWizard AI configuration](./docs/Quick_Start/en-US/AI-Config.jpg)

## Supported Platforms

Expand Down
13 changes: 10 additions & 3 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,16 @@
- **国际化**:支持全球19种语言及地区设置

## 界面预览
**NoteWizard 快速上手**
> 提示: 本软件持续更新,以优化性能和用户体验。列出的功能仅供参考,可能随技术进步和需求变化而调整。
![NoteWizard 快速上手](./docs/Quick_Start/QuickStart_zhCN.webp)
#### 编辑模式
![NoteWizard 编辑模式](./docs/Quick_Start/zh-CN/Edit-mode.jpg)
#### 只读模式
![NoteWizard 只读模式](./docs/Quick_Start/zh-CN/Read-mode.jpg)
#### 首选项通用
![NoteWizard 首选项通用](./docs/Quick_Start/zh-CN/General.jpg)
#### 首选项安全
![NoteWizard 首选项安全](./docs/Quick_Start/zh-CN/Security.jpg)
#### 首选项AI配置
![NoteWizard AI辅助写作](./docs/Quick_Start/zh-CN/AI-Config.jpg)

## 支持平台

Expand Down
Binary file removed docs/Quick_Start/QuickStart_enUS.webp
Binary file not shown.
Binary file removed docs/Quick_Start/QuickStart_zhCN.webp
Binary file not shown.
Binary file added docs/Quick_Start/en-US/AI-Config.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Quick_Start/en-US/Edit-mode.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Quick_Start/en-US/General.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Quick_Start/en-US/Read-mode.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Quick_Start/en-US/Security.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Quick_Start/zh-CN/AI-Config.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Quick_Start/zh-CN/Edit-mode.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Quick_Start/zh-CN/General.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Quick_Start/zh-CN/Read-mode.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Quick_Start/zh-CN/Security.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 49 additions & 1 deletion scripts/sync-terms-of-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const __dirname = path.dirname(__filename);
const repoRoot = path.resolve(__dirname, '..');

const wikiRawUrl = 'https://raw.githubusercontent.com/wiki/jetyu/NoteWizard/T01_Terms-of-Service.md';
const allowedWikiHost = 'raw.githubusercontent.com';
const maxTermsSizeBytes = 200 * 1024;

const outputPath = path.join(repoRoot, 'src', 'assets', 'terms-of-service', 'local-tos.txt');

Expand All @@ -23,7 +25,52 @@ function markdownToText(markdown) {
.trim();
}

function validateSourceUrl(rawUrl) {
const url = new URL(rawUrl);
if (url.protocol !== 'https:') {
throw new Error(`Unexpected protocol for terms source: ${url.protocol}`);
}

if (url.hostname !== allowedWikiHost) {
throw new Error(`Unexpected host for terms source: ${url.hostname}`);
}

if (!url.pathname.startsWith('/wiki/jetyu/NoteWizard/')) {
throw new Error(`Unexpected path for terms source: ${url.pathname}`);
}
}

function validateResponse(response) {
const contentType = response.headers.get('content-type') || '';
if (!/^text\//i.test(contentType)) {
throw new Error(`Unexpected content type for terms source: ${contentType || 'unknown'}`);
}

const contentLengthHeader = response.headers.get('content-length');
const contentLength = Number(contentLengthHeader || 0);
if (Number.isFinite(contentLength) && contentLength > maxTermsSizeBytes) {
throw new Error(`Terms source too large: ${contentLength} bytes`);
}
}

function sanitizeTermsText(text) {
const normalized = text
.replace(/\u0000/g, '')
.replace(/[\u0001-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, '');

if (!/terms of service/i.test(normalized)) {
throw new Error('Downloaded terms content failed validation.');
}

if (Buffer.byteLength(normalized, 'utf8') > maxTermsSizeBytes) {
throw new Error('Downloaded terms content exceeded size limit after processing.');
}

return normalized;
}

async function main() {
validateSourceUrl(wikiRawUrl);
await fs.mkdir(path.dirname(outputPath), { recursive: true });

let existing = '';
Expand All @@ -36,9 +83,10 @@ async function main() {
try {
const response = await fetch(wikiRawUrl);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
validateResponse(response);

const markdown = await response.text();
const text = markdownToText(markdown) + '\n';
const text = sanitizeTermsText(markdownToText(markdown)) + '\n';
await fs.writeFile(outputPath, '\ufeff' + text, 'utf8');
console.log(`Synced Terms of Service from wiki: ${wikiRawUrl}`);
return;
Expand Down
3 changes: 2 additions & 1 deletion src/assets/changelog/history_cn.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
### [1.1.4] - 2026-03-08
#### 修复
- 修复在配置文件缺失情况下导致密钥验证异常的问题。
- 修复更新加密元数据时可能出现的文件系统竞态条件问题。
- 修复只读模式状态下笔记不显示只读图标的问题。
- 修复可能导致数据更新不一致的潜在问题。
#### 优化
- 优化预览界面渲染机制,提升滚动流畅度。

Expand Down
3 changes: 2 additions & 1 deletion src/assets/changelog/history_en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
### [1.1.4] - 2026-03-08
#### Fixed
- Fixed an issue that caused key verification to fail when the configuration file was missing.
- Fix a potential file system race condition when updating encryption metadata.
- Fixed an issue where the note read-only icon was not displayed in read-only mode.
- Fixed an potential data inconsistency issue.
#### Improved
- Optimize the preview interface rendering mechanism to improve scrolling smoothness.

Expand Down
Loading