feat: UI/UX polish — Multi-target slogan, dynamic placeholders, social, reverse highlight, mobile (#35)
* feat(i18n): dynamic placeholders + Multi-target slogan
- Replace "Eight target formats" with "Multi-target formats" in app.description across en/vi/ja/zh-CN
- Add input_placeholder_format and output_empty_format keys with {{ext}} interpolation
- InputPanel and OutputPanel render extension-aware placeholders in reverse mode (e.g. "Paste your CSV here...", "Output will appear here once you provide valid YAML.")
- Forward mode keeps the original JSON-specific copy
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(ui): social links in Footer + About Community section
- Add SocialIcons component with 6 inline-SVG brand icons (Discord, X, Bluesky, Mastodon, Telegram, YouTube), since lucide-react has no brand icons
- Footer now exposes Discord (dev community) / X / Bluesky as a centered icon row, sandwiched between app meta and the maintainer credit
- About page gains a "Community" section between Donate and Third-party, listing all six platforms with icon + label
- Add i18n keys: about.community.* (titled section) and social.* (aria-labels) across en/vi/ja/zh-CN
- Curated based on username.txt: includes dev-relevant + maintainer's public socials; excludes Steam, Discord game server, email, and the Telegram bot (off-topic for the project)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(editor): scroll polish + reverse highlight for md/sql/toml/jsonl
Scroll fix
- .cm-scroller switched from scrollbarWidth: 'none' to 'thin' and explicit overflow: 'auto'. Hiding the native scrollbar was making wheel scroll require a click-to-focus before it engaged on some Chromium builds. Thin themed scrollbar reads fine on both light and dark theme.
Reverse-mode highlight
- Add @codemirror/lang-markdown, @codemirror/lang-sql, @codemirror/legacy-modes
- CodeEditor's EditorLanguage union now covers markdown, sql, and toml
- InputPanel maps jsonl -> json, markdown -> markdown, sql -> sql, toml -> toml; csv/tsv stay plain (no good CodeMirror grammar)
- All extensions go through the existing prismHighlightStyle, so colors stay consistent with forward JSON highlighting
Bundle impact: the three new packs are routed into the existing 'codemirror' manualChunk; no initial-bundle regression.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(ui): mobile responsiveness polish
- Header: nav links Convert/About now always visible (previously hidden md:flex), brand mark + wordmark scale down on small screens, padding tightened to 12px so the 360px viewport fits brand + nav + lang + theme + GitHub icon
- InputPanel/OutputPanel toolbar buttons: icon-only on mobile (label hidden below sm); aria-label and title now carry the text for a11y/tooltips
- ConverterWorkspace panels: min-h-[40vh] on mobile so the stacked Input/Output each keep a usable height instead of collapsing
- Home hero: stack the title and the drop-zone hint on mobile (flex-col), reduce outer padding
- About page: reduce outer padding on mobile (px-4 py-10) to claw back horizontal space
- FormatPicker chips: smaller padding + 11px font on mobile so the 12-format wrap stays compact
Skipped hamburger menu by design — Header only has 2 nav links, the drawer pattern adds bundle and complexity without payoff.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: refresh README EN + VI for Multi-target slogan, full format table, Community section
- Replace "Eight target formats" tagline with "Multi-target formats" (EN) / "Đa định dạng đích" (VI), matching the in-app app.description copy
- VI README format table now mirrors EN: includes BSON / CBOR / MessagePack (Phase 4) and the "Reverse (→ JSON)" column that the VI side was missing
- Bump tech-stack line from Vite 6 to Vite 8 in both files (package.json has been on ^8.0.0 for a while; the About page already reflected this)
- Add a Community section listing Discord (dev community), X, Bluesky, Mastodon, Telegram, and YouTube — same set as the in-app Community section, sourced from the maintainer's public socials
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
2d8c416975
commit
27743986cc
18 files changed
+485
-42
No files matched your search
@@ -4,7 +4,7 @@
|
||||
|
||||
**Disperse JSON into many formats.**
|
||||
|
||||
One JSON input. Eight target formats. Fully in your browser.
|
||||
One JSON input. Multi-target formats. Fully in your browser.
|
||||
|
||||
[](https://github.com/poli0981/jsonPrism/actions/workflows/ci.yml)
|
||||
[](https://github.com/poli0981/jsonPrism/actions/workflows/deploy.yml)
|
||||
@@ -47,7 +47,7 @@ JSONPrism is a refracting tool for developers. It takes a single JSON input and
|
||||
|
||||
## Tech stack
|
||||
|
||||
- **Vite 6** + **React 19** + **TypeScript 5.7**
|
||||
- **Vite 8** + **React 19** + **TypeScript 5.7**
|
||||
- **Tailwind CSS v4** + **shadcn/ui** (New York style, neutral base)
|
||||
- **CodeMirror 6** for the input editor (Phase 1 polish)
|
||||
- **PapaParse**, **js-yaml**, **smol-toml**, **fast-xml-parser** for parsing/serialization
|
||||
@@ -205,6 +205,17 @@ For bug reports and feature requests, use [GitHub Issues](https://github.com/pol
|
||||
| [`docs/TAURI-NOTES.md`](docs/TAURI-NOTES.md) | Tauri build / process notes. |
|
||||
| [`docs/RESX-MIGRATION.md`](docs/RESX-MIGRATION.md) | i18next JSON → .NET RESX tutorial. |
|
||||
|
||||
## Community
|
||||
|
||||
Hang out, ask questions, or follow updates:
|
||||
|
||||
- [Discord — dev community](https://discord.gg/2aNR3aVt)
|
||||
- [X (Twitter) — @SkullMute0011](https://twitter.com/SkullMute0011)
|
||||
- [Bluesky — @skullmute0011.bsky.social](https://bsky.app/profile/skullmute0011.bsky.social)
|
||||
- [Mastodon — @skullmute1122@mastodon.social](https://mastodon.social/@skullmute1122)
|
||||
- [Telegram — @SkullMute0011](https://t.me/SkullMute0011)
|
||||
- [YouTube — @SkullMute](https://youtube.com/@SkullMute)
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
Substantial parts of JSONPrism's code, tests, translations, and docs
|
||||
|
||||
+27
-13
@@ -4,7 +4,7 @@
|
||||
|
||||
**Tán sắc JSON ra nhiều định dạng.**
|
||||
|
||||
Một JSON đầu vào. Tám định dạng đích. Chạy hoàn toàn trong trình duyệt.
|
||||
Một JSON đầu vào. Đa định dạng đích. Chạy hoàn toàn trong trình duyệt.
|
||||
|
||||
[](https://github.com/poli0981/jsonPrism/actions/workflows/ci.yml)
|
||||
[](https://github.com/poli0981/jsonPrism/actions/workflows/deploy.yml)
|
||||
@@ -20,17 +20,20 @@ JSONPrism là công cụ "tán sắc" cho developer. Nhận một JSON đầu v
|
||||
|
||||
## Định dạng hỗ trợ
|
||||
|
||||
| Định dạng | Phần mở rộng | Trạng thái |
|
||||
| ----------------- | ------------ | -------------- |
|
||||
| JSONL | `.jsonl` | ✅ Phase 1 |
|
||||
| CSV | `.csv` | ✅ Phase 1 |
|
||||
| TSV | `.tsv` | ✅ Phase 1 |
|
||||
| YAML | `.yaml` | ✅ Phase 1 |
|
||||
| XML | `.xml` | ✅ Phase 2 |
|
||||
| TOML | `.toml` | ✅ Phase 2 |
|
||||
| Bảng Markdown | `.md` | ✅ Phase 2 |
|
||||
| SQL `INSERT` | `.sql` | ✅ Phase 2 |
|
||||
| RESX (.NET) | `.resx` | ✅ Phase 3 |
|
||||
| Định dạng | Phần mở rộng | Trạng thái | Đảo (→ JSON) |
|
||||
| ----------------- | ------------ | -------------- | ------------ |
|
||||
| JSONL | `.jsonl` | ✅ Phase 1 | ✅ |
|
||||
| CSV | `.csv` | ✅ Phase 1 | ✅ |
|
||||
| TSV | `.tsv` | ✅ Phase 1 | ✅ |
|
||||
| YAML | `.yaml` | ✅ Phase 1 | ✅ |
|
||||
| XML | `.xml` | ✅ Phase 2 | — |
|
||||
| TOML | `.toml` | ✅ Phase 2 | ✅ |
|
||||
| Bảng Markdown | `.md` | ✅ Phase 2 | — |
|
||||
| SQL `INSERT` | `.sql` | ✅ Phase 2 | — |
|
||||
| RESX (.NET) | `.resx` | ✅ Phase 3 | ✅ |
|
||||
| BSON | `.bson` | ✅ Phase 4 | — |
|
||||
| CBOR | `.cbor` | ✅ Phase 4 | — |
|
||||
| MessagePack | `.msgpack` | ✅ Phase 4 | — |
|
||||
|
||||
## Tính năng
|
||||
|
||||
@@ -44,7 +47,7 @@ JSONPrism là công cụ "tán sắc" cho developer. Nhận một JSON đầu v
|
||||
|
||||
## Tech stack
|
||||
|
||||
- **Vite 6** + **React 19** + **TypeScript 5.7**
|
||||
- **Vite 8** + **React 19** + **TypeScript 5.7**
|
||||
- **Tailwind CSS v4** + **shadcn/ui** (style New York, base neutral)
|
||||
- **CodeMirror 6** cho editor đầu vào (Phase 1 polish)
|
||||
- **PapaParse**, **js-yaml**, **smol-toml**, **fast-xml-parser** để parse/serialize
|
||||
@@ -202,6 +205,17 @@ Báo bug hoặc đề xuất tính năng tại [GitHub Issues](https://github.co
|
||||
| [`docs/TAURI-NOTES.md`](docs/TAURI-NOTES.md) | Ghi chú Tauri build / process. |
|
||||
| [`docs/RESX-MIGRATION.md`](docs/RESX-MIGRATION.md) | Hướng dẫn i18next JSON → .NET RESX. |
|
||||
|
||||
## Cộng đồng
|
||||
|
||||
Trò chuyện, hỏi đáp, hoặc theo dõi cập nhật:
|
||||
|
||||
- [Discord — cộng đồng dev](https://discord.gg/2aNR3aVt)
|
||||
- [X (Twitter) — @SkullMute0011](https://twitter.com/SkullMute0011)
|
||||
- [Bluesky — @skullmute0011.bsky.social](https://bsky.app/profile/skullmute0011.bsky.social)
|
||||
- [Mastodon — @skullmute1122@mastodon.social](https://mastodon.social/@skullmute1122)
|
||||
- [Telegram — @SkullMute0011](https://t.me/SkullMute0011)
|
||||
- [YouTube — @SkullMute](https://youtube.com/@SkullMute)
|
||||
|
||||
## Ghi nhận
|
||||
|
||||
Phần lớn code, test, bản dịch và tài liệu của JSONPrism được draft với
|
||||
|
||||
Generated
+129
@@ -10,9 +10,12 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@codemirror/lang-json": "^6.0.0",
|
||||
"@codemirror/lang-markdown": "^6.5.0",
|
||||
"@codemirror/lang-sql": "^6.10.0",
|
||||
"@codemirror/lang-xml": "^6.1.0",
|
||||
"@codemirror/lang-yaml": "^6.1.3",
|
||||
"@codemirror/language": "^6.10.0",
|
||||
"@codemirror/legacy-modes": "^6.5.2",
|
||||
"@codemirror/lint": "^6.8.0",
|
||||
"@codemirror/state": "^6.4.0",
|
||||
"@codemirror/view": "^6.34.0",
|
||||
@@ -337,6 +340,51 @@
|
||||
"@lezer/common": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/lang-css": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-6.3.1.tgz",
|
||||
"integrity": "sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.0.0",
|
||||
"@codemirror/language": "^6.0.0",
|
||||
"@codemirror/state": "^6.0.0",
|
||||
"@lezer/common": "^1.0.2",
|
||||
"@lezer/css": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/lang-html": {
|
||||
"version": "6.4.11",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.11.tgz",
|
||||
"integrity": "sha512-9NsXp7Nwp891pQchI7gPdTwBuSuT3K65NGTHWHNJ55HjYcHLllr0rbIZNdOzas9ztc1EUVBlHou85FFZS4BNnw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.0.0",
|
||||
"@codemirror/lang-css": "^6.0.0",
|
||||
"@codemirror/lang-javascript": "^6.0.0",
|
||||
"@codemirror/language": "^6.4.0",
|
||||
"@codemirror/state": "^6.0.0",
|
||||
"@codemirror/view": "^6.17.0",
|
||||
"@lezer/common": "^1.0.0",
|
||||
"@lezer/css": "^1.1.0",
|
||||
"@lezer/html": "^1.3.12"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/lang-javascript": {
|
||||
"version": "6.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.2.5.tgz",
|
||||
"integrity": "sha512-zD4e5mS+50htS7F+TYjBPsiIFGanfVqg4HyUz6WNFikgOPf2BgKlx+TQedI1w6n/IqRBVBbBWmGFdLB/7uxO4A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.0.0",
|
||||
"@codemirror/language": "^6.6.0",
|
||||
"@codemirror/lint": "^6.0.0",
|
||||
"@codemirror/state": "^6.0.0",
|
||||
"@codemirror/view": "^6.17.0",
|
||||
"@lezer/common": "^1.0.0",
|
||||
"@lezer/javascript": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/lang-json": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-json/-/lang-json-6.0.2.tgz",
|
||||
@@ -347,6 +395,35 @@
|
||||
"@lezer/json": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/lang-markdown": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.5.0.tgz",
|
||||
"integrity": "sha512-0K40bZ35jpHya6FriukbgaleaqzBLZfOh7HuzqbMxBXkbYMJDxfF39c23xOgxFezR+3G+tR2/Mup+Xk865OMvw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.7.1",
|
||||
"@codemirror/lang-html": "^6.0.0",
|
||||
"@codemirror/language": "^6.3.0",
|
||||
"@codemirror/state": "^6.0.0",
|
||||
"@codemirror/view": "^6.0.0",
|
||||
"@lezer/common": "^1.2.1",
|
||||
"@lezer/markdown": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/lang-sql": {
|
||||
"version": "6.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-sql/-/lang-sql-6.10.0.tgz",
|
||||
"integrity": "sha512-6ayPkEd/yRw0XKBx5uAiToSgGECo/GY2NoJIHXIIQh1EVwLuKoU8BP/qK0qH5NLXAbtJRLuT73hx7P9X34iO4w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.0.0",
|
||||
"@codemirror/language": "^6.0.0",
|
||||
"@codemirror/state": "^6.0.0",
|
||||
"@lezer/common": "^1.2.0",
|
||||
"@lezer/highlight": "^1.0.0",
|
||||
"@lezer/lr": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/lang-xml": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-xml/-/lang-xml-6.1.0.tgz",
|
||||
@@ -390,6 +467,15 @@
|
||||
"style-mod": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/legacy-modes": {
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/legacy-modes/-/legacy-modes-6.5.2.tgz",
|
||||
"integrity": "sha512-/jJbwSTazlQEDOQw2FJ8LEEKVS72pU0lx6oM54kGpL8t/NJ2Jda3CZ4pcltiKTdqYSRk3ug1B3pil1gsjA6+8Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/language": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/lint": {
|
||||
"version": "6.9.6",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.6.tgz",
|
||||
@@ -903,6 +989,17 @@
|
||||
"integrity": "sha512-sxQE460fPZyU3sdc8lafxiPwJHBzZRy/udNFynGQky1SePYBdhkBl1kOagA9uT3pxR8K09bOrmTUqA9wb/PjSQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@lezer/css": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.3.3.tgz",
|
||||
"integrity": "sha512-RzBo8r+/6QJeow7aPHIpGVIH59xTcJXp399820gZoMo9noQDRVpJLheIBUicYwKcsbOYoBRoLZlf2720dG/4Tg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@lezer/common": "^1.2.0",
|
||||
"@lezer/highlight": "^1.0.0",
|
||||
"@lezer/lr": "^1.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@lezer/highlight": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz",
|
||||
@@ -912,6 +1009,28 @@
|
||||
"@lezer/common": "^1.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@lezer/html": {
|
||||
"version": "1.3.13",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.13.tgz",
|
||||
"integrity": "sha512-oI7n6NJml729m7pjm9lvLvmXbdoMoi2f+1pwSDJkl9d68zGr7a9Btz8NdHTGQZtW2DA25ybeuv/SyDb9D5tseg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@lezer/common": "^1.2.0",
|
||||
"@lezer/highlight": "^1.0.0",
|
||||
"@lezer/lr": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@lezer/javascript": {
|
||||
"version": "1.5.4",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.5.4.tgz",
|
||||
"integrity": "sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@lezer/common": "^1.2.0",
|
||||
"@lezer/highlight": "^1.1.3",
|
||||
"@lezer/lr": "^1.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@lezer/json": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/json/-/json-1.0.3.tgz",
|
||||
@@ -932,6 +1051,16 @@
|
||||
"@lezer/common": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@lezer/markdown": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/markdown/-/markdown-1.6.3.tgz",
|
||||
"integrity": "sha512-jpGm5Ps+XErS+xA4urw7ogEGkeZOahVQF21Z6oECF0sj+2liwZopd2+I8uH5I/vZsRuuze3OxBREIANLf6KKUw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@lezer/common": "^1.5.0",
|
||||
"@lezer/highlight": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@lezer/xml": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/xml/-/xml-1.0.6.tgz",
|
||||
|
||||
@@ -34,9 +34,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/lang-json": "^6.0.0",
|
||||
"@codemirror/lang-markdown": "^6.5.0",
|
||||
"@codemirror/lang-sql": "^6.10.0",
|
||||
"@codemirror/lang-xml": "^6.1.0",
|
||||
"@codemirror/lang-yaml": "^6.1.3",
|
||||
"@codemirror/language": "^6.10.0",
|
||||
"@codemirror/legacy-modes": "^6.5.2",
|
||||
"@codemirror/lint": "^6.8.0",
|
||||
"@codemirror/state": "^6.4.0",
|
||||
"@codemirror/view": "^6.34.0",
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
interface IconProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function DiscordIcon({ className }: IconProps) {
|
||||
return (
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" className={className} aria-hidden>
|
||||
<path d="M20.317 4.369A19.79 19.79 0 0 0 16.558 3.2a.074.074 0 0 0-.079.037c-.34.6-.719 1.385-.984 2.001a18.27 18.27 0 0 0-5.487 0 12.5 12.5 0 0 0-.997-2.001.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 5.18 4.369a.07.07 0 0 0-.032.027C2.39 8.523 1.64 12.572 2.005 16.573a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.077.077 0 0 0 .084-.028c.462-.63.873-1.295 1.226-1.994a.076.076 0 0 0-.041-.105 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.371-.291a.074.074 0 0 1 .078-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .079.009c.12.099.245.198.372.292a.077.077 0 0 1-.006.128 12.3 12.3 0 0 1-1.873.891.077.077 0 0 0-.041.106c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.029 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-4.79-.838-8.806-3.548-12.179a.061.061 0 0 0-.031-.028zM8.02 14.331c-1.182 0-2.157-1.085-2.157-2.42 0-1.333.956-2.418 2.157-2.418 1.21 0 2.176 1.094 2.157 2.419 0 1.334-.956 2.42-2.157 2.42zm7.974 0c-1.182 0-2.157-1.085-2.157-2.42 0-1.333.955-2.418 2.157-2.418 1.21 0 2.176 1.094 2.157 2.419 0 1.334-.946 2.42-2.157 2.42z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function XIcon({ className }: IconProps) {
|
||||
return (
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" className={className} aria-hidden>
|
||||
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function BlueskyIcon({ className }: IconProps) {
|
||||
return (
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" className={className} aria-hidden>
|
||||
<path d="M5.918 4.55C8.93 6.84 12.171 11.482 13.36 13.97c1.187-2.488 4.43-7.13 7.44-9.42 2.173-1.652 5.696-2.93 5.696 1.116 0 .808-.46 6.788-.732 7.76-.94 3.379-4.358 4.24-7.4 3.717 5.318.918 6.671 3.94 3.748 6.96-5.55 5.74-7.974-1.44-8.596-3.281-.114-.337-.167-.495-.167-.361 0-.134-.053.024-.167.361-.621 1.841-3.046 9.022-8.595 3.281-2.923-3.02-1.571-6.042 3.748-6.96-3.043.523-6.46-.338-7.4-3.717C.265 12.454-.196 6.474-.196 5.666c0-4.046 3.523-2.768 5.696-1.116l.418.001-.001.001z" transform="translate(0.196 0)" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function MastodonIcon({ className }: IconProps) {
|
||||
return (
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" className={className} aria-hidden>
|
||||
<path d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.673-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function TelegramIcon({ className }: IconProps) {
|
||||
return (
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" className={className} aria-hidden>
|
||||
<path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function YoutubeIcon({ className }: IconProps) {
|
||||
return (
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" className={className} aria-hidden>
|
||||
<path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -3,13 +3,16 @@ import CodeMirror, { type ReactCodeMirrorRef, EditorView } from '@uiw/react-code
|
||||
import { json, jsonParseLinter } from '@codemirror/lang-json';
|
||||
import { yaml } from '@codemirror/lang-yaml';
|
||||
import { xml } from '@codemirror/lang-xml';
|
||||
import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
|
||||
import { markdown } from '@codemirror/lang-markdown';
|
||||
import { sql } from '@codemirror/lang-sql';
|
||||
import { HighlightStyle, StreamLanguage, syntaxHighlighting } from '@codemirror/language';
|
||||
import { toml } from '@codemirror/legacy-modes/mode/toml';
|
||||
import { lintGutter, linter } from '@codemirror/lint';
|
||||
import { tags as t } from '@lezer/highlight';
|
||||
import { useTheme } from '@/lib/theme';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
export type EditorLanguage = 'json' | 'plain' | 'yaml' | 'xml';
|
||||
export type EditorLanguage = 'json' | 'plain' | 'yaml' | 'xml' | 'markdown' | 'sql' | 'toml';
|
||||
|
||||
interface CodeEditorProps {
|
||||
value: string;
|
||||
@@ -57,6 +60,12 @@ export function CodeEditor({
|
||||
exts.push(yaml());
|
||||
} else if (language === 'xml') {
|
||||
exts.push(xml());
|
||||
} else if (language === 'markdown') {
|
||||
exts.push(markdown());
|
||||
} else if (language === 'sql') {
|
||||
exts.push(sql());
|
||||
} else if (language === 'toml') {
|
||||
exts.push(StreamLanguage.define(toml));
|
||||
}
|
||||
exts.push(syntaxHighlighting(prismHighlightStyle));
|
||||
exts.push(EditorView.lineWrapping);
|
||||
@@ -76,11 +85,18 @@ export function CodeEditor({
|
||||
'.cm-scroller': {
|
||||
fontFamily: 'var(--font-mono)',
|
||||
lineHeight: '1.6',
|
||||
// Hide native scrollbar while keeping wheel/keyboard scroll.
|
||||
scrollbarWidth: 'none',
|
||||
overflow: 'auto',
|
||||
// Show a thin native scrollbar — `scrollbarWidth: 'none'` made wheel
|
||||
// scroll require a click-to-focus first on some browsers.
|
||||
scrollbarWidth: 'thin',
|
||||
},
|
||||
'.cm-scroller::-webkit-scrollbar': {
|
||||
display: 'none',
|
||||
width: '8px',
|
||||
height: '8px',
|
||||
},
|
||||
'.cm-scroller::-webkit-scrollbar-thumb': {
|
||||
backgroundColor: 'color-mix(in oklch, var(--muted-foreground) 30%, transparent)',
|
||||
borderRadius: '4px',
|
||||
},
|
||||
'.cm-content': {
|
||||
padding: '16px 0',
|
||||
|
||||
@@ -216,7 +216,7 @@ export function ConverterWorkspace() {
|
||||
|
||||
<div className="border-border bg-card/40 flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border">
|
||||
<div className="grid min-h-0 flex-1 md:grid-cols-2">
|
||||
<div className="md:border-border/60 min-h-0 border-b md:border-r md:border-b-0">
|
||||
<div className="md:border-border/60 min-h-[40vh] border-b md:min-h-0 md:border-r md:border-b-0">
|
||||
<InputPanel
|
||||
value={input}
|
||||
onChange={setInput}
|
||||
@@ -226,7 +226,7 @@ export function ConverterWorkspace() {
|
||||
onMultiFileDrop={handleMultiFileDrop}
|
||||
/>
|
||||
</div>
|
||||
<div className="min-h-0">
|
||||
<div className="min-h-[40vh] md:min-h-0">
|
||||
<OutputPanel
|
||||
format={format}
|
||||
content={output}
|
||||
|
||||
@@ -35,7 +35,7 @@ export function FormatPicker({ value, onChange, shape, direction = 'forward' }:
|
||||
onClick={() => onChange(id)}
|
||||
disabled={!enabled}
|
||||
className={cn(
|
||||
'group relative inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium transition',
|
||||
'group relative inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-[11px] font-medium transition sm:px-2.5 sm:py-1 sm:text-xs',
|
||||
active
|
||||
? 'border-primary/60 bg-primary/10 text-foreground'
|
||||
: 'border-border bg-card/40 text-muted-foreground hover:text-foreground hover:border-border',
|
||||
|
||||
@@ -65,6 +65,10 @@ export function InputPanel({
|
||||
if (!isReverse) return 'json';
|
||||
if (format === 'yaml') return 'yaml';
|
||||
if (format === 'xml' || format === 'resx') return 'xml';
|
||||
if (format === 'jsonl') return 'json';
|
||||
if (format === 'markdown') return 'markdown';
|
||||
if (format === 'sql') return 'sql';
|
||||
if (format === 'toml') return 'toml';
|
||||
return 'plain';
|
||||
}, [isReverse, format]);
|
||||
|
||||
@@ -218,7 +222,13 @@ export function InputPanel({
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
language={editorLanguage}
|
||||
placeholder={t('home.input_placeholder')}
|
||||
placeholder={
|
||||
isReverse
|
||||
? t('home.input_placeholder_format', {
|
||||
ext: converter.meta.extension.toUpperCase(),
|
||||
})
|
||||
: t('home.input_placeholder')
|
||||
}
|
||||
/>
|
||||
{showOverlay && (
|
||||
<div className="bg-background/80 pointer-events-none absolute inset-0 z-10 flex items-center justify-center backdrop-blur-sm">
|
||||
@@ -257,10 +267,12 @@ function ToolbarButton({ onClick, label, icon, disabled }: ToolbarButtonProps) {
|
||||
type="button"
|
||||
onClick={onClick}
|
||||
disabled={disabled}
|
||||
aria-label={label}
|
||||
title={label}
|
||||
className="text-muted-foreground hover:bg-muted hover:text-foreground inline-flex items-center gap-1.5 rounded px-2 py-1 text-xs transition disabled:cursor-not-allowed disabled:opacity-40"
|
||||
>
|
||||
{icon}
|
||||
<span>{label}</span>
|
||||
<span className="hidden sm:inline">{label}</span>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
@@ -109,7 +109,11 @@ export function OutputPanel({
|
||||
</pre>
|
||||
) : (
|
||||
<div className="text-muted-foreground/60 p-4 text-sm italic">
|
||||
{t('home.output_empty')}
|
||||
{isReverse
|
||||
? t('home.output_empty_format', {
|
||||
ext: converter.meta.extension.toUpperCase(),
|
||||
})
|
||||
: t('home.output_empty')}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -130,10 +134,12 @@ function ToolbarButton({ onClick, label, icon, disabled }: ToolbarButtonProps) {
|
||||
type="button"
|
||||
onClick={onClick}
|
||||
disabled={disabled}
|
||||
aria-label={label}
|
||||
title={label}
|
||||
className="text-muted-foreground hover:bg-muted hover:text-foreground inline-flex items-center gap-1.5 rounded px-2 py-1 text-xs transition disabled:cursor-not-allowed disabled:opacity-40"
|
||||
>
|
||||
{icon}
|
||||
<span>{label}</span>
|
||||
<span className="hidden sm:inline">{label}</span>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
@@ -1,10 +1,32 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { BlueskyIcon, DiscordIcon, XIcon } from '@/components/common/SocialIcons';
|
||||
|
||||
export function Footer() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<footer className="border-border/60 text-muted-foreground border-t px-6 py-6 text-xs">
|
||||
<div className="mx-auto flex max-w-screen-2xl flex-col items-center justify-between gap-2 sm:flex-row">
|
||||
<div className="mx-auto flex max-w-screen-2xl flex-col items-center justify-between gap-3 sm:flex-row sm:gap-2">
|
||||
<div>
|
||||
<span className="font-mono">JSONPrism</span> · v{__APP_VERSION__} · Apache-2.0
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<SocialLink
|
||||
href="https://discord.gg/2aNR3aVt"
|
||||
label={t('social.discord')}
|
||||
icon={<DiscordIcon className="h-3.5 w-3.5" />}
|
||||
/>
|
||||
<SocialLink
|
||||
href="https://twitter.com/SkullMute0011"
|
||||
label={t('social.x')}
|
||||
icon={<XIcon className="h-3.5 w-3.5" />}
|
||||
/>
|
||||
<SocialLink
|
||||
href="https://bsky.app/profile/skullmute0011.bsky.social"
|
||||
label={t('social.bluesky')}
|
||||
icon={<BlueskyIcon className="h-3.5 w-3.5" />}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex items-center gap-1.5">
|
||||
<span>Built by</span>
|
||||
<a
|
||||
@@ -20,3 +42,24 @@ export function Footer() {
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
|
||||
interface SocialLinkProps {
|
||||
href: string;
|
||||
label: string;
|
||||
icon: React.ReactNode;
|
||||
}
|
||||
|
||||
function SocialLink({ href, label, icon }: SocialLinkProps) {
|
||||
return (
|
||||
<a
|
||||
href={href}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
aria-label={label}
|
||||
title={label}
|
||||
className="hover:text-foreground inline-flex h-7 w-7 items-center justify-center rounded transition"
|
||||
>
|
||||
{icon}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
@@ -10,15 +10,15 @@ export function Header() {
|
||||
|
||||
return (
|
||||
<header className="border-border/60 bg-background/80 sticky top-0 z-40 border-b backdrop-blur-md">
|
||||
<div className="mx-auto flex h-14 max-w-screen-2xl items-center gap-6 px-6">
|
||||
<Link to="/" className="group flex items-center gap-2.5">
|
||||
<BrandMark className="h-7 w-7" />
|
||||
<span className="font-display text-xl leading-none tracking-tight">
|
||||
<div className="mx-auto flex h-14 max-w-screen-2xl items-center gap-2 px-3 sm:gap-6 sm:px-6">
|
||||
<Link to="/" className="group flex items-center gap-2 sm:gap-2.5">
|
||||
<BrandMark className="h-6 w-6 sm:h-7 sm:w-7" />
|
||||
<span className="font-display text-base leading-none tracking-tight sm:text-xl">
|
||||
JSON<span className="text-spectrum italic">Prism</span>
|
||||
</span>
|
||||
</Link>
|
||||
|
||||
<nav className="ml-6 hidden gap-1 md:flex">
|
||||
<nav className="flex gap-0.5 md:ml-6 md:gap-1">
|
||||
<NavItem to="/" end>
|
||||
{t('nav.home')}
|
||||
</NavItem>
|
||||
@@ -56,7 +56,7 @@ function NavItem({ to, end, children }: NavItemProps) {
|
||||
{...(end !== undefined ? { end } : {})}
|
||||
className={({ isActive }) =>
|
||||
cn(
|
||||
'inline-flex h-9 items-center rounded-md px-3 text-sm font-medium transition',
|
||||
'inline-flex h-9 items-center rounded-md px-2 text-sm font-medium transition sm:px-3',
|
||||
isActive
|
||||
? 'text-foreground bg-muted/60'
|
||||
: 'text-muted-foreground hover:text-foreground hover:bg-muted/40',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"app": {
|
||||
"name": "JSONPrism",
|
||||
"tagline": "Disperse JSON into many formats",
|
||||
"description": "One JSON input. Eight target formats. Fully in your browser."
|
||||
"description": "One JSON input. Multi-target formats. Fully in your browser."
|
||||
},
|
||||
"nav": {
|
||||
"home": "Convert",
|
||||
@@ -13,8 +13,10 @@
|
||||
"input_label": "Input JSON",
|
||||
"input_label_format": "Input {{format}}",
|
||||
"input_placeholder": "Paste your JSON here, drop files, or load a sample…",
|
||||
"input_placeholder_format": "Paste your {{ext}} here, drop files, or load a sample…",
|
||||
"output_label": "Output",
|
||||
"output_empty": "Output will appear here once you provide valid JSON.",
|
||||
"output_empty_format": "Output will appear here once you provide valid {{ext}}.",
|
||||
"drop_zone": "Drop JSON files here",
|
||||
"drop_zone_active": "Drop to load",
|
||||
"drop_zone_hint": "Up to 500 files. Everything runs in your browser — nothing leaves your device.",
|
||||
@@ -244,6 +246,16 @@
|
||||
"patreon": "Patreon",
|
||||
"paypal": "PayPal"
|
||||
},
|
||||
"community": {
|
||||
"title": "Community & maintainer",
|
||||
"lead": "Follow Kokone or join the JSONPrism dev community:",
|
||||
"discord": "Discord (dev community)",
|
||||
"x": "X (Twitter)",
|
||||
"bluesky": "Bluesky",
|
||||
"mastodon": "Mastodon",
|
||||
"telegram": "Telegram",
|
||||
"youtube": "YouTube"
|
||||
},
|
||||
"third_party": {
|
||||
"title": "Built on open source",
|
||||
"lead": "JSONPrism stands on the shoulders of many great projects:",
|
||||
@@ -281,5 +293,13 @@
|
||||
},
|
||||
"disclaimer": {
|
||||
"translation": "Non-English translations are AI-generated. Accuracy is not guaranteed."
|
||||
},
|
||||
"social": {
|
||||
"discord": "Discord",
|
||||
"x": "X (Twitter)",
|
||||
"bluesky": "Bluesky",
|
||||
"mastodon": "Mastodon",
|
||||
"telegram": "Telegram",
|
||||
"youtube": "YouTube"
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"app": {
|
||||
"name": "JSONPrism",
|
||||
"tagline": "JSON を様々な形式に分散",
|
||||
"description": "JSON 入力ひとつ。ターゲット形式は 8 種類以上。ブラウザ内で完結。"
|
||||
"description": "JSON 入力ひとつ。マルチターゲット形式。ブラウザ内で完結。"
|
||||
},
|
||||
"nav": {
|
||||
"home": "変換",
|
||||
@@ -13,8 +13,10 @@
|
||||
"input_label": "JSON 入力",
|
||||
"input_label_format": "{{format}} 入力",
|
||||
"input_placeholder": "ここに JSON を貼り付け、ファイルをドロップ、またはサンプルを読み込み…",
|
||||
"input_placeholder_format": "ここに {{ext}} を貼り付け、ファイルをドロップ、またはサンプルを読み込み…",
|
||||
"output_label": "出力",
|
||||
"output_empty": "有効な JSON を入力すると、ここに出力が表示されます。",
|
||||
"output_empty_format": "有効な {{ext}} を入力すると、ここに出力が表示されます。",
|
||||
"drop_zone": "JSON ファイルをここにドロップ",
|
||||
"drop_zone_active": "ドロップして読み込み",
|
||||
"drop_zone_hint": "最大 500 ファイル。すべてブラウザ内で処理 — データは端末から外に出ません。",
|
||||
@@ -244,6 +246,16 @@
|
||||
"patreon": "Patreon",
|
||||
"paypal": "PayPal"
|
||||
},
|
||||
"community": {
|
||||
"title": "コミュニティ & メンテナー",
|
||||
"lead": "Kokone をフォローするか、JSONPrism の開発者コミュニティに参加:",
|
||||
"discord": "Discord (開発者コミュニティ)",
|
||||
"x": "X (Twitter)",
|
||||
"bluesky": "Bluesky",
|
||||
"mastodon": "Mastodon",
|
||||
"telegram": "Telegram",
|
||||
"youtube": "YouTube"
|
||||
},
|
||||
"third_party": {
|
||||
"title": "オープンソースの上に構築",
|
||||
"lead": "JSONPrism は多くの優れたプロジェクトの上に成り立っています:",
|
||||
@@ -281,5 +293,13 @@
|
||||
},
|
||||
"disclaimer": {
|
||||
"translation": "このページの翻訳は AI 生成です。100% の正確性は保証されません。"
|
||||
},
|
||||
"social": {
|
||||
"discord": "Discord",
|
||||
"x": "X (Twitter)",
|
||||
"bluesky": "Bluesky",
|
||||
"mastodon": "Mastodon",
|
||||
"telegram": "Telegram",
|
||||
"youtube": "YouTube"
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"app": {
|
||||
"name": "JSONPrism",
|
||||
"tagline": "Tán sắc JSON ra nhiều định dạng",
|
||||
"description": "Một JSON đầu vào. Tám định dạng đích. Chạy hoàn toàn trong trình duyệt."
|
||||
"description": "Một JSON đầu vào. Đa định dạng đích. Chạy hoàn toàn trong trình duyệt."
|
||||
},
|
||||
"nav": {
|
||||
"home": "Chuyển đổi",
|
||||
@@ -13,8 +13,10 @@
|
||||
"input_label": "JSON đầu vào",
|
||||
"input_label_format": "Đầu vào {{format}}",
|
||||
"input_placeholder": "Dán JSON vào đây, thả file, hoặc nạp mẫu…",
|
||||
"input_placeholder_format": "Dán {{ext}} vào đây, thả file, hoặc nạp mẫu…",
|
||||
"output_label": "Kết quả",
|
||||
"output_empty": "Kết quả sẽ hiện ở đây khi bạn cung cấp JSON hợp lệ.",
|
||||
"output_empty_format": "Kết quả sẽ hiện ở đây khi bạn cung cấp {{ext}} hợp lệ.",
|
||||
"drop_zone": "Thả file JSON vào đây",
|
||||
"drop_zone_active": "Thả ra để nạp",
|
||||
"drop_zone_hint": "Tối đa 500 file. Mọi thứ chạy trong trình duyệt — không có dữ liệu nào rời khỏi máy của bạn.",
|
||||
@@ -244,6 +246,16 @@
|
||||
"patreon": "Patreon",
|
||||
"paypal": "PayPal"
|
||||
},
|
||||
"community": {
|
||||
"title": "Cộng đồng & maintainer",
|
||||
"lead": "Theo dõi Kokone hoặc tham gia cộng đồng dev JSONPrism:",
|
||||
"discord": "Discord (cộng đồng dev)",
|
||||
"x": "X (Twitter)",
|
||||
"bluesky": "Bluesky",
|
||||
"mastodon": "Mastodon",
|
||||
"telegram": "Telegram",
|
||||
"youtube": "YouTube"
|
||||
},
|
||||
"third_party": {
|
||||
"title": "Đứng trên vai open source",
|
||||
"lead": "JSONPrism được xây dựng trên nhiều project tuyệt vời:",
|
||||
@@ -281,5 +293,13 @@
|
||||
},
|
||||
"disclaimer": {
|
||||
"translation": "Các bản dịch không phải tiếng Anh do AI tạo, không đảm bảo chính xác 100%."
|
||||
},
|
||||
"social": {
|
||||
"discord": "Discord",
|
||||
"x": "X (Twitter)",
|
||||
"bluesky": "Bluesky",
|
||||
"mastodon": "Mastodon",
|
||||
"telegram": "Telegram",
|
||||
"youtube": "YouTube"
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"app": {
|
||||
"name": "JSONPrism",
|
||||
"tagline": "将 JSON 分散为多种格式",
|
||||
"description": "一份 JSON 输入,八种以上目标格式,全程在浏览器中完成。"
|
||||
"description": "一份 JSON 输入,多目标格式,全程在浏览器中完成。"
|
||||
},
|
||||
"nav": {
|
||||
"home": "转换",
|
||||
@@ -13,8 +13,10 @@
|
||||
"input_label": "JSON 输入",
|
||||
"input_label_format": "{{format}} 输入",
|
||||
"input_placeholder": "在此处粘贴 JSON、拖入文件或加载示例…",
|
||||
"input_placeholder_format": "在此处粘贴 {{ext}}、拖入文件或加载示例…",
|
||||
"output_label": "输出",
|
||||
"output_empty": "提供有效的 JSON 后,输出将显示在此处。",
|
||||
"output_empty_format": "提供有效的 {{ext}} 后,输出将显示在此处。",
|
||||
"drop_zone": "将 JSON 文件拖到此处",
|
||||
"drop_zone_active": "释放即可加载",
|
||||
"drop_zone_hint": "最多 500 个文件。全部在浏览器中运行 — 数据不会离开你的设备。",
|
||||
@@ -244,6 +246,16 @@
|
||||
"patreon": "Patreon",
|
||||
"paypal": "PayPal"
|
||||
},
|
||||
"community": {
|
||||
"title": "社区与维护者",
|
||||
"lead": "关注 Kokone 或加入 JSONPrism 开发者社区:",
|
||||
"discord": "Discord(开发者社区)",
|
||||
"x": "X (Twitter)",
|
||||
"bluesky": "Bluesky",
|
||||
"mastodon": "Mastodon",
|
||||
"telegram": "Telegram",
|
||||
"youtube": "YouTube"
|
||||
},
|
||||
"third_party": {
|
||||
"title": "构建于开源之上",
|
||||
"lead": "JSONPrism 站在众多优秀项目的肩膀上:",
|
||||
@@ -281,5 +293,13 @@
|
||||
},
|
||||
"disclaimer": {
|
||||
"translation": "本页面译文由 AI 生成,不保证 100% 准确。"
|
||||
},
|
||||
"social": {
|
||||
"discord": "Discord",
|
||||
"x": "X (Twitter)",
|
||||
"bluesky": "Bluesky",
|
||||
"mastodon": "Mastodon",
|
||||
"telegram": "Telegram",
|
||||
"youtube": "YouTube"
|
||||
}
|
||||
}
|
||||
+80
-2
@@ -1,9 +1,56 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ExternalLink, Heart } from 'lucide-react';
|
||||
import { ExternalLink, Heart, Users } from 'lucide-react';
|
||||
import {
|
||||
BlueskyIcon,
|
||||
DiscordIcon,
|
||||
MastodonIcon,
|
||||
TelegramIcon,
|
||||
XIcon,
|
||||
YoutubeIcon,
|
||||
} from '@/components/common/SocialIcons';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
const REPO_URL = 'https://github.com/poli0981/jsonPrism';
|
||||
|
||||
interface CommunityPlatform {
|
||||
key: 'discord' | 'x' | 'bluesky' | 'mastodon' | 'telegram' | 'youtube';
|
||||
url: string;
|
||||
icon: React.ReactNode;
|
||||
}
|
||||
|
||||
const COMMUNITY: CommunityPlatform[] = [
|
||||
{
|
||||
key: 'discord',
|
||||
url: 'https://discord.gg/2aNR3aVt',
|
||||
icon: <DiscordIcon className="h-4 w-4" />,
|
||||
},
|
||||
{
|
||||
key: 'x',
|
||||
url: 'https://twitter.com/SkullMute0011',
|
||||
icon: <XIcon className="h-4 w-4" />,
|
||||
},
|
||||
{
|
||||
key: 'bluesky',
|
||||
url: 'https://bsky.app/profile/skullmute0011.bsky.social',
|
||||
icon: <BlueskyIcon className="h-4 w-4" />,
|
||||
},
|
||||
{
|
||||
key: 'mastodon',
|
||||
url: 'https://mastodon.social/@skullmute1122',
|
||||
icon: <MastodonIcon className="h-4 w-4" />,
|
||||
},
|
||||
{
|
||||
key: 'telegram',
|
||||
url: 'https://t.me/SkullMute0011',
|
||||
icon: <TelegramIcon className="h-4 w-4" />,
|
||||
},
|
||||
{
|
||||
key: 'youtube',
|
||||
url: 'https://youtube.com/@SkullMute',
|
||||
icon: <YoutubeIcon className="h-4 w-4" />,
|
||||
},
|
||||
];
|
||||
|
||||
interface DonatePlatform {
|
||||
key: 'github' | 'ko_fi' | 'buy_me_a_coffee' | 'patreon' | 'paypal';
|
||||
url: string;
|
||||
@@ -94,7 +141,7 @@ export function About() {
|
||||
// About page has many sections, so it needs its own scroll container —
|
||||
// otherwise content overflows past the Footer at the bottom.
|
||||
<div className="scrollbar-hide min-h-0 flex-1 overflow-y-auto">
|
||||
<div className="mx-auto max-w-3xl px-6 py-16">
|
||||
<div className="mx-auto max-w-3xl px-4 py-10 sm:px-6 sm:py-16">
|
||||
<h1 className="font-display text-spectrum mb-4 text-5xl tracking-tight italic">
|
||||
{t('about.title')}
|
||||
</h1>
|
||||
@@ -132,6 +179,37 @@ export function About() {
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
{/* Community */}
|
||||
<section className="mt-14">
|
||||
<h2 className="font-display mb-1 text-2xl tracking-tight">
|
||||
<Users className="text-primary mr-2 inline-block h-5 w-5" />
|
||||
{t('about.community.title')}
|
||||
</h2>
|
||||
<p className="text-muted-foreground mb-4 text-sm">{t('about.community.lead')}</p>
|
||||
<ul className="grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{COMMUNITY.map((platform) => (
|
||||
<li key={platform.key}>
|
||||
<a
|
||||
href={platform.url}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className={cn(
|
||||
'border-border/60 bg-card/40 hover:border-primary/40 hover:bg-card/80 inline-flex w-full items-center justify-between gap-2 rounded-md border px-3 py-2 text-sm transition',
|
||||
)}
|
||||
>
|
||||
<span className="text-muted-foreground inline-flex items-center gap-2">
|
||||
{platform.icon}
|
||||
<span className="text-foreground font-medium">
|
||||
{t(`about.community.${platform.key}`)}
|
||||
</span>
|
||||
</span>
|
||||
<ExternalLink className="text-muted-foreground h-3.5 w-3.5" />
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
{/* Third-party */}
|
||||
<section className="mt-14">
|
||||
<h2 className="font-display mb-1 text-2xl tracking-tight">
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ export function Home() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<div className="mx-auto flex min-h-0 w-full max-w-screen-2xl flex-1 flex-col gap-6 px-6 py-6">
|
||||
<header className="flex items-end justify-between gap-6">
|
||||
<div className="mx-auto flex min-h-0 w-full max-w-screen-2xl flex-1 flex-col gap-4 px-4 py-4 sm:gap-6 sm:px-6 sm:py-6">
|
||||
<header className="flex flex-col gap-2 md:flex-row md:items-end md:justify-between md:gap-6">
|
||||
<div>
|
||||
<h1 className="font-display text-4xl leading-none tracking-tight md:text-5xl">
|
||||
<span className="text-spectrum italic">Disperse</span> JSON.
|
||||
|
||||
Reference in new issue
Block a user