{$LL.features[feature.key].title()}
+{$LL.features[feature.key].description()}
+From b77377ec3dd1dfc0111e5e8bb0468436de3918ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?lollipopkit=F0=9F=8F=B3=EF=B8=8F=E2=80=8D=E2=9A=A7?=
=?UTF-8?q?=EF=B8=8F?= <10864310+lollipopkit@users.noreply.github.com>
Date: Sat, 25 Apr 2026 03:19:16 +0800
Subject: [PATCH 01/11] opt.: new website Fixes #1137
---
Makefile | 26 +-
scripts/release/package-dmg-from-xcarchive.sh | 2 +-
scripts/release/release-macos-dmg.sh | 51 +-
scripts/release/sync-homebrew-cask.sh | 112 +++
website/.gitignore | 26 +
website/.typesafe-i18n.json | 7 +
website/.vscode/extensions.json | 3 +
website/bun.lock | 242 ++++++
website/components.json | 20 +
website/index.html | 17 +
website/jsconfig.json | 38 +
website/package.json | 31 +
website/public/favicon.svg | 13 +
website/public/icons.svg | 24 +
website/src/App.svelte | 306 ++++++++
website/src/app.css | 719 ++++++++++++++++++
website/src/assets/serverbox/app_icon.png | Bin 0 -> 15362 bytes
website/src/i18n/en/index.ts | 152 ++++
website/src/i18n/formatters.ts | 11 +
website/src/i18n/i18n-svelte.ts | 12 +
website/src/i18n/i18n-types.ts | 690 +++++++++++++++++
website/src/i18n/i18n-util.async.ts | 27 +
website/src/i18n/i18n-util.sync.ts | 26 +
website/src/i18n/i18n-util.ts | 38 +
website/src/i18n/zh-CN/index.ts | 151 ++++
website/src/lib/Counter.svelte | 5 +
website/src/lib/i18n.js | 38 +
website/src/lib/utils.js | 8 +
website/src/main.js | 9 +
website/svelte.config.js | 2 +
website/vite.config.js | 17 +
31 files changed, 2817 insertions(+), 6 deletions(-)
create mode 100755 scripts/release/sync-homebrew-cask.sh
create mode 100644 website/.gitignore
create mode 100644 website/.typesafe-i18n.json
create mode 100644 website/.vscode/extensions.json
create mode 100644 website/bun.lock
create mode 100644 website/components.json
create mode 100644 website/index.html
create mode 100644 website/jsconfig.json
create mode 100644 website/package.json
create mode 100644 website/public/favicon.svg
create mode 100644 website/public/icons.svg
create mode 100644 website/src/App.svelte
create mode 100644 website/src/app.css
create mode 100644 website/src/assets/serverbox/app_icon.png
create mode 100644 website/src/i18n/en/index.ts
create mode 100644 website/src/i18n/formatters.ts
create mode 100644 website/src/i18n/i18n-svelte.ts
create mode 100644 website/src/i18n/i18n-types.ts
create mode 100644 website/src/i18n/i18n-util.async.ts
create mode 100644 website/src/i18n/i18n-util.sync.ts
create mode 100644 website/src/i18n/i18n-util.ts
create mode 100644 website/src/i18n/zh-CN/index.ts
create mode 100644 website/src/lib/Counter.svelte
create mode 100644 website/src/lib/i18n.js
create mode 100644 website/src/lib/utils.js
create mode 100644 website/src/main.js
create mode 100644 website/svelte.config.js
create mode 100644 website/vite.config.js
diff --git a/Makefile b/Makefile
index fb6a25caa..936f153e2 100644
--- a/Makefile
+++ b/Makefile
@@ -10,10 +10,12 @@ PLATFORM ?=
ENV_FILE ?=
XCARCHIVE_PATH ?=
APP_PATH ?=
+TAP_REPO_PATH ?=
.PHONY: help deps pub-get run run-device analyze test test-one coverage \
gen gen-build gen-build-clean gen-l10n build build-android build-ios \
- build-macos build-linux build-windows clean release-macos-dmg package-dmg
+ build-macos build-linux build-windows clean release-macos-dmg package-dmg \
+ sync-homebrew-cask
help:
@printf '%s\n' \
@@ -48,7 +50,11 @@ help:
' Optional: make release-macos-dmg ENV_FILE=.env.release' \
' package-dmg Run scripts/release/package-dmg-from-xcarchive.sh' \
' Example: make package-dmg APP_PATH="/path/Server Box.app"' \
- ' Example: make package-dmg XCARCHIVE_PATH=/path/Runner.xcarchive'
+ ' Example: make package-dmg XCARCHIVE_PATH=/path/Runner.xcarchive' \
+ ' sync-homebrew-cask Generate ~/proj/homebrew-taps/Casks/serverbox.rb from a built DMG' \
+ ' Example: make sync-homebrew-cask APP_PATH="/path/Server Box.app"' \
+ ' Example: make sync-homebrew-cask XCARCHIVE_PATH=/path/Runner.xcarchive' \
+ ' Example: make sync-homebrew-cask DMG_PATH=build/artifacts/ServerBox-1.0.1365.dmg'
deps pub-get:
$(FLUTTER) pub get
@@ -134,3 +140,19 @@ package-dmg:
else \
XCARCHIVE_PATH="$(XCARCHIVE_PATH)" bash scripts/release/package-dmg-from-xcarchive.sh; \
fi
+
+sync-homebrew-cask:
+ @if [ -z "$(APP_PATH)" ] && [ -z "$(XCARCHIVE_PATH)" ] && [ -z "$(DMG_PATH)" ]; then \
+ echo 'APP_PATH, XCARCHIVE_PATH, or DMG_PATH is required.'; \
+ echo 'Example: make sync-homebrew-cask APP_PATH="/path/Server Box.app"'; \
+ echo 'Example: make sync-homebrew-cask XCARCHIVE_PATH=/path/Runner.xcarchive'; \
+ echo 'Example: make sync-homebrew-cask DMG_PATH=build/artifacts/ServerBox-1.0.1365.dmg'; \
+ exit 1; \
+ fi
+ @if [ -n "$(APP_PATH)" ]; then \
+ APP_PATH="$(APP_PATH)" DMG_PATH="$(DMG_PATH)" TAP_REPO_PATH="$(TAP_REPO_PATH)" bash scripts/release/sync-homebrew-cask.sh; \
+ elif [ -n "$(XCARCHIVE_PATH)" ]; then \
+ XCARCHIVE_PATH="$(XCARCHIVE_PATH)" DMG_PATH="$(DMG_PATH)" TAP_REPO_PATH="$(TAP_REPO_PATH)" bash scripts/release/sync-homebrew-cask.sh; \
+ else \
+ DMG_PATH="$(DMG_PATH)" TAP_REPO_PATH="$(TAP_REPO_PATH)" bash scripts/release/sync-homebrew-cask.sh; \
+ fi
diff --git a/scripts/release/package-dmg-from-xcarchive.sh b/scripts/release/package-dmg-from-xcarchive.sh
index f68b0d3a7..c07972a5b 100755
--- a/scripts/release/package-dmg-from-xcarchive.sh
+++ b/scripts/release/package-dmg-from-xcarchive.sh
@@ -41,7 +41,7 @@ fi
APP_VERSION="$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' "$INFO_PLIST")"
APP_BUILD="$(/usr/libexec/PlistBuddy -c 'Print :CFBundleVersion' "$INFO_PLIST")"
-DMG_BASENAME="${DMG_BASENAME:-${APP_ASSET_NAME}-${APP_VERSION}-${APP_BUILD}}"
+DMG_BASENAME="${DMG_BASENAME:-${APP_ASSET_NAME}-${APP_VERSION}}"
DMG_PATH="${DMG_PATH:-$ARTIFACTS_PATH/${DMG_BASENAME}.dmg}"
mkdir -p "$ARTIFACTS_PATH"
diff --git a/scripts/release/release-macos-dmg.sh b/scripts/release/release-macos-dmg.sh
index 20fae1cd1..de0f59a31 100755
--- a/scripts/release/release-macos-dmg.sh
+++ b/scripts/release/release-macos-dmg.sh
@@ -47,6 +47,39 @@ require_cmd() {
fi
}
+warn_pre_notary_spctl_rejection() {
+ local app_path="$1"
+
+ echo "Skipping pre-notarization spctl enforcement for $app_path"
+ echo 'Developer ID signed apps can be rejected by Gatekeeper before notarization with source=Unnotarized Developer ID'
+}
+
+ensure_macos_pods_synced() {
+ local macos_dir="$REPO_ROOT/macos"
+ local podfile_lock="$macos_dir/Podfile.lock"
+ local manifest_lock="$macos_dir/Pods/Manifest.lock"
+ local pods_project="$macos_dir/Pods/Pods.xcodeproj"
+
+ require_cmd pod
+
+ if [[ ! -f "$manifest_lock" || ! -d "$pods_project" ]]; then
+ echo 'CocoaPods sandbox is incomplete, running pod install'
+ (
+ cd "$macos_dir"
+ pod install
+ )
+ return
+ fi
+
+ if [[ -f "$podfile_lock" ]] && ! cmp -s "$podfile_lock" "$manifest_lock"; then
+ echo 'CocoaPods sandbox is out of sync, running pod install'
+ (
+ cd "$macos_dir"
+ pod install
+ )
+ fi
+}
+
normalize_abs_path() {
local path="$1"
if [[ -z "$path" ]]; then
@@ -232,13 +265,14 @@ if [[ "$PUBLISH_GITHUB_RELEASE" == "1" ]]; then
fi
require_file "$WORKSPACE_PATH"
+ensure_macos_pods_synced
read -r DEFAULT_MARKETING_VERSION DEFAULT_CURRENT_PROJECT_VERSION <<<"$(read_pubspec_versions)"
MARKETING_VERSION="${MARKETING_VERSION_OVERRIDE:-$DEFAULT_MARKETING_VERSION}"
CURRENT_PROJECT_VERSION="${CURRENT_PROJECT_VERSION_OVERRIDE:-$DEFAULT_CURRENT_PROJECT_VERSION}"
RELEASE_TAG="${RELEASE_TAG:-v${MARKETING_VERSION}}"
RELEASE_TITLE="${RELEASE_TITLE:-$RELEASE_TAG}"
-DMG_BASENAME="${DMG_BASENAME:-${APP_ASSET_NAME}-${MARKETING_VERSION}-${CURRENT_PROJECT_VERSION}}"
+DMG_BASENAME="${DMG_BASENAME:-${APP_ASSET_NAME}-${MARKETING_VERSION}}"
DMG_PATH="${DMG_PATH:-$ARTIFACTS_PATH/${DMG_BASENAME}.dmg}"
validate_allowed_path 'BUILD_ROOT' "$BUILD_ROOT" >/dev/null
@@ -303,7 +337,7 @@ if [[ ! -d "$APP_PATH" ]]; then
fi
codesign --verify --deep --strict --verbose=2 "$APP_PATH"
-spctl -a -t exec -vv "$APP_PATH"
+warn_pre_notary_spctl_rejection "$APP_PATH"
APP_PATH="$APP_PATH" \
APP_NAME="$APP_NAME" \
@@ -313,7 +347,7 @@ ARTIFACTS_PATH="$ARTIFACTS_PATH" \
DMG_STAGING_PATH="$DMG_STAGING_PATH" \
DMG_BASENAME="$DMG_BASENAME" \
DMG_PATH="$DMG_PATH" \
-REQUIRE_SPCTL=1 \
+REQUIRE_SPCTL=0 \
bash "$SCRIPT_DIR/package-dmg-from-xcarchive.sh"
codesign --force --sign "$SIGNING_IDENTITY" --timestamp "$DMG_PATH"
@@ -325,6 +359,7 @@ xcrun notarytool submit "$DMG_PATH" \
xcrun stapler staple "$DMG_PATH"
xcrun stapler validate "$DMG_PATH"
+spctl -a -t open --context context:primary-signature -vv "$DMG_PATH"
if [[ "$PUBLISH_GITHUB_RELEASE" == "1" ]]; then
if gh release view "$RELEASE_TAG" --repo "$APP_REPO_SLUG" >/dev/null 2>&1; then
@@ -343,6 +378,13 @@ if [[ "$PUBLISH_GITHUB_RELEASE" == "1" ]]; then
--clobber
fi
+if [[ "${SYNC_HOMEBREW_CASK:-1}" == "1" ]]; then
+ APP_PATH="$APP_PATH" \
+ DMG_PATH="$DMG_PATH" \
+ TAP_REPO_PATH="${TAP_REPO_PATH:-$HOME/proj/homebrew-taps}" \
+ bash "$SCRIPT_DIR/sync-homebrew-cask.sh"
+fi
+
echo "Release complete"
echo "Marketing version: $MARKETING_VERSION"
echo "Build number: $CURRENT_PROJECT_VERSION"
@@ -352,3 +394,6 @@ echo "DMG: $DMG_PATH"
if [[ "$PUBLISH_GITHUB_RELEASE" == "1" ]]; then
echo "GitHub release: $APP_REPO_SLUG $RELEASE_TAG"
fi
+if [[ "${SYNC_HOMEBREW_CASK:-1}" == "1" ]]; then
+ echo "Homebrew cask: ${TAP_REPO_PATH:-$HOME/proj/homebrew-taps}/Casks/serverbox.rb"
+fi
diff --git a/scripts/release/sync-homebrew-cask.sh b/scripts/release/sync-homebrew-cask.sh
new file mode 100755
index 000000000..14ed6bd7b
--- /dev/null
+++ b/scripts/release/sync-homebrew-cask.sh
@@ -0,0 +1,112 @@
+#!/bin/bash
+set -euo pipefail
+
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
+APP_NAME="${APP_NAME:-Server Box}"
+CASK_NAME="${CASK_NAME:-serverbox}"
+CASK_DISPLAY_NAME="${CASK_DISPLAY_NAME:-ServerBox}"
+CASK_DESC="${CASK_DESC:-App for monitoring server status with SSH terminal, SFTP, Container management}"
+APP_REPO_SLUG="${APP_REPO_SLUG:-lollipopkit/flutter_server_box}"
+TAP_REPO_PATH="${TAP_REPO_PATH:-$HOME/proj/homebrew-taps}"
+TAP_CASK_PATH="${TAP_CASK_PATH:-}"
+EXPLICIT_TAP_CASK_PATH="${TAP_CASK_PATH:-}"
+XCARCHIVE_PATH="${1:-${XCARCHIVE_PATH:-}}"
+
+if [[ -n "$XCARCHIVE_PATH" ]]; then
+ APP_PATH="${APP_PATH:-$XCARCHIVE_PATH/Products/Applications/${APP_NAME}.app}"
+else
+ APP_PATH="${APP_PATH:-}"
+fi
+
+if [[ -n "$APP_PATH" ]]; then
+ INFO_PLIST="$APP_PATH/Contents/Info.plist"
+else
+ INFO_PLIST="${INFO_PLIST:-$REPO_ROOT/macos/Runner/Info.plist}"
+fi
+
+if [[ -f "$INFO_PLIST" ]]; then
+ APP_VERSION="$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' "$INFO_PLIST")"
+ APP_BUILD="$(/usr/libexec/PlistBuddy -c 'Print :CFBundleVersion' "$INFO_PLIST")"
+else
+ APP_VERSION=""
+ APP_BUILD=""
+fi
+
+if [[ -n "$APP_VERSION" && "$APP_VERSION" != '$('* ]]; then
+ DMG_BASENAME="${DMG_BASENAME:-ServerBox-${APP_VERSION}}"
+fi
+
+if [[ -z "${DMG_PATH:-}" ]]; then
+ if [[ -z "${DMG_BASENAME:-}" ]]; then
+ echo "DMG_PATH requires DMG_BASENAME when version is unavailable" >&2
+ echo "Provide DMG_PATH directly, or provide XCARCHIVE_PATH/APP_PATH so DMG_BASENAME can be resolved." >&2
+ exit 1
+ fi
+ DMG_PATH="$REPO_ROOT/build/artifacts/${DMG_BASENAME}.dmg"
+fi
+
+if [[ ! -f "$DMG_PATH" ]]; then
+ echo "DMG not found: $DMG_PATH" >&2
+ echo "Run package-dmg-from-xcarchive.sh first or provide DMG_PATH." >&2
+ exit 1
+fi
+
+if [[ -z "$APP_VERSION" || "$APP_VERSION" == '$('* ]]; then
+ dmg_filename="$(basename "$DMG_PATH")"
+ if [[ "$dmg_filename" =~ ^ServerBox-([0-9]+(\.[0-9]+){1,2})\.dmg$ ]]; then
+ APP_VERSION="${BASH_REMATCH[1]}"
+ APP_BUILD="${APP_BUILD:-}"
+ elif [[ "$dmg_filename" =~ ^ServerBox-([0-9]+(\.[0-9]+){1,2})-([0-9]+)\.dmg$ ]]; then
+ APP_VERSION="${BASH_REMATCH[1]}"
+ APP_BUILD="${BASH_REMATCH[3]}"
+ else
+ echo "unable to determine version from $DMG_PATH" >&2
+ echo "Provide XCARCHIVE_PATH, APP_PATH, or a DMG named ServerBox-
+ {$LL.hero.subtitle()}
+
+ {$LL.features.subtitle()}
+ {$LL.features[feature.key].description()}
+ {$LL.capabilities.subtitle()}
+
+ {$LL.download.subtitle()}
+ {$LL.download.platforms[group.key].description()} {$LL.download.note()} “{$LL.testimonials[t.key].quote()}”
+ {$LL.cta.subtitle()}
+ {$LL.hero.titlePrefix()}
+
{$LL.hero.titleSuffix()}
+ {/each}
+
{$LL.features.title()}
+ {$LL.features[feature.key].title()}
+ {$LL.capabilities.title()}
+ {$LL.download.title()}
+ {$LL.download.platforms[group.key].title()}
+ {$LL.testimonials.title()}
+ {$LL.cta.title()}
+ S~5Y~9MtzHwjyNTN5&khf#68kqZ`nM
yU)Z~@rTeAkhy!nS>;UQmjJJO>gLT4Fz_t*2A;iGKC
zXP|1=x;aE$HSKEOlXCf
RRczndKJ;J_d3H60IPC;T>o7X;IZPYN+UnFJLq4oo}vZ%#<8yX0_h3S7_q
zyfaG{y0AF#d1cCK>**^`)NxE36@Gmjq*E@dXj(q-dIFgN@NSA1?fqD|6X?SDYJ2k}
z9Uy1*S3$eR>#b*-cX%35<7GW=CE6bpd%>QUsX87jqK3Py?pK7R?m+9+V$hx7(DJj6
zeDaM$FY|6vngz~aVnKofI|q&$n5zhGypV|m+2a?SL6v^4Gq&%^O(RC`O)DuNN+PlH
z)R|r}l8XVPLUiXTu%bjV;{zgZkirpmnwb;{Ou;C0*rmnGX!CJ`^HXQ(^Krw>IDp<|
z*O@!?vcQ#tm~oixNASm$_y&ST3|Ke7Bs+f}%%o;)=BqT!SNE5h^b0$`itMiA>ar|t
z_wmm0;x`R`1Rk-huYiMgF^rtH88<5>;g3nX0VOTHQ#{tIC2C7k7)JtWBFh~%G-(q{
iBxmFQ*L~hDksx7{=^qUc(_r=j0Geugs>OFKLjM;;nh$0G
literal 0
HcmV?d00001
diff --git a/website/src/i18n/en/index.ts b/website/src/i18n/en/index.ts
new file mode 100644
index 000000000..08faf613e
--- /dev/null
+++ b/website/src/i18n/en/index.ts
@@ -0,0 +1,152 @@
+import type { BaseTranslation } from '../i18n-types.js'
+
+const en: BaseTranslation = {
+ meta: {
+ lang: 'en',
+ title: 'ServerBox — Server status, SSH, and operations in one Flutter app',
+ description:
+ 'ServerBox monitors Linux, Unix, and Windows servers with status charts, SSH terminal, SFTP, Docker, process, systemd, S.M.A.R.T, push, widgets, and watchOS support.',
+ },
+ nav: {
+ features: 'Features',
+ capabilities: 'Capabilities',
+ testimonials: 'Testimonials',
+ download: 'Download',
+ languageLabel: 'Language',
+ },
+ hero: {
+ titlePrefix: 'Server status,',
+ titleSuffix: 'right in your pocket.',
+ subtitle:
+ 'ServerBox brings charts, SSH terminal, SFTP, Docker, process control, systemd, S.M.A.R.T, push alerts, widgets, and watchOS support into one Flutter app.',
+ primaryAction: 'Download ServerBox',
+ secondaryAction: 'Explore features',
+ },
+ screenshots: {
+ label: 'Interactive ServerBox screenshots',
+ one: 'ServerBox server overview screenshot',
+ two: 'ServerBox status chart screenshot',
+ three: 'ServerBox terminal screenshot',
+ four: 'ServerBox tools screenshot',
+ },
+ features: {
+ title: 'One compact workspace for everyday server maintenance.',
+ subtitle:
+ 'A focused operational surface with no decorative filler — every block maps to a real maintenance workflow.',
+ charts: {
+ title: 'Status Charts',
+ description:
+ 'Track CPU, memory, sensors, GPU, network, disk, and host health from dense mobile charts.',
+ },
+ workspace: {
+ title: 'Cross-Platform Workspace',
+ description:
+ 'Use ServerBox across iOS, Android, macOS, Linux, and Windows with one familiar Flutter interface.',
+ },
+ terminal: {
+ title: 'SSH Terminal and SFTP',
+ description:
+ 'Open command-line and file sessions directly from a server card, backed by dartssh2 and xterm.dart.',
+ },
+ native: {
+ title: 'Native Device Hooks',
+ description:
+ 'Biometric auth, message push, home widgets, and watchOS support keep server context nearby.',
+ },
+ platforms: {
+ title: 'Docker, Process, Systemd',
+ description:
+ 'Inspect containers, processes, and services without switching away from your monitoring flow.',
+ },
+ },
+ capabilities: {
+ title: 'All the tools. One app.',
+ subtitle:
+ 'ServerBox keeps terminal access, file transfer, service checks, hardware health, and device-native alerts in the same workflow.',
+ installIosPrompt: '# iOS and macOS',
+ installReleasePrompt: '# Android, Linux, and Windows',
+ },
+ download: {
+ title: 'Every platform, every official source.',
+ subtitle:
+ 'Choose the channel that matches your device and trust model. iOS and macOS use the App Store; Android, Linux, and Windows also have direct package downloads.',
+ platforms: {
+ iosMacos: {
+ title: 'iOS / macOS',
+ description:
+ 'Use the App Store build for Apple platforms, including automatic updates through your Apple account.',
+ },
+ android: {
+ title: 'Android',
+ description:
+ 'Install from GitHub Releases, the project CDN, F-Droid, or OpenAPK depending on how you manage Android packages.',
+ },
+ linux: {
+ title: 'Linux',
+ description:
+ 'Download desktop packages from GitHub Releases or the project CDN.',
+ },
+ windows: {
+ title: 'Windows',
+ description:
+ 'Download Windows packages from GitHub Releases or the project CDN.',
+ },
+ },
+ sources: {
+ appStore: {
+ name: 'App Store',
+ note: 'Apple platforms',
+ },
+ github: {
+ name: 'GitHub Releases',
+ note: 'release builds',
+ },
+ cdn: {
+ name: 'Project CDN',
+ note: 'package mirror',
+ },
+ fdroid: {
+ name: 'F-Droid',
+ note: 'Android repo',
+ },
+ openapk: {
+ name: 'OpenAPK',
+ note: 'Android listing',
+ },
+ },
+ note:
+ 'Only download packages from a source you trust. For server-side push, widgets, and companion monitoring, install ServerBoxMonitor separately on your servers.',
+ },
+ testimonials: {
+ title: 'Trusted by people who maintain real machines.',
+ admin: {
+ quote:
+ 'ServerBox keeps the quick server checks I do every day in one place, without forcing me back to a laptop.',
+ role: 'Server Administrator',
+ },
+ infra: {
+ quote:
+ 'The jump from metrics to SSH and SFTP is direct. It removes a lot of small context switches during incidents.',
+ role: 'Infrastructure Maintainer',
+ },
+ student: {
+ quote:
+ 'It is lightweight enough for my personal servers, but still covers Docker, systemd, and health checks.',
+ role: 'Homelab User',
+ },
+ },
+ cta: {
+ title: 'ServerBox is free and open source under AGPLv3.',
+ subtitle:
+ 'Install from the App Store, GitHub Releases, F-Droid, OpenAPK, or the project CDN. Only download packages from sources you trust.',
+ appStoreAction: 'Open App Store',
+ githubAction: 'Download from GitHub Releases',
+ },
+ footer: {
+ features: 'Features',
+ capabilities: 'Capabilities',
+ releases: 'Releases',
+ },
+}
+
+export default en
diff --git a/website/src/i18n/formatters.ts b/website/src/i18n/formatters.ts
new file mode 100644
index 000000000..9e0741e47
--- /dev/null
+++ b/website/src/i18n/formatters.ts
@@ -0,0 +1,11 @@
+import type { FormattersInitializer } from 'typesafe-i18n'
+import type { Locales, Formatters } from './i18n-types.js'
+
+export const initFormatters: FormattersInitializer
{$LL.download.platforms[group.key].description()}
{$LL.download.note()}
-“{$LL.testimonials[t.key].quote()}”
- -S~5Y~9MtzHwjyNTN5&khf#68kqZ`nM4TXU|FP_04j9@s 9ghz zKpi) )1BNnQc4-*8r2q~|e>;{JN|NX(qtFp(9>FhD*9#&t1*yxnj(yTfJCG %8 zDA4qfp1Kb*DZD!mopqJ5IMR=aM3U{#vgV*G#RtEH!Nf`3%TtC}Q1zYk5>l$;2SPCe zZCWt_E5w-4v=%nNVW?o-!2uw8OHIe@4nHmbx~GK|56KHun=@E@2h+as8lylnvNtd~ z2~n-C9Wdg|4dY-HzoLM76el}a)W=ueepnJBN#Q^7{FwQt_#n7&QlKMeNuk+b@-s+c zWQG P&g#&XYK6ZH2W-NRy52F_O-62s7w&I4XRTFP=B86~E)T$*-o$pqVz;`=Pg- zsayqirPPZ;tgtF=XW1BSt<59xlrhLw-Jo?r#eBV*DXQy@(t2W3!yq&3qjmgf0MQT| zFdq4=M88yGk0(T$Qo*kPyE!GOP}L^ksJnPY{%+Rq(ZRi>X`3TPv6`-9ke}cx95%d$ zsJCWGhr?&S4mzXvz0D_#DYTO|{0BThgzS^QEn(1(pQJ16 Z=Q( Pa^GZY&0yS0Aup$X zvligoQ|KR^ypdCL4R3_q+zAI!&}<7F&Q)f#LITB j!hYvX&QdG+8-iPM#S1m%Snmo5U^;i5mb8#6J|NYIrSovu+X9?lFjE` zO+EV!Fnw2EFVQ(R3v(<@0zqTi&?HO!q4r@b;)s*^j;iW~$|1hE-qr<+$lYPYIAxI0 zw0HI0kJ}>xOB2T74IQTI)rx!;o3OFt?$NHMl;j?++aO0l%P;UL{i~@Qb5i7JHnWW5 z;1%PBtkWCzA)MOP)Y5i+x_<<60@Ye&R<9ouLW )R8eDL7W5uxYGLSxeX5N=0JqPrpzx| zUV%@gMy|2Fot0KYQpiDRiloFT7DGq2QgU{ bufz{Z0mMzTHC;Lu%H((V1wFuR_6=!v%eh_CHIBHd z(mDr&!(si4ZA{pP^O9t&-z_JF+WwOC3wBOf!4{;N1dm7Wws7p!zUVy|_Vknr&^o}s zdA$X)Q)H@%yRz=7oLKm4?53h~ +Zz!IItIAE zki7s7sm}_-#|21#D9#0E yU)Z~@rTeAkhy!nS>;UQmjJJO>gLT4Fz_t*2A;iGKC zXP|1=x;aE$HSKEOlXCfGX8h{Y*p;9L z>8YvJ&G&WE3pfvFJuK>qLhs8uO)Lb;ce%=}3|Pa2kCvfBZ`a@7!J;^?O1N@wcpGnH zGIr0Bnn2+ ?fqsBqH=XHgoS5YpZk`ick38jB)Q(pT& )mdLkpn&f_41~xu1t7MR75+s*x&zv_;VyZ|D9jN=#PT#me*s(cuJrL)DVY%ij z&%%hmn?(spD=A8HJ%2)v_E=kgH}a{GC9#NKg=~2cgb_U`(4BuD*|0}g&g8wa_uT-p z_4P44=lap%0n&g`y6#e@fhvpR&8+V{8^CV+n$IO(yC;8ah=oS;pq2(56;fW-3QpUv z@7&J?zsDC>=_;2W$%b&{+K(}^SRgM}QW%~Ko5ie%2tMbH=O(p&oNY%Amj~U<9f;M) z;`}eA-#iiem)JpI2Ir=As7s6a0O5#v5nFD^1;_rQApiufsaDpa-I4)}an6|J6(y~d z-33S+eUQ2QQ_0j1n@;CmVPnZ!7AQB!Q*j>ibW5>Lp1y^DxPM4ImfcTnnK<42Sc9w| zXfifeaG4$8R%$O`PII~2h ( zB}eWasbo>6uIKH)Rk>**SMd=J#UtpE7ZnkzNVC4vfPUR*GVXe|S-K_J?jQN*mY_-! z$v@-#hQh{?-6gXDVXrn--cxP=RgW5|iio(Cn6$7)#v66kH9jgO17%8femg=T$*-Wm zcBK!55fCys(TeN<7rklg;Oa`Mao`=2zo`URN4-sAWc}C61Jwo5o?w54DW_<&ojY!9 zf-g6R;`<+x O6eGU8>mS}r+??B5dV)TIBm=qq4Gd%Sly^RpJk&S zNPpydj^AvctI}F6r%z<2f#dA|R_mrxvtI`bL(G7Yl~=w$pV8jfJpC^v&f;F^6x}UQ zN9%^RJ(J!1ZdSa$poU&zuo5|0d0LQcgfUwwU$gh&*<+TN)_E!?I?r8Q$UB!0O8?Pn z!PU3K%(h`Py-$IpsVT|njV3vUbOyL4@BK?Nt| z6B+_O!2HJ*bRk~9$P`CIYtpNebyl^7*eU&F;1WGCBw51=d}fHnC+N?xRW)= z4J^@_r-+E#Q3g$>O63HmFuHn{-;C${RYIFw_dNS&j7>kEP7--FRt#MRrL)S+%%nic z4TGw^7<$W2q*iy#!+f8NiJXw)J(-wOgrBskr%XYE3TTap1N{bI6ys1glA)8N;8vgS zwwswHz5L|xzy|%K&-|2Il)B{^37AfSR^Z)}sJHeK$ )HH`Lw`P# z6yg~}8=cnwT(0iZRidq#T-%<=*4#Y??KEzs%O?>!4Mj>L3v}C|H^+@y8!%ZCORC#n z%qy$(x>IKvA$J?+m0n&OKe9U52_y-gNP6FTMq%%nD)_x5@Y>)33k!~Fc6FX1X_iM! z79q{?ztR;wl2g82thqP6nns%pN}P!tyb&?X;*=+b7tjrnI5ae5Fd842 (H^OlTjhwf3}SF^M*2R;PYfvTxz UFKbz)EaQQg>g#u?KQRoUhB>v#0Ini)h*NXPI#^?qER2PK z79wZ8l}9HQB1tJJ9(#SFk`^tWz^8=FrzDhfv`|J2g+TZ?05?Rv+~-^7K {KoA9Zz_fb7A(GTzwFgs?gHc}01f7OUb@nF|d$K J6Asok zsUOeeqS{8RU`tegd19Emq`X{ex>N5AJ*LO ya; z{gtk?v@~;x_FAwNIg`ZmIL3<%VcQ{lI|7WfNHRpn=H z8OdQNnuF||odX-4sf0!>0&misg0Qj`XKa$5?K|8PP4Wjde$d_M78T5BWNu$+wCQK5 zTGT!1T?PA`q4Vd23kskCr3dT1z$*6SZv@7$daGCy7V)6 *dkuewnWo3tw;dRL2+cx8Ae8pS8DR%0OJwwaED{cLaWoB|2y zbE6Hu_>`w?d1=zla@u|qpx@Pt5u~gEWu7}AnGKK`T<|k+0pzT~TOft_|89Y!LF))O zl}SS o>bTh)F~yT^Aq5xHZ-~w1md36V{Qnq$T3J!}4|9$pE$`2XY5jIu3t0 zebBIv@9FliNtHm!b)7LvjoR{3t3%Ea*SkGXSC5NUijh;>+uMH^3IX%Rj{PK)mka5& z9zCxldcV~CHduZofx6*=%5q#Zze)Oa=i>$qb`zYc0Y)%F!$F0`r^(DNatm+Cc?{WW zK>HO8$<2|40tx`oxRkjR_;`OgK)+Clj^p@vSuy_ejtMA&2n42s^ZGDE bBd2Sp-&F_D~;d;7Tx(&h=oAn-EfWzcRjeups3b!OZU3?7{0Q~`Gn{6U{O9YeL0 zOF?sc_V12os9}ANOW@NFLvV+DrR^kf>}=|p$$J_n2^)qR+#Q1>vm~bKAG&p4gnoxt z4B 2qe#K2xW;0J)VRI9Q*E#p$@j%>SpvfhrrW(kg{NaoOI zZO*QWua&%4kB`BAA3=J0dR%qUj)Cg$oJ6i3%l;bdUq&_Dq5}Y{@U6i?wA#0l{l(Cf z+j(}2<}b@?XWnpk|9T?aGYQ2wOS?`TLF-71#H>RJyjZ6Bfqc*fG2%W+1yK@9%mgRI zOlaxQoLwy1f6y0G0rgCFEUEWKwl|qfVoZJ3D)Sr5bG9Y&I(N4ADu~Qj95^u9ua;KE z^XPNZ%1{Ty>mHq`pr>AaIMiUFK^h*mclVK $-HV>2ZLnb11 XJ5HYludJ-fdWc57%&+(P`Pb&GS#czXNW}KF=80Ml zvG L9C~<`GcLbf6@OHY`-qYCKso*N6 zFs0>{H5#~kCAx3K-MYOq^0?l e9};Xc;^``e-3(SaQ2_q`*hu{muP*faS4j1=Kz z)*$pX5(zV`gR-gaaI`pbm DL(;Opuw-z 2d}SGC}$>X};3bq%mU z33BE@BRbJhGPg5g!O>$XaCcZnW62zN;KXkt!1K;9#k%7)5-9am)h?1bzG@)z<_ZTS znp?>%pvW*qnqYbn1b%I$6mF|Fyqnqy#o21^=Jk!`cLR!4WGjzXf5#*p>Y;z%7)+_J za+y3}#olJ%4`mE4v|@Q>7*dT1^1ql=A$Gi(H*3wPCG+7*^ynINLR9f-k&gVSg8~qD z!qeBrtC7D%-n?g0F6w^Km8AZ#`-7 T-LfFDE}VJUCM>Z*ZBgiEO%8>H0m6$~oyB3_s t4gA zoPHNP2<3Bozc3D7)^DvQU-{1}`xO}`g1 CJr_X;wsoGZ zSTA@}8Z#bR$O(^OE8LR91~9N(-OWW_q6rCS_ZxkY^xEvly{suA#olZ$>(hrdrr!Gt zvvX} ; z^(K )-Y>COmDv5}k7B0#13NBX=-c9{C-eMoMP}cjsY7;Mm !iI)aI$K9Rlm@j5D3Hih0_cjln6EY?| zPzqq3TVA!OgRA7#@rLmgHOT5G`W}pkf8>;`c2H!br!Z|j(=MdE&fbHzZvR!WL|8!Y zb1I)n ~QnZClPbyO{a7-MBLiELXmoPM@zRcLGcOI{5)RiMq!mYz*`qQ4V zBy%lg!h$ZUt)+XQ*!dh0y|-;`E_N;-@e%KXt2xvAJH9Am@BHNqD1}vPBe;)4{iX6f z-DX=F9a^4%JM4~jITnj$<#VkpHmx6;PosZ-UU&);%U~Kk{_RCqbsk _vaQn?!D-@Y`MmRI<4Z%o1|JLOpz)udl!76pU>vY^D(x;+ z6yzx#K|WY@#(73k3?qy$gHg)MK=hO0(UQ(wJ=?=YiK-3#aWE|Qk$?We>NNUo!BpB! zuE^M$rFo>&!!}Ut+vpkrC9faQkSMouSS}#1xQ>bA6 8qOOOw%rL_)4$5PgT zC15H8&`~3H>J<=X5nq2)M#)YVnIp{_YWQ>rXLCj_e>5QQfCMoU77w1E%XFyWYV{|7 z(lh!$xBGeU6GkWSdk=Wo4ta`V6~XYH-Fx3RG3wihtSu@<(Cp8l#Mfh1ViUzixK ;CklDVaBn5OzN8 ~~-&MG6;*^ef&Bp5;M=*^Db$ zcubbr)M4s2fe8TI;7f&4anya-Dn{>i*>{|DwclZzmy(iM1&!4@4X+WK*58Bg1^`-i z2$Fi;joszlX{Z5}OVj>hD#z(Mq<{SJ+43gRF*@xO2r0g41!^B0f*8{0Y~Iep&DoJo z^7;QRMWTn@z|7vIcIN|RO300bIzCIVoy54q3=Z&wK{8N)p}_MO7Cv+kSf!yLY Q#ihk=h>*9!~w9CzL=`QqN6U>qWa{>mrMk2)m|pSB6~08nb4nwlD2 zAu+hN)qeAZ!%iWYSkZ(b!D^2`kwK*qDw4A&!H)au(%-0pos8dnjAA~BrehyO#S#_4 zcl@<*-?*kYNi6e}L7`(FQUjc)h%0AKyOyf0R?n(Qe)MZ Rm z`#-Kr7Sc67%KEX0@6>|9zy_bpaZvji9jk#bQw_XPB|#F?fVqM RRczndKJ;J_d3H60IPC;T>o7X;IZPYN+UnFJLq4oo}vZ%#<8yX0_h3S7_q zyfaG{y0AF#d1cCK>**^`)NxE36@Gmjq*E@dXj(q-dIFgN@NSA1?fqD|6X?SDYJ2k} z9Uy1*S3$eR>#b*-cX%35<7GW=CE6bpd%>QUsX87jqK3Py?pK7R?m+9+V$hx7(DJj6 zeDaM$FY|6vngz~aVnKofI|q&$n5zhGypV|m+2a?SL6v^4Gq&%^O(RC`O)DuNN+PlH z)R|r}l8XVPLUiXTu%bjV;{zgZkirpmnwb;{Ou;C0*rmnGX!CJ`^HXQ(^Krw>IDp<| z*O@!?vcQ#tm~oixNASm$_y&ST3|Ke7Bs+f}%%o;)=BqT!SNE5h^b0$`itMiA>ar|t z_wmm0;x`R`1Rk-huYiMgF^rtH88<5>;g3nX0VOTHQ#{tIC2C7k7)JtWBFh~%G-(q{ iBxmFQ*L~hDksx7{=^qUc(_r=j0Geugs>OFKLjM;;nh$0G literal 0 HcmV?d00001 diff --git a/website/public/favicon.svg b/website/public/favicon.svg deleted file mode 100644 index 69faf4108..000000000 --- a/website/public/favicon.svg +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/website/src/App.svelte b/website/src/App.svelte index 2fd0bd9b1..e961fc6d4 100644 --- a/website/src/App.svelte +++ b/website/src/App.svelte @@ -1,11 +1,6 @@ -{#if locale && isMounted} +{#if locale}scrollToSection(event, 'top')}>ServerBox @@ -164,6 +165,7 @@ scrollToSection(event, 'features')}>{$LL.nav.features()} scrollToSection(event, 'capabilities')}>{$LL.nav.capabilities()} scrollToSection(event, 'download')}>{$LL.nav.download()} + Docs From b553f47ed0b3ff28e8740744638cc3380ff3452f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lollipopkit=F0=9F=8F=B3=EF=B8=8F=E2=80=8D=E2=9A=A7?= =?UTF-8?q?=EF=B8=8F?= <10864310+lollipopkit@users.noreply.github.com> Date: Sat, 25 Apr 2026 15:00:06 +0800 Subject: [PATCH 06/11] opt.: docs --- README.md | 5 ++- README_zh.md | 5 ++- docs/src/content/docs/advanced/bulk-import.md | 11 ++--- .../content/docs/de/advanced/bulk-import.md | 10 ++--- .../docs/de/development/architecture.md | 2 +- .../content/docs/de/development/codegen.md | 9 ++-- .../content/docs/de/development/testing.md | 31 ++----------- docs/src/content/docs/de/index.mdx | 4 +- docs/src/content/docs/de/installation.mdx | 20 ++++++--- .../docs/de/principles/architecture.md | 2 +- .../content/docs/development/architecture.md | 2 +- docs/src/content/docs/development/codegen.md | 9 ++-- docs/src/content/docs/development/testing.md | 43 ++----------------- .../content/docs/es/advanced/bulk-import.md | 10 ++--- .../docs/es/development/architecture.md | 2 +- .../content/docs/es/development/codegen.md | 9 ++-- .../content/docs/es/development/testing.md | 31 ++----------- docs/src/content/docs/es/index.mdx | 4 +- docs/src/content/docs/es/installation.mdx | 20 ++++++--- .../content/docs/fr/advanced/bulk-import.md | 11 ++--- .../docs/fr/development/architecture.md | 2 +- .../content/docs/fr/development/codegen.md | 9 ++-- .../content/docs/fr/development/testing.md | 31 ++----------- docs/src/content/docs/fr/index.mdx | 4 +- docs/src/content/docs/fr/installation.mdx | 20 ++++++--- docs/src/content/docs/index.mdx | 4 +- docs/src/content/docs/installation.mdx | 20 ++++++--- .../content/docs/ja/advanced/bulk-import.md | 10 ++--- .../docs/ja/development/architecture.md | 2 +- .../content/docs/ja/development/codegen.md | 9 ++-- .../content/docs/ja/development/testing.md | 31 ++----------- docs/src/content/docs/ja/index.mdx | 4 +- docs/src/content/docs/ja/installation.mdx | 20 ++++++--- .../docs/ja/principles/architecture.md | 2 +- .../content/docs/principles/architecture.md | 2 +- .../content/docs/zh/advanced/bulk-import.md | 11 ++--- .../docs/zh/development/architecture.md | 2 +- .../content/docs/zh/development/codegen.md | 9 ++-- .../content/docs/zh/development/testing.md | 31 ++----------- docs/src/content/docs/zh/index.mdx | 2 +- docs/src/content/docs/zh/installation.mdx | 18 +++++--- .../docs/zh/principles/architecture.md | 2 +- website/src/App.svelte | 11 ++++- website/src/i18n/en/index.ts | 4 +- website/src/i18n/i18n-types.ts | 8 ++-- website/src/i18n/zh-CN/index.ts | 4 +- 46 files changed, 219 insertions(+), 293 deletions(-) diff --git a/README.md b/README.md index 6c48b9d75..4945f483b 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,9 @@ Especially thanks to dartss |Platform| From| |--|--| -| iOS / macOS | [AppStore](https://apps.apple.com/app/id1586449703) / brew install --cask server-box | -| Android | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid) / [F-Droid](https://f-droid.org/packages/tech.lolli.toolbox) / [OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/) | +| iOS | [AppStore](https://apps.apple.com/app/id1586449703) | +| macOS | [AppStore](https://apps.apple.com/app/id1586449703) / brew install --cask server-box | +| Android | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid) / [F-Droid](https://f-droid.org/packages/tech.lolli.toolbox) / [OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/) | | Linux / Windows | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid) | Please only download pkgs from the source that **you trust**! diff --git a/README_zh.md b/README_zh.md index 4c1d84664..be35366fe 100644 --- a/README_zh.md +++ b/README_zh.md @@ -30,8 +30,9 @@ 平台|下载 --|-- -iOS / macOS | [AppStore](https://apps.apple.com/app/id1586449703) / brew install --cask server-box -Android | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid) / [F-Droid](https://f-droid.org/packages/tech.lolli.toolbox) / [OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/) +| iOS | [AppStore](https://apps.apple.com/app/id1586449703) | +| macOS | [AppStore](https://apps.apple.com/app/id1586449703) / brew install --cask server-box | +Android | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid) / [F-Droid](https://f-droid.org/packages/tech.lolli.toolbox) / [OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/) Linux / Windows | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid) 请从 **信任** 的来源下载! diff --git a/docs/src/content/docs/advanced/bulk-import.md b/docs/src/content/docs/advanced/bulk-import.md index 8ba04647e..b59e2f9c0 100644 --- a/docs/src/content/docs/advanced/bulk-import.md +++ b/docs/src/content/docs/advanced/bulk-import.md @@ -10,7 +10,7 @@ Import multiple server configurations at once using a JSON file. :::danger[Security Warning] **Never store plaintext passwords in files!** This JSON example shows a password field for demonstration only, but you should: -- **Prefer SSH keys** (`keyId`) instead of `pwd` - they're more secure +- **Prefer SSH keys** (`pubKeyId`) instead of `pwd` - they're more secure - **Use secret managers** or environment variables if you must use passwords - **Delete the file immediately** after import - don't leave credentials lying around - **Add to .gitignore** - never commit credential files to version control @@ -24,7 +24,7 @@ Import multiple server configurations at once using a JSON file. "port": 22, "user": "root", "pwd": "password", - "keyId": "", + "pubKeyId": "", "tags": ["production"], "autoConnect": false } @@ -40,9 +40,10 @@ Import multiple server configurations at once using a JSON file. | `port` | Yes | SSH port (usually 22) | | `user` | Yes | SSH username | | `pwd` | No | Password (avoid - use SSH keys instead) | -| `keyId` | No | SSH key name (from Private Keys - recommended) | +| `pubKeyId` | No | Private key id (from Private Keys - recommended) | | `tags` | No | Organization tags | | `autoConnect` | No | Auto-connect on startup | +| `id` | No | Stable server id; omitted or empty values are generated on import | ## Import Steps @@ -60,7 +61,7 @@ Import multiple server configurations at once using a JSON file. "ip": "prod.example.com", "port": 22, "user": "admin", - "keyId": "my-key", + "pubKeyId": "my-key", "tags": ["production", "web"] }, { @@ -68,7 +69,7 @@ Import multiple server configurations at once using a JSON file. "ip": "dev.example.com", "port": 2222, "user": "dev", - "keyId": "dev-key", + "pubKeyId": "dev-key", "tags": ["development"] } ] diff --git a/docs/src/content/docs/de/advanced/bulk-import.md b/docs/src/content/docs/de/advanced/bulk-import.md index d603698ae..1a1f29071 100644 --- a/docs/src/content/docs/de/advanced/bulk-import.md +++ b/docs/src/content/docs/de/advanced/bulk-import.md @@ -10,7 +10,7 @@ Importieren Sie mehrere Serverkonfigurationen gleichzeitig mithilfe einer JSON-D :::danger[Sicherheitswarnung] **Speichern Sie niemals Klartext-Passwörter in Dateien!** Dieses JSON-Beispiel zeigt ein Passwort-Feld nur zur Demonstration, aber Sie sollten: -- **SSH-Schlüssel bevorzugen** (`keyId`) anstelle von `pwd` - diese sind sicherer +- **SSH-Schlüssel bevorzugen** (`pubKeyId`) anstelle von `pwd` - diese sind sicherer - **Passwort-Manager** oder Umgebungsvariablen verwenden, wenn Sie Passwörter verwenden müssen - **Löschen Sie die Datei sofort** nach dem Import - lassen Sie keine Anmeldedaten herumliegen - **Fügen Sie sie zur .gitignore hinzu** - checken Sie niemals Anmeldedatendateien in die Versionsverwaltung ein @@ -24,7 +24,7 @@ Importieren Sie mehrere Serverkonfigurationen gleichzeitig mithilfe einer JSON-D "port": 22, "user": "root", "pwd": "password", - "keyId": "", + "pubKeyId": "", "tags": ["production"], "autoConnect": false } @@ -40,7 +40,7 @@ Importieren Sie mehrere Serverkonfigurationen gleichzeitig mithilfe einer JSON-D | `port` | Ja | SSH-Port (normalerweise 22) | | `user` | Ja | SSH-Benutzername | | `pwd` | Nein | Passwort (vermeiden - stattdessen SSH-Schlüssel verwenden) | -| `keyId` | Nein | SSH-Schlüsselname (aus Private Keys - empfohlen) | +| `pubKeyId` | Nein | Private-Key-ID (aus Private Keys - empfohlen) | | `tags` | Nein | Organisations-Tags | | `autoConnect` | Nein | Automatische Verbindung beim Start | @@ -60,7 +60,7 @@ Importieren Sie mehrere Serverkonfigurationen gleichzeitig mithilfe einer JSON-D "ip": "prod.example.com", "port": 22, "user": "admin", - "keyId": "my-key", + "pubKeyId": "my-key", "tags": ["production", "web"] }, { @@ -68,7 +68,7 @@ Importieren Sie mehrere Serverkonfigurationen gleichzeitig mithilfe einer JSON-D "ip": "dev.example.com", "port": 2222, "user": "dev", - "keyId": "dev-key", + "pubKeyId": "dev-key", "tags": ["development"] } ] diff --git a/docs/src/content/docs/de/development/architecture.md b/docs/src/content/docs/de/development/architecture.md index 4e0a48412..f97307dad 100644 --- a/docs/src/content/docs/de/development/architecture.md +++ b/docs/src/content/docs/de/development/architecture.md @@ -47,7 +47,7 @@ Server Box folgt den Prinzipien der Clean Architecture mit einer klaren Trennung ### Lokale Speicherung: Hive - **hive_ce**: Community-Edition von Hive -- Keine manuellen `@HiveField` oder `@HiveType` erforderlich +- Folgen Sie dem bestehenden Modellmuster: Die meisten Stores verwenden `hive_ce`, einige verfolgte Modelle deklarieren weiterhin explizit `@HiveType` und `@HiveField` - Typ-Adapter werden automatisch generiert - Persistenter Key-Value-Speicher diff --git a/docs/src/content/docs/de/development/codegen.md b/docs/src/content/docs/de/development/codegen.md index 40dbdcbc6..88aebe33f 100644 --- a/docs/src/content/docs/de/development/codegen.md +++ b/docs/src/content/docs/de/development/codegen.md @@ -21,8 +21,11 @@ Führen Sie sie aus nach der Änderung von: # Gesamten Code generieren dart run build_runner build --delete-conflicting-outputs -# Bereinigen und neu generieren -dart run build_runner build --delete-conflicting-outputs --clean +# Generierten Build-Cache bereinigen +dart run build_runner clean + +# Dann neu generieren +dart run build_runner build --delete-conflicting-outputs ``` ## Generierte Dateien @@ -94,5 +97,5 @@ Generiert `lib/generated/l10n/` aus `lib/l10n/*.arb` Dateien. ## Tipps - Verwenden Sie `--delete-conflicting-outputs`, um Konflikte zu vermeiden. -- Fügen Sie generierte Dateien zur `.gitignore` hinzu. +- Behalten Sie generierte Dateien in der Versionsverwaltung, wenn dieses Repository sie bereits verfolgt. - Bearbeiten Sie generierte Dateien niemals manuell. diff --git a/docs/src/content/docs/de/development/testing.md b/docs/src/content/docs/de/development/testing.md index 0172c3ed7..eb7980042 100644 --- a/docs/src/content/docs/de/development/testing.md +++ b/docs/src/content/docs/de/development/testing.md @@ -18,17 +18,7 @@ flutter test --coverage ## Teststruktur -Tests befinden sich im Verzeichnis `test/` und spiegeln die Struktur von `lib/` wider: - -``` -test/ -├── data/ -│ ├── model/ -│ └── provider/ -├── view/ -│ └── widget/ -└── test_helpers.dart -``` +Tests befinden sich im Verzeichnis `test/`. Die aktuelle Suite ist überwiegend flach und nach Parser-, Modell- und Utility-Verhalten gruppiert, zum Beispiel `cpu_test.dart`, `container_test.dart` und `ssh_config_test.dart`. ## Unit-Tests @@ -71,26 +61,13 @@ test('serverStatusProvider gibt Status zurück', () async { }); ``` -## Mocking - -Mocks für externe Abhängigkeiten verwenden: - -```dart -class MockSshService extends Mock implements SshService {} +## Externe Abhängigkeiten -test('verbindet zum Server', () async { - final mockSsh = MockSshService(); - when(mockSsh.connect(any)).thenAnswer((_) async => true); - - // Test mit Mock -}); -``` +Vermeiden Sie Tests, die von echten SSH-Servern abhängen. Parser-, Modell- und Command-Builder-Tests sollten deterministisch bleiben; fügen Sie gezielte Fakes oder Fixtures hinzu, wenn eine Funktion eine Service-Grenze einführt. ## Integrationstests -Komplette Benutzerabläufe testen (in `integration_test/`): - -```dart +Im aktuellen Repository gibt es keine `integration_test/`-Suite. Fügen Sie Integrationstests nur hinzu, wenn eine Funktion End-to-End-Geräte- oder App-Flow-Abdeckung benötigt.dart testWidgets('Server hinzufügen Ablauf', (tester) async { await tester.pumpWidget(MyApp()); diff --git a/docs/src/content/docs/de/index.mdx b/docs/src/content/docs/de/index.mdx index 04631f9b5..171a37194 100644 --- a/docs/src/content/docs/de/index.mdx +++ b/docs/src/content/docs/de/index.mdx @@ -5,7 +5,7 @@ hero: tagline: Verwalten Sie Ihre Linux-Server von überall aus actions: - text: Loslegen - link: /de/introduction/ + link: /docs/de/introduction/ icon: right-arrow variant: primary - text: Auf GitHub ansehen @@ -41,6 +41,6 @@ import { Card, CardGrid } from '@astrojs/starlight/components'; ## Quick-Links -- **Download**: Verfügbar im [App Store](https://apps.apple.com/app/id1586449703), auf [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) und bei [F-Droid](https://f-droid.org/) +- **Download**: Verfügbar im [App Store](https://apps.apple.com/app/id1586449703), auf [GitHub](https://github.com/lollipopkit/flutter_server_box/releases), bei [F-Droid](https://f-droid.org/packages/tech.lolli.toolbox), im [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid) und bei [OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/) - **Dokumentation**: Entdecken Sie die Anleitungen für den Einstieg in die Server Box - **Support**: Treten Sie unserer Community auf GitHub für Diskussionen und Probleme bei diff --git a/docs/src/content/docs/de/installation.mdx b/docs/src/content/docs/de/installation.mdx index fa48ef79d..897c8de2c 100644 --- a/docs/src/content/docs/de/installation.mdx +++ b/docs/src/content/docs/de/installation.mdx @@ -15,14 +15,20 @@ Laden Sie es aus dem **[App Store](https://apps.apple.com/app/id1586449703)** he Wählen Sie Ihre bevorzugte Quelle: -- **[F-Droid](https://f-droid.org/)** – Für Benutzer, die reine FOSS-Quellen bevorzugen - **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** – Für die neueste Version direkt von der Quelle +- **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)** – Spiegel für Release-Pakete +- **[F-Droid](https://f-droid.org/packages/tech.lolli.toolbox)** – Für Benutzer, die reine FOSS-Quellen bevorzugen +- **[OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/)** – Drittanbieter-Android-App-Store ## Desktop Apps ### macOS -Herunterladen von den **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)**. +Aus dem **[App Store](https://apps.apple.com/app/id1586449703)** herunterladen oder mit Homebrew Cask installieren: + +```sh +brew install --cask server-box +``` Funktionen: - Native Menüleisten-Integration @@ -30,13 +36,15 @@ Funktionen: ### Linux -Herunterladen von den **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)**. +Herunterladen von den **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** oder dem **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)**. -Verfügbar als AppImage, deb oder tar.gz Pakete. +GitHub Releases und CDN stellen Linux-AppImage-Pakete bereit. ### Windows -Herunterladen von den **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)**. +Herunterladen von den **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** oder dem **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)**. + +GitHub Releases und CDN stellen Windows-zip-Pakete bereit. ## watchOS @@ -44,7 +52,7 @@ Verfügbar im **[App Store](https://apps.apple.com/app/id1586449703)** als Teil ## Aus dem Quellcode bauen -Um Server Box aus dem Quellcode zu bauen, lesen Sie den Abschnitt [Bauen](/de/development/building/) in der Entwicklungsdokumentation. +Um Server Box aus dem Quellcode zu bauen, lesen Sie den Abschnitt [Bauen](/docs/development/building/) in der Entwicklungsdokumentation. ## Versionsinformationen diff --git a/docs/src/content/docs/de/principles/architecture.md b/docs/src/content/docs/de/principles/architecture.md index 9c6e59dd9..aba2ef3d2 100644 --- a/docs/src/content/docs/de/principles/architecture.md +++ b/docs/src/content/docs/de/principles/architecture.md @@ -85,7 +85,7 @@ void main() { - Keine Abhängigkeiten von nativem Code - Schneller Key-Value-Speicher - Typsicher durch Codegenerierung -- Keine manuellen Feld-Annotationen erforderlich +- Folgen Sie dem bestehenden Modellmuster; einige verfolgte Modelle verwenden weiterhin explizite Feld-Annotationen **Stores:** - `SettingStore`: App-Einstellungen diff --git a/docs/src/content/docs/development/architecture.md b/docs/src/content/docs/development/architecture.md index 6fb4837a4..639ff7317 100644 --- a/docs/src/content/docs/development/architecture.md +++ b/docs/src/content/docs/development/architecture.md @@ -47,7 +47,7 @@ Server Box follows clean architecture principles with clear separation between d ### Local Storage: Hive - **hive_ce**: Community edition of Hive -- No manual `@HiveField` or `@HiveType` needed +- Follow the existing model pattern: most stores use `hive_ce`, while some tracked models still declare `@HiveType` and `@HiveField` explicitly - Type adapters auto-generated - Persistent key-value storage diff --git a/docs/src/content/docs/development/codegen.md b/docs/src/content/docs/development/codegen.md index 1e714d004..09b65d369 100644 --- a/docs/src/content/docs/development/codegen.md +++ b/docs/src/content/docs/development/codegen.md @@ -21,8 +21,11 @@ Run after modifying: # Generate all code dart run build_runner build --delete-conflicting-outputs -# Clean and regenerate -dart run build_runner build --delete-conflicting-outputs --clean +# Clean generated build cache +dart run build_runner clean + +# Then regenerate +dart run build_runner build --delete-conflicting-outputs ``` ## Generated Files @@ -94,5 +97,5 @@ Generates `lib/generated/l10n/` from `lib/l10n/*.arb` files. ## Tips - Use `--delete-conflicting-outputs` to avoid conflicts -- Add generated files to `.gitignore` +- Keep generated files in version control when they are already tracked by this repository - Never manually edit generated files diff --git a/docs/src/content/docs/development/testing.md b/docs/src/content/docs/development/testing.md index d19b53458..af1c1550e 100644 --- a/docs/src/content/docs/development/testing.md +++ b/docs/src/content/docs/development/testing.md @@ -18,17 +18,7 @@ flutter test --coverage ## Test Structure -Tests are located in the `test/` directory mirroring the lib structure: - -``` -test/ -├── data/ -│ ├── model/ -│ └── provider/ -├── view/ -│ └── widget/ -└── test_helpers.dart -``` +Tests are located in the `test/` directory. The current suite is mostly flat and grouped by parser, model, and utility behavior, for example `cpu_test.dart`, `container_test.dart`, and `ssh_config_test.dart`. ## Unit Tests @@ -71,38 +61,13 @@ test('serverStatusProvider returns status', () async { }); ``` -## Mocking - -Use mocks for external dependencies: +## External Dependencies -```dart -class MockSshService extends Mock implements SshService {} - -test('connects to server', () async { - final mockSsh = MockSshService(); - when(mockSsh.connect(any)).thenAnswer((_) async => true); - - // Test with mock -}); -``` +Avoid tests that depend on real SSH servers. Keep parser, model, and command-builder tests deterministic; add targeted fakes or fixtures when a feature introduces a service boundary. ## Integration Tests -Test complete user flows (in `integration_test/`): - -```dart -testWidgets('add server flow', (tester) async { - await tester.pumpWidget(MyApp()); - - // Tap add button - await tester.tap(find.byIcon(Icons.add)); - await tester.pumpAndSettle(); - - // Fill form - await tester.enterText(find.byKey(Key('name')), 'Test Server'); - // ... -}); -``` +There is no `integration_test/` suite in the current repository. Add integration tests only when a feature needs end-to-end device or app-flow coverage. ## Best Practices diff --git a/docs/src/content/docs/es/advanced/bulk-import.md b/docs/src/content/docs/es/advanced/bulk-import.md index ac5adec2b..03799b8df 100644 --- a/docs/src/content/docs/es/advanced/bulk-import.md +++ b/docs/src/content/docs/es/advanced/bulk-import.md @@ -10,7 +10,7 @@ Importa múltiples configuraciones de servidor a la vez utilizando un archivo JS :::danger[Advertencia de Seguridad] **¡Nunca guardes contraseñas en texto plano en archivos!** Este ejemplo JSON muestra un campo de contraseña solo con fines demostrativos, pero deberías: -- **Preferir claves SSH** (`keyId`) en lugar de `pwd`; son más seguras +- **Preferir claves SSH** (`pubKeyId`) en lugar de `pwd`; son más seguras - **Usar gestores de secretos** o variables de entorno si debes usar contraseñas - **Eliminar el archivo inmediatamente** después de la importación; no dejes credenciales tiradas - **Añadir a .gitignore**: nunca subas archivos de credenciales al control de versiones @@ -24,7 +24,7 @@ Importa múltiples configuraciones de servidor a la vez utilizando un archivo JS "port": 22, "user": "root", "pwd": "password", - "keyId": "", + "pubKeyId": "", "tags": ["production"], "autoConnect": false } @@ -40,7 +40,7 @@ Importa múltiples configuraciones de servidor a la vez utilizando un archivo JS | `port` | Sí | Puerto SSH (usualmente 22) | | `user` | Sí | Usuario SSH | | `pwd` | No | Contraseña (evitar - usar claves SSH en su lugar) | -| `keyId` | No | Nombre de la clave SSH (de Claves Privadas - recomendado) | +| `pubKeyId` | No | ID de clave privada (de Claves Privadas - recomendado) | | `tags` | No | Etiquetas de organización | | `autoConnect` | No | Autoconexión al iniciar | @@ -60,7 +60,7 @@ Importa múltiples configuraciones de servidor a la vez utilizando un archivo JS "ip": "prod.example.com", "port": 22, "user": "admin", - "keyId": "mi-clave", + "pubKeyId": "mi-clave", "tags": ["production", "web"] }, { @@ -68,7 +68,7 @@ Importa múltiples configuraciones de servidor a la vez utilizando un archivo JS "ip": "dev.example.com", "port": 2222, "user": "dev", - "keyId": "dev-clave", + "pubKeyId": "dev-clave", "tags": ["development"] } ] diff --git a/docs/src/content/docs/es/development/architecture.md b/docs/src/content/docs/es/development/architecture.md index f74931cac..54a5e470f 100644 --- a/docs/src/content/docs/es/development/architecture.md +++ b/docs/src/content/docs/es/development/architecture.md @@ -47,7 +47,7 @@ Server Box sigue los principios de Clean Architecture con una clara separación ### Almacenamiento Local: Hive - **hive_ce**: Edición comunitaria de Hive -- No se requiere `@HiveField` o `@HiveType` manual +- Sigue el patrón existente: la mayoría de los stores usan `hive_ce`, mientras algunos modelos versionados aún declaran explícitamente `@HiveType` y `@HiveField` - Adaptadores de tipo generados automáticamente - Almacenamiento persistente clave-valor diff --git a/docs/src/content/docs/es/development/codegen.md b/docs/src/content/docs/es/development/codegen.md index d1b13d3ba..b1f09114a 100644 --- a/docs/src/content/docs/es/development/codegen.md +++ b/docs/src/content/docs/es/development/codegen.md @@ -21,8 +21,11 @@ Ejecutar tras modificar: # Generar todo el código dart run build_runner build --delete-conflicting-outputs -# Limpiar y regenerar -dart run build_runner build --delete-conflicting-outputs --clean +# Limpiar la caché de generación +dart run build_runner clean + +# Luego regenerar +dart run build_runner build --delete-conflicting-outputs ``` ## Archivos Generados @@ -94,5 +97,5 @@ Genera `lib/generated/l10n/` a partir de los archivos `lib/l10n/*.arb`. ## Consejos - Usa `--delete-conflicting-outputs` para evitar conflictos -- Añade los archivos generados al `.gitignore` +- Mantén los archivos generados en el control de versiones cuando este repositorio ya los sigue - Nunca edites manualmente los archivos generados diff --git a/docs/src/content/docs/es/development/testing.md b/docs/src/content/docs/es/development/testing.md index fa51fd328..bf46be534 100644 --- a/docs/src/content/docs/es/development/testing.md +++ b/docs/src/content/docs/es/development/testing.md @@ -18,17 +18,7 @@ flutter test --coverage ## Estructura de las Pruebas -Las pruebas se encuentran en el directorio `test/` reflejando la estructura de lib: - -``` -test/ -├── data/ -│ ├── model/ -│ └── provider/ -├── view/ -│ └── widget/ -└── test_helpers.dart -``` +Las pruebas se encuentran en el directorio `test/`. La suite actual es mayormente plana y se agrupa por comportamiento de parsers, modelos y utilidades, por ejemplo `cpu_test.dart`, `container_test.dart` y `ssh_config_test.dart`. ## Pruebas Unitarias @@ -71,26 +61,13 @@ test('serverStatusProvider devuelve el estado', () async { }); ``` -## Mocking (Simulaciones) - -Utilizar mocks para dependencias externas: - -```dart -class MockSshService extends Mock implements SshService {} +## Dependencias externas -test('se conecta al servidor', () async { - final mockSsh = MockSshService(); - when(mockSsh.connect(any)).thenAnswer((_) async => true); - - // Probar con el mock -}); -``` +Evita pruebas que dependan de servidores SSH reales. Las pruebas de parsers, modelos y constructores de comandos deben ser deterministas; añade fakes o fixtures dirigidos cuando una función introduzca una frontera de servicio. ## Pruebas de Integración -Probar flujos de usuario completos (en `integration_test/`): - -```dart +El repositorio actual no contiene una suite `integration_test/`. Añade pruebas de integración solo cuando una función necesite cobertura end-to-end de dispositivo o flujo completo de la app.dart testWidgets('flujo de agregar servidor', (tester) async { await tester.pumpWidget(MyApp()); diff --git a/docs/src/content/docs/es/index.mdx b/docs/src/content/docs/es/index.mdx index d602382a5..c1e1b8a6a 100644 --- a/docs/src/content/docs/es/index.mdx +++ b/docs/src/content/docs/es/index.mdx @@ -5,7 +5,7 @@ hero: tagline: Administra tus servidores Linux desde cualquier lugar actions: - text: Empezar - link: /es/introduction/ + link: /docs/es/introduction/ icon: right-arrow variant: primary - text: Ver en GitHub @@ -41,6 +41,6 @@ import { Card, CardGrid } from '@astrojs/starlight/components'; ## Enlaces Rápidos -- **Descarga**: Disponible en [App Store](https://apps.apple.com/app/id1586449703), [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) y [F-Droid](https://f-droid.org/) +- **Descarga**: Disponible en [App Store](https://apps.apple.com/app/id1586449703), [GitHub](https://github.com/lollipopkit/flutter_server_box/releases), [F-Droid](https://f-droid.org/packages/tech.lolli.toolbox), [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid) y [OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/) - **Documentación**: Explora las guías para comenzar con Server Box - **Soporte**: Únete a nuestra comunidad en GitHub para discusiones y problemas diff --git a/docs/src/content/docs/es/installation.mdx b/docs/src/content/docs/es/installation.mdx index 0c740d4a7..b111b32d2 100644 --- a/docs/src/content/docs/es/installation.mdx +++ b/docs/src/content/docs/es/installation.mdx @@ -15,14 +15,20 @@ Descárgalo desde la **[App Store](https://apps.apple.com/app/id1586449703)**. Elige tu fuente preferida: -- **[F-Droid](https://f-droid.org/)** - Para usuarios que prefieren fuentes exclusivamente FOSS (Software Libre y de Código Abierto) - **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** - Para la última versión directamente desde la fuente +- **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)** - Espejo para paquetes de lanzamiento +- **[F-Droid](https://f-droid.org/packages/tech.lolli.toolbox)** - Para usuarios que prefieren fuentes exclusivamente FOSS (Software Libre y de Código Abierto) +- **[OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/)** - Tienda Android de terceros ## Aplicaciones de Escritorio ### macOS -Descárgalo desde **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)**. +Descárgalo desde la **[App Store](https://apps.apple.com/app/id1586449703)** o instálalo con Homebrew Cask: + +```sh +brew install --cask server-box +``` Características: - Integración nativa con la barra de menú @@ -30,13 +36,15 @@ Características: ### Linux -Descárgalo desde **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)**. +Descárgalo desde **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** o el **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)**. -Disponible en paquetes AppImage, deb o tar.gz. +GitHub Releases y el CDN proporcionan paquetes Linux AppImage. ### Windows -Descárgalo desde **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)**. +Descárgalo desde **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** o el **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)**. + +GitHub Releases y el CDN proporcionan paquetes Windows zip. ## watchOS @@ -44,7 +52,7 @@ Disponible en la **[App Store](https://apps.apple.com/app/id1586449703)** como p ## Compilación desde el Código Fuente -Para compilar Server Box desde el código fuente, consulta la sección de [Compilación](/es/development/building/) en la documentación de desarrollo. +Para compilar Server Box desde el código fuente, consulta la sección de [Compilación](/docs/development/building/) en la documentación de desarrollo. ## Información de Versión diff --git a/docs/src/content/docs/fr/advanced/bulk-import.md b/docs/src/content/docs/fr/advanced/bulk-import.md index 012ff1e3d..a062c7eef 100644 --- a/docs/src/content/docs/fr/advanced/bulk-import.md +++ b/docs/src/content/docs/fr/advanced/bulk-import.md @@ -10,7 +10,7 @@ Importez plusieurs configurations de serveur en une seule fois à l'aide d'un fi :::danger[Avertissement de sécurité] **Ne stockez jamais de mots de passe en clair dans des fichiers !** Cet exemple JSON montre un champ de mot de passe à des fins de démonstration uniquement, mais vous devriez : -- **Préférer les clés SSH** (`keyId`) au lieu de `pwd` - elles sont plus sûres +- **Préférer les clés SSH** (`pubKeyId`) au lieu de `pwd` - elles sont plus sûres - **Utiliser des gestionnaires de mots de passe** ou des variables d'environnement si vous devez utiliser des mots de passe - **Supprimer le fichier immédiatement** après l'importation - ne laissez pas traîner des identifiants - **Ajouter au .gitignore** - ne validez jamais de fichiers d'identifiants dans le contrôle de version @@ -24,7 +24,7 @@ Importez plusieurs configurations de serveur en une seule fois à l'aide d'un fi "port": 22, "user": "root", "pwd": "password", - "keyId": "", + "pubKeyId": "", "tags": ["production"], "autoConnect": false } @@ -40,9 +40,10 @@ Importez plusieurs configurations de serveur en une seule fois à l'aide d'un fi | `port` | Oui | Port SSH (généralement 22) | | `user` | Oui | Nom d'utilisateur SSH | | `pwd` | Non | Mot de passe (à éviter - utilisez plutôt des clés SSH) | -| `keyId` | Non | Nom de la clé SSH (à partir des clés privées - recommandé) | +| `pubKeyId` | Non | ID de clé privée (à partir des clés privées - recommandé) | | `tags` | Non | Tags d'organisation | | `autoConnect` | Non | Connexion automatique au démarrage | +| `id` | Non | ID serveur stable ; les valeurs absentes ou vides sont générées à l’import | ## Étapes d'importation @@ -60,7 +61,7 @@ Importez plusieurs configurations de serveur en une seule fois à l'aide d'un fi "ip": "prod.example.com", "port": 22, "user": "admin", - "keyId": "my-key", + "pubKeyId": "my-key", "tags": ["production", "web"] }, { @@ -68,7 +69,7 @@ Importez plusieurs configurations de serveur en une seule fois à l'aide d'un fi "ip": "dev.example.com", "port": 2222, "user": "dev", - "keyId": "dev-key", + "pubKeyId": "dev-key", "tags": ["development"] } ] diff --git a/docs/src/content/docs/fr/development/architecture.md b/docs/src/content/docs/fr/development/architecture.md index 7e2fa2ab0..78a2595ca 100644 --- a/docs/src/content/docs/fr/development/architecture.md +++ b/docs/src/content/docs/fr/development/architecture.md @@ -47,7 +47,7 @@ Server Box suit les principes de la Clean Architecture avec une séparation clai ### Stockage local : Hive - **hive_ce** : Édition communautaire de Hive -- Pas de `@HiveField` ou `@HiveType` manuel requis +- Suivez le modèle existant : la plupart des stores utilisent `hive_ce`, tandis que certains modèles suivis déclarent encore explicitement `@HiveType` et `@HiveField` - Adaptateurs de type auto-générés - Stockage clé-valeur persistant diff --git a/docs/src/content/docs/fr/development/codegen.md b/docs/src/content/docs/fr/development/codegen.md index d2e81c00c..3b8be82a2 100644 --- a/docs/src/content/docs/fr/development/codegen.md +++ b/docs/src/content/docs/fr/development/codegen.md @@ -21,8 +21,11 @@ Server Box utilise intensivement la génération de code pour les modèles, la g # Générer tout le code dart run build_runner build --delete-conflicting-outputs -# Nettoyer et régénérer -dart run build_runner build --delete-conflicting-outputs --clean +# Nettoyer le cache de génération +dart run build_runner clean + +# Puis régénérer +dart run build_runner build --delete-conflicting-outputs ``` ## Fichiers générés @@ -94,5 +97,5 @@ Génère `lib/generated/l10n/` à partir des fichiers `lib/l10n/*.arb`. ## Conseils - Utilisez `--delete-conflicting-outputs` pour éviter les conflits -- Ajoutez les fichiers générés au `.gitignore` +- Conservez les fichiers générés dans le contrôle de version lorsqu'ils sont déjà suivis par ce dépôt - Ne modifiez jamais manuellement les fichiers générés diff --git a/docs/src/content/docs/fr/development/testing.md b/docs/src/content/docs/fr/development/testing.md index dac0d4ef8..0441bf401 100644 --- a/docs/src/content/docs/fr/development/testing.md +++ b/docs/src/content/docs/fr/development/testing.md @@ -18,17 +18,7 @@ flutter test --coverage ## Structure des tests -Les tests sont situés dans le répertoire `test/`, reflétant la structure de `lib/` : - -``` -test/ -├── data/ -│ ├── model/ -│ └── provider/ -├── view/ -│ └── widget/ -└── test_helpers.dart -``` +Les tests se trouvent dans le répertoire `test/`. La suite actuelle est principalement plate et regroupée par comportement de parseur, de modèle et d’utilitaire, par exemple `cpu_test.dart`, `container_test.dart` et `ssh_config_test.dart`. ## Tests unitaires @@ -71,26 +61,13 @@ test('serverStatusProvider retourne le statut', () async { }); ``` -## Mocking (Simulations) - -Utiliser des mocks pour les dépendances externes : - -```dart -class MockSshService extends Mock implements SshService {} +## Dépendances externes -test('se connecte au serveur', () async { - final mockSsh = MockSshService(); - when(mockSsh.connect(any)).thenAnswer((_) async => true); - - // Tester avec le mock -}); -``` +Évitez les tests qui dépendent de vrais serveurs SSH. Les tests de parseurs, modèles et constructeurs de commandes doivent rester déterministes ; ajoutez des fakes ou fixtures ciblés lorsqu’une fonctionnalité introduit une frontière de service. ## Tests d'intégration -Tester des flux utilisateurs complets (dans `integration_test/`) : - -```dart +Le dépôt actuel ne contient pas de suite `integration_test/`. Ajoutez des tests d’intégration seulement lorsqu’une fonctionnalité nécessite une couverture end-to-end sur appareil ou flux applicatif complet.dart testWidgets('flux d\'ajout de serveur', (tester) async { await tester.pumpWidget(MyApp()); diff --git a/docs/src/content/docs/fr/index.mdx b/docs/src/content/docs/fr/index.mdx index a5fdf0cd1..8b7ccc116 100644 --- a/docs/src/content/docs/fr/index.mdx +++ b/docs/src/content/docs/fr/index.mdx @@ -5,7 +5,7 @@ hero: tagline: Gérez vos serveurs Linux de n'importe où actions: - text: Commencer - link: /fr/introduction/ + link: /docs/fr/introduction/ icon: right-arrow variant: primary - text: Voir sur GitHub @@ -41,6 +41,6 @@ import { Card, CardGrid } from '@astrojs/starlight/components'; ## Liens rapides -- **Téléchargement**: Disponible sur l'[App Store](https://apps.apple.com/app/id1586449703), [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) et [F-Droid](https://f-droid.org/) +- **Téléchargement**: Disponible sur l'[App Store](https://apps.apple.com/app/id1586449703), [GitHub](https://github.com/lollipopkit/flutter_server_box/releases), [F-Droid](https://f-droid.org/packages/tech.lolli.toolbox), [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid) et [OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/) - **Documentation**: Explorez les guides pour commencer avec Server Box - **Support**: Rejoignez notre communauté sur GitHub pour des discussions et des problèmes diff --git a/docs/src/content/docs/fr/installation.mdx b/docs/src/content/docs/fr/installation.mdx index 7f2db0538..d66197582 100644 --- a/docs/src/content/docs/fr/installation.mdx +++ b/docs/src/content/docs/fr/installation.mdx @@ -15,14 +15,20 @@ Téléchargez depuis l'**[App Store](https://apps.apple.com/app/id1586449703)**. Choisissez votre source préférée : -- **[F-Droid](https://f-droid.org/)** - Pour les utilisateurs qui préfèrent les sources exclusivement FOSS - **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** - Pour la dernière version directement depuis la source +- **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)** - Miroir pour les paquets de publication +- **[F-Droid](https://f-droid.org/packages/tech.lolli.toolbox)** - Pour les utilisateurs qui préfèrent les sources exclusivement FOSS +- **[OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/)** - Boutique Android tierce ## Applications de Bureau ### macOS -Téléchargez depuis les **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)**. +Téléchargez depuis l’**[App Store](https://apps.apple.com/app/id1586449703)** ou installez avec Homebrew Cask : + +```sh +brew install --cask server-box +``` Caractéristiques : - Intégration native de la barre de menus @@ -30,13 +36,15 @@ Caractéristiques : ### Linux -Téléchargez depuis les **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)**. +Téléchargez depuis les **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** ou le **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)**. -Disponible en packages AppImage, deb ou tar.gz. +GitHub Releases et le CDN fournissent des paquets Linux AppImage. ### Windows -Téléchargez depuis les **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)**. +Téléchargez depuis les **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** ou le **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)**. + +GitHub Releases et le CDN fournissent des paquets Windows zip. ## watchOS @@ -44,7 +52,7 @@ Disponible sur l'**[App Store](https://apps.apple.com/app/id1586449703)** en tan ## Construction à partir des sources -Pour construire Server Box à partir des sources, consultez la section [Construction](/fr/development/building/) dans la documentation de développement. +Pour construire Server Box à partir des sources, consultez la section [Construction](/docs/development/building/) dans la documentation de développement. ## Informations sur la version diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index dd90afa4a..ce3a8b67c 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -5,7 +5,7 @@ hero: tagline: Manage your Linux servers from anywhere actions: - text: Get Started - link: /introduction/ + link: /docs/introduction/ icon: right-arrow variant: primary - text: View on GitHub @@ -41,6 +41,6 @@ import { Card, CardGrid } from '@astrojs/starlight/components'; ## Quick Links -- **Download**: Available on [App Store](https://apps.apple.com/app/id1586449703), [GitHub](https://github.com/lollipopkit/flutter_server_box/releases), and [F-Droid](https://f-droid.org/) +- **Download**: Available on [App Store](https://apps.apple.com/app/id1586449703), [GitHub](https://github.com/lollipopkit/flutter_server_box/releases), [F-Droid](https://f-droid.org/packages/tech.lolli.toolbox), [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid), and [OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/) - **Documentation**: Explore the guides to get started with Server Box - **Support**: Join our community on GitHub for discussions and issues diff --git a/docs/src/content/docs/installation.mdx b/docs/src/content/docs/installation.mdx index 22c073e3d..45c7244b3 100644 --- a/docs/src/content/docs/installation.mdx +++ b/docs/src/content/docs/installation.mdx @@ -15,14 +15,20 @@ Download from the **[App Store](https://apps.apple.com/app/id1586449703)**. Choose your preferred source: -- **[F-Droid](https://f-droid.org/)** - For users who prefer FOSS-only sources - **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** - For the latest version directly from the source +- **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)** - Mirror for release packages +- **[F-Droid](https://f-droid.org/packages/tech.lolli.toolbox)** - For users who prefer FOSS-only sources +- **[OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/)** - Third-party Android app store ## Desktop Apps ### macOS -Download from **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)**. +Download from the **[App Store](https://apps.apple.com/app/id1586449703)** or install with Homebrew Cask: + +```sh +brew install --cask server-box +``` Features: - Native menu bar integration @@ -30,13 +36,15 @@ Features: ### Linux -Download from **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)**. +Download from **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** or the **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)**. -Available as AppImage, deb, or tar.gz packages. +GitHub Releases and the CDN provide Linux AppImage packages. ### Windows -Download from **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)**. +Download from **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** or the **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)**. + +GitHub Releases and the CDN provide Windows zip packages. ## watchOS @@ -44,7 +52,7 @@ Available on the **[App Store](https://apps.apple.com/app/id1586449703)** as par ## Building from Source -To build Server Box from source, see the [Building](/development/building) section in the Development documentation. +To build Server Box from source, see the [Building](/docs/development/building/) section in the Development documentation. ## Version Information diff --git a/docs/src/content/docs/ja/advanced/bulk-import.md b/docs/src/content/docs/ja/advanced/bulk-import.md index 4a49c268b..d8105e08c 100644 --- a/docs/src/content/docs/ja/advanced/bulk-import.md +++ b/docs/src/content/docs/ja/advanced/bulk-import.md @@ -10,7 +10,7 @@ JSON ファイルを使用して、複数のサーバー設定を一度にイン :::danger[セキュリティ警告] **プレーンテキストのパスワードをファイルに保存しないでください!** この JSON の例ではデモンストレーションのためにパスワードフィールドを表示していますが、以下の点に注意してください。 -- **SSH キーを優先** (`keyId`) し、`pwd` の使用は避けてください。その方が安全です。 +- **SSH キーを優先** (`pubKeyId`) し、`pwd` の使用は避けてください。その方が安全です。 - パスワードを使用する必要がある場合は、**シークレットマネージャー**や環境変数を使用してください。 - インポート後は**直ちにファイルを削除**してください。資格情報を放置しないでください。 - **.gitignore に追加**してください。資格情報ファイルをバージョン管理にコミットしないでください。 @@ -24,7 +24,7 @@ JSON ファイルを使用して、複数のサーバー設定を一度にイン "port": 22, "user": "root", "pwd": "password", - "keyId": "", + "pubKeyId": "", "tags": ["production"], "autoConnect": false } @@ -40,7 +40,7 @@ JSON ファイルを使用して、複数のサーバー設定を一度にイン | `port` | はい | SSH ポート (通常は 22) | | `user` | はい | SSH ユーザー名 | | `pwd` | いいえ | パスワード (非推奨 - 代わりに SSH キーを使用してください) | -| `keyId` | いいえ | SSH キー名 (「非公開鍵」から取得 - 推奨) | +| `pubKeyId` | いいえ | 秘密鍵レコードの ID(「非公開鍵」から取得 - 推奨) | | `tags` | いいえ | 整理用タグ | | `autoConnect` | いいえ | 起動時に自動接続 | @@ -60,7 +60,7 @@ JSON ファイルを使用して、複数のサーバー設定を一度にイン "ip": "prod.example.com", "port": 22, "user": "admin", - "keyId": "my-key", + "pubKeyId": "my-key", "tags": ["production", "web"] }, { @@ -68,7 +68,7 @@ JSON ファイルを使用して、複数のサーバー設定を一度にイン "ip": "dev.example.com", "port": 2222, "user": "dev", - "keyId": "dev-key", + "pubKeyId": "dev-key", "tags": ["development"] } ] diff --git a/docs/src/content/docs/ja/development/architecture.md b/docs/src/content/docs/ja/development/architecture.md index 884708726..47c66f405 100644 --- a/docs/src/content/docs/ja/development/architecture.md +++ b/docs/src/content/docs/ja/development/architecture.md @@ -47,7 +47,7 @@ Server Box は、データ層、ドメイン層、プレゼンテーション層 ### ローカルストレージ: Hive - **hive_ce**: Hive のコミュニティ版を使用 -- 手動での `@HiveField` や `@HiveType` の指定が不要 +- 既存のモデルパターンに従ってください。多くの store は `hive_ce` を使いますが、一部の追跡済みモデルは引き続き `@HiveType` と `@HiveField` を明示します - 型アダプターの自動生成 - 永続的なキーバリューストレージ diff --git a/docs/src/content/docs/ja/development/codegen.md b/docs/src/content/docs/ja/development/codegen.md index 5dc6d1267..e4ccae905 100644 --- a/docs/src/content/docs/ja/development/codegen.md +++ b/docs/src/content/docs/ja/development/codegen.md @@ -21,8 +21,11 @@ Server Box では、モデル、状態管理、シリアライズのためにコ # すべてのコードを生成 dart run build_runner build --delete-conflicting-outputs -# クリーンアップして再生成 -dart run build_runner build --delete-conflicting-outputs --clean +# 生成キャッシュをクリーン +dart run build_runner clean + +# その後再生成 +dart run build_runner build --delete-conflicting-outputs ``` ## 生成されるファイル @@ -94,5 +97,5 @@ flutter gen-l10n ## ヒント - 競合を避けるために `--delete-conflicting-outputs` を使用してください。 -- 生成されたファイルを `.gitignore` に追加してください。 +- このリポジトリで既に追跡されている生成ファイルは、引き続きバージョン管理に含めてください。 - 生成されたファイルを手動で編集しないでください。 diff --git a/docs/src/content/docs/ja/development/testing.md b/docs/src/content/docs/ja/development/testing.md index 481e708a5..fde6e0812 100644 --- a/docs/src/content/docs/ja/development/testing.md +++ b/docs/src/content/docs/ja/development/testing.md @@ -18,17 +18,7 @@ flutter test --coverage ## テスト構造 -テストは `test/` ディレクトリにあり、lib の構造を反映しています: - -``` -test/ -├── data/ -│ ├── model/ -│ └── provider/ -├── view/ -│ └── widget/ -└── test_helpers.dart -``` +テストは `test/` ディレクトリにあります。現在のテストスイートは主にフラットな構成で、パーサー、モデル、ユーティリティの挙動ごとに分かれています。例: `cpu_test.dart`、`container_test.dart`、`ssh_config_test.dart`。 ## ユニットテスト @@ -71,26 +61,13 @@ test('serverStatusProvider がステータスを返すこと', () async { }); ``` -## モック (Mocking) - -外部依存関係にモックを使用する: - -```dart -class MockSshService extends Mock implements SshService {} +## 外部依存 -test('サーバーに接続すること', () async { - final mockSsh = MockSshService(); - when(mockSsh.connect(any)).thenAnswer((_) async => true); - - // モックを使用してテスト -}); -``` +実際の SSH サーバーに依存するテストは避けてください。パーサー、モデル、コマンドビルダーのテストは決定的に保ち、機能がサービス境界を導入する場合にのみ対象を絞った fake や fixture を追加してください。 ## 統合テスト -完全なユーザーフローのテスト (`integration_test/` 内): - -```dart +現在のリポジトリには `integration_test/` スイートはありません。デバイス上の end-to-end やアプリ全体のフロー確認が必要な機能でのみ追加してください。dart testWidgets('サーバー追加フロー', (tester) async { await tester.pumpWidget(MyApp()); diff --git a/docs/src/content/docs/ja/index.mdx b/docs/src/content/docs/ja/index.mdx index dd43e86b3..33ebdfdf7 100644 --- a/docs/src/content/docs/ja/index.mdx +++ b/docs/src/content/docs/ja/index.mdx @@ -5,7 +5,7 @@ hero: tagline: どこからでも Linux サーバーを管理 actions: - text: はじめる - link: /ja/introduction/ + link: /docs/ja/introduction/ icon: right-arrow variant: primary - text: GitHub で見る @@ -41,6 +41,6 @@ import { Card, CardGrid } from '@astrojs/starlight/components'; ## クイックリンク -- **ダウンロード**: [App Store](https://apps.apple.com/app/id1586449703)、[GitHub](https://github.com/lollipopkit/flutter_server_box/releases)、[F-Droid](https://f-droid.org/) で入手可能 +- **ダウンロード**: [App Store](https://apps.apple.com/app/id1586449703)、[GitHub](https://github.com/lollipopkit/flutter_server_box/releases)、[F-Droid](https://f-droid.org/packages/tech.lolli.toolbox)、[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)、[OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/) で入手可能 - **ドキュメント**: Server Box を使い始めるためのガイドを確認 - **サポート**: GitHub コミュニティに参加して議論や問題報告を行う diff --git a/docs/src/content/docs/ja/installation.mdx b/docs/src/content/docs/ja/installation.mdx index 732a28aa9..e00b08625 100644 --- a/docs/src/content/docs/ja/installation.mdx +++ b/docs/src/content/docs/ja/installation.mdx @@ -15,14 +15,20 @@ Server Box は複数のプラットフォームで利用可能です。お好み お好みのソースを選択してください: -- **[F-Droid](https://f-droid.org/)** - FOSS(自由でオープンソースのソフトウェア)のみのソースを好むユーザー向け - **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** - ソースから直接最新バージョンを入手したいユーザー向け +- **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)** - リリースパッケージのミラー +- **[F-Droid](https://f-droid.org/packages/tech.lolli.toolbox)** - FOSS(自由でオープンソースのソフトウェア)のみのソースを好むユーザー向け +- **[OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/)** - サードパーティの Android アプリストア ## デスクトップアプリ ### macOS -**[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** からダウンロードしてください。 +**[App Store](https://apps.apple.com/app/id1586449703)** からダウンロードするか、Homebrew Cask でインストールしてください: + +```sh +brew install --cask server-box +``` 特徴: - ネイティブメニューバーへの統合 @@ -30,13 +36,15 @@ Server Box は複数のプラットフォームで利用可能です。お好み ### Linux -**[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** からダウンロードしてください。 +**[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** または **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)** からダウンロードしてください。 -AppImage、deb、または tar.gz パッケージとして利用可能です。 +GitHub Releases と CDN で Linux AppImage パッケージを提供しています。 ### Windows -**[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** からダウンロードしてください。 +**[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** または **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)** からダウンロードしてください。 + +GitHub Releases と CDN で Windows zip パッケージを提供しています。 ## watchOS @@ -44,7 +52,7 @@ iOS アプリの一部として **[App Store](https://apps.apple.com/app/id15864 ## ソースからのビルド -Server Box をソースからビルドするには、開発ドキュメントの [ビルド](/ja/development/building/) セクションを参照してください。 +Server Box をソースからビルドするには、開発ドキュメントの [ビルド](/docs/development/building/) セクションを参照してください。 ## バージョン情報 diff --git a/docs/src/content/docs/ja/principles/architecture.md b/docs/src/content/docs/ja/principles/architecture.md index 8f2d82bcf..e41851e6d 100644 --- a/docs/src/content/docs/ja/principles/architecture.md +++ b/docs/src/content/docs/ja/principles/architecture.md @@ -85,7 +85,7 @@ void main() { - ネイティブコードへの依存がない - 高速なキーバリューストレージ - コード生成による型安全性 -- 手動でのフィールドアノテーションが不要 +- 既存のモデルパターンに従ってください。一部の追跡済みモデルは引き続き明示的なフィールドアノテーションを使用します **ストア:** - `SettingStore`: アプリの設定 diff --git a/docs/src/content/docs/principles/architecture.md b/docs/src/content/docs/principles/architecture.md index 39887795b..50902d0be 100644 --- a/docs/src/content/docs/principles/architecture.md +++ b/docs/src/content/docs/principles/architecture.md @@ -85,7 +85,7 @@ void main() { - No native code dependencies - Fast key-value storage - Type-safe with code generation -- No manual field annotations needed +- Follow the existing model pattern; some tracked models still use explicit field annotations **Stores:** - `SettingStore`: App preferences diff --git a/docs/src/content/docs/zh/advanced/bulk-import.md b/docs/src/content/docs/zh/advanced/bulk-import.md index 056726ce3..8a92b34ef 100644 --- a/docs/src/content/docs/zh/advanced/bulk-import.md +++ b/docs/src/content/docs/zh/advanced/bulk-import.md @@ -10,7 +10,7 @@ description: 从 JSON 文件中导入多个服务器 :::danger[安全警告] **切勿在文件中存储明文密码!** 此 JSON 示例仅为了演示显示了密码字段,但你应该: -- **优先使用 SSH 密钥** (`keyId`) 而不是 `pwd` - 它们更安全 +- **优先使用 SSH 密钥** (`pubKeyId`) 而不是 `pwd` - 它们更安全 - 如果必须使用密码,请使用**密码管理器**或环境变量 - 导入后**立即删除文件** - 不要让凭据散落在各处 - **添加到 .gitignore** - 切勿将凭证文件提交到版本控制 @@ -24,7 +24,7 @@ description: 从 JSON 文件中导入多个服务器 "port": 22, "user": "root", "pwd": "password", - "keyId": "", + "pubKeyId": "", "tags": ["production"], "autoConnect": false } @@ -40,9 +40,10 @@ description: 从 JSON 文件中导入多个服务器 | `port` | 是 | SSH 端口 (通常为 22) | | `user` | 是 | SSH 用户名 | | `pwd` | 否 | 密码 (不建议使用 - 请改用 SSH 密钥) | -| `keyId` | 否 | SSH 密钥名称 (来自“私钥” - 推荐) | +| `pubKeyId` | 否 | 私钥记录 id(来自“私钥” - 推荐) | | `tags` | 否 | 组织标签 | | `autoConnect` | 否 | 启动时自动连接 | +| `id` | 否 | 稳定的服务器 id;省略或为空时会在导入时生成 | ## 导入步骤 @@ -60,7 +61,7 @@ description: 从 JSON 文件中导入多个服务器 "ip": "prod.example.com", "port": 22, "user": "admin", - "keyId": "my-key", + "pubKeyId": "my-key", "tags": ["production", "web"] }, { @@ -68,7 +69,7 @@ description: 从 JSON 文件中导入多个服务器 "ip": "dev.example.com", "port": 2222, "user": "dev", - "keyId": "dev-key", + "pubKeyId": "dev-key", "tags": ["development"] } ] diff --git a/docs/src/content/docs/zh/development/architecture.md b/docs/src/content/docs/zh/development/architecture.md index 74cc8308f..77322caea 100644 --- a/docs/src/content/docs/zh/development/architecture.md +++ b/docs/src/content/docs/zh/development/architecture.md @@ -47,7 +47,7 @@ Server Box 遵循整洁架构 (Clean Architecture) 原则,在数据层、领 ### 本地存储:Hive - **hive_ce**:Hive 的社区版 -- 无需手动添加 `@HiveField` 或 `@HiveType` 注解 +- 遵循现有模型模式:多数存储使用 `hive_ce`,部分已跟踪模型仍显式声明 `@HiveType` 和 `@HiveField` - 类型适配器 (Type adapters) 自动生成 - 持久化键值对存储 diff --git a/docs/src/content/docs/zh/development/codegen.md b/docs/src/content/docs/zh/development/codegen.md index c6c6d1b61..74a09dae9 100644 --- a/docs/src/content/docs/zh/development/codegen.md +++ b/docs/src/content/docs/zh/development/codegen.md @@ -21,8 +21,11 @@ Server Box 大量使用代码生成技术来处理模型、状态管理和序列 # 生成所有代码 dart run build_runner build --delete-conflicting-outputs -# 清理并重新生成 -dart run build_runner build --delete-conflicting-outputs --clean +# 清理生成缓存 +dart run build_runner clean + +# 然后重新生成 +dart run build_runner build --delete-conflicting-outputs ``` ## 生成的文件类型 @@ -94,5 +97,5 @@ flutter gen-l10n ## 提示 - 使用 `--delete-conflicting-outputs` 避免冲突 -- 将生成的文件添加到 `.gitignore` +- 如果生成文件已被本仓库跟踪,请继续提交这些生成文件 - **切勿**手动编辑生成的文件 diff --git a/docs/src/content/docs/zh/development/testing.md b/docs/src/content/docs/zh/development/testing.md index 6ef7a0ed5..954af156c 100644 --- a/docs/src/content/docs/zh/development/testing.md +++ b/docs/src/content/docs/zh/development/testing.md @@ -18,17 +18,7 @@ flutter test --coverage ## 测试结构 -测试文件位于 `test/` 目录中,其结构与 `lib` 目录保持一致: - -``` -test/ -├── data/ -│ ├── model/ -│ └── provider/ -├── view/ -│ └── widget/ -└── test_helpers.dart -``` +测试位于 `test/` 目录中。当前测试套件基本是扁平结构,按解析器、模型和工具行为分组,例如 `cpu_test.dart`、`container_test.dart` 和 `ssh_config_test.dart`。 ## 单元测试 @@ -71,26 +61,13 @@ test('serverStatusProvider 应当返回状态', () async { }); ``` -## Mock 模拟 - -对外部依赖使用 Mock 模拟: - -```dart -class MockSshService extends Mock implements SshService {} +## 外部依赖 -test('应当能连接到服务器', () async { - final mockSsh = MockSshService(); - when(mockSsh.connect(any)).thenAnswer((_) async => true); - - // 使用 mock 进行测试 -}); -``` +避免让测试依赖真实 SSH 服务器。解析器、模型和命令构建测试应保持确定性;当功能引入服务边界时,再添加有针对性的 fake 或 fixture。 ## 集成测试 -测试完整的用户流程(位于 `integration_test/`): - -```dart +当前仓库没有 `integration_test/` 测试套件。只有当功能需要端到端设备或完整应用流程覆盖时,再新增集成测试。dart testWidgets('添加服务器流程', (tester) async { await tester.pumpWidget(MyApp()); diff --git a/docs/src/content/docs/zh/index.mdx b/docs/src/content/docs/zh/index.mdx index 3a12af7ef..becea8e65 100644 --- a/docs/src/content/docs/zh/index.mdx +++ b/docs/src/content/docs/zh/index.mdx @@ -5,7 +5,7 @@ hero: tagline: 随时随地管理您的 Linux 服务器 actions: - text: 开始使用 - link: /zh/introduction/ + link: /docs/zh/introduction/ icon: right-arrow variant: primary - text: 在 GitHub 上查看 diff --git a/docs/src/content/docs/zh/installation.mdx b/docs/src/content/docs/zh/installation.mdx index bf2f6192d..ad6dfbe13 100644 --- a/docs/src/content/docs/zh/installation.mdx +++ b/docs/src/content/docs/zh/installation.mdx @@ -15,16 +15,20 @@ Server Box 适用于多个平台。选择您偏好的安装方式。 选择您偏好的来源: -- **[F-Droid](https://f-droid.org/packages/tech.lolli.toolbox)** - 适合偏好 FOSS 来源的用户 - **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** - 直接从源获取最新版本 - **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)** - CDN +- **[F-Droid](https://f-droid.org/packages/tech.lolli.toolbox)** - 适合偏好 FOSS 来源的用户 - **[OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/)** - 第三方应用商店 ## 桌面应用 ### macOS -从 **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** 下载。 +从 **[App Store](https://apps.apple.com/app/id1586449703)** 下载,或使用 Homebrew Cask 安装: + +```sh +brew install --cask server-box +``` 特性: - 原生菜单栏集成 @@ -32,13 +36,15 @@ Server Box 适用于多个平台。选择您偏好的安装方式。 ### Linux -从 **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** 下载。 +从 **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** 或 **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)** 下载。 -提供 AppImage、deb 或 tar.gz 格式包。 +GitHub Releases 和 CDN 提供 Linux AppImage 包。 ### Windows -从 **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** 下载。 +从 **[GitHub Releases](https://github.com/lollipopkit/flutter_server_box/releases)** 或 **[CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)** 下载。 + +GitHub Releases 和 CDN 提供 Windows zip 包。 ## watchOS @@ -46,7 +52,7 @@ Server Box 适用于多个平台。选择您偏好的安装方式。 ## 从源码构建 -要从源码构建 Server Box,请参阅开发文档中的[构建](/zh/development/building)部分。 +要从源码构建 Server Box,请参阅开发文档中的[构建](/docs/zh/development/building/)部分。 ## 版本信息 diff --git a/docs/src/content/docs/zh/principles/architecture.md b/docs/src/content/docs/zh/principles/architecture.md index ce792e46e..4a2d743fe 100644 --- a/docs/src/content/docs/zh/principles/architecture.md +++ b/docs/src/content/docs/zh/principles/architecture.md @@ -85,7 +85,7 @@ void main() { - 无原生代码依赖 - 快速的键值存储 - 通过代码生成实现类型安全 -- 无需手动添加字段注解 +- 遵循现有模型模式;部分已跟踪模型仍显式使用字段注解 **存储类:** - `SettingStore`:应用偏好设置 diff --git a/website/src/App.svelte b/website/src/App.svelte index ec4d83c96..a6f99ac5e 100644 --- a/website/src/App.svelte +++ b/website/src/App.svelte @@ -32,8 +32,15 @@ const downloadGroups = [ { - key: 'iosMacos', - label: 'iOS / macOS', + key: 'ios', + label: 'iOS', + sources: [ + { label: 'App Store', href: 'https://apps.apple.com/app/id1586449703' }, + ], + }, + { + key: 'macos', + label: 'macOS', sources: [ { label: 'App Store', href: 'https://apps.apple.com/app/id1586449703' }, { label: 'Homebrew Cask', command: 'brew install --cask server-box' }, diff --git a/website/src/i18n/en/index.ts b/website/src/i18n/en/index.ts index 45af1c4d3..a4d853250 100644 --- a/website/src/i18n/en/index.ts +++ b/website/src/i18n/en/index.ts @@ -62,13 +62,13 @@ const en: BaseTranslation = { title: 'All the tools. One app.', subtitle: 'ServerBox keeps terminal access, file transfer, service checks, hardware health, and device-native alerts in the same workflow.', - installIosPrompt: '# iOS and macOS', + installIosPrompt: '# iOS', installReleasePrompt: '# Android, Linux, and Windows', }, download: { title: 'Every platform, every source.', subtitle: - 'Choose the channel that matches your device and trust model. iOS and macOS use the App Store; Android, Linux, and Windows also have direct package downloads.', + 'Choose the channel that matches your device and trust model. iOS uses the App Store; macOS uses the App Store or Homebrew; Android, Linux, and Windows also have direct package downloads.', copied: 'Install command copied', copyPrompt: 'Copy this install command:', note: diff --git a/website/src/i18n/i18n-types.ts b/website/src/i18n/i18n-types.ts index 9281c328a..7d62027b9 100644 --- a/website/src/i18n/i18n-types.ts +++ b/website/src/i18n/i18n-types.ts @@ -160,7 +160,7 @@ type RootTranslation = { */ subtitle: string /** - * # iOS and macOS + * # iOS */ installIosPrompt: string /** @@ -174,7 +174,7 @@ type RootTranslation = { */ title: string /** - * Choose the channel that matches your device and trust model. iOS and macOS use the App Store; Android, Linux, and Windows also have direct package downloads. + * Choose the channel that matches your device and trust model. iOS uses the App Store; macOS uses the App Store or Homebrew; Android, Linux, and Windows also have direct package downloads. */ subtitle: string /** @@ -371,7 +371,7 @@ export type TranslationFunctions = { */ subtitle: () => LocalizedString /** - * # iOS and macOS + * # iOS */ installIosPrompt: () => LocalizedString /** @@ -385,7 +385,7 @@ export type TranslationFunctions = { */ title: () => LocalizedString /** - * Choose the channel that matches your device and trust model. iOS and macOS use the App Store; Android, Linux, and Windows also have direct package downloads. + * Choose the channel that matches your device and trust model. iOS uses the App Store; macOS uses the App Store or Homebrew; Android, Linux, and Windows also have direct package downloads. */ subtitle: () => LocalizedString /** diff --git a/website/src/i18n/zh-CN/index.ts b/website/src/i18n/zh-CN/index.ts index 9c8796042..8c9aa859d 100644 --- a/website/src/i18n/zh-CN/index.ts +++ b/website/src/i18n/zh-CN/index.ts @@ -61,13 +61,13 @@ const zhCN: Translation = { title: '所有工具,一个应用。', subtitle: 'ServerBox 将终端访问、文件传输、服务检查、硬件健康和设备原生提醒放在同一个工作流中。', - installIosPrompt: '# iOS 与 macOS', + installIosPrompt: '# iOS', installReleasePrompt: '# Android、Linux 与 Windows', }, download: { title: '所有平台,所有来源。', subtitle: - '根据设备和信任模型选择下载渠道。iOS 与 macOS 使用 App Store;Android、Linux 和 Windows 也提供直接安装包。', + '根据设备和信任模型选择下载渠道。iOS 使用 App Store;macOS 使用 App Store 或 Homebrew;Android、Linux 和 Windows 也提供直接安装包。', copied: '已复制安装命令', copyPrompt: '复制此安装命令:', note: From d7bd5db7cd99cfd7e0ef46854f931a2a8d197595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lollipopkit=F0=9F=8F=B3=EF=B8=8F=E2=80=8D=E2=9A=A7?= =?UTF-8?q?=EF=B8=8F?= <10864310+lollipopkit@users.noreply.github.com> Date: Sat, 25 Apr 2026 15:18:06 +0800 Subject: [PATCH 07/11] fix --- docs/src/content/docs/de/installation.mdx | 2 +- .../content/docs/es/development/testing.md | 14 +-- docs/src/content/docs/es/installation.mdx | 2 +- .../content/docs/fr/advanced/bulk-import.md | 2 +- docs/src/content/docs/fr/installation.mdx | 2 +- .../content/docs/ja/advanced/bulk-import.md | 1 + docs/src/content/docs/ja/installation.mdx | 2 +- .../content/docs/zh/development/codegen.md | 14 ++- website/src/i18n/en/index.ts | 15 +++ website/src/i18n/i18n-types.ts | 108 ++++++++++++++++++ website/src/i18n/zh-CN/index.ts | 15 +++ 11 files changed, 155 insertions(+), 22 deletions(-) diff --git a/docs/src/content/docs/de/installation.mdx b/docs/src/content/docs/de/installation.mdx index 897c8de2c..78aacc16f 100644 --- a/docs/src/content/docs/de/installation.mdx +++ b/docs/src/content/docs/de/installation.mdx @@ -52,7 +52,7 @@ Verfügbar im **[App Store](https://apps.apple.com/app/id1586449703)** als Teil ## Aus dem Quellcode bauen -Um Server Box aus dem Quellcode zu bauen, lesen Sie den Abschnitt [Bauen](/docs/development/building/) in der Entwicklungsdokumentation. +Um Server Box aus dem Quellcode zu bauen, lesen Sie den Abschnitt [Bauen](/docs/de/development/building/) in der Entwicklungsdokumentation. ## Versionsinformationen diff --git a/docs/src/content/docs/es/development/testing.md b/docs/src/content/docs/es/development/testing.md index bf46be534..33086ba50 100644 --- a/docs/src/content/docs/es/development/testing.md +++ b/docs/src/content/docs/es/development/testing.md @@ -67,19 +67,7 @@ Evita pruebas que dependan de servidores SSH reales. Las pruebas de parsers, mod ## Pruebas de Integración -El repositorio actual no contiene una suite `integration_test/`. Añade pruebas de integración solo cuando una función necesite cobertura end-to-end de dispositivo o flujo completo de la app.dart -testWidgets('flujo de agregar servidor', (tester) async { - await tester.pumpWidget(MyApp()); - - // Tocar el botón de agregar - await tester.tap(find.byIcon(Icons.add)); - await tester.pumpAndSettle(); - - // Completar el formulario - await tester.enterText(find.byKey(Key('name')), 'Test Server'); - // ... -}); -``` +El repositorio actual no contiene una suite `integration_test/`. Añade pruebas de integración solo cuando una función necesite cobertura end-to-end de dispositivo o flujo completo de la app. ## Buenas Prácticas diff --git a/docs/src/content/docs/es/installation.mdx b/docs/src/content/docs/es/installation.mdx index b111b32d2..d3f03439d 100644 --- a/docs/src/content/docs/es/installation.mdx +++ b/docs/src/content/docs/es/installation.mdx @@ -52,7 +52,7 @@ Disponible en la **[App Store](https://apps.apple.com/app/id1586449703)** como p ## Compilación desde el Código Fuente -Para compilar Server Box desde el código fuente, consulta la sección de [Compilación](/docs/development/building/) en la documentación de desarrollo. +Para compilar Server Box desde el código fuente, consulta la sección de [Compilación](/docs/es/development/building/) en la documentación de desarrollo. ## Información de Versión diff --git a/docs/src/content/docs/fr/advanced/bulk-import.md b/docs/src/content/docs/fr/advanced/bulk-import.md index a062c7eef..f3d319902 100644 --- a/docs/src/content/docs/fr/advanced/bulk-import.md +++ b/docs/src/content/docs/fr/advanced/bulk-import.md @@ -43,7 +43,7 @@ Importez plusieurs configurations de serveur en une seule fois à l'aide d'un fi | `pubKeyId` | Non | ID de clé privée (à partir des clés privées - recommandé) | | `tags` | Non | Tags d'organisation | | `autoConnect` | Non | Connexion automatique au démarrage | -| `id` | Non | ID serveur stable ; les valeurs absentes ou vides sont générées à l’import | +| `id` | Non | ID serveur stable ; les valeurs absentes ou vides sont générées à l'import | ## Étapes d'importation diff --git a/docs/src/content/docs/fr/installation.mdx b/docs/src/content/docs/fr/installation.mdx index d66197582..af47d1ca8 100644 --- a/docs/src/content/docs/fr/installation.mdx +++ b/docs/src/content/docs/fr/installation.mdx @@ -52,7 +52,7 @@ Disponible sur l'**[App Store](https://apps.apple.com/app/id1586449703)** en tan ## Construction à partir des sources -Pour construire Server Box à partir des sources, consultez la section [Construction](/docs/development/building/) dans la documentation de développement. +Pour construire Server Box à partir des sources, consultez la section [Construction](/docs/fr/development/building/) dans la documentation de développement. ## Informations sur la version diff --git a/docs/src/content/docs/ja/advanced/bulk-import.md b/docs/src/content/docs/ja/advanced/bulk-import.md index d8105e08c..d5a32a5a8 100644 --- a/docs/src/content/docs/ja/advanced/bulk-import.md +++ b/docs/src/content/docs/ja/advanced/bulk-import.md @@ -43,6 +43,7 @@ JSON ファイルを使用して、複数のサーバー設定を一度にイン | `pubKeyId` | いいえ | 秘密鍵レコードの ID(「非公開鍵」から取得 - 推奨) | | `tags` | いいえ | 整理用タグ | | `autoConnect` | いいえ | 起動時に自動接続 | +| `id` | いいえ | レコードの一意識別子(省略または空の場合はインポート時に自動生成) | ## インポートの手順 diff --git a/docs/src/content/docs/ja/installation.mdx b/docs/src/content/docs/ja/installation.mdx index e00b08625..3acdbacc8 100644 --- a/docs/src/content/docs/ja/installation.mdx +++ b/docs/src/content/docs/ja/installation.mdx @@ -52,7 +52,7 @@ iOS アプリの一部として **[App Store](https://apps.apple.com/app/id15864 ## ソースからのビルド -Server Box をソースからビルドするには、開発ドキュメントの [ビルド](/docs/development/building/) セクションを参照してください。 +Server Box をソースからビルドするには、開発ドキュメントの [ビルド](/docs/ja/development/building/) セクションを参照してください。 ## バージョン情報 diff --git a/docs/src/content/docs/zh/development/codegen.md b/docs/src/content/docs/zh/development/codegen.md index 74a09dae9..6d09ebfaa 100644 --- a/docs/src/content/docs/zh/development/codegen.md +++ b/docs/src/content/docs/zh/development/codegen.md @@ -17,14 +17,20 @@ Server Box 大量使用代码生成技术来处理模型、状态管理和序列 ## 运行代码生成 +### 普通构建 + +用于常规代码生成: + ```bash -# 生成所有代码 dart run build_runner build --delete-conflicting-outputs +``` -# 清理生成缓存 -dart run build_runner clean +### 清理后重建 -# 然后重新生成 +仅在生成缓存异常或生成结果不一致时使用。先清理,再重新生成: + +```bash +dart run build_runner clean dart run build_runner build --delete-conflicting-outputs ``` diff --git a/website/src/i18n/en/index.ts b/website/src/i18n/en/index.ts index a4d853250..becde45e8 100644 --- a/website/src/i18n/en/index.ts +++ b/website/src/i18n/en/index.ts @@ -11,6 +11,7 @@ const en: BaseTranslation = { features: 'Features', capabilities: 'Capabilities', download: 'Download', + docs: 'Docs', languageLabel: 'Language', }, hero: { @@ -64,6 +65,20 @@ const en: BaseTranslation = { 'ServerBox keeps terminal access, file transfer, service checks, hardware health, and device-native alerts in the same workflow.', installIosPrompt: '# iOS', installReleasePrompt: '# Android, Linux, and Windows', + items: { + statusChart: 'Status chart', + sshTerminal: 'SSH Terminal', + sftp: 'SFTP', + docker: 'Docker', + process: 'Process', + systemd: 'Systemd', + smart: 'S.M.A.R.T', + gpu: 'GPU', + sensors: 'Sensors', + push: 'Push', + homeWidget: 'Home Widget', + watchos: 'watchOS', + }, }, download: { title: 'Every platform, every source.', diff --git a/website/src/i18n/i18n-types.ts b/website/src/i18n/i18n-types.ts index 7d62027b9..62b066bc3 100644 --- a/website/src/i18n/i18n-types.ts +++ b/website/src/i18n/i18n-types.ts @@ -41,6 +41,10 @@ type RootTranslation = { * Download */ download: string + /** + * Docs + */ + docs: string /** * Language */ @@ -167,6 +171,56 @@ type RootTranslation = { * # Android, Linux, and Windows */ installReleasePrompt: string + items: { + /** + * Status chart + */ + statusChart: string + /** + * SSH Terminal + */ + sshTerminal: string + /** + * SFTP + */ + sftp: string + /** + * Docker + */ + docker: string + /** + * Process + */ + process: string + /** + * Systemd + */ + systemd: string + /** + * S.M.A.R.T + */ + smart: string + /** + * GPU + */ + gpu: string + /** + * Sensors + */ + sensors: string + /** + * Push + */ + push: string + /** + * Home Widget + */ + homeWidget: string + /** + * watchOS + */ + watchos: string + } } download: { /** @@ -252,6 +306,10 @@ export type TranslationFunctions = { * Download */ download: () => LocalizedString + /** + * Docs + */ + docs: () => LocalizedString /** * Language */ @@ -378,6 +436,56 @@ export type TranslationFunctions = { * # Android, Linux, and Windows */ installReleasePrompt: () => LocalizedString + items: { + /** + * Status chart + */ + statusChart: () => LocalizedString + /** + * SSH Terminal + */ + sshTerminal: () => LocalizedString + /** + * SFTP + */ + sftp: () => LocalizedString + /** + * Docker + */ + docker: () => LocalizedString + /** + * Process + */ + process: () => LocalizedString + /** + * Systemd + */ + systemd: () => LocalizedString + /** + * S.M.A.R.T + */ + smart: () => LocalizedString + /** + * GPU + */ + gpu: () => LocalizedString + /** + * Sensors + */ + sensors: () => LocalizedString + /** + * Push + */ + push: () => LocalizedString + /** + * Home Widget + */ + homeWidget: () => LocalizedString + /** + * watchOS + */ + watchos: () => LocalizedString + } } download: { /** diff --git a/website/src/i18n/zh-CN/index.ts b/website/src/i18n/zh-CN/index.ts index 8c9aa859d..dc3e35f7b 100644 --- a/website/src/i18n/zh-CN/index.ts +++ b/website/src/i18n/zh-CN/index.ts @@ -11,6 +11,7 @@ const zhCN: Translation = { features: '特性', capabilities: '能力', download: '下载', + docs: '文档', languageLabel: '语言', }, hero: { @@ -63,6 +64,20 @@ const zhCN: Translation = { 'ServerBox 将终端访问、文件传输、服务检查、硬件健康和设备原生提醒放在同一个工作流中。', installIosPrompt: '# iOS', installReleasePrompt: '# Android、Linux 与 Windows', + items: { + statusChart: '状态图表', + sshTerminal: 'SSH 终端', + sftp: 'SFTP', + docker: 'Docker', + process: '进程', + systemd: 'Systemd', + smart: 'S.M.A.R.T', + gpu: 'GPU', + sensors: '传感器', + push: '推送', + homeWidget: '桌面小组件', + watchos: 'watchOS', + }, }, download: { title: '所有平台,所有来源。', From 73e5688e43d13131b6cececd545c2288f0bd623c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lollipopkit=F0=9F=8F=B3=EF=B8=8F=E2=80=8D=E2=9A=A7?= =?UTF-8?q?=EF=B8=8F?= <10864310+lollipopkit@users.noreply.github.com> Date: Sat, 25 Apr 2026 15:23:26 +0800 Subject: [PATCH 08/11] new: more locales --- website/src/i18n/es/index.ts | 106 ++++++++++++++++++++++++++++ website/src/i18n/fr/index.ts | 106 ++++++++++++++++++++++++++++ website/src/i18n/i18n-types.ts | 5 ++ website/src/i18n/i18n-util.async.ts | 5 ++ website/src/i18n/i18n-util.sync.ts | 10 +++ website/src/i18n/i18n-util.ts | 5 ++ website/src/i18n/it/index.ts | 106 ++++++++++++++++++++++++++++ website/src/i18n/ja/index.ts | 106 ++++++++++++++++++++++++++++ website/src/i18n/kr/index.ts | 106 ++++++++++++++++++++++++++++ website/src/lib/i18n.js | 10 +++ 10 files changed, 565 insertions(+) create mode 100644 website/src/i18n/es/index.ts create mode 100644 website/src/i18n/fr/index.ts create mode 100644 website/src/i18n/it/index.ts create mode 100644 website/src/i18n/ja/index.ts create mode 100644 website/src/i18n/kr/index.ts diff --git a/website/src/i18n/es/index.ts b/website/src/i18n/es/index.ts new file mode 100644 index 000000000..4b5bcf78b --- /dev/null +++ b/website/src/i18n/es/index.ts @@ -0,0 +1,106 @@ +import type { Translation } from '../i18n-types.js' + +const es: Translation = { + meta: { + lang: 'es', + title: 'ServerBox — Estado de servidores, SSH y operaciones en una app Flutter', + description: + 'ServerBox monitoriza servidores Linux, Unix y Windows con gráficas, terminal SSH, SFTP, Docker, procesos, systemd, S.M.A.R.T, notificaciones, widgets y watchOS.', + }, + nav: { + features: 'Funciones', + capabilities: 'Capacidades', + download: 'Descargar', + docs: 'Docs', + languageLabel: 'Idioma', + }, + hero: { + titlePrefix: 'Estado del servidor,', + titleSuffix: 'en tu bolsillo.', + subtitle: + 'ServerBox reúne gráficas, terminal SSH, SFTP, Docker, control de procesos, systemd, S.M.A.R.T, alertas, widgets y watchOS en una sola app Flutter.', + primaryAction: 'Descargar ServerBox', + secondaryAction: 'Ver funciones', + }, + screenshots: { + label: 'Capturas interactivas de ServerBox', + one: 'Captura de vista general de ServerBox', + two: 'Captura de gráficas de ServerBox', + three: 'Captura del terminal de ServerBox', + four: 'Captura de herramientas de ServerBox', + }, + features: { + title: 'Un espacio compacto para el mantenimiento diario.', + subtitle: + 'Una superficie operativa enfocada: cada bloque corresponde a un flujo real de mantenimiento.', + charts: { + title: 'Gráficas de estado', + description: + 'Controla CPU, memoria, sensores, GPU, red, disco y salud del host desde gráficas móviles densas.', + }, + workspace: { + title: 'Espacio multiplataforma', + description: + 'Usa ServerBox en iOS, Android, macOS, Linux y Windows con la misma interfaz Flutter.', + }, + terminal: { + title: 'Terminal SSH y SFTP', + description: + 'Abre sesiones de terminal y archivos desde una tarjeta de servidor, con dartssh2 y xterm.dart.', + }, + native: { + title: 'Integraciones nativas', + description: + 'Autenticación biométrica, notificaciones, widgets y watchOS mantienen cerca el contexto del servidor.', + }, + platforms: { + title: 'Docker, procesos, systemd', + description: + 'Inspecciona contenedores, procesos y servicios sin salir del flujo de monitorización.', + }, + }, + capabilities: { + title: 'Todas las herramientas. Una app.', + subtitle: + 'ServerBox mantiene terminal, transferencia de archivos, servicios, salud de hardware y alertas en el mismo flujo.', + installIosPrompt: '# iOS', + installReleasePrompt: '# Android, Linux y Windows', + items: { + statusChart: 'Gráficas', + sshTerminal: 'Terminal SSH', + sftp: 'SFTP', + docker: 'Docker', + process: 'Procesos', + systemd: 'Systemd', + smart: 'S.M.A.R.T', + gpu: 'GPU', + sensors: 'Sensores', + push: 'Alertas', + homeWidget: 'Widget', + watchos: 'watchOS', + }, + }, + download: { + title: 'Cada plataforma, cada fuente.', + subtitle: + 'Elige el canal adecuado para tu dispositivo. iOS usa App Store; macOS usa App Store o Homebrew; Android, Linux y Windows también tienen paquetes directos.', + copied: 'Comando copiado', + copyPrompt: 'Copia este comando:', + note: + 'Descarga solo desde fuentes de confianza. Para notificaciones del servidor, widgets y monitorización companion, instala ServerBoxMonitor en tus servidores.', + }, + cta: { + title: 'ServerBox es gratis y open source bajo AGPLv3.', + subtitle: + 'Instala desde App Store, GitHub Releases, F-Droid, OpenAPK o el CDN del proyecto.', + appStoreAction: 'Abrir App Store', + githubAction: 'Descargar desde GitHub Releases', + }, + footer: { + features: 'Funciones', + capabilities: 'Capacidades', + releases: 'Versiones', + }, +} + +export default es diff --git a/website/src/i18n/fr/index.ts b/website/src/i18n/fr/index.ts new file mode 100644 index 000000000..77e93420c --- /dev/null +++ b/website/src/i18n/fr/index.ts @@ -0,0 +1,106 @@ +import type { Translation } from '../i18n-types.js' + +const fr: Translation = { + meta: { + lang: 'fr', + title: 'ServerBox — État des serveurs, SSH et opérations dans une app Flutter', + description: + 'ServerBox surveille les serveurs Linux, Unix et Windows avec graphiques, terminal SSH, SFTP, Docker, processus, systemd, S.M.A.R.T, notifications, widgets et watchOS.', + }, + nav: { + features: 'Fonctions', + capabilities: 'Capacités', + download: 'Télécharger', + docs: 'Docs', + languageLabel: 'Langue', + }, + hero: { + titlePrefix: 'État des serveurs,', + titleSuffix: 'dans votre poche.', + subtitle: + 'ServerBox réunit graphiques, terminal SSH, SFTP, Docker, contrôle des processus, systemd, S.M.A.R.T, alertes, widgets et watchOS dans une seule app Flutter.', + primaryAction: 'Télécharger ServerBox', + secondaryAction: 'Voir les fonctions', + }, + screenshots: { + label: 'Captures interactives de ServerBox', + one: 'Capture de la vue serveur ServerBox', + two: 'Capture des graphiques ServerBox', + three: 'Capture du terminal ServerBox', + four: 'Capture des outils ServerBox', + }, + features: { + title: 'Un espace compact pour la maintenance quotidienne.', + subtitle: + 'Une surface opérationnelle dense et directe, où chaque bloc correspond à un vrai flux de maintenance.', + charts: { + title: 'Graphiques d’état', + description: + 'Suivez CPU, mémoire, capteurs, GPU, réseau, disque et santé de l’hôte depuis des graphiques mobiles denses.', + }, + workspace: { + title: 'Espace multiplateforme', + description: + 'Utilisez ServerBox sur iOS, Android, macOS, Linux et Windows avec la même interface Flutter familière.', + }, + terminal: { + title: 'Terminal SSH et SFTP', + description: + 'Ouvrez des sessions terminal et fichiers depuis une carte serveur, avec dartssh2 et xterm.dart.', + }, + native: { + title: 'Intégrations natives', + description: + 'Authentification biométrique, notifications, widgets et watchOS gardent le contexte serveur à portée.', + }, + platforms: { + title: 'Docker, processus, systemd', + description: + 'Inspectez conteneurs, processus et services sans quitter le flux de surveillance.', + }, + }, + capabilities: { + title: 'Tous les outils. Une seule app.', + subtitle: + 'ServerBox garde terminal, transfert de fichiers, services, santé matérielle et alertes dans le même flux.', + installIosPrompt: '# iOS', + installReleasePrompt: '# Android, Linux et Windows', + items: { + statusChart: 'Graphiques', + sshTerminal: 'Terminal SSH', + sftp: 'SFTP', + docker: 'Docker', + process: 'Processus', + systemd: 'Systemd', + smart: 'S.M.A.R.T', + gpu: 'GPU', + sensors: 'Capteurs', + push: 'Notifications', + homeWidget: 'Widget', + watchos: 'watchOS', + }, + }, + download: { + title: 'Toutes les plateformes, toutes les sources.', + subtitle: + 'Choisissez le canal adapté à votre appareil. iOS utilise l’App Store ; macOS utilise l’App Store ou Homebrew ; Android, Linux et Windows ont aussi des paquets directs.', + copied: 'Commande copiée', + copyPrompt: 'Copiez cette commande :', + note: + 'Téléchargez uniquement depuis une source de confiance. Pour les notifications serveur, widgets et surveillance compagnon, installez ServerBoxMonitor sur vos serveurs.', + }, + cta: { + title: 'ServerBox est libre et open source sous AGPLv3.', + subtitle: + 'Installez depuis l’App Store, GitHub Releases, F-Droid, OpenAPK ou le CDN du projet.', + appStoreAction: 'Ouvrir l’App Store', + githubAction: 'Télécharger depuis GitHub Releases', + }, + footer: { + features: 'Fonctions', + capabilities: 'Capacités', + releases: 'Versions', + }, +} + +export default fr diff --git a/website/src/i18n/i18n-types.ts b/website/src/i18n/i18n-types.ts index 62b066bc3..768026d99 100644 --- a/website/src/i18n/i18n-types.ts +++ b/website/src/i18n/i18n-types.ts @@ -7,6 +7,11 @@ export type BaseLocale = 'en' export type Locales = | 'en' + | 'es' + | 'fr' + | 'it' + | 'ja' + | 'kr' | 'zh-CN' export type Translation = RootTranslation diff --git a/website/src/i18n/i18n-util.async.ts b/website/src/i18n/i18n-util.async.ts index 7621099d9..579320a43 100644 --- a/website/src/i18n/i18n-util.async.ts +++ b/website/src/i18n/i18n-util.async.ts @@ -7,6 +7,11 @@ import { loadedFormatters, loadedLocales, locales } from './i18n-util.js' const localeTranslationLoaders = { en: () => import('./en/index.js'), + es: () => import('./es/index.js'), + fr: () => import('./fr/index.js'), + it: () => import('./it/index.js'), + ja: () => import('./ja/index.js'), + kr: () => import('./kr/index.js'), 'zh-CN': () => import('./zh-CN/index.js'), } diff --git a/website/src/i18n/i18n-util.sync.ts b/website/src/i18n/i18n-util.sync.ts index b6f8fa5c6..5be008ab0 100644 --- a/website/src/i18n/i18n-util.sync.ts +++ b/website/src/i18n/i18n-util.sync.ts @@ -6,10 +6,20 @@ import type { Locales, Translations } from './i18n-types.js' import { loadedFormatters, loadedLocales, locales } from './i18n-util.js' import en from './en/index.js' +import es from './es/index.js' +import fr from './fr/index.js' +import it from './it/index.js' +import ja from './ja/index.js' +import kr from './kr/index.js' import zh_CN from './zh-CN/index.js' const localeTranslations = { en, + es, + fr, + it, + ja, + kr, 'zh-CN': zh_CN, } diff --git a/website/src/i18n/i18n-util.ts b/website/src/i18n/i18n-util.ts index d69518834..4dfbee2f9 100644 --- a/website/src/i18n/i18n-util.ts +++ b/website/src/i18n/i18n-util.ts @@ -12,6 +12,11 @@ export const baseLocale: Locales = 'en' export const locales: Locales[] = [ 'en', + 'es', + 'fr', + 'it', + 'ja', + 'kr', 'zh-CN' ] diff --git a/website/src/i18n/it/index.ts b/website/src/i18n/it/index.ts new file mode 100644 index 000000000..7f19e8c97 --- /dev/null +++ b/website/src/i18n/it/index.ts @@ -0,0 +1,106 @@ +import type { Translation } from '../i18n-types.js' + +const it: Translation = { + meta: { + lang: 'it', + title: 'ServerBox — Stato server, SSH e operazioni in una app Flutter', + description: + 'ServerBox monitora server Linux, Unix e Windows con grafici, terminale SSH, SFTP, Docker, processi, systemd, S.M.A.R.T, notifiche, widget e watchOS.', + }, + nav: { + features: 'Funzioni', + capabilities: 'Capacità', + download: 'Scarica', + docs: 'Documenti', + languageLabel: 'Lingua', + }, + hero: { + titlePrefix: 'Stato server,', + titleSuffix: 'in tasca.', + subtitle: + 'ServerBox riunisce grafici, terminale SSH, SFTP, Docker, processi, systemd, S.M.A.R.T, notifiche, widget e watchOS in una sola app Flutter.', + primaryAction: 'Scarica ServerBox', + secondaryAction: 'Esplora le funzioni', + }, + screenshots: { + label: 'Screenshot interattivi di ServerBox', + one: 'Screenshot panoramica server ServerBox', + two: 'Screenshot grafici ServerBox', + three: 'Screenshot terminale ServerBox', + four: 'Screenshot strumenti ServerBox', + }, + features: { + title: 'Uno spazio compatto per la manutenzione quotidiana.', + subtitle: + 'Una superficie operativa focalizzata: ogni blocco corrisponde a un flusso reale di manutenzione.', + charts: { + title: 'Grafici di stato', + description: + 'Controlla CPU, memoria, sensori, GPU, rete, disco e salute host da grafici mobili densi.', + }, + workspace: { + title: 'Spazio multipiattaforma', + description: + 'Usa ServerBox su iOS, Android, macOS, Linux e Windows con la stessa interfaccia Flutter.', + }, + terminal: { + title: 'Terminale SSH e SFTP', + description: + 'Apri sessioni terminale e file da una scheda server, con dartssh2 e xterm.dart.', + }, + native: { + title: 'Integrazioni native', + description: + 'Autenticazione biometrica, notifiche, widget e watchOS mantengono vicino il contesto server.', + }, + platforms: { + title: 'Docker, processi, systemd', + description: + 'Ispeziona container, processi e servizi senza uscire dal flusso di monitoraggio.', + }, + }, + capabilities: { + title: 'Tutti gli strumenti. Una sola app.', + subtitle: + 'ServerBox tiene terminale, trasferimento file, servizi, salute hardware e avvisi nello stesso flusso.', + installIosPrompt: '# iOS', + installReleasePrompt: '# Android, Linux e Windows', + items: { + statusChart: 'Grafici', + sshTerminal: 'Terminale SSH', + sftp: 'SFTP', + docker: 'Docker', + process: 'Processi', + systemd: 'Systemd', + smart: 'S.M.A.R.T', + gpu: 'GPU', + sensors: 'Sensori', + push: 'Notifiche', + homeWidget: 'Widget', + watchos: 'watchOS', + }, + }, + download: { + title: 'Ogni piattaforma, ogni sorgente.', + subtitle: + 'Scegli il canale adatto al dispositivo. iOS usa App Store; macOS usa App Store o Homebrew; Android, Linux e Windows hanno pacchetti diretti.', + copied: 'Comando copiato', + copyPrompt: 'Copia questo comando:', + note: + 'Scarica solo da fonti attendibili. Per notifiche server, widget e monitoraggio companion, installa ServerBoxMonitor sui server.', + }, + cta: { + title: 'ServerBox è libero e open source sotto AGPLv3.', + subtitle: + 'Installa da App Store, GitHub Releases, F-Droid, OpenAPK o dal CDN del progetto.', + appStoreAction: 'Apri App Store', + githubAction: 'Scarica da GitHub Releases', + }, + footer: { + features: 'Funzioni', + capabilities: 'Capacità', + releases: 'Release', + }, +} + +export default it diff --git a/website/src/i18n/ja/index.ts b/website/src/i18n/ja/index.ts new file mode 100644 index 000000000..26967e868 --- /dev/null +++ b/website/src/i18n/ja/index.ts @@ -0,0 +1,106 @@ +import type { Translation } from '../i18n-types.js' + +const ja: Translation = { + meta: { + lang: 'ja', + title: 'ServerBox — サーバー状態、SSH、運用を 1 つの Flutter アプリで', + description: + 'ServerBox は、状態チャート、SSH ターミナル、SFTP、Docker、プロセス、systemd、S.M.A.R.T、通知、ウィジェット、watchOS で Linux、Unix、Windows サーバーを監視します。', + }, + nav: { + features: '機能', + capabilities: 'ツール', + download: 'ダウンロード', + docs: 'ドキュメント', + languageLabel: '言語', + }, + hero: { + titlePrefix: 'サーバー状態を、', + titleSuffix: 'ポケットの中に。', + subtitle: + 'ServerBox はチャート、SSH ターミナル、SFTP、Docker、プロセス制御、systemd、S.M.A.R.T、通知、ウィジェット、watchOS を 1 つの Flutter アプリにまとめます。', + primaryAction: 'ServerBox をダウンロード', + secondaryAction: '機能を見る', + }, + screenshots: { + label: 'ServerBox のインタラクティブなスクリーンショット', + one: 'ServerBox サーバー概要のスクリーンショット', + two: 'ServerBox 状態チャートのスクリーンショット', + three: 'ServerBox ターミナルのスクリーンショット', + four: 'ServerBox ツールのスクリーンショット', + }, + features: { + title: '日常のサーバーメンテナンスに使える小さな作業場。', + subtitle: + '装飾を抑え、実際のメンテナンス作業に対応する機能だけを集めています。', + charts: { + title: '状態チャート', + description: + 'CPU、メモリ、センサー、GPU、ネットワーク、ディスク、ホスト状態をモバイルチャートで確認できます。', + }, + workspace: { + title: 'クロスプラットフォーム', + description: + 'iOS、Android、macOS、Linux、Windows で同じ Flutter インターフェースを使えます。', + }, + terminal: { + title: 'SSH ターミナルと SFTP', + description: + 'サーバーカードからターミナルとファイルセッションを直接開けます。dartssh2 と xterm.dart を使用しています。', + }, + native: { + title: 'ネイティブ連携', + description: + '生体認証、通知、ホームウィジェット、watchOS により、サーバーの状況を近くに保てます。', + }, + platforms: { + title: 'Docker、プロセス、systemd', + description: + '監視の流れを離れずに、コンテナ、プロセス、サービスを確認できます。', + }, + }, + capabilities: { + title: '必要なツールを 1 つのアプリに。', + subtitle: + 'ServerBox はターミナル、ファイル転送、サービス確認、ハードウェア状態、デバイス通知を同じ流れにまとめます。', + installIosPrompt: '# iOS', + installReleasePrompt: '# Android、Linux、Windows', + items: { + statusChart: '状態チャート', + sshTerminal: 'SSH ターミナル', + sftp: 'SFTP', + docker: 'Docker', + process: 'プロセス', + systemd: 'Systemd', + smart: 'S.M.A.R.T', + gpu: 'GPU', + sensors: 'センサー', + push: '通知', + homeWidget: 'ホームウィジェット', + watchos: 'watchOS', + }, + }, + download: { + title: 'すべてのプラットフォーム、すべての配布元。', + subtitle: + 'デバイスと信頼できる配布元に合わせて選択できます。iOS は App Store、macOS は App Store または Homebrew、Android、Linux、Windows は直接パッケージも利用できます。', + copied: 'インストールコマンドをコピーしました', + copyPrompt: 'このインストールコマンドをコピーしてください:', + note: + '信頼できる配布元からのみダウンロードしてください。サーバー側の通知、ウィジェット、companion 監視には、サーバーに ServerBoxMonitor を別途インストールしてください。', + }, + cta: { + title: 'ServerBox は AGPLv3 の無料オープンソースです。', + subtitle: + 'App Store、GitHub Releases、F-Droid、OpenAPK、またはプロジェクト CDN からインストールできます。', + appStoreAction: 'App Store を開く', + githubAction: 'GitHub Releases からダウンロード', + }, + footer: { + features: '機能', + capabilities: 'ツール', + releases: 'リリース', + }, +} + +export default ja diff --git a/website/src/i18n/kr/index.ts b/website/src/i18n/kr/index.ts new file mode 100644 index 000000000..8b23a3625 --- /dev/null +++ b/website/src/i18n/kr/index.ts @@ -0,0 +1,106 @@ +import type { Translation } from '../i18n-types.js' + +const kr: Translation = { + meta: { + lang: 'ko', + title: 'ServerBox — 서버 상태, SSH, 운영 도구를 하나의 Flutter 앱으로', + description: + 'ServerBox는 상태 차트, SSH 터미널, SFTP, Docker, 프로세스, systemd, S.M.A.R.T, 푸시, 위젯, watchOS로 Linux, Unix, Windows 서버를 모니터링합니다.', + }, + nav: { + features: '기능', + capabilities: '도구', + download: '다운로드', + docs: '문서', + languageLabel: '언어', + }, + hero: { + titlePrefix: '서버 상태를,', + titleSuffix: '손안에서 확인하세요.', + subtitle: + 'ServerBox는 차트, SSH 터미널, SFTP, Docker, 프로세스 제어, systemd, S.M.A.R.T, 푸시 알림, 위젯, watchOS 지원을 하나의 Flutter 앱에 담았습니다.', + primaryAction: 'ServerBox 다운로드', + secondaryAction: '기능 보기', + }, + screenshots: { + label: 'ServerBox 인터랙티브 스크린샷', + one: 'ServerBox 서버 개요 스크린샷', + two: 'ServerBox 상태 차트 스크린샷', + three: 'ServerBox 터미널 스크린샷', + four: 'ServerBox 도구 스크린샷', + }, + features: { + title: '일상적인 서버 관리를 위한 컴팩트한 작업 공간.', + subtitle: + '장식 없이 실제 운영 흐름에 맞춘 밀도 높은 인터페이스입니다.', + charts: { + title: '상태 차트', + description: + 'CPU, 메모리, 센서, GPU, 네트워크, 디스크, 호스트 상태를 모바일 차트로 확인합니다.', + }, + workspace: { + title: '크로스 플랫폼 작업 공간', + description: + 'iOS, Android, macOS, Linux, Windows에서 같은 Flutter 인터페이스를 사용합니다.', + }, + terminal: { + title: 'SSH 터미널과 SFTP', + description: + '서버 카드에서 바로 터미널과 파일 세션을 열 수 있으며 dartssh2와 xterm.dart를 사용합니다.', + }, + native: { + title: '네이티브 기기 기능', + description: + '생체 인증, 푸시 알림, 홈 위젯, watchOS 지원으로 서버 상태를 가까이에 둡니다.', + }, + platforms: { + title: 'Docker, 프로세스, systemd', + description: + '모니터링 흐름을 벗어나지 않고 컨테이너, 프로세스, 서비스를 확인합니다.', + }, + }, + capabilities: { + title: '모든 도구를 하나의 앱에.', + subtitle: + 'ServerBox는 터미널, 파일 전송, 서비스 점검, 하드웨어 상태, 기기 알림을 같은 흐름에 둡니다.', + installIosPrompt: '# iOS', + installReleasePrompt: '# Android, Linux, Windows', + items: { + statusChart: '상태 차트', + sshTerminal: 'SSH 터미널', + sftp: 'SFTP', + docker: 'Docker', + process: '프로세스', + systemd: 'Systemd', + smart: 'S.M.A.R.T', + gpu: 'GPU', + sensors: '센서', + push: '푸시', + homeWidget: '홈 위젯', + watchos: 'watchOS', + }, + }, + download: { + title: '모든 플랫폼, 모든 배포 경로.', + subtitle: + '기기와 신뢰 모델에 맞는 채널을 선택하세요. iOS는 App Store, macOS는 App Store 또는 Homebrew, Android/Linux/Windows는 직접 패키지를 제공합니다.', + copied: '설치 명령을 복사했습니다', + copyPrompt: '이 설치 명령을 복사하세요:', + note: + '신뢰할 수 있는 출처에서만 패키지를 다운로드하세요. 서버 푸시, 위젯, companion 모니터링에는 서버에 ServerBoxMonitor를 별도로 설치하세요.', + }, + cta: { + title: 'ServerBox는 AGPLv3 기반의 무료 오픈소스입니다.', + subtitle: + 'App Store, GitHub Releases, F-Droid, OpenAPK 또는 프로젝트 CDN에서 설치할 수 있습니다.', + appStoreAction: 'App Store 열기', + githubAction: 'GitHub Releases에서 다운로드', + }, + footer: { + features: '기능', + capabilities: '도구', + releases: '릴리스', + }, +} + +export default kr diff --git a/website/src/lib/i18n.js b/website/src/lib/i18n.js index 797e1cab1..abfaad0de 100644 --- a/website/src/lib/i18n.js +++ b/website/src/lib/i18n.js @@ -5,6 +5,11 @@ export const defaultLocale = baseLocale export const locales = [ { code: 'en', label: 'English' }, { code: 'zh-CN', label: '简体中文' }, + { code: 'fr', label: 'Français' }, + { code: 'it', label: 'Italiano' }, + { code: 'kr', label: '한국어' }, + { code: 'ja', label: '日本語' }, + { code: 'es', label: 'Español' }, ].filter((locale) => generatedLocales.includes(locale.code)) export const localeStorageKey = 'mfuse.website.locale' @@ -15,6 +20,11 @@ export function normalizeLocale(locale) { const lowerLocale = locale.toLowerCase() if (lowerLocale.startsWith('zh')) return 'zh-CN' + if (lowerLocale.startsWith('fr')) return 'fr' + if (lowerLocale.startsWith('it')) return 'it' + if (lowerLocale.startsWith('ko') || lowerLocale.startsWith('kr')) return 'kr' + if (lowerLocale.startsWith('ja')) return 'ja' + if (lowerLocale.startsWith('es')) return 'es' if (lowerLocale.startsWith('en')) return 'en' return defaultLocale From dd059d03a3375122ea005263c6708a8f1371e894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lollipopkit=F0=9F=8F=B3=EF=B8=8F=E2=80=8D=E2=9A=A7?= =?UTF-8?q?=EF=B8=8F?= <10864310+lollipopkit@users.noreply.github.com> Date: Sat, 25 Apr 2026 15:26:54 +0800 Subject: [PATCH 09/11] opt.: js -> ts --- README.md | 11 -------- README_zh.md | 11 -------- website/index.html | 2 +- website/jsconfig.json | 38 ---------------------------- website/src/App.svelte | 4 +-- website/src/i18n/es/index.ts | 2 +- website/src/i18n/fr/index.ts | 2 +- website/src/lib/{i18n.js => i18n.ts} | 18 ++++++++----- website/src/lib/utils.js | 8 ------ website/src/lib/utils.ts | 6 +++++ website/src/main.js | 9 ------- website/src/main.ts | 15 +++++++++++ website/tsconfig.json | 20 +++++++++++++++ 13 files changed, 58 insertions(+), 88 deletions(-) delete mode 100644 website/jsconfig.json rename website/src/lib/{i18n.js => i18n.ts} (75%) delete mode 100644 website/src/lib/utils.js create mode 100644 website/src/lib/utils.ts delete mode 100644 website/src/main.js create mode 100644 website/src/main.ts create mode 100644 website/tsconfig.json diff --git a/README.md b/README.md index 4945f483b..c9dd70e9b 100644 --- a/README.md +++ b/README.md @@ -74,17 +74,6 @@ If I forgot to add your name to the contributors list, please add a comment in t 2. Clone this repo, run `flutter run` to start the app. 3. Run `dart run fl_build -p PLATFORM` to build the app. -### Release macOS notarized DMG - -1. Copy `.env.release.example` to `.env.release`. -2. Fill in `APPLE_TEAM_ID` and `APPLE_NOTARY_KEYCHAIN_PROFILE`. -3. Make sure the `Developer ID Application` certificate is already installed in Keychain. -4. Make sure notarization credentials are already stored via `xcrun notarytool store-credentials`. -5. Install the provisioning profile used for DMG packaging. The script defaults to `ServerBox DMG Profile`, and you can override it with `APP_PROFILE_NAME`. -6. Run `bash scripts/release/release-macos-dmg.sh`. - -This flow does not modify the default Xcode Release signing config. It injects a temporary `xcconfig` only for archive/export, builds a signed `.app`, packages a DMG, submits it to notarization, staples the result, and optionally uploads the DMG to the GitHub Release for `v `. - ### Translation - [Guide](https://blog.lpkt.cn/posts/faq/) can be found in my blog. diff --git a/README_zh.md b/README_zh.md index be35366fe..9948efe81 100644 --- a/README_zh.md +++ b/README_zh.md @@ -76,17 +76,6 @@ Linux / Windows | [GitHub](https://github.com/lollipopkit/flutter_server_box/rel 2. 克隆这个仓库, 运行 `flutter run` 启动应用 3. 运行 `dart run fl_build -p PLATFORM` 构建应用 -### 发布 macOS 公证 DMG - -1. 复制 `.env.release.example` 为 `.env.release` -2. 填入 `APPLE_TEAM_ID` 和 `APPLE_NOTARY_KEYCHAIN_PROFILE` -3. 确保 `Developer ID Application` 证书已经安装到 Keychain -4. 确保已经通过 `xcrun notarytool store-credentials` 存好了公证凭据 -5. 安装用于 DMG 打包的 provisioning profile。脚本默认使用 `ServerBox DMG Profile`,也可以通过 `APP_PROFILE_NAME` 覆盖 -6. 运行 `bash scripts/release/release-macos-dmg.sh` - -这套流程不会修改工程默认的 Xcode Release 签名配置。脚本只会在归档和导出时注入临时 `xcconfig`,生成已签名 `.app`、打包 DMG、提交公证、回填 stapler,并可选把 DMG 上传到 `v ` 对应的 GitHub Release。 - ### 翻译 [指南](https://blog.lpkt.cn/faq/) 可在我的博客中找到。 diff --git a/website/index.html b/website/index.html index d4e3de0f0..88acd3070 100644 --- a/website/index.html +++ b/website/index.html @@ -12,6 +12,6 @@ - + diff --git a/website/jsconfig.json b/website/jsconfig.json deleted file mode 100644 index dba20b9de..000000000 --- a/website/jsconfig.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "bundler", - "target": "ESNext", - "module": "ESNext", - /** - * svelte-preprocess cannot figure out whether you have - * a value or a type, so tell TypeScript to enforce using - * `import type` instead of `import` for Types. - */ - "verbatimModuleSyntax": true, - "isolatedModules": true, - "resolveJsonModule": true, - /** - * To have warnings / errors of the Svelte compiler at the - * correct position, enable source maps by default. - */ - "sourceMap": true, - "esModuleInterop": true, - "baseUrl": ".", - "paths": { - "$lib": ["src/lib"], - "$lib/*": ["src/lib/*"] - }, - "types": ["vite/client"], - "skipLibCheck": true, - /** - * Typecheck JS in `.svelte` and `.js` files by default. - * Disable this if you'd like to use dynamic types. - */ - "checkJs": true - }, - /** - * Use global.d.ts instead of compilerOptions.types - * to avoid limiting type declarations. - */ - "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte", "src/**/*.ts"] -} diff --git a/website/src/App.svelte b/website/src/App.svelte index a6f99ac5e..24717dd31 100644 --- a/website/src/App.svelte +++ b/website/src/App.svelte @@ -11,7 +11,7 @@ locales, localeStorageKey, syncLocaleToUrl, - } from './lib/i18n.js' + } from './lib/i18n' const capabilities = ['Status chart', 'SSH Terminal', 'SFTP', 'Docker', 'Process', 'Systemd', 'S.M.A.R.T', 'GPU', 'Sensors', 'Push', 'Home Widget', 'watchOS'] @@ -172,7 +172,7 @@ scrollToSection(event, 'features')}>{$LL.nav.features()} scrollToSection(event, 'capabilities')}>{$LL.nav.capabilities()} scrollToSection(event, 'download')}>{$LL.nav.download()} - Docs + {$LL.nav.docs()}