Compare commits

...

33 Commits

Author SHA1 Message Date
lollipopkit🏳️‍⚧️
aaa69f0f95 chore: bump version 2024-08-04 19:26:31 +08:00
lollipopkit🏳️‍⚧️
64676bc5cb chore: l10n 2024-08-04 13:05:29 +08:00
lollipopkit🏳️‍⚧️
a15c04956c opt.: TipText 2024-08-04 12:02:57 +08:00
lollipopkit🏳️‍⚧️
e3c885483b opt.: use ssh term to decompress (#519) 2024-08-04 11:40:38 +08:00
lollipopkit🏳️‍⚧️
493c86cacb fix: home widget url (#517) 2024-08-04 00:17:21 +08:00
lollipopkit🏳️‍⚧️
ea7c8caf14 bug: color seed setting not working (#516) 2024-08-03 23:17:18 +08:00
lollipopkit🏳️‍⚧️
9db04a60c2 opt.: l10n & fix: write script (#514) 2024-08-03 22:44:21 +08:00
lollipopkit🏳️‍⚧️
610f46da0d opt.: bulk import servers (#512) 2024-08-03 14:52:39 +08:00
lollipopkit🏳️‍⚧️
b8e5418ff2 feat: import snippets from network (#510)
Fixes #507
2024-08-03 14:25:58 +08:00
lollipopkit🏳️‍⚧️
0e21755acb opt.: remove internal SharePreference keys while using KvEditor (#509)
Fixes #508
2024-08-03 12:37:16 +08:00
lollipopkit🏳️‍⚧️
73248011a1 migrate: fl_lib 2024-08-01 13:44:32 +08:00
lollipopkit🏳️‍⚧️
969643d3df opt.: debug page copy logs 2024-07-28 22:12:07 +08:00
lollipopkit🏳️‍⚧️
c90d0e4b3b fix: manual restore 2024-07-28 20:37:34 +08:00
lollipopkit🏳️‍⚧️
f9aadc6b0f opt.: Btn 2024-07-28 20:26:08 +08:00
lollipopkit🏳️‍⚧️
8fd4cc1fe1 opt.: TagsEditor & Btn 2024-07-28 19:05:31 +08:00
lollipopkit🏳️‍⚧️
432d76f024 fix: builtin editor (#503) 2024-07-28 15:06:34 +08:00
𝗦𝗵𝗟𝗲𝗿𝗣
ca8211e1a4 Add TR Locales (#497) 2024-07-27 16:42:09 +08:00
lollipopkit🏳️‍⚧️
a3b48fc01c chore: bump version 2024-07-26 23:35:59 +08:00
lollipopkit🏳️‍⚧️
8be94aa09c feat: use $EDITOR to edit files (#496)
Fixes #489
2024-07-26 23:32:57 +08:00
lollipopkit🏳️‍⚧️
5db1253ab8 fix: termux compatibility (#495) 2024-07-26 22:31:17 +08:00
lollipopkit🏳️‍⚧️
ceedd86310 rm: pkg (#494)
Fixes #470
2024-07-26 21:31:45 +08:00
lollipopkit🏳️‍⚧️
6a0254623f opt.: json input experience 2024-07-26 20:22:30 +08:00
lollipopkit🏳️‍⚧️
1c6ec56032 Create FUNDING.yml 2024-07-25 10:42:18 +08:00
lollipopkit🏳️‍⚧️
287869ed45 opt.: simplify settings page (#488) 2024-07-24 00:30:17 +08:00
lollipopkit🏳️‍⚧️
e4dbc3ba12 feat: set envs in term (#485) 2024-07-23 21:34:34 +08:00
lollipopkit🏳️‍⚧️
426e5689f8 fix: uploaded file's path on windows (#484) 2024-07-23 19:59:58 +08:00
lollipopkit🏳️‍⚧️
afda5fd4a4 fix: bio auth (#482) 2024-07-23 19:26:03 +08:00
lollipopkit🏳️‍⚧️
0a21b2820c fix: letterCacheTip translation 2024-07-23 12:14:31 +08:00
lollipopkit🏳️‍⚧️
87b3b76b0b feat: display cpu model (#477) 2024-07-23 12:03:10 +08:00
lollipopkit🏳️‍⚧️
41ec46f1d3 opt.: show loading dialog 2024-07-22 23:33:21 +08:00
lollipopkit🏳️‍⚧️
7a359588db opt.: input field suggestion 2024-07-22 22:03:56 +08:00
lollipopkit🏳️‍⚧️
255abe8b11 rollback: write script to /dev/shm (#474) 2024-07-21 17:58:14 +08:00
lollipopkit🏳️‍⚧️
b0936c5e6e fix: termux compatibility (#472) 2024-07-20 20:35:30 +08:00
80 changed files with 2191 additions and 3398 deletions

14
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: lollipopkit
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
custom: ['https://afdian.com/a/lollipopkit'] # Replace with up to 4 custom sponsorship URLs

View File

@@ -9,8 +9,8 @@ permissions:
contents: write
jobs:
releaseAL:
name: Release android and linux
releaseAndroid:
name: Release android
runs-on: ubuntu-22.04
steps:
- name: Checkout
@@ -19,7 +19,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.22.2'
flutter-version: '3.22.3'
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
@@ -29,7 +29,7 @@ jobs:
curl -u ${{ secrets.BASIC_AUTH }} -o android/app/app.key ${{ secrets.URL_PREFIX }}app.key
curl -u ${{ secrets.BASIC_AUTH }} -o android/key.properties ${{ secrets.URL_PREFIX }}key.properties
- name: Build
run: dart run fl_build -p android,linux
run: dart run fl_build -p android
- name: Rename for fdroid
run: |
mv build/app/outputs/flutter-apk/${{ env.APP_NAME }}_${{ env.BUILD_NUMBER }}_arm64.apk build/app/outputs/flutter-apk/${{ env.APP_NAME }}_v1.0.${{ env.BUILD_NUMBER }}_arm64.apk
@@ -42,6 +42,24 @@ jobs:
build/app/outputs/flutter-apk/${{ env.APP_NAME }}_v1.0.${{ env.BUILD_NUMBER }}_arm64.apk
build/app/outputs/flutter-apk/${{ env.APP_NAME }}_v1.0.${{ env.BUILD_NUMBER }}_arm.apk
build/app/outputs/flutter-apk/${{ env.APP_NAME }}_v1.0.${{ env.BUILD_NUMBER }}_amd64.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
releaseLinux:
name: Release linux
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Flutter
uses: subosito/flutter-action@v2
- name: Build
run: |
dart run fl_build -p linux
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
${{ env.APP_NAME }}_${{ env.BUILD_NUMBER }}_amd64.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -27,10 +27,12 @@ Linux / Windows | [GitHub](https://github.com/lollipopkit/flutter_server_box/rel
- Github releases are built by Github Actions
- Other sources are built by themselves
## 🔖 Feature
- `Status chart` (CPU, Sensors, GPU...), `SSH` Term, `SFTP`, `Docker & Pkg & Process`...
- `Status chart` (CPU, Sensors, GPU...), `SSH` Term, `SFTP`, `Docker & Process`...
- Platform specific: `Bio auth``Msg push``Home widget``watchOS App`...
- English, 简体中文; Deutsch [@its-tom](https://github.com/its-tom), 繁體中文 [@kalashnikov](https://github.com/kalashnikov), Indonesian [@azkadev](https://github.com/azkadev), Français [@FrancXPT](https://github.com/FrancXPT), Dutch [@QazCetelic](https://github.com/QazCetelic); Español, Русский язык, Português, 日本語 (Generated by GPT)
- English, 简体中文; Deutsch [@its-tom](https://github.com/its-tom), 繁體中文 [@kalashnikov](https://github.com/kalashnikov), Indonesian [@azkadev](https://github.com/azkadev), Français [@FrancXPT](https://github.com/FrancXPT), Dutch [@QazCetelic](https://github.com/QazCetelic), Türkçe [@mikropsoft](https://github.com/mikropsoft); Español, Русский язык, Português, 日本語 (Generated by GPT)
## 🏙️ ScreenShots
<table>
@@ -60,8 +62,16 @@ After you read the above, you can open an [issue](https://github.com/lollipopkit
## 🧱 Contribution
- Any positive contribution is welcome.
- [l10n guide](https://blog.lolli.tech/faq/) can be found in my blog.
Any positive contribution is welcome.
### Development
1. Setup [Flutter](https://flutter.dev/docs/get-started/install) environment.
2. Clone this repo, run `flutter run` to start the app.
3. Run `dart run fl_build -p PLATFORM` to build the app.
### Translation
- [Guide](https://blog.lpkt.cn/posts/faq/) can be found in my blog.
- We need your help! Just feel free to open a PR.
## 💡 My other apps

View File

@@ -26,13 +26,14 @@ Linux / Windows | [GitHub](https://github.com/lollipopkit/flutter_server_box/rel
- Github 的包由 Github Actions 构建
- 其他来源由其所有者构建
## 🔖 特点
- `状态图表`CPU、传感器、GPU 等), `SSH` 终端, `SFTP`, `Docker & 包 & 进程` 管理...
- `状态图表`CPU、传感器、GPU 等), `SSH` 终端, `SFTP`, `Docker & 进程` 管理...
- 特殊支持:`生物认证``推送``桌面小部件``watchOS App``跟随系统颜色`...
- 本地化
- English, 简体中文
- Español, Русский язык, Português, 日本語 (Generated by GPT)
- Deutsch (@its-tom) / 繁體中文 (@kalashnikov) / Indonesian (@azkadev) / Français (@FrancXPT) / Dutch (@QazCetelic)
- Deutsch [@its-tom](https://github.com/its-tom), 繁體中文 [@kalashnikov](https://github.com/kalashnikov), Indonesian [@azkadev](https://github.com/azkadev), Français [@FrancXPT](https://github.com/FrancXPT), Dutch [@QazCetelic](https://github.com/QazCetelic), Türkçe [@mikropsoft](https://github.com/mikropsoft);
## 🏙️ 截屏
@@ -65,9 +66,15 @@ Linux / Windows | [GitHub](https://github.com/lollipopkit/flutter_server_box/rel
## 🧱 贡献
- 任何正面的贡献都欢迎。
- [本地化翻译指南](https://blog.lolli.tech/faq/) 可在我的博客中找到。
任何正面的贡献都欢迎。
### 开发
1. 安装 [Flutter](https://flutter.dev/docs/get-started/install)
2. 克隆这个仓库, 运行 `flutter run` 启动应用
3. 运行 `dart run fl_build -p PLATFORM` 构建应用
### 翻译
[指南](https://blog.lolli.tech/faq/) 可在我的博客中找到。
## 💡 我的其它 Apps
- [GPT Box](https://github.com/lollipopkit/flutter_gpt_box) - 支持 OpenAI API 的 第三方全平台客户端。

View File

@@ -27,9 +27,12 @@ class HomeWidget : AppWidgetProvider() {
private fun updateAppWidget(context: Context, appWidgetManager: AppWidgetManager, appWidgetId: Int) {
val views = RemoteViews(context.packageName, R.layout.home_widget)
val sp = context.getSharedPreferences("FlutterSharedPreferences", Context.MODE_PRIVATE)
var url = sp.getString("$appWidgetId", null)
val gUrl = sp.getString("*", null)
var url = sp.getString("widget_$appWidgetId", null)
if (url.isNullOrEmpty()) {
url = sp.getString("$appWidgetId", null)
}
if (url.isNullOrEmpty()) {
val gUrl = sp.getString("widget_*", null)
url = gUrl
}

View File

@@ -690,7 +690,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 1018;
CURRENT_PROJECT_VERSION = 1051;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -700,7 +700,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1018;
MARKETING_VERSION = 1.0.1051;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -826,7 +826,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 1018;
CURRENT_PROJECT_VERSION = 1051;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -836,7 +836,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1018;
MARKETING_VERSION = 1.0.1051;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -854,7 +854,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 1018;
CURRENT_PROJECT_VERSION = 1051;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -864,7 +864,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1018;
MARKETING_VERSION = 1.0.1051;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -885,7 +885,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1018;
CURRENT_PROJECT_VERSION = 1051;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -898,7 +898,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.1018;
MARKETING_VERSION = 1.0.1051;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
@@ -924,7 +924,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1018;
CURRENT_PROJECT_VERSION = 1051;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -937,7 +937,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.1018;
MARKETING_VERSION = 1.0.1051;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -960,7 +960,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1018;
CURRENT_PROJECT_VERSION = 1051;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -973,7 +973,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.1018;
MARKETING_VERSION = 1.0.1051;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -996,7 +996,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1018;
CURRENT_PROJECT_VERSION = 1051;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
@@ -1008,7 +1008,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1018;
MARKETING_VERSION = 1.0.1051;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
@@ -1037,7 +1037,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1018;
CURRENT_PROJECT_VERSION = 1051;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
@@ -1049,7 +1049,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1018;
MARKETING_VERSION = 1.0.1051;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox;
@@ -1075,7 +1075,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1018;
CURRENT_PROJECT_VERSION = 1051;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
@@ -1087,7 +1087,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1018;
MARKETING_VERSION = 1.0.1051;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox;

View File

@@ -22,8 +22,22 @@ class MyApp extends StatelessWidget {
listenable: RNodes.app,
builder: (context, _) {
if (!Stores.setting.useSystemPrimaryColor.fetch()) {
UIs.colorSeed = Color(Stores.setting.primaryColor.fetch());
return _buildApp(context);
final colorSeed = Color(Stores.setting.colorSeed.fetch());
UIs.colorSeed = colorSeed;
// Past code uses [UIs.primaryColor] as the primary color
UIs.primaryColor = colorSeed;
return _buildApp(
context,
light: ThemeData(
useMaterial3: true,
colorSchemeSeed: UIs.colorSeed,
),
dark: ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
colorSchemeSeed: UIs.colorSeed,
),
);
}
return DynamicColorBuilder(
builder: (light, dark) {
@@ -36,10 +50,10 @@ class MyApp extends StatelessWidget {
brightness: Brightness.dark,
colorScheme: dark,
);
if (context.isDark && light != null) {
UIs.primaryColor = light.primary;
} else if (!context.isDark && dark != null) {
if (context.isDark && dark != null) {
UIs.primaryColor = dark.primary;
} else if (!context.isDark && light != null) {
UIs.primaryColor = light.primary;
}
return _buildApp(context, light: lightTheme, dark: darkTheme);
},
@@ -48,7 +62,8 @@ class MyApp extends StatelessWidget {
);
}
Widget _buildApp(BuildContext ctx, {ThemeData? light, ThemeData? dark}) {
Widget _buildApp(BuildContext ctx,
{required ThemeData light, required ThemeData dark}) {
final tMode = Stores.setting.themeMode.fetch();
// Issue #57
final themeMode = switch (tMode) {
@@ -58,16 +73,6 @@ class MyApp extends StatelessWidget {
};
final locale = Stores.setting.locale.fetch().toLocale;
light ??= ThemeData(
useMaterial3: true,
colorSchemeSeed: UIs.colorSeed,
);
dark ??= ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
colorSchemeSeed: UIs.colorSeed,
);
return MaterialApp(
locale: locale,
localizationsDelegates: const [
@@ -76,10 +81,11 @@ class MyApp extends StatelessWidget {
],
supportedLocales: AppLocalizations.supportedLocales,
localeListResolutionCallback: LocaleUtil.resolve,
navigatorObservers: [AppRouteObserver.instance],
title: BuildData.name,
themeMode: themeMode,
theme: light,
darkTheme: tMode < 3 ? dark : dark.toAmoled,
theme: light.fixWindowsFont,
darkTheme: (tMode < 3 ? dark : dark.toAmoled).fixWindowsFont,
home: Builder(
builder: (context) {
context.setLibL10n();

View File

@@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
import 'package:server_box/data/model/server/private_key_info.dart';
import 'package:server_box/data/model/server/server_private_info.dart';
import 'package:server_box/data/res/build_data.dart';
import 'package:server_box/data/res/provider.dart';
import 'package:server_box/data/res/store.dart';
import 'package:server_box/view/page/backup.dart';
import 'package:server_box/view/page/container.dart';
@@ -157,11 +156,7 @@ class AppRoutes {
return AppRoutes(
DebugPage(
key: key,
args: DebugPageArgs(
notifier: Pros.debug.widgets,
onClear: Pros.debug.clear,
title: 'Logs(${BuildData.build})',
),
args: const DebugPageArgs(title: 'Logs(${BuildData.build})'),
),
'debug',
);
@@ -248,8 +243,4 @@ class AppRoutes {
static AppRoutes pve({Key? key, required ServerPrivateInfo spi}) {
return AppRoutes(PvePage(key: key, spi: spi), 'pve');
}
static AppRoutes kvEditor({Key? key, required Map<String, String> data}) {
return AppRoutes(KvEditor(key: key, data: data), 'kv_editor');
}
}

View File

@@ -90,83 +90,109 @@ class Backup {
}
// Snippets
final nowSnippets = Stores.snippet.box.keys.toSet();
final bakSnippets = snippets.map((e) => e.name).toSet();
final newSnippets = bakSnippets.difference(nowSnippets);
final delSnippets = nowSnippets.difference(bakSnippets);
final updateSnippets = nowSnippets.intersection(bakSnippets);
for (final s in newSnippets) {
Stores.snippet.box.put(s, snippets.firstWhere((e) => e.name == s));
}
for (final s in delSnippets) {
Stores.snippet.box.delete(s);
}
for (final s in updateSnippets) {
Stores.snippet.box.put(s, snippets.firstWhere((e) => e.name == s));
if (force) {
for (final s in snippets) {
Stores.snippet.box.put(s.name, s);
}
} else {
final nowSnippets = Stores.snippet.box.keys.toSet();
final bakSnippets = snippets.map((e) => e.name).toSet();
final newSnippets = bakSnippets.difference(nowSnippets);
final delSnippets = nowSnippets.difference(bakSnippets);
final updateSnippets = nowSnippets.intersection(bakSnippets);
for (final s in newSnippets) {
Stores.snippet.box.put(s, snippets.firstWhere((e) => e.name == s));
}
for (final s in delSnippets) {
Stores.snippet.box.delete(s);
}
for (final s in updateSnippets) {
Stores.snippet.box.put(s, snippets.firstWhere((e) => e.name == s));
}
}
// ServerPrivateInfo
final nowSpis = Stores.server.box.keys.toSet();
final bakSpis = spis.map((e) => e.id).toSet();
final newSpis = bakSpis.difference(nowSpis);
final delSpis = nowSpis.difference(bakSpis);
final updateSpis = nowSpis.intersection(bakSpis);
for (final s in newSpis) {
Stores.server.box.put(s, spis.firstWhere((e) => e.id == s));
}
for (final s in delSpis) {
Stores.server.box.delete(s);
}
for (final s in updateSpis) {
Stores.server.box.put(s, spis.firstWhere((e) => e.id == s));
if (force) {
for (final s in spis) {
Stores.server.box.put(s.id, s);
}
} else {
final nowSpis = Stores.server.box.keys.toSet();
final bakSpis = spis.map((e) => e.id).toSet();
final newSpis = bakSpis.difference(nowSpis);
final delSpis = nowSpis.difference(bakSpis);
final updateSpis = nowSpis.intersection(bakSpis);
for (final s in newSpis) {
Stores.server.box.put(s, spis.firstWhere((e) => e.id == s));
}
for (final s in delSpis) {
Stores.server.box.delete(s);
}
for (final s in updateSpis) {
Stores.server.box.put(s, spis.firstWhere((e) => e.id == s));
}
}
// PrivateKeyInfo
final nowKeys = Stores.key.box.keys.toSet();
final bakKeys = keys.map((e) => e.id).toSet();
final newKeys = bakKeys.difference(nowKeys);
final delKeys = nowKeys.difference(bakKeys);
final updateKeys = nowKeys.intersection(bakKeys);
for (final s in newKeys) {
Stores.key.box.put(s, keys.firstWhere((e) => e.id == s));
}
for (final s in delKeys) {
Stores.key.box.delete(s);
}
for (final s in updateKeys) {
Stores.key.box.put(s, keys.firstWhere((e) => e.id == s));
if (force) {
for (final s in keys) {
Stores.key.box.put(s.id, s);
}
} else {
final nowKeys = Stores.key.box.keys.toSet();
final bakKeys = keys.map((e) => e.id).toSet();
final newKeys = bakKeys.difference(nowKeys);
final delKeys = nowKeys.difference(bakKeys);
final updateKeys = nowKeys.intersection(bakKeys);
for (final s in newKeys) {
Stores.key.box.put(s, keys.firstWhere((e) => e.id == s));
}
for (final s in delKeys) {
Stores.key.box.delete(s);
}
for (final s in updateKeys) {
Stores.key.box.put(s, keys.firstWhere((e) => e.id == s));
}
}
// History
final nowHistory = Stores.history.box.keys.toSet();
final bakHistory = history.keys.toSet();
final newHistory = bakHistory.difference(nowHistory);
final delHistory = nowHistory.difference(bakHistory);
final updateHistory = nowHistory.intersection(bakHistory);
for (final s in newHistory) {
Stores.history.box.put(s, history[s]);
}
for (final s in delHistory) {
Stores.history.box.delete(s);
}
for (final s in updateHistory) {
Stores.history.box.put(s, history[s]);
if (force) {
Stores.history.box.putAll(history);
} else {
final nowHistory = Stores.history.box.keys.toSet();
final bakHistory = history.keys.toSet();
final newHistory = bakHistory.difference(nowHistory);
final delHistory = nowHistory.difference(bakHistory);
final updateHistory = nowHistory.intersection(bakHistory);
for (final s in newHistory) {
Stores.history.box.put(s, history[s]);
}
for (final s in delHistory) {
Stores.history.box.delete(s);
}
for (final s in updateHistory) {
Stores.history.box.put(s, history[s]);
}
}
// Container
final nowContainer = Stores.container.box.keys.toSet();
final bakContainer = container.keys.toSet();
final newContainer = bakContainer.difference(nowContainer);
final delContainer = nowContainer.difference(bakContainer);
final updateContainer = nowContainer.intersection(bakContainer);
for (final s in newContainer) {
Stores.container.box.put(s, container[s]);
}
for (final s in delContainer) {
Stores.container.box.delete(s);
}
for (final s in updateContainer) {
Stores.container.box.put(s, container[s]);
if (force) {
Stores.container.box.putAll(container);
} else {
final nowContainer = Stores.container.box.keys.toSet();
final bakContainer = container.keys.toSet();
final newContainer = bakContainer.difference(nowContainer);
final delContainer = nowContainer.difference(bakContainer);
final updateContainer = nowContainer.intersection(bakContainer);
for (final s in newContainer) {
Stores.container.box.put(s, container[s]);
}
for (final s in delContainer) {
Stores.container.box.delete(s);
}
for (final s in updateContainer) {
Stores.container.box.put(s, container[s]);
}
}
Pros.reload();

View File

@@ -1,3 +1,4 @@
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:server_box/core/extension/context/locale.dart';
@@ -21,46 +22,27 @@ enum ContainerMenu {
terminal,
//stats,
];
} else {
return [start, rm, logs];
}
return [start, rm, logs];
}
IconData get icon {
switch (this) {
case ContainerMenu.start:
return Icons.play_arrow;
case ContainerMenu.stop:
return Icons.stop;
case ContainerMenu.restart:
return Icons.restart_alt;
case ContainerMenu.rm:
return Icons.delete;
case ContainerMenu.logs:
return Icons.logo_dev;
case ContainerMenu.terminal:
return Icons.terminal;
// case DockerMenuType.stats:
// return Icons.bar_chart;
}
}
IconData get icon => switch (this) {
ContainerMenu.start => Icons.play_arrow,
ContainerMenu.stop => Icons.stop,
ContainerMenu.restart => Icons.restart_alt,
ContainerMenu.rm => Icons.delete,
ContainerMenu.logs => Icons.logo_dev,
ContainerMenu.terminal => Icons.terminal,
// DockerMenuType.stats => Icons.bar_chart,
};
String get toStr {
switch (this) {
case ContainerMenu.start:
return l10n.start;
case ContainerMenu.stop:
return l10n.stop;
case ContainerMenu.restart:
return l10n.restart;
case ContainerMenu.rm:
return l10n.delete;
case ContainerMenu.logs:
return l10n.log;
case ContainerMenu.terminal:
return l10n.terminal;
// case DockerMenuType.stats:
// return s.stats;
}
}
String get toStr => switch (this) {
ContainerMenu.start => l10n.start,
ContainerMenu.stop => l10n.stop,
ContainerMenu.restart => l10n.restart,
ContainerMenu.rm => libL10n.delete,
ContainerMenu.logs => libL10n.log,
ContainerMenu.terminal => l10n.terminal,
// DockerMenuType.stats => s.stats,
};
}

View File

@@ -15,8 +15,8 @@ enum ServerFuncBtn {
container,
@HiveField(3)
process,
@HiveField(4)
pkg,
//@HiveField(4)
//pkg,
@HiveField(5)
snippet,
@HiveField(6)
@@ -30,14 +30,14 @@ enum ServerFuncBtn {
sftp,
container,
process,
pkg,
//pkg,
snippet,
].map((e) => e.index).toList();
IconData get icon => switch (this) {
sftp => Icons.insert_drive_file,
snippet => Icons.code,
pkg => Icons.system_security_update,
//pkg => Icons.system_security_update,
container => FontAwesome.docker_brand,
process => Icons.list_alt_outlined,
terminal => Icons.terminal,
@@ -47,7 +47,7 @@ enum ServerFuncBtn {
String get toStr => switch (this) {
sftp => 'SFTP',
snippet => l10n.snippet,
pkg => l10n.pkg,
//pkg => l10n.pkg,
container => l10n.container,
process => l10n.process,
terminal => l10n.terminal,

View File

@@ -21,8 +21,6 @@ class ServerFuncBtnAdapter extends TypeAdapter<ServerFuncBtn> {
return ServerFuncBtn.container;
case 3:
return ServerFuncBtn.process;
case 4:
return ServerFuncBtn.pkg;
case 5:
return ServerFuncBtn.snippet;
case 6:
@@ -47,9 +45,6 @@ class ServerFuncBtnAdapter extends TypeAdapter<ServerFuncBtn> {
case ServerFuncBtn.process:
writer.writeByte(3);
break;
case ServerFuncBtn.pkg:
writer.writeByte(4);
break;
case ServerFuncBtn.snippet:
writer.writeByte(5);
break;

View File

@@ -1,3 +1,4 @@
import 'package:fl_lib/fl_lib.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:server_box/core/extension/context/locale.dart';
import 'package:server_box/data/model/server/server.dart';
@@ -14,27 +15,17 @@ enum NetViewType {
@HiveField(2)
traffic;
NetViewType get next {
switch (this) {
case conn:
return speed;
case speed:
return traffic;
case traffic:
return conn;
}
}
NetViewType get next => switch (this) {
conn => speed,
speed => traffic,
traffic => conn,
};
String get toStr {
switch (this) {
case NetViewType.conn:
return l10n.conn;
case NetViewType.traffic:
return l10n.traffic;
case NetViewType.speed:
return l10n.speed;
}
}
String get toStr => switch (this) {
NetViewType.conn => l10n.conn,
NetViewType.traffic => l10n.traffic,
NetViewType.speed => l10n.speed,
};
(String, String) build(ServerStatus ss) {
final ignoreLocal = Stores.setting.ignoreLocalNet.fetch();
@@ -42,7 +33,7 @@ enum NetViewType {
case NetViewType.conn:
return (
'${l10n.conn}:\n${ss.tcp.maxConn}',
'${l10n.failed}:\n${ss.tcp.fail}',
'${libL10n.fail}:\n${ss.tcp.fail}',
);
case NetViewType.speed:
if (ignoreLocal) {
@@ -69,25 +60,15 @@ enum NetViewType {
}
}
int toJson() {
switch (this) {
case NetViewType.conn:
return 0;
case NetViewType.speed:
return 1;
case NetViewType.traffic:
return 2;
}
}
int toJson() => switch (this) {
NetViewType.conn => 0,
NetViewType.speed => 1,
NetViewType.traffic => 2,
};
static NetViewType fromJson(int json) {
switch (json) {
case 0:
return NetViewType.conn;
case 2:
return NetViewType.traffic;
default:
return NetViewType.speed;
}
}
static NetViewType fromJson(int json) => switch (json) {
0 => NetViewType.conn,
1 => NetViewType.speed,
_ => NetViewType.traffic,
};
}

View File

@@ -31,7 +31,7 @@ enum ServerDetailCards {
static final names = values.map((e) => e.name).toList();
String get toStr => switch (this) {
about => l10n.about,
about => libL10n.about,
cpu => 'CPU',
mem => 'RAM',
swap => 'Swap',

View File

@@ -19,30 +19,51 @@ enum ShellFunc {
/// srvboxm -> ServerBox Mobile
static const scriptFile = 'srvboxm_v${BuildData.script}.sh';
static const scriptPath = '/dev/shm/$scriptFile';
static const installShellCmd = """
static const scriptDirHome = '~/.config/server_box';
static const scriptDirTmp = '/tmp/server_box';
static final _scriptDirMap = <String, String>{};
/// Get the script directory for the given [id].
///
/// Default is [scriptDirTmp]/[scriptFile], if this path is not accessible,
/// it will be changed to [scriptDirHome]/[scriptFile].
static String getScriptDir(String id) {
return _scriptDirMap.putIfAbsent(id, () {
return scriptDirTmp;
});
}
static void switchScriptDir(String id) => switch (_scriptDirMap[id]) {
scriptDirTmp => _scriptDirMap[id] = scriptDirHome,
scriptDirHome => _scriptDirMap[id] = scriptDirTmp,
_ => _scriptDirMap[id] = scriptDirHome,
};
static String getScriptPath(String id) {
return '${getScriptDir(id)}/$scriptFile';
}
static String getInstallShellCmd(String id) {
final scriptDir = getScriptDir(id);
final scriptPath = '$scriptDir/$scriptFile';
return """
mkdir -p $scriptDir
cat > $scriptPath
chmod 744 $scriptPath
""";
String get flag {
switch (this) {
case ShellFunc.status:
return 's';
// case ShellFunc.docker:
// return 'd';
case ShellFunc.process:
return 'p';
case ShellFunc.shutdown:
return 'sd';
case ShellFunc.reboot:
return 'r';
case ShellFunc.suspend:
return 'sp';
}
}
String get exec => 'sh $scriptPath -$flag';
String get flag => switch (this) {
ShellFunc.process => 'p',
ShellFunc.shutdown => 'sd',
ShellFunc.reboot => 'r',
ShellFunc.suspend => 'sp',
ShellFunc.status => 's',
// ShellFunc.docker=> 'd',
};
String exec(String id) => 'sh ${getScriptPath(id)} -$flag';
String get name {
switch (this) {
@@ -198,6 +219,7 @@ enum StatusCmdType {
'for f in /sys/class/power_supply/*/uevent; do cat "\$f"; echo; done'),
nvidia._('nvidia-smi -q -x'),
sensors._('sensors'),
cpuBrand._('cat /proc/cpuinfo | grep "model name"'),
;
final String cmd;
@@ -216,6 +238,7 @@ enum BSDStatusCmdType {
mem._('top -l 1 | grep PhysMem'),
//temp,
host._('hostname'),
cpuBrand._('sysctl -n machdep.cpu.brand_string'),
;
final String cmd;

View File

@@ -1,14 +1,16 @@
import 'dart:collection';
import 'package:fl_chart/fl_chart.dart';
import 'package:fl_lib/fl_lib.dart';
import 'package:server_box/data/model/server/time_seq.dart';
import 'package:server_box/data/res/status.dart';
/// Capacity of the FIFO queue
const _kCap = 30;
class Cpus extends TimeSeq<List<SingleCpuCore>> {
Cpus(super.init1, super.init2);
final Map<String, int> brand = {};
@override
void onUpdate() {
_coresCount = now.length;
@@ -23,10 +25,16 @@ class Cpus extends TimeSeq<List<SingleCpuCore>> {
double usedPercent({int coreIdx = 0}) {
if (now.length != pre.length) return 0;
final idleDelta = now[coreIdx].idle - pre[coreIdx].idle;
final totalDelta = now[coreIdx].total - pre[coreIdx].total;
final used = idleDelta / totalDelta;
return used.isNaN ? 0 : 100 - used * 100;
if (now.isEmpty) return 0;
try {
final idleDelta = now[coreIdx].idle - pre[coreIdx].idle;
final totalDelta = now[coreIdx].total - pre[coreIdx].total;
final used = idleDelta / totalDelta;
return used.isNaN ? 0 : 100 - used * 100;
} catch (e, s) {
Loggers.app.warning('Cpus.usedPercent()', e, s);
return 0;
}
}
int _coresCount = 0;
@@ -175,6 +183,22 @@ class SingleCpuCore extends TimeSeqIface<SingleCpuCore> {
}
}
final class CpuBrand {
static Map<String, int> parse(String raw) {
final lines = raw.split('\n');
// {brand: count}
final brands = <String, int>{};
for (var line in lines) {
if (line.contains('model name')) {
final model = line.split(':').last.trim();
final count = brands[model] ?? 0;
brands[model] = count + 1;
}
}
return brands;
}
}
final _bsdCpuPercentReg = RegExp(r'(\d+\.\d+)%');
/// TODO: Change this implementation to parse cpu status on BSD system

View File

@@ -1,5 +1,4 @@
import 'package:fl_lib/fl_lib.dart';
import 'package:server_box/core/extension/context/locale.dart';
final class SensorAdaptor {
final String raw;
@@ -37,7 +36,7 @@ final class SensorItem {
String get toMarkdown {
final sb = StringBuffer();
sb.writeln('| ${l10n.name} | ${l10n.content} |');
sb.writeln('| ${libL10n.name} | ${libL10n.content} |');
sb.writeln('| --- | --- |');
for (final entry in details.entries) {
sb.writeln('| ${entry.key} | ${entry.value} |');
@@ -80,9 +79,7 @@ final class SensorItem {
for (var idx = 2; idx < len; idx++) {
final part = sensorLines[idx];
final detailParts = part.split(':');
if (detailParts.length < 2) {
continue;
}
if (detailParts.length < 2) continue;
final key = detailParts[0].trim();
final value = detailParts[1].trim();
details[key] = value;

View File

@@ -1,8 +1,7 @@
import 'package:dartssh2/dartssh2.dart';
import 'package:fl_lib/fl_lib.dart';
import 'package:server_box/core/extension/context/locale.dart';
import 'package:server_box/data/model/app/error.dart';
import 'package:server_box/data/model/app/shell_func.dart';
import 'package:server_box/data/model/app/tag_pickable.dart';
import 'package:server_box/data/model/server/battery.dart';
import 'package:server_box/data/model/server/conn.dart';
import 'package:server_box/data/model/server/cpu.dart';
@@ -15,10 +14,6 @@ import 'package:server_box/data/model/server/server_private_info.dart';
import 'package:server_box/data/model/server/system.dart';
import 'package:server_box/data/model/server/temp.dart';
import '../app/tag_pickable.dart';
part 'server.ext.dart';
class Server implements TagPickable {
ServerPrivateInfo spi;
ServerStatus status;

View File

@@ -1,58 +0,0 @@
part of 'server.dart';
extension ServerX on Server {
String getTopRightStr(ServerPrivateInfo spi) {
switch (conn) {
case ServerConn.disconnected:
return l10n.disconnected;
case ServerConn.finished:
// Highest priority of temperature display
final cmdTemp = () {
final val = status.customCmds['server_card_top_right'];
if (val == null) return null;
// This returned value is used on server card top right, so it should
// be a single line string.
return val.split('\n').lastOrNull;
}();
final temperatureVal = () {
// Second priority
final preferTempDev = spi.custom?.preferTempDev;
if (preferTempDev != null) {
final preferTemp = status.sensors
.firstWhereOrNull((e) => e.device == preferTempDev)
?.summary
?.split(' ')
.firstOrNull;
if (preferTemp != null) {
return double.tryParse(preferTemp.replaceFirst('°C', ''));
}
}
// Last priority
final temp = status.temps.first;
if (temp != null) {
return temp;
}
return null;
}();
final upTime = status.more[StatusCmdType.uptime];
final items = [
cmdTemp ??
(temperatureVal != null
? '${temperatureVal.toStringAsFixed(1)}°C'
: null),
upTime
];
final str = items.where((e) => e != null && e.isNotEmpty).join(' | ');
if (str.isEmpty) return l10n.noResult;
return str;
case ServerConn.loading:
return l10n.serverTabLoading;
case ServerConn.connected:
return l10n.connected;
case ServerConn.connecting:
return l10n.serverTabConnecting;
case ServerConn.failed:
return status.err != null ? l10n.viewErr : l10n.serverTabFailed;
}
}
}

View File

@@ -42,6 +42,10 @@ class ServerPrivateInfo {
@HiveField(11)
final WakeOnLanCfg? wolCfg;
/// It only applies to SSH terminal.
@HiveField(12)
final Map<String, String>? envs;
final String id;
const ServerPrivateInfo({
@@ -57,6 +61,7 @@ class ServerPrivateInfo {
this.jumpId,
this.custom,
this.wolCfg,
this.envs,
}) : id = '$user@$ip:$port';
static ServerPrivateInfo fromJson(Map<String, dynamic> json) {
@@ -76,6 +81,15 @@ class ServerPrivateInfo {
final wolCfg = json["wolCfg"] == null
? null
: WakeOnLanCfg.fromJson(json["wolCfg"].cast<String, dynamic>());
final envs_ = json["envs"] as Map<String, dynamic>?;
final envs = <String, String>{};
if (envs_ != null) {
envs_.forEach((key, value) {
if (value is String) {
envs[key] = value;
}
});
}
return ServerPrivateInfo(
name: name,
@@ -90,6 +104,7 @@ class ServerPrivateInfo {
jumpId: jumpId,
custom: custom,
wolCfg: wolCfg,
envs: envs.isEmpty ? null : envs,
);
}
@@ -123,6 +138,9 @@ class ServerPrivateInfo {
if (wolCfg != null) {
data["wolCfg"] = wolCfg?.toJson();
}
if (envs != null) {
data["envs"] = envs;
}
return data;
}
@@ -162,6 +180,28 @@ class ServerPrivateInfo {
String toString() {
return id;
}
static const example = ServerPrivateInfo(
name: 'name',
ip: 'ip',
port: 22,
user: 'root',
pwd: 'pwd',
keyId: 'private_key_id',
tags: ['tag1', 'tag2'],
alterUrl: 'user@ip:port',
autoConnect: true,
jumpId: 'jump_server_id',
custom: ServerCustom(
pveAddr: 'http://localhost:8006',
pveIgnoreCert: false,
cmds: {
'echo': 'echo hello',
},
preferTempDev: 'nvme-pci-0400',
logoUrl: 'https://example.com/logo.png',
),
);
}
class _IpPort {

View File

@@ -29,13 +29,14 @@ class ServerPrivateInfoAdapter extends TypeAdapter<ServerPrivateInfo> {
jumpId: fields[9] as String?,
custom: fields[10] as ServerCustom?,
wolCfg: fields[11] as WakeOnLanCfg?,
envs: (fields[12] as Map?)?.cast<String, String>(),
);
}
@override
void write(BinaryWriter writer, ServerPrivateInfo obj) {
writer
..writeByte(12)
..writeByte(13)
..writeByte(0)
..write(obj.name)
..writeByte(1)
@@ -59,7 +60,9 @@ class ServerPrivateInfoAdapter extends TypeAdapter<ServerPrivateInfo> {
..writeByte(10)
..write(obj.custom)
..writeByte(11)
..write(obj.wolCfg);
..write(obj.wolCfg)
..writeByte(12)
..write(obj.envs);
}
@override

View File

@@ -71,6 +71,9 @@ Future<ServerStatus> _getLinuxStatus(ServerStatusUpdateReq req) async {
try {
final cpus = SingleCpuCore.parse(StatusCmdType.cpu.find(segments));
req.ss.cpu.update(cpus);
final brand = CpuBrand.parse(StatusCmdType.cpuBrand.find(segments));
req.ss.cpu.brand.clear();
req.ss.cpu.brand.addAll(brand);
} catch (e, s) {
Loggers.app.warning(e, s);
}

View File

@@ -183,6 +183,14 @@ class Snippet implements TagPickable {
r'${ctrl': TerminalKey.control,
r'${alt': TerminalKey.alt,
};
static const example = Snippet(
name: 'example',
script: 'echo hello',
tags: ['tag'],
note: 'note',
autoRunOn: ['server_id'],
);
}
class SnippetResult {

View File

@@ -1,11 +1,4 @@
import 'dart:async';
import 'package:fl_lib/fl_lib.dart';
import 'package:server_box/data/res/store.dart';
import '../../../core/utils/server.dart';
import '../server/server_private_info.dart';
import 'worker.dart';
part of 'worker.dart';
class SftpReq {
final ServerPrivateInfo spi;
@@ -69,9 +62,8 @@ class SftpReqStatus {
int get hashCode => id ^ super.hashCode;
void dispose() {
// ignore: deprecated_member_use_from_same_package
worker.dispose();
completer?.complete();
worker._dispose();
completer?.complete(true);
}
void onNotify(dynamic event) {

View File

@@ -5,9 +5,12 @@ import 'dart:typed_data';
import 'package:dartssh2/dartssh2.dart';
import 'package:easy_isolate/easy_isolate.dart';
import 'package:fl_lib/fl_lib.dart';
import 'package:server_box/core/utils/server.dart';
import 'package:server_box/data/model/server/server_private_info.dart';
import 'package:server_box/data/res/store.dart';
import '../../../core/utils/server.dart';
import 'req.dart';
part 'req.dart';
class SftpWorker {
final Function(Object event) onNotify;
@@ -20,14 +23,7 @@ class SftpWorker {
required this.req,
});
/// Use [@Deprecated] to prevent calling [SftpWorker.dispose] directly
///
/// Don't delete this method
@Deprecated(
"Use [SftpWorkerStatus.dispose] to dispose the worker, "
"instead of [SftpWorker.dispose]",
)
void dispose() {
void _dispose() {
worker.dispose();
}

View File

@@ -1,5 +1,5 @@
import 'dart:async';
import 'dart:io';
// import 'dart:io';
import 'package:computer/computer.dart';
import 'package:dartssh2/dartssh2.dart';
@@ -10,8 +10,8 @@ import 'package:server_box/core/utils/ssh_auth.dart';
import 'package:server_box/data/model/app/error.dart';
import 'package:server_box/data/model/app/shell_func.dart';
import 'package:server_box/data/model/server/system.dart';
import 'package:server_box/data/model/sftp/req.dart';
import 'package:server_box/data/res/provider.dart';
// import 'package:server_box/data/model/sftp/req.dart';
// import 'package:server_box/data/res/provider.dart';
import 'package:server_box/data/res/store.dart';
import '../../core/utils/server.dart';
@@ -26,8 +26,8 @@ class ServerProvider extends ChangeNotifier {
Iterable<Server> get servers => _servers.values;
final List<String> _serverOrder = [];
List<String> get serverOrder => _serverOrder;
final _tags = ValueNotifier(<String>[]);
ValueNotifier<List<String>> get tags => _tags;
final _tags = ValueNotifier(<String>{});
ValueNotifier<Set<String>> get tags => _tags;
Timer? _timer;
@@ -85,7 +85,6 @@ class ServerProvider extends ChangeNotifier {
}
void _updateTags() {
_tags.value.clear();
for (final s in _servers.values) {
if (s.spi.tags == null) continue;
for (final t in s.spi.tags!) {
@@ -94,21 +93,7 @@ class ServerProvider extends ChangeNotifier {
}
}
}
_tags.value.sort();
_tags.notifyListeners();
}
void renameTag(String old, String new_) {
for (final s in _servers.values) {
if (s.spi.tags == null) continue;
for (var i = 0; i < s.spi.tags!.length; i++) {
if (s.spi.tags![i] == old) {
s.spi.tags![i] = new_;
}
}
Stores.server.update(s.spi, s.spi);
}
_updateTags();
_tags.value = (_tags.value.toList()..sort()).toSet();
}
Server genServer(ServerPrivateInfo spi) {
@@ -313,66 +298,41 @@ class ServerProvider extends ChangeNotifier {
_setServerState(s, ServerConn.connected);
// Write script to server
// by ssh
final scriptRaw = ShellFunc.allScript(spi.custom?.cmds).uint8List;
try {
await s.client?.runForOutput(
ShellFunc.installShellCmd,
final writeScriptResult = await s.client!.runForOutput(
ShellFunc.getInstallShellCmd(spi.id),
action: (session) async {
session.stdin.add(scriptRaw);
session.stdin.close();
},
);
if (writeScriptResult.isNotEmpty) {
ShellFunc.switchScriptDir(spi.id);
throw String.fromCharCodes(writeScriptResult);
}
} on SSHAuthAbortError catch (e) {
TryLimiter.inc(sid);
s.status.err = SSHErr(type: SSHErrType.auth, message: e.toString());
final err = SSHErr(type: SSHErrType.auth, message: e.toString());
s.status.err = err;
Loggers.app.warning(err);
_setServerState(s, ServerConn.failed);
return;
} on SSHAuthFailError catch (e) {
TryLimiter.inc(sid);
s.status.err = SSHErr(type: SSHErrType.auth, message: e.toString());
final err = SSHErr(type: SSHErrType.auth, message: e.toString());
s.status.err = err;
Loggers.app.warning(err);
_setServerState(s, ServerConn.failed);
return;
} catch (e) {
Loggers.app.warning('Write script to ${spi.name} by shell', e);
/// by sftp
final localPath = Paths.doc.joinPath('install.sh');
final file = File(localPath);
try {
file.writeAsBytes(scriptRaw);
final completer = Completer();
final homePath = (await s.client?.run('echo \$HOME').string)?.trim();
if (homePath == null || homePath.isEmpty) {
throw Exception('Got empty home path');
}
final reqId = Pros.sftp.add(
SftpReq(
spi,
ShellFunc.scriptPath,
localPath,
SftpReqType.upload,
),
completer: completer,
);
await completer.future;
final err = Pros.sftp.get(reqId)?.error;
if (err != null) {
throw err;
}
} catch (ee) {
TryLimiter.inc(sid);
s.status.err = SSHErr(
type: SSHErrType.writeScript,
message: '$e\n\n$ee',
);
_setServerState(s, ServerConn.failed);
Loggers.app.warning('Write script to ${spi.name} by sftp', ee);
return;
} finally {
if (await file.exists()) await file.delete();
}
// If max try times < 2 and can't write script, this will stop the status getting and etc.
// TryLimiter.inc(sid);
final err = SSHErr(type: SSHErrType.writeScript, message: e.toString());
s.status.err = err;
Loggers.app.warning(err);
_setServerState(s, ServerConn.failed);
}
}
@@ -389,7 +349,7 @@ class ServerProvider extends ChangeNotifier {
String? raw;
try {
raw = await s.client?.run(ShellFunc.status.exec).string;
raw = await s.client?.run(ShellFunc.status.exec(spi.id)).string;
segments = raw?.split(ShellFunc.seperator).map((e) => e.trim()).toList();
if (raw == null || raw.isEmpty || segments == null || segments.isEmpty) {
if (Stores.setting.keepStatusWhenErr.fetch()) {
@@ -462,26 +422,4 @@ class ServerProvider extends ChangeNotifier {
// reset try times only after prepared successfully
TryLimiter.reset(sid);
}
// Future<SnippetResult?> runSnippet(String id, Snippet snippet) async {
// final server = _servers[id];
// if (server == null) return null;
// final watch = Stopwatch()..start();
// final result = await server.client?.run(snippet.fmtWithArgs(server.spi)).string;
// final time = watch.elapsed;
// watch.stop();
// if (result == null) return null;
// return SnippetResult(
// dest: _servers[id]?.spi.name,
// result: result,
// time: time,
// );
// }
// Future<List<SnippetResult?>> runSnippetsMulti(
// List<String> ids,
// Snippet snippet,
// ) async {
// return await Future.wait(ids.map((id) async => runSnippet(id, snippet)));
// }
}

View File

@@ -1,8 +1,7 @@
import 'dart:async';
import 'package:flutter/material.dart';
import '../model/sftp/req.dart';
import 'package:server_box/data/model/sftp/worker.dart';
class SftpProvider extends ChangeNotifier {
final List<SftpReqStatus> _status = [];

View File

@@ -9,8 +9,7 @@ class SnippetProvider extends ChangeNotifier {
late List<Snippet> _snippets;
List<Snippet> get snippets => _snippets;
final _tags = ValueNotifier(<String>[]);
ValueNotifier<List<String>> get tags => _tags;
final tags = ValueNotifier(<String>{});
void load() {
_snippets = Stores.snippet.fetch();
@@ -29,16 +28,14 @@ class SnippetProvider extends ChangeNotifier {
}
void _updateTags() {
_tags.value.clear();
final tags = <String>{};
final tags_ = <String>{};
for (final s in _snippets) {
if (s.tags?.isEmpty ?? true) {
continue;
final t = s.tags;
if (t != null) {
tags_.addAll(t);
}
tags.addAll(s.tags!);
}
_tags.value.addAll(tags);
_tags.notifyListeners();
tags.value = tags_;
}
void add(Snippet snippet) {

View File

@@ -2,6 +2,6 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 1018;
static const int script = 51;
static const int build = 1051;
static const int script = 56;
}

View File

@@ -9,17 +9,20 @@ abstract final class GithubIds {
'azkadev',
'kalashnikov',
'calvinweb',
'No06',
'QazCetelic',
'RainSunMe',
'FrancXPT',
'Liloupar',
'dccif',
'mikropsoft',
};
static const participants = <GhId>{
'jaychoubaby',
'fecture',
'Tao173',
'Jasonzhu1207',
'QingAnLe',
'wxdjs',
'Aeorq',
@@ -72,7 +75,6 @@ abstract final class GithubIds {
'pgs666',
'FHU-yezi',
'ZRY233',
'Jasonzhu1207',
'sakuraanzu',
'licaon-kter',
'77160860',
@@ -84,6 +86,17 @@ abstract final class GithubIds {
'Mooling0602',
'IllTamer',
'marlkiller',
'hlarc',
'itsandrewpao',
'StudyingLover',
'QJAG1024',
'Wuming-HUST',
'WolfCanglong',
'liwenjie119',
'logce',
'h-lyf',
'88484396',
'honggeigei',
};
}

View File

@@ -1,4 +1,3 @@
import 'package:fl_lib/fl_lib.dart';
import 'package:server_box/data/provider/app.dart';
import 'package:server_box/data/provider/private_key.dart';
import 'package:server_box/data/provider/server.dart';
@@ -7,7 +6,6 @@ import 'package:server_box/data/provider/snippet.dart';
abstract final class Pros {
static final app = AppProvider();
static final debug = DebugProvider(maxLines: 177);
static final key = PrivateKeyProvider();
static final server = ServerProvider();
static final sftp = SftpProvider();

View File

@@ -16,28 +16,16 @@ class SettingStore extends PersistentStore {
// item in the drawer of the home page)
/// Discussion #146
late final serverTabUseOldUI = property(
'serverTabUseOldUI',
false,
);
late final serverTabUseOldUI = property('serverTabUseOldUI', false);
/// Time out for server connect and more...
late final timeout = property(
'timeOut',
5,
);
late final timeout = property('timeOut', 5);
/// Record history of SFTP path and etc.
late final recordHistory = property(
'recordHistory',
true,
);
late final recordHistory = property('recordHistory', true);
/// Lanch page idx
late final launchPage = property(
'launchPage',
Defaults.launchPageIdx,
);
// late final launchPage = property('launchPage', Defaults.launchPageIdx);
/// Disk view: amount / IO
late final serverTabPreferDiskAmount = property(
@@ -50,15 +38,10 @@ class SettingStore extends PersistentStore {
/// Bigger for bigger font size
/// 1.0 means 100%
/// Warning: This may cause some UI issues
late final textFactor = property(
'textFactor',
1.0,
);
late final textFactor = property('textFactor', 1.0);
late final primaryColor = property(
'primaryColor',
4287106639,
);
/// The seed of color scheme
late final colorSeed = property('primaryColor', 4287106639);
late final serverStatusUpdateInterval = property(
'serverStatusUpdateInterval',
@@ -100,25 +83,14 @@ class SettingStore extends PersistentStore {
late final editorFontSize = property('editorFontSize', 12.5);
// Editor theme
late final editorTheme = property(
'editorTheme',
Defaults.editorTheme,
);
late final editorTheme = property('editorTheme', Defaults.editorTheme);
late final editorDarkTheme = property(
'editorDarkTheme',
Defaults.editorDarkTheme,
);
late final editorDarkTheme =
property('editorDarkTheme', Defaults.editorDarkTheme);
late final fullScreen = property(
'fullScreen',
false,
);
late final fullScreen = property('fullScreen', false);
late final fullScreenJitter = property(
'fullScreenJitter',
true,
);
late final fullScreenJitter = property('fullScreenJitter', true);
// late final fullScreenRotateQuarter = property(
// 'fullScreenRotateQuarter',
@@ -135,53 +107,29 @@ class SettingStore extends PersistentStore {
VirtKey.defaultOrder.map((e) => e.index).toList(),
);
late final netViewType = property(
'netViewType',
NetViewType.speed,
);
late final netViewType = property('netViewType', NetViewType.speed);
// Only valid on iOS
late final autoUpdateHomeWidget = property(
'autoUpdateHomeWidget',
isIOS,
);
late final autoUpdateHomeWidget = property('autoUpdateHomeWidget', isIOS);
late final autoCheckAppUpdate = property(
'autoCheckAppUpdate',
true,
);
late final autoCheckAppUpdate = property('autoCheckAppUpdate', true);
/// Display server tab function buttons on the bottom of each server card if [true]
///
/// Otherwise, display them on the top of server detail page
late final moveOutServerTabFuncBtns = property(
'moveOutServerTabFuncBtns',
true,
);
late final moveServerFuncs = property('moveOutServerTabFuncBtns', false);
/// Whether use `rm -r` to delete directory on SFTP
late final sftpRmrDir = property(
'sftpRmrDir',
false,
);
late final sftpRmrDir = property('sftpRmrDir', false);
/// Whether use system's primary color as the app's primary color
late final useSystemPrimaryColor = property(
'useSystemPrimaryColor',
false,
);
late final useSystemPrimaryColor = property('useSystemPrimaryColor', false);
/// Only valid on iOS and macOS
late final icloudSync = property(
'icloudSync',
false,
);
late final icloudSync = property('icloudSync', false);
/// Only valid on iOS / Android / Windows
late final useBioAuth = property(
'useBioAuth',
false,
);
late final useBioAuth = property('useBioAuth', false);
/// The performance of highlight is bad
late final editorHighlight = property('editorHighlight', true);
@@ -284,6 +232,10 @@ class SettingStore extends PersistentStore {
late final letterCache = property('letterCache', false);
/// Set it to `$EDITOR`, `vim` and etc. to use remote system editor in SSH terminal.
/// Set it empty to use local editor GUI.
late final sftpEditor = property('sftpEditor', '');
// Never show these settings for users
//
// ------BEGIN------

View File

@@ -7,8 +7,6 @@ final class _IntroPage extends StatelessWidget {
static const _builders = {
1: _buildAppSettings,
2: _buildRecommended,
1006: _buildTermLetterCache,
};
@override
@@ -18,64 +16,20 @@ final class _IntroPage extends StatelessWidget {
final padTop = cons.maxHeight * .16;
final pages_ = pages.map((e) => e(context, padTop)).toList();
return IntroPage(
pages: pages_,
onDone: (ctx) {
Stores.setting.introVer.put(BuildData.build);
Navigator.of(ctx).pushReplacement(
MaterialPageRoute(builder: (_) => const HomePage()),
);
},
args: IntroPageArgs(
pages: pages_,
onDone: (ctx) {
Stores.setting.introVer.put(BuildData.build);
Navigator.of(ctx).pushReplacement(
MaterialPageRoute(builder: (_) => const HomePage()),
);
},
),
);
},
);
}
static Widget _buildTermLetterCache(BuildContext context, double padTop) {
return ListView(
padding: _introListPad,
children: [
SizedBox(height: padTop),
IntroPage.title(icon: BoxIcons.bxs_terminal, big: true),
SizedBox(height: padTop),
ListTile(
leading: const Icon(Bootstrap.input_cursor),
title: Text(l10n.letterCache),
subtitle: Text(l10n.letterCacheTip, style: UIs.textGrey),
trailing: StoreSwitch(prop: _setting.letterCache),
).cardx,
],
);
}
static Widget _buildRecommended(BuildContext context, double padTop) {
return ListView(
padding: _introListPad,
children: [
SizedBox(height: padTop),
IntroPage.title(icon: Bootstrap.stars, big: true),
SizedBox(height: padTop),
ListTile(
leading: const Icon(MingCute.delete_2_fill),
title: const Text('rm -r'),
subtitle: Text(l10n.sftpRmrDirSummary, style: UIs.textGrey),
trailing: StoreSwitch(prop: _setting.sftpRmrDir),
).cardx,
ListTile(
leading: const Icon(IonIcons.stats_chart, size: _kIconSize),
title: Text(l10n.parseContainerStats),
subtitle: Text(l10n.parseContainerStatsTip, style: UIs.textGrey),
trailing: StoreSwitch(prop: _setting.containerParseStat),
).cardx,
ListTile(
leading: const Icon(OctIcons.cpu),
title: Text(l10n.noLineChartForCpu),
subtitle: Text(l10n.cpuViewAsProgressTip, style: UIs.textGrey),
trailing: StoreSwitch(prop: _setting.cpuViewAsProgress),
).cardx,
],
);
}
static Widget _buildAppSettings(BuildContext ctx, double padTop) {
return ListView(
padding: _introListPad,
@@ -85,12 +39,12 @@ final class _IntroPage extends StatelessWidget {
SizedBox(height: padTop),
ListTile(
leading: const Icon(IonIcons.language),
title: Text(l10n.language),
title: Text(libL10n.language),
onTap: () async {
final selected = await ctx.showPickSingleDialog(
title: l10n.language,
title: libL10n.language,
items: AppLocalizations.supportedLocales,
name: (p0) => p0.code,
name: (p0) => p0.nativeName,
initial: _setting.locale.fetch().toLocale,
);
if (selected != null) {
@@ -99,16 +53,37 @@ final class _IntroPage extends StatelessWidget {
}
},
trailing: Text(
l10n.languageName,
ctx.localeNativeName,
style: const TextStyle(fontSize: 15, color: Colors.grey),
),
).cardx,
ListTile(
leading: const Icon(Icons.update),
title: Text(l10n.autoCheckUpdate),
title: Text(libL10n.autoCheckUpdate),
subtitle: Text(l10n.fdroidReleaseTip, style: UIs.textGrey),
trailing: StoreSwitch(prop: _setting.autoCheckAppUpdate),
).cardx,
ListTile(
leading: const Icon(MingCute.delete_2_fill),
title: TipText('rm -r', l10n.sftpRmrDirSummary),
trailing: StoreSwitch(prop: _setting.sftpRmrDir),
).cardx,
ListTile(
leading: const Icon(MingCute.chart_line_line, size: _kIconSize),
title: TipText(l10n.stat, l10n.parseContainerStatsTip),
trailing: StoreSwitch(prop: _setting.containerParseStat),
).cardx,
ListTile(
leading: const Icon(OctIcons.cpu),
title: TipText(l10n.noLineChartForCpu, l10n.cpuViewAsProgressTip),
trailing: StoreSwitch(prop: _setting.cpuViewAsProgress),
).cardx,
ListTile(
leading: const Icon(Bootstrap.alphabet),
title: TipText(l10n.letterCache, l10n.letterCacheTip),
trailing: StoreSwitch(prop: _setting.letterCache),
).cardx,
UIs.height77,
],
);
}

View File

@@ -1,84 +1,42 @@
{
"@@locale": "de",
"about": "Über",
"aboutThanks": "Vielen Dank an die folgenden Personen, die daran teilgenommen haben.\n",
"acceptBeta": "Akzeptieren Sie Testversion-Updates",
"add": "Neu",
"addAServer": "Server hinzufügen",
"addPrivateKey": "Private key hinzufügen",
"addSystemPrivateKeyTip": "Derzeit haben Sie keinen privaten Schlüssel, fügen Sie den Schlüssel hinzu, der mit dem System geliefert wird (~/.ssh/id_rsa)?",
"added2List": "Zur Aufgabenliste hinzugefügt",
"addr": "Adresse",
"all": "Alle",
"alreadyLastDir": "Bereits im letzten Verzeichnis.",
"askContinue": "{msg}. Weiter?",
"attention": "Achtung",
"authFailTip": "Authentifizierung fehlgeschlagen, bitte überprüfen Sie, ob das Passwort/Schlüssel/Host/Benutzer usw. falsch sind.",
"authRequired": "Autorisierung erforderlich",
"auto": "System folgen",
"autoBackupConflict": "Es kann nur eine automatische Sicherung gleichzeitig aktiviert werden.",
"autoCheckUpdate": "Aktualisierung automatisch prüfen",
"autoConnect": "Automatisch verbinden",
"autoRun": "Automatischer Start",
"autoUpdateHomeWidget": "Home-Widget automatisch aktualisieren",
"backup": "Backup",
"backupTip": "Das Backup wird nur einfach verschlüsselt.\nBitte bewahre die Datei sicher auf.",
"backupVersionNotMatch": "Die Backup-Version stimmt nicht überein.",
"battery": "Batterie",
"bgRun": "Hintergrundaktualisierung",
"bgRunTip": "Dieser Schalter bedeutet nur, dass die App versuchen wird, im Hintergrund zu laufen. Ob sie im Hintergrund laufen kann, hängt davon ab, ob die Berechtigungen aktiviert sind oder nicht. Bei nativem Android deaktivieren Sie bitte \"Batterieoptimierung\" in dieser App, und bei miui ändern Sie bitte die Energiesparrichtlinie auf \"Unbegrenzt\".",
"bioAuth": "Biozertifizierung",
"browser": "Browser",
"bulkImportServers": "Server im Batch importieren",
"bulkImportServersTip": "Sie können das [Format]({url}) hier finden.",
"canPullRefresh": "Danach: herunterziehen zum Aktualisieren",
"cancel": "Abbrechen",
"choose": "Auswählen",
"chooseFontFile": "Schriftart auswählen",
"choosePrivateKey": "Private key auswählen",
"clear": "Entfernen",
"clipboard": "Zwischenablage",
"close": "Schließen",
"cmd": "Command",
"cnKeyboardComp": "Kompatibilität mit chinesischem Android",
"cnKeyboardCompTip": "Wenn das Terminal ein sicheres Tastenfeld öffnet, können Sie es aktivieren.",
"collapseUI": "Zusammenbrechen",
"collapseUITip": "Ob lange Listen in der Benutzeroberfläche standardmäßig eingeklappt werden sollen oder nicht",
"conn": "Verbindung",
"connected": "in Verbindung gebracht",
"container": "Container",
"containerName": "Container Name",
"containerStatus": "Container Status",
"containerTrySudoTip": "Zum Beispiel: In der App ist der Benutzer auf aaa eingestellt, aber Docker ist unter dem Root-Benutzer installiert. In diesem Fall müssen Sie diese Option aktivieren",
"content": "Inhalt",
"convert": "Konvertieren",
"copy": "Kopieren",
"copyPath": "Pfad kopieren",
"cpuViewAsProgressTip": "Zeigen Sie die Auslastung jedes CPUs in einem Fortschrittsbalken-Stil an (alter Stil)",
"createFile": "Datei erstellen",
"createFolder": "Ordner erstellen",
"cursorType": "Cursor-Typ",
"customCmd": "Benutzerdefinierte Befehle",
"customCmdDocUrl": "https://github.com/lollipopkit/flutter_server_box/wiki#custom-commands",
"customCmdHint": "\"Befehlsname\": \"Befehl\"",
"dark": "Dunkel",
"day": "Tag",
"debug": "Debug",
"decode": "Decode",
"decompress": "Dekomprimieren",
"delete": "Löschen",
"deleteServers": "Batch-Löschung von Servern",
"deviceName": "Gerätename",
"dirEmpty": "Stelle sicher, dass der Ordner leer ist.",
"disabled": "Behinderte",
"disconnected": "Disconnected",
"disk": "Festplatte",
"diskIgnorePath": "Pfad für Datenträger ignorieren",
"displayCpuIndex": "Zeigen Sie den CPU-Index an",
"displayName": "Name anzeigen",
"dl2Local": "Datei \"{fileName}\" herunterladen?",
"doc": "Dokumentation",
"dockerEditHost": "DOCKER_HOST bearbeiten",
"dockerEmptyRunningItems": "Es gibt keine laufenden Container.\nDas könnte daran liegen:\n- Der Docker-Installationsbenutzer ist nicht mit dem in der App konfigurierten Benutzernamen identisch.\n- Die Umgebungsvariable DOCKER_HOST wurde nicht korrekt gelesen. Sie können sie ermitteln, indem Sie `echo $DOCKER_HOST` im Terminal ausführen.",
"dockerImagesFmt": "{count} Image(s)",
"dockerNotInstalled": "Docker ist nicht installiert",
@@ -86,39 +44,24 @@
"dockerStatusRunningFmt": "{count} Container aktiv",
"doubleColumnMode": "Doppelspaltiger Modus",
"doubleColumnTip": "Diese Option aktiviert nur die Funktion, ob sie tatsächlich aktiviert werden kann, hängt auch von der Breite des Geräts ab",
"download": "Download",
"edit": "Bearbeiten",
"editVirtKeys": "Virtuelle Tasten bearbeiten",
"editor": "Editor",
"editorHighlightTip": "Die Leistung der aktuellen Codehervorhebung ist schlechter und kann zur Verbesserung optional ausgeschaltet werden.",
"encode": "Encode",
"error": "Fehler",
"exampleName": "Servername",
"envVars": "Umgebungsvariable",
"experimentalFeature": "Experimentelles Feature",
"export": "Export",
"extraArgs": "Extra args",
"failed": "Failed",
"fallbackSshDest": "SSH-Fallback-Ziel",
"fdroidReleaseTip": "Wenn Sie diese App von F-Droid heruntergeladen haben, wird empfohlen, diese Option zu deaktivieren.",
"feedback": "Feedback",
"feedbackOnGithub": "Wenn du Fragen hast, stelle diese bitte auf Github.",
"fieldMustNotEmpty": "Die Eingabefelder dürfen nicht leer sein.",
"fileNotExist": "{file} existiert nicht",
"fileTooLarge": "Datei '{file}' ist zu groß {size}, max {sizeMax}",
"files": "Dateien",
"finished": "fertiggestellt",
"followSystem": "System verfolgen",
"font": "Schriftarten",
"fontSize": "Schriftgröße",
"forExample": "Zum Beispiel",
"force": "freiwillig",
"foundNUpdate": "Update {count} gefunden",
"fullScreen": "Vollbildmodus",
"fullScreenJitter": "Jitter im Vollbildmodus",
"fullScreenJitterHelp": "Einbrennen des Bildschirms verhindern",
"fullScreenTip": "Soll der Vollbildmodus aktiviert werden, wenn das Gerät in den Quermodus gedreht wird? Diese Option gilt nur für die Server-Registerkarte.",
"getPushTokenFailed": "Push-Token kann nicht abgerufen werden",
"gettingToken": "Getting token...",
"goBackQ": "Zurückkommen?",
"goto": "Pfad öffnen",
"hideTitleBar": "Titelleiste ausblenden",
@@ -126,40 +69,24 @@
"highlight": "Code highlight",
"homeWidgetUrlConfig": "Home-Widget-Link konfigurieren",
"host": "Host",
"hour": "Stunde",
"httpFailedWithCode": "Anfrage fehlgeschlagen, Statuscode: {code}",
"icloudSynced": "iCloud wird synchronisiert und einige Einstellungen erfordern möglicherweise einen Neustart der App, um wirksam zu werden.",
"ignoreCert": "Zertifikat ignorieren",
"image": "Image",
"imagesList": "Images",
"import": "Importieren",
"inAppUpdate": "Im App aktualisieren? Andernfalls mit einem Browser herunterladen.",
"init": "Initialisieren",
"inner": "Eingebaut",
"inputDomainHere": "Domain eingeben",
"install": "install",
"installDockerWithUrl": "Bitte installiere docker zuerst. https://docs.docker.com/engine/install",
"invalid": "Ungültig",
"invalidJson": "Ungültige JSON",
"invalidVersion": "Ungültige Version",
"invalidVersionHelp": "Bitte stelle sicher, dass Docker korrekt installiert ist oder dass du eine nicht selbstkompilierte Version verwendest. Wenn du die oben genannten Probleme nicht hast, melde bitte einen Fehler auf {url}.",
"isBusy": "Is busy now",
"jumpServer": "Server springen",
"keepForeground": "Stelle sicher, dass die App geöffnet bleibt.",
"keepStatusWhenErr": "Den letzten Serverstatus beibehalten",
"keepStatusWhenErrTip": "Nur im Fehlerfall während der Ausführung des Skripts",
"keyAuth": "Schlüsselauthentifzierung",
"language": "Sprache",
"languageName": "Deutsch",
"lastTry": "Letzter Versuch",
"launchPage": "Startseite",
"letterCache": "Buchstaben-Caching",
"letterCacheTip": "Empfohlen zu aktivieren, aber die Aktivierung verhindert die Eingabe von CJK (Chinesisch, Japanisch, Koreanisch) Zeichen",
"letterCacheTip": "Empfohlen, zu deaktivieren, aber nach dem Deaktivieren können keine CJK-Zeichen eingegeben werden.",
"license": "Lizenzen",
"light": "Hell",
"loadingFiles": "Lädt Dateien...",
"location": "Standort",
"log": "Log",
"loss": "loss",
"madeWithLove": "Erstellt mit ❤️ von {myGithub}",
"manual": "Handbuch",
@@ -167,62 +94,36 @@
"maxRetryCount": "Anzahl an Verbindungsversuchen",
"maxRetryCountEqual0": "Unbegrenzte Verbindungsversuche zum Server",
"min": "min",
"minute": "Minute",
"mission": "Mission",
"more": "Mehr",
"moveOutServerFuncBtnsHelp": "Ein: kann unter jeder Karte auf der Registerkarte \"Server\" angezeigt werden. Aus: kann oben auf der Seite \"Serverdetails\" angezeigt werden.",
"ms": "ms",
"name": "Name",
"needHomeDir": "Wenn Sie ein Synology-Benutzer sind, [sehen Sie hier](https://kb.synology.com/DSM/tutorial/user_enable_home_service). Benutzer anderer Systeme müssen suchen, wie man ein Home-Verzeichnis erstellt.",
"needRestart": "App muss neugestartet werden",
"net": "Netzwerk",
"netViewType": "Netzwerkansicht Typ",
"newContainer": "Neuer Container",
"noClient": "Kein Client",
"noInterface": "Kein Interface",
"noLineChart": "Verwenden Sie keine Liniendiagramme",
"noLineChartForCpu": "Verwenden Sie keine Liniendiagramme für CPU",
"noNotiPerm": "Keine Benachrichtigungsrechte, möglicherweise keine Fortschrittsanzeige beim Herunterladen von App-Updates.",
"noOptions": "Keine Optionen verfügbar",
"noPrivateKeyTip": "Der private Schlüssel existiert nicht, möglicherweise wurde er gelöscht oder es liegt ein Konfigurationsfehler vor.",
"noPromptAgain": "Nicht mehr nachfragen",
"noResult": "Kein Ergebnis",
"noSavedPrivateKey": "Keine gespeicherten Private Keys",
"noSavedSnippet": "Keine gespeicherten Snippets.",
"noServerAvailable": "Kein Server verfügbar.",
"noTask": "Nicht fragen",
"noUpdateAvailable": "Kein Update verfügbar",
"node": "Knoten",
"notAvailable": "Nicht verfügbar",
"notSelected": "Nicht ausgewählt",
"note": "Hinweis",
"nullToken": "Null token",
"ok": "OK",
"onServerDetailPage": "in Detailansicht des Servers",
"onlyOneLine": "Nur als eine Zeile anzeigen (scrollbar)",
"onlyWhenCoreBiggerThan8": "Wirksam nur, wenn die Anzahl der Kerne > 8 ist.",
"open": "Öffnen",
"openLastPath": "Öffnen Sie den letzten Pfad",
"openLastPathTip": "Verschiedene Server haben unterschiedliche Einträge, und der Eintrag ist der Pfad zum Ausgang",
"parseContainerStats": "Den Status der Container-Belegung analysieren",
"parseContainerStatsTip": "Das Analysieren des Belegungsstatus durch Docker ist relativ langsam",
"paste": "Einfügen",
"path": "Pfad",
"percentOfSize": "{percent}% von {size}",
"permission": "Berechtigungen",
"pickFile": "Datei wählen",
"pingAvg": "Avg:",
"pingInputIP": "Bitte gib eine Ziel-IP/Domain ein.",
"pingNoServer": "Kein Server zum Anpingen.\nBitte füge einen Server hinzu.",
"pkg": "Pkg",
"pkgUpgradeTip": "Bitte sichern Sie Ihr System vor dem Update.",
"platformNotSupportUpdate": "Die aktuelle Plattform unterstützt keine In-App-Updates.\nBitte kompiliere vom Quellcode und installiere sie.",
"plugInType": "Einfügetyp",
"plzEnterHost": "Bitte Host eingeben.",
"plzSelectKey": "Wähle einen Key.",
"port": "Port",
"preview": "Vorschau",
"primaryColorSeed": "Farbschema",
"privateKey": "Private Key",
"process": "Prozess",
"pushToken": "Push Token",
@@ -232,16 +133,11 @@
"pwd": "Passwort",
"read": "Lesen",
"reboot": "Neustart",
"rememberChoice": "Auswahl merken",
"rememberPwdInMem": "Passwort im Speicher behalten",
"rememberPwdInMemTip": "Für Container, Aufhängen usw.",
"rememberWindowSize": "Fenstergröße merken",
"remotePath": "Entfernte Pfade",
"rename": "Umbenennen",
"reportBugsOnGithubIssue": "Bitte Bugs auf {url} melden",
"restart": "Neustart",
"restore": "Wiederherstellen",
"restoreSuccess": "Wiederherstellung erfolgreich. App neustarten um Änderungen anzuwenden.",
"result": "Result",
"rotateAngel": "Rotationswinkel",
"route": "Routen",
@@ -256,14 +152,8 @@
"serverDetailOrder": "Reihenfolge der Widgets auf der Detailseite",
"serverFuncBtns": "Server-Funktionsschaltflächen",
"serverOrder": "Server-Bestellung",
"serverTabConnecting": "Verbinden...",
"serverTabEmpty": "Keine Server vorhanden.",
"serverTabFailed": "Fehlgeschlagen",
"serverTabLoading": "Lädt...",
"serverTabPlzSave": "Bitte 'speichere' diesen privaten Schlüssel erneut.",
"serverTabUnkown": "Unbekannter Status",
"setting": "Einstellungen",
"sftpDlPrepare": "Verbindung vorbereiten...",
"sftpEditorTip": "Wenn leer, verwenden Sie den im App integrierten Dateieditor. Wenn ein Wert vorhanden ist, wird der Editor des Remote-Servers verwendet, z.B. `vim` (es wird empfohlen, automatisch gemäß `EDITOR` zu ermitteln).",
"sftpRmrDirSummary": "Verwenden Sie \"rm -r\", um das Verzeichnis in SFTP zu löschen.",
"sftpSSHConnected": "SFTP Verbunden",
"sftpShowFoldersFirst": "Ordner zuerst anzeigen",
@@ -278,11 +168,11 @@
"sshTip": "Diese Funktion befindet sich jetzt in der Experimentierphase.\n\nBitte melde Bugs auf {url} oder mach mit bei der Entwicklung.",
"sshVirtualKeyAutoOff": "Automatische Umschaltung der virtuellen Tasten",
"start": "Start",
"stat": "Statistik",
"stats": "Statistik",
"stop": "Stop",
"stopped": "Ausgelaufen",
"storage": "Speicher",
"success": "Erfolgreich",
"supportFmtArgs": "Die folgenden Formatierungsparameter werden unterstützt:",
"suspend": "Suspend",
"suspendTip": "Die Suspend-Funktion erfordert Root-Rechte und systemd-Unterstützung.",
@@ -298,7 +188,6 @@
"textScaler": "Skalierung der Schriftart",
"textScalerTip": "1.0 => 100% (Originalgröße), funktioniert nur auf der Serverseite Teil der Schrift, nicht empfohlen zu ändern.",
"theme": "Themen",
"themeMode": "Themen-Modus",
"time": "Zeit",
"times": "x",
"total": "Total",
@@ -306,27 +195,18 @@
"trySudo": "Versuche es mit sudo",
"ttl": "TTL",
"unknown": "Unbekannt",
"unknownError": "Unbekannter Fehler",
"unkownConvertMode": "Unbekannter Konvertierungsmodus",
"update": "Update",
"updateAll": "Alle aktualisieren",
"updateIntervalEqual0": "Wenn du den Wert 0 einstellst, wird nicht automatisch aktualisiert.\nDer CPU-Status kann nicht berechnet werden.",
"updateServerStatusInterval": "Aktualisierungsintervall des Serverstatus",
"updateTip": "Update: v1.0.{newest}",
"updateTipTooLow": "Aktuelle Version ist zu alt, bitte update auf v1.0.{newest}",
"upload": "Hochladen",
"upsideDown": "Upside Down",
"uptime": "Betriebszeit",
"urlOrJson": "URL oder JSON",
"useCdn": "Verwenden von CDN",
"useCdnTip": "Nicht-chinesischen Benutzern wird die Verwendung eines CDN empfohlen. Möchten Sie es verwenden?",
"useNoPwd": "Es wird kein Passwort verwendet",
"usePodmanByDefault": "Standardmäßige Verwendung von Podman",
"used": "Gebraucht",
"user": "Benutzer",
"versionHaveUpdate": "Gefunden: v1.0.{build}, klicke zum Aktualisieren",
"versionUnknownUpdate": "Aktuell: v1.0.{build}. Klicken Sie hier, um nach Updates zu suchen",
"versionUpdated": "v1.0.{build} ist bereits die neueste Version",
"view": "Ansicht",
"viewErr": "Fehler anzeigen",
"virtKeyHelpClipboard": "In die Zwischenablage kopieren, wenn das ausgewählte Terminal nicht leer ist, andernfalls den Inhalt der Zwischenablage in das Terminal einfügen.",
@@ -337,8 +217,8 @@
"watchNotPaired": "Keine gekoppelte Apple Watch",
"webdavSettingEmpty": "Webdav-Einstellungen sind leer",
"whenOpenApp": "Beim Öffnen der App",
"willTakEeffectImmediately": "Wird sofort angewendet",
"wolTip": "Nach der Konfiguration von WOL (Wake-on-LAN) wird jedes Mal, wenn der Server verbunden wird, eine WOL-Anfrage gesendet.",
"write": "Schreiben",
"writeScriptFailTip": "Das Schreiben des Skripts ist fehlgeschlagen, möglicherweise aufgrund fehlender Berechtigungen oder das Verzeichnis existiert nicht."
"writeScriptFailTip": "Das Schreiben des Skripts ist fehlgeschlagen, möglicherweise aufgrund fehlender Berechtigungen oder das Verzeichnis existiert nicht.",
"writeScriptTip": "Nach der Verbindung mit dem Server wird ein Skript in ~/.config/server_box geschrieben, um den Systemstatus zu überwachen. Sie können den Skriptinhalt überprüfen."
}

View File

@@ -1,84 +1,42 @@
{
"@@locale": "en",
"about": "About",
"aboutThanks": "Thanks to the following people who participated in.",
"acceptBeta": "Accept beta version updates",
"add": "Add",
"addAServer": "add a server",
"addPrivateKey": "Add private key",
"addSystemPrivateKeyTip": "Currently private keys don't exist, do you want to add the one that comes with the system (~/.ssh/id_rsa)?",
"added2List": "Added to task list",
"addr": "Address",
"all": "All",
"alreadyLastDir": "Already in last directory.",
"askContinue": "{msg}. Continue?",
"attention": "Attention",
"authFailTip": "Authentication failed, please check whether credentials are correct",
"authRequired": "Auth required",
"auto": "Auto",
"autoBackupConflict": "Only one automatic backup can be turned on at the same time.",
"autoCheckUpdate": "Automatic update check",
"autoConnect": "Auto connect",
"autoRun": "Auto run",
"autoUpdateHomeWidget": "Automatic home widget update",
"backup": "Backup",
"backupTip": "The exported data is weakly encrypted. \nPlease keep it safe.",
"backupVersionNotMatch": "Backup version is not match.",
"battery": "Battery",
"bgRun": "Run in background",
"bgRunTip": "This switch only means the program will try to run in the background. Whether it can run in the background depends on whether the permission is enabled or not. For AOSP-based Android ROMs, please disable \"Battery Optimization\" in this app. For MIUI / HyperOS, please change the power saving policy to \"Unlimited\".",
"bioAuth": "Biometric auth",
"browser": "Browser",
"bulkImportServers": "Batch import servers",
"bulkImportServersTip": "You can find the [format]({url}) here.",
"canPullRefresh": "You can pull to refresh.",
"cancel": "Cancel",
"choose": "Choose",
"chooseFontFile": "Choose a font file",
"choosePrivateKey": "Choose private key",
"clear": "Clear",
"clipboard": "Clipboard",
"close": "Close",
"cmd": "Command",
"cnKeyboardComp": "Compatibility with Chinese Android",
"cnKeyboardCompTip": "If the terminal pops up a secure keyboard, you can enable it.",
"collapseUI": "Collapse",
"collapseUITip": "Whether to collapse long lists present in the UI by default",
"conn": "Connection",
"connected": "Connected",
"container": "Container",
"containerName": "Container name",
"containerStatus": "Container status",
"containerTrySudoTip": "For example: In the app, the user is set to aaa, but Docker is installed under the root user. In this case, you need to enable this option.",
"content": "Content",
"convert": "Convert",
"copy": "Copy",
"copyPath": "Copy path",
"cpuViewAsProgressTip": "Display the usage of each CPU in a progress bar style (old style)",
"createFile": "Create file",
"createFolder": "Create folder",
"cursorType": "Cursor type",
"customCmd": "Custom commands",
"customCmdDocUrl": "https://github.com/lollipopkit/flutter_server_box/wiki#custom-commands",
"customCmdHint": "\"Command Name\": \"Command\"",
"dark": "Dark",
"day": "Day",
"debug": "Debug",
"decode": "Decode",
"decompress": "Decompress",
"delete": "Delete",
"deleteServers": "Batch delete servers",
"deviceName": "Device name",
"dirEmpty": "Make sure the folder is empty.",
"disabled": "Disabled",
"disconnected": "Disconnected",
"disk": "Disk",
"diskIgnorePath": "Ignore path for disk",
"displayCpuIndex": "Display CPU index",
"displayName": "Display name",
"dl2Local": "Download {fileName} to local?",
"doc": "Documentation",
"dockerEditHost": "Edit DOCKER_HOST",
"dockerEmptyRunningItems": "There are no running containers.\nThis could be because:\n- The Docker installation user is not the same as the username configured within the App.\n- The environment variable DOCKER_HOST was not read correctly. You can get it by running `echo $DOCKER_HOST` in the terminal.",
"dockerImagesFmt": "{count} images",
"dockerNotInstalled": "Docker not installed",
@@ -86,39 +44,24 @@
"dockerStatusRunningFmt": "{count} container running.",
"doubleColumnMode": "Double column mode",
"doubleColumnTip": "This option only enables the feature, whether it can actually be enabled depends on the width of the device",
"download": "Download",
"edit": "Edit",
"editVirtKeys": "Edit virtual keys",
"editor": "Editor",
"editorHighlightTip": "The current code highlighting performance is not ideal and can be optionally turned off to improve.",
"encode": "Encode",
"error": "Error",
"exampleName": "Example name",
"envVars": "Environment variable",
"experimentalFeature": "Experimental feature",
"export": "Export",
"extraArgs": "Extra arguments",
"failed": "Failed",
"fallbackSshDest": "Fallback SSH destination",
"fdroidReleaseTip": "If you downloaded this app from F-Droid, it is recommended to turn off this option.",
"feedback": "Feedback",
"feedbackOnGithub": "If you have any questions, please create issues on Github.",
"fieldMustNotEmpty": "These fields must not be empty.",
"fileNotExist": "{file} not exist",
"fileTooLarge": "File '{file}' too large {size}, max {sizeMax}",
"files": "Files",
"finished": "Finished",
"followSystem": "Follow system",
"font": "Font",
"fontSize": "Font size",
"forExample": "For example",
"force": "Force",
"foundNUpdate": "Found {count} update",
"fullScreen": "Full screen mode",
"fullScreenJitter": "Full screen jitter",
"fullScreenJitterHelp": "To avoid screen burn-in",
"fullScreenTip": "Should full-screen mode be enabled when the device is rotated to landscape mode? This option only applies to the server tab.",
"getPushTokenFailed": "Can't fetch push token",
"gettingToken": "Getting token...",
"goBackQ": "Go back?",
"goto": "Go to",
"hideTitleBar": "Hide title bar",
@@ -126,40 +69,24 @@
"highlight": "Code highlighting",
"homeWidgetUrlConfig": "Config home widget url",
"host": "Host",
"hour": "Hour",
"httpFailedWithCode": "request failed, status code: {code}",
"icloudSynced": "iCloud wird synchronisiert und einige Einstellungen erfordern möglicherweise einen Neustart der App, um wirksam zu werden.",
"ignoreCert": "Ignore certificate",
"image": "Image",
"imagesList": "Images list",
"import": "Import",
"inAppUpdate": "Update within the app? Otherwise, download using a browser.",
"init": "Initialize",
"inner": "Inner",
"inputDomainHere": "Input Domain here",
"install": "install",
"installDockerWithUrl": "Please https://docs.docker.com/engine/install docker first.",
"invalid": "Invalid",
"invalidJson": "Invalid JSON",
"invalidVersion": "Invalid version",
"invalidVersionHelp": "Please make sure that docker is installed correctly, or that you are using a non-self-compiled version. If you don't have the above issues, please submit an issue on {url}.",
"isBusy": "Is busy now",
"jumpServer": "Jump server",
"keepForeground": "Keep app foreground!",
"keepStatusWhenErr": "Preserve the last server state",
"keepStatusWhenErrTip": "Only in the event of an error during script execution",
"keyAuth": "Key Auth",
"language": "Language",
"languageName": "English",
"lastTry": "Last try",
"launchPage": "Launch page",
"letterCache": "Letter caching",
"letterCacheTip": "Recommended to enable, but enabling it prevents the input of CJK (Chinese, Japanese, Korean) characters",
"letterCacheTip": "Recommended to disable, but after disabling, it will be impossible to input CJK characters.",
"license": "License",
"light": "Light",
"loadingFiles": "Loading files...",
"location": "Location",
"log": "Log",
"loss": "loss",
"madeWithLove": "Made with ❤️ by {myGithub}",
"manual": "Manual",
@@ -167,62 +94,36 @@
"maxRetryCount": "Number of server reconnections",
"maxRetryCountEqual0": "Will retry again and again.",
"min": "min",
"minute": "Minute",
"mission": "Mission",
"more": "More",
"moveOutServerFuncBtnsHelp": "On: can be displayed below each card on the Server Tab page. Off: can be displayed at the top of the Server Details page.",
"ms": "ms",
"name": "Name",
"needHomeDir": "If you are a Synology user, [see here](https://kb.synology.com/DSM/tutorial/user_enable_home_service). Users of other systems need to search for how to create a home directory.",
"needRestart": "App needs to be restarted",
"net": "Network",
"netViewType": "Network view type",
"newContainer": "New container",
"noClient": "No client",
"noInterface": "No interface",
"noLineChart": "Do not use line charts",
"noLineChartForCpu": "Do not use line charts for CPU",
"noNotiPerm": "No notification permissions, possibly no progress indication when downloading app updates.",
"noOptions": "No options",
"noPrivateKeyTip": "The private key does not exist, it may have been deleted or there is a configuration error.",
"noPromptAgain": "Do not prompt again",
"noResult": "No result",
"noSavedPrivateKey": "No saved private keys.",
"noSavedSnippet": "No saved snippets.",
"noServerAvailable": "No server available.",
"noTask": "No task",
"noUpdateAvailable": "No update available",
"node": "Node",
"notAvailable": "Unavailable",
"notSelected": "Not selected",
"note": "Note",
"nullToken": "Null token",
"ok": "OK",
"onServerDetailPage": "On server detail page",
"onlyOneLine": "Only display as one line (scrollable)",
"onlyWhenCoreBiggerThan8": "Works only when the number of cores is greater than 8",
"open": "Open",
"openLastPath": "Open the last path",
"openLastPathTip": "Different servers will have different logs, and the log is the path to the exit",
"parseContainerStats": "Parse the container occupancy status",
"parseContainerStatsTip": "Parsing the occupancy status of Docker is relatively slow.",
"paste": "Paste",
"path": "Path",
"percentOfSize": "{percent}% of {size}",
"permission": "Permissions",
"pickFile": "Pick file",
"pingAvg": "Avg:",
"pingInputIP": "Please input a target IP / domain.",
"pingNoServer": "No server to ping.\nPlease add a server in server tab.",
"pkg": "Pkg",
"pkgUpgradeTip": "Please backup your system before updating.",
"platformNotSupportUpdate": "Current platform does not support in-app update.\nPlease build from source and install it.",
"plugInType": "Insertion Type",
"plzEnterHost": "Please enter host.",
"plzSelectKey": "Please select a key.",
"port": "Port",
"preview": "Preview",
"primaryColorSeed": "Primary color seed",
"privateKey": "Private Key",
"process": "Process",
"pushToken": "Push token",
@@ -232,16 +133,11 @@
"pwd": "Password",
"read": "Read",
"reboot": "Reboot",
"rememberChoice": "Remember the selection",
"rememberPwdInMem": "Remember password in memory",
"rememberPwdInMemTip": "Used for containers, suspending, etc.",
"rememberWindowSize": "Remember window size",
"remotePath": "Remote path",
"rename": "Rename",
"reportBugsOnGithubIssue": "Please report bugs on {url}",
"restart": "Restart",
"restore": "Restore",
"restoreSuccess": "Restore success. Restart app to apply.",
"result": "Result",
"rotateAngel": "Rotation angle",
"route": "Routing",
@@ -256,14 +152,8 @@
"serverDetailOrder": "Detail page widget order",
"serverFuncBtns": "Server function buttons",
"serverOrder": "Server order",
"serverTabConnecting": "Connecting...",
"serverTabEmpty": "There is no server.\nClick the fab to add one.",
"serverTabFailed": "Failed",
"serverTabLoading": "Loading...",
"serverTabPlzSave": "Please 'save' this private key again.",
"serverTabUnkown": "Unknown state",
"setting": "Settings",
"sftpDlPrepare": "Preparing to connect...",
"sftpEditorTip": "If empty, use the built-in file editor of the app. If a value is present, use the remote servers editor, e.g., `vim` (recommended to automatically detect according to `EDITOR`).",
"sftpRmrDirSummary": "Use `rm -r` to delete a folder in SFTP.",
"sftpSSHConnected": "SFTP Connected",
"sftpShowFoldersFirst": "Display folders first",
@@ -278,11 +168,11 @@
"sshTip": "This function is now in the experimental stage.\n\nPlease report bugs on {url} or join our development.",
"sshVirtualKeyAutoOff": "Auto switching of virtual keys",
"start": "Start",
"stat": "Statistics",
"stats": "Statistics",
"stop": "Stop",
"stopped": "Stopped",
"storage": "Storage",
"success": "Success",
"supportFmtArgs": "The following formatting parameters are supported:",
"suspend": "Suspend",
"suspendTip": "The suspend function requires root permission and systemd support.",
@@ -298,7 +188,6 @@
"textScaler": "Text scaler",
"textScalerTip": "1.0 => 100% (original size), only works on server page part of the font, not recommended to change.",
"theme": "Theme",
"themeMode": "Theme mode",
"time": "Time",
"times": "Times",
"total": "Total",
@@ -306,27 +195,18 @@
"trySudo": "Try using sudo",
"ttl": "TTL",
"unknown": "Unknown",
"unknownError": "Unknown error",
"unkownConvertMode": "Unknown conversion mode",
"update": "Update",
"updateAll": "Update all",
"updateIntervalEqual0": "You set to 0, will not update automatically.\nCan't calculate CPU status.",
"updateServerStatusInterval": "Server status update interval",
"updateTip": "Update: v1.0.{newest}",
"updateTipTooLow": "Current version is too low, please update to v1.0.{newest}",
"upload": "Upload",
"upsideDown": "Upside Down",
"uptime": "Uptime",
"urlOrJson": "URL or JSON",
"useCdn": "Using CDN",
"useCdnTip": "Non-Chinese users are recommended to use CDN. Would you like to use it?",
"useNoPwd": "No password will be used",
"usePodmanByDefault": "Use Podman by default",
"used": "Used",
"user": "User",
"versionHaveUpdate": "Found: v1.0.{build}, click to update",
"versionUnknownUpdate": "Current: v1.0.{build}, click to check updates",
"versionUpdated": "Current: v1.0.{build}, is up to date",
"view": "View",
"viewErr": "See error",
"virtKeyHelpClipboard": "Copy to the clipboard if the selected terminal is not empty, otherwise paste the content of the clipboard to the terminal.",
@@ -337,8 +217,8 @@
"watchNotPaired": "No paired Apple Watch",
"webdavSettingEmpty": "WebDav setting is empty",
"whenOpenApp": "When opening the app",
"willTakEeffectImmediately": "Will take effect immediately",
"wolTip": "After configuring WOL (Wake-on-LAN), a WOL request is sent each time the server is connected.",
"write": "Write",
"writeScriptFailTip": "Writing to the script failed, possibly due to lack of permissions or the directory does not exist."
"writeScriptFailTip": "Writing to the script failed, possibly due to lack of permissions or the directory does not exist.",
"writeScriptTip": "After connecting to the server, a script will be written to ~/.config/server_box to monitor the system status. You can review the script content."
}

View File

@@ -1,84 +1,42 @@
{
"@@locale": "es",
"about": "Acerca de",
"aboutThanks": "Gracias a los siguientes participantes.",
"acceptBeta": "Aceptar actualizaciones de la versión de prueba",
"add": "Añadir",
"addAServer": "Agregar un servidor",
"addPrivateKey": "Agregar una llave privada",
"addSystemPrivateKeyTip": "Actualmente no hay ninguna llave privada, ¿quieres agregar la que viene por defecto en el sistema (~/.ssh/id_rsa)?",
"added2List": "Añadido a la lista de tareas",
"addr": "Dirección",
"all": "Todos",
"alreadyLastDir": "Ya estás en el directorio superior",
"askContinue": "{msg}, ¿continuar?",
"attention": "Atención",
"authFailTip": "La autenticación ha fallado, por favor verifica si la contraseña/llave/host/usuario, etc., son incorrectos.",
"authRequired": "Autenticación requerida",
"auto": "Automático",
"autoBackupConflict": "Solo se puede activar una copia de seguridad automática a la vez",
"autoCheckUpdate": "Verificación automática de actualizaciones",
"autoConnect": "Conexión automática",
"autoRun": "Ejecución automática",
"autoUpdateHomeWidget": "Actualizar automáticamente el widget del escritorio",
"backup": "Respaldo",
"backupTip": "Los datos exportados solo están encriptados de manera básica, por favor guárdalos en un lugar seguro.",
"backupVersionNotMatch": "La versión de la copia de seguridad no coincide, no se puede restaurar",
"battery": "Batería",
"bgRun": "Ejecución en segundo plano",
"bgRunTip": "Este interruptor solo indica que la aplicación intentará correr en segundo plano, si puede hacerlo o no depende de si tiene el permiso correspondiente. En Android puro, por favor desactiva la “optimización de batería” para esta app, en MIUI por favor cambia la estrategia de ahorro de energía a “Sin restricciones”.",
"bioAuth": "Autenticación biométrica",
"browser": "Navegador",
"bulkImportServers": "Importar servidores en masa",
"bulkImportServersTip": "Puede encontrar el [formato]]({url}) aquí.",
"canPullRefresh": "Se puede deslizar hacia abajo para refrescar",
"cancel": "Cancelar",
"choose": "Elegir",
"chooseFontFile": "Seleccionar archivo de fuente",
"choosePrivateKey": "Elegir llave privada",
"clear": "Limpiar",
"clipboard": "Portapapeles",
"close": "Cerrar",
"cmd": "Comando",
"cnKeyboardComp": "Compatibilidad con Android chino",
"cnKeyboardCompTip": "Si el terminal muestra un teclado seguro, puedes activarlo.",
"collapseUI": "Colapsar",
"collapseUITip": "¿Colapsar por defecto las listas largas en la UI?",
"conn": "Conectar",
"connected": "Conectado",
"container": "Contenedor",
"containerName": "Nombre del contenedor",
"containerStatus": "Estado del contenedor",
"containerTrySudoTip": "Por ejemplo: si configuras el usuario dentro de la app como aaa, pero Docker está instalado bajo el usuario root, entonces necesitarás habilitar esta opción",
"content": "Contenido",
"convert": "Convertir",
"copy": "Copiar",
"copyPath": "Copiar ruta",
"cpuViewAsProgressTip": "Muestre la tasa de uso de cada CPU en estilo de barra de progreso (estilo antiguo)",
"createFile": "Crear archivo",
"createFolder": "Crear carpeta",
"cursorType": "Tipo de cursor",
"customCmd": "Comandos personalizados",
"customCmdDocUrl": "https://github.com/lollipopkit/flutter_server_box/wiki#custom-commands",
"customCmdHint": "\"Nombre del comando\": \"Comando\"",
"dark": "Oscuro",
"day": "Día",
"debug": "Depurar",
"decode": "Decodificar",
"decompress": "Descomprimir",
"delete": "Eliminar",
"deleteServers": "Eliminar servidores en lote",
"deviceName": "Nombre del dispositivo",
"dirEmpty": "Asegúrate de que el directorio esté vacío",
"disabled": "Deshabilitado",
"disconnected": "Desconectado",
"disk": "Disco",
"diskIgnorePath": "Rutas de disco ignoradas",
"displayCpuIndex": "Muestre el índice de CPU",
"displayName": "Nombre a mostrar",
"dl2Local": "¿Descargar {fileName} a local?",
"doc": "Documentación",
"dockerEditHost": "Editar DOCKER_HOST",
"dockerEmptyRunningItems": "No hay contenedores en ejecución.\nEsto podría deberse a que:\n- El usuario con el que se instaló Docker es diferente al configurado en la app\n- La variable de entorno DOCKER_HOST no se ha leído correctamente. Puedes obtenerla ejecutando `echo $DOCKER_HOST` en el terminal.",
"dockerImagesFmt": "Total de {count} imágenes",
"dockerNotInstalled": "Docker no está instalado",
@@ -86,39 +44,24 @@
"dockerStatusRunningFmt": "{count} contenedores en ejecución",
"doubleColumnMode": "Modo de doble columna",
"doubleColumnTip": "Esta opción solo habilita la función, si se puede activar o no depende del ancho del dispositivo",
"download": "Descargar",
"edit": "Editar",
"editVirtKeys": "Editar teclas virtuales",
"editor": "Editor",
"editorHighlightTip": "El rendimiento del resaltado de código es bastante pobre actualmente, puedes elegir desactivarlo para mejorar.",
"encode": "Codificar",
"error": "Error",
"exampleName": "Ejemplo de nombre",
"envVars": "Variable de entorno",
"experimentalFeature": "Función experimental",
"export": "Exportar",
"extraArgs": "Argumentos extra",
"failed": "Fallido",
"fallbackSshDest": "Destino SSH alternativo",
"fdroidReleaseTip": "Si descargaste esta aplicación desde F-Droid, se recomienda desactivar esta opción.",
"feedback": "Retroalimentación",
"feedbackOnGithub": "Si tienes algún problema, por favor informa en GitHub",
"fieldMustNotEmpty": "Estos campos no pueden estar vacíos.",
"fileNotExist": "{file} no existe",
"fileTooLarge": "El archivo '{file}' es demasiado grande '{size}', supera el {sizeMax}",
"files": "Archivos",
"finished": "Finalizado",
"followSystem": "Seguir al sistema",
"font": "Fuente",
"fontSize": "Tamaño de fuente",
"forExample": "Por ejemplo",
"force": "Forzar",
"foundNUpdate": "Encontradas {count} actualizaciones",
"fullScreen": "Modo pantalla completa",
"fullScreenJitter": "Temblores en modo pantalla completa",
"fullScreenJitterHelp": "Prevención de quemaduras de pantalla",
"fullScreenTip": "¿Debe habilitarse el modo de pantalla completa cuando el dispositivo se rote al modo horizontal? Esta opción solo se aplica a la pestaña del servidor.",
"getPushTokenFailed": "No se pudo obtener el token de notificación",
"gettingToken": "Obteniendo Token...",
"goBackQ": "¿Regresar?",
"goto": "Ir a",
"hideTitleBar": "Ocultar barra de título",
@@ -126,40 +69,24 @@
"highlight": "Resaltar código",
"homeWidgetUrlConfig": "Configuración de URL del widget de inicio",
"host": "Anfitrión",
"hour": "Hora",
"httpFailedWithCode": "Fallo en la solicitud, código de estado: {code}",
"icloudSynced": "iCloud sincronizado, algunos ajustes pueden requerir reiniciar para tomar efecto.",
"ignoreCert": "Ignorar certificado",
"image": "Imagen",
"imagesList": "Lista de imágenes",
"import": "Importar",
"inAppUpdate": "¿Actualizar dentro de la app? De lo contrario, descargar usando un navegador.",
"init": "Inicializar",
"inner": "Interno",
"inputDomainHere": "Introduce el dominio aquí",
"install": "Instalar",
"installDockerWithUrl": "Por favor instala Docker primero desde https://docs.docker.com/engine/install",
"invalid": "Inválido",
"invalidJson": "JSON inválido",
"invalidVersion": "Versión no soportada",
"invalidVersionHelp": "Por favor asegúrate de haber instalado Docker correctamente o que no estés usando una versión compilada por ti mismo. Si no tienes estos problemas, informa en {url}.",
"isBusy": "Está ocupado",
"jumpServer": "Servidor de salto",
"keepForeground": "¡Por favor, mantén la app en primer plano!",
"keepStatusWhenErr": "Mantener el estado anterior del servidor",
"keepStatusWhenErrTip": "Solo aplica cuando hay errores al ejecutar scripts",
"keyAuth": "Autenticación con llave",
"language": "Idioma",
"languageName": "Español",
"lastTry": "Último intento",
"launchPage": "Página de lanzamiento",
"letterCache": "Caché de letras",
"letterCacheTip": "Se recomienda activar, pero al activarlo se impide la introducción de caracteres CJK (chino, japonés, coreano)",
"letterCacheTip": "Recomendado desactivar, pero después de desactivarlo, no se podrán ingresar caracteres CJK.",
"license": "Licencia de código abierto",
"light": "Claro",
"loadingFiles": "Cargando directorio...",
"location": "Ubicación",
"log": "Registro",
"loss": "Tasa de pérdida",
"madeWithLove": "Hecho con ❤️ por {myGithub}",
"manual": "Manual",
@@ -167,62 +94,36 @@
"maxRetryCount": "Número máximo de reintentos de conexión al servidor",
"maxRetryCountEqual0": "Reintentará infinitamente",
"min": "Mínimo",
"minute": "Minuto",
"mission": "Misión",
"more": "Más",
"moveOutServerFuncBtnsHelp": "Activado: se mostrará debajo de cada tarjeta en la página de servidores. Desactivado: se mostrará en la parte superior de los detalles del servidor.",
"ms": "milisegundos",
"name": "Nombre",
"needHomeDir": "Si eres usuario de Synology, [consulta aquí](https://kb.synology.com/DSM/tutorial/user_enable_home_service). Los usuarios de otros sistemas deben buscar cómo crear un directorio home.",
"needRestart": "Necesita reiniciar la app",
"net": "Red",
"netViewType": "Tipo de vista de red",
"newContainer": "Crear contenedor nuevo",
"noClient": "No hay conexión SSH",
"noInterface": "No hay interfaz disponible",
"noLineChart": "No utilice gráficos de líneas",
"noLineChartForCpu": "No utilice gráficos lineales para la CPU",
"noNotiPerm": "Sin permisos de notificación, posiblemente sin indicación de progreso al descargar actualizaciones de la aplicación.",
"noOptions": "Sin opciones disponibles",
"noPrivateKeyTip": "La clave privada no existe, puede haber sido eliminada o hay un error de configuración.",
"noPromptAgain": "No volver a preguntar",
"noResult": "Sin resultados",
"noSavedPrivateKey": "No hay llaves privadas guardadas.",
"noSavedSnippet": "No hay fragmentos de código guardados.",
"noServerAvailable": "No hay servidores disponibles.",
"noTask": "Sin tareas",
"noUpdateAvailable": "No hay actualizaciones disponibles",
"node": "Nodo",
"notAvailable": "No disponible",
"notSelected": "No seleccionado",
"note": "Nota",
"nullToken": "Token nulo",
"ok": "Ok",
"onServerDetailPage": "En la página de detalles del servidor",
"onlyOneLine": "Mostrar solo en una línea (desplazable)",
"onlyWhenCoreBiggerThan8": "Efectivo solo cuando el número de núcleos > 8",
"open": "Abrir",
"openLastPath": "Abrir el último camino",
"openLastPathTip": "Los diferentes servidores tendrán diferentes registros, y lo que se registra es la ruta de salida",
"parseContainerStats": "Analizar estado de uso del contenedor",
"parseContainerStatsTip": "El análisis del estado de uso de Docker es bastante lento",
"paste": "Pegar",
"path": "Ruta",
"percentOfSize": "El {percent}% de {size}",
"permission": "Permisos",
"pickFile": "Seleccionar archivo",
"pingAvg": "Promedio:",
"pingInputIP": "Por favor, introduce la IP de destino o el dominio",
"pingNoServer": "No hay servidores disponibles para hacer Ping\nPor favor, añade un servidor en la pestaña de servidores y vuelve a intentarlo",
"pkg": "Gestión de paquetes",
"pkgUpgradeTip": "Realice una copia de seguridad de su sistema antes de actualizar.",
"platformNotSupportUpdate": "La plataforma actual no soporta actualizaciones, por favor instala manualmente la última versión del código fuente",
"plugInType": "Tipo de inserción",
"plzEnterHost": "Por favor, introduce el host",
"plzSelectKey": "Por favor, selecciona una llave privada",
"port": "Puerto",
"preview": "Vista previa",
"primaryColorSeed": "Semilla de color primario",
"privateKey": "Llave privada",
"process": "Proceso",
"pushToken": "Token de notificaciones",
@@ -232,16 +133,11 @@
"pwd": "Contraseña",
"read": "Leer",
"reboot": "Reiniciar",
"rememberChoice": "Recordar la selección",
"rememberPwdInMem": "Recordar contraseña en la memoria",
"rememberPwdInMemTip": "Utilizado para contenedores, suspensión, etc.",
"rememberWindowSize": "Recordar el tamaño de la ventana",
"remotePath": "Ruta remota",
"rename": "Renombrar",
"reportBugsOnGithubIssue": "Por favor, informa los problemas en {url}",
"restart": "Reiniciar",
"restore": "Restaurar",
"restoreSuccess": "Restauración exitosa, necesitas reiniciar la App para aplicar cambios",
"result": "Resultado",
"rotateAngel": "Ángulo de rotación",
"route": "Enrutamiento",
@@ -256,14 +152,8 @@
"serverDetailOrder": "Orden de los componentes en la página de detalles del servidor",
"serverFuncBtns": "Botones de función del servidor",
"serverOrder": "Orden del servidor",
"serverTabConnecting": "Conectando...",
"serverTabEmpty": "No hay servidores por ahora.\nHaz clic en el botón de la esquina inferior derecha para añadir uno.",
"serverTabFailed": "Fallo",
"serverTabLoading": "Cargando...",
"serverTabPlzSave": "Por favor, guarda la llave privada nuevamente",
"serverTabUnkown": "Estado desconocido",
"setting": "Configuración",
"sftpDlPrepare": "Preparando para conectar al servidor...",
"sftpEditorTip": "Si está vacío, use el editor de archivos incorporado de la aplicación. Si hay un valor, use el editor del servidor remoto, por ejemplo, `vim` (se recomienda detectar automáticamente según `EDITOR`).",
"sftpRmrDirSummary": "Usar `rm -r` en SFTP para eliminar directorios",
"sftpSSHConnected": "SFTP conectado...",
"sftpShowFoldersFirst": "Mostrar carpetas primero",
@@ -278,11 +168,11 @@
"sshTip": "Esta función está en fase de pruebas.\n\nPor favor, informa los problemas en {url}, o únete a nuestro desarrollo.",
"sshVirtualKeyAutoOff": "Desactivación automática de teclas virtuales",
"start": "Iniciar",
"stat": "Estadísticas",
"stats": "Estadísticas",
"stop": "Detener",
"stopped": "Detenido",
"storage": "Almacenamiento",
"success": "Éxito",
"supportFmtArgs": "Soporta los siguientes argumentos de formato:",
"suspend": "Suspender",
"suspendTip": "La función de suspender necesita permisos de root y soporte de systemd.",
@@ -298,7 +188,6 @@
"textScaler": "Escalar texto",
"textScalerTip": "1.0 => 100% (tamaño original), solo afecta a ciertas fuentes en la página del servidor, no se recomienda modificar.",
"theme": "Tema",
"themeMode": "Modo de tema",
"time": "Tiempo",
"times": "Veces",
"total": "Total",
@@ -306,27 +195,18 @@
"trySudo": "Intentar con sudo",
"ttl": "TTL",
"unknown": "Desconocido",
"unknownError": "Error desconocido",
"unkownConvertMode": "Modo de conversión desconocido",
"update": "Actualizar",
"updateAll": "Actualizar todo",
"updateIntervalEqual0": "Si configuras esto a 0, el estado del servidor no se refrescará automáticamente.\nY no se podrá calcular el uso de CPU.",
"updateServerStatusInterval": "Intervalo de actualización del estado del servidor",
"updateTip": "Nueva versión: v1.0.{newest}",
"updateTipTooLow": "La versión actual es demasiado baja, por favor actualiza a v1.0.{newest}",
"upload": "Subir",
"upsideDown": "Invertir arriba por abajo",
"uptime": "Tiempo de actividad",
"urlOrJson": "URL o JSON",
"useCdn": "Usando CDN",
"useCdnTip": "Se recomienda a los usuarios no chinos utilizar CDN. ¿Le gustaría utilizarlo?",
"useNoPwd": "Se usará sin contraseña",
"usePodmanByDefault": "Usar Podman por defecto",
"used": "Usado",
"user": "Usuario",
"versionHaveUpdate": "Nueva versión encontrada: v1.0.{build}, haz clic para actualizar",
"versionUnknownUpdate": "Actual: v1.0.{build}, haz clic para verificar actualizaciones",
"versionUpdated": "Actual: v1.0.{build}, ya estás en la última versión",
"view": "Vista",
"viewErr": "Ver error",
"virtKeyHelpClipboard": "Si el terminal tiene caracteres seleccionados, entonces copiará los caracteres seleccionados al portapapeles, de lo contrario, pegará el contenido del portapapeles al terminal.",
@@ -337,8 +217,8 @@
"watchNotPaired": "No hay un Apple Watch emparejado",
"webdavSettingEmpty": "La configuración de Webdav está vacía",
"whenOpenApp": "Al abrir la App",
"willTakEeffectImmediately": "Los cambios tendrán efecto inmediatamente",
"wolTip": "Después de configurar WOL (Wake-on-LAN), se envía una solicitud de WOL cada vez que se conecta el servidor.",
"write": "Escribir",
"writeScriptFailTip": "La escritura en el script falló, posiblemente por falta de permisos o porque el directorio no existe."
"writeScriptFailTip": "La escritura en el script falló, posiblemente por falta de permisos o porque el directorio no existe.",
"writeScriptTip": "Después de conectarse al servidor, se escribirá un script en ~/.config/server_box para monitorear el estado del sistema. Puedes revisar el contenido del script."
}

View File

@@ -1,84 +1,42 @@
{
"@@locale": "fr",
"about": "À propos",
"aboutThanks": "Merci aux personnes suivantes qui ont participé.",
"acceptBeta": "Accepter les mises à jour de la version de test",
"add": "Ajouter",
"addAServer": "Ajouter un serveur",
"addPrivateKey": "Ajouter une clé privée",
"addSystemPrivateKeyTip": "Actuellement, vous n'avez aucune clé privée. Souhaitez-vous ajouter celle qui vient avec le système (~/.ssh/id_rsa) ?",
"added2List": "Ajouté à la liste des tâches",
"addr": "Adresse",
"all": "Tous",
"alreadyLastDir": "Déjà dans le dernier répertoire.",
"askContinue": "{msg}. Continuer ?",
"attention": "Attention",
"authFailTip": "Échec de l'authentification. Veuillez vérifier si le mot de passe/clé/hôte/utilisateur, etc., est incorrect.",
"authRequired": "Authentification requise",
"auto": "Automatique",
"autoBackupConflict": "Un seul sauvegarde automatique peut être activé en même temps.",
"autoCheckUpdate": "Vérification automatique des mises à jour",
"autoConnect": "Connexion automatique",
"autoRun": "Exécution automatique",
"autoUpdateHomeWidget": "Mise à jour automatique du widget d'accueil",
"backup": "Sauvegarde",
"backupTip": "Les données exportées sont simplement chiffrées. \nVeuillez les garder en sécurité.",
"backupVersionNotMatch": "La version de sauvegarde ne correspond pas.",
"battery": "Batterie",
"bgRun": "Exécution en arrière-plan",
"bgRunTip": "Cette option signifie seulement que le programme essaiera de s'exécuter en arrière-plan, que cela soit possible dépend de l'autorisation activée ou non. Pour Android natif, veuillez désactiver l'« Optimisation de la batterie » dans cette application, et pour MIUI, veuillez changer la politique d'économie d'énergie en « Illimité ».",
"bioAuth": "Authentification biométrique",
"browser": "Navigateur",
"bulkImportServers": "Importation groupée des serveurs",
"bulkImportServersTip": "Vous pouvez trouver le [format]({url}) ici.",
"canPullRefresh": "Vous pouvez tirer pour rafraîchir.",
"cancel": "Annuler",
"choose": "Choisir",
"chooseFontFile": "Choisir un fichier de police",
"choosePrivateKey": "Choisir une clé privée",
"clear": "Effacer",
"clipboard": "Presse-papiers",
"close": "Fermer",
"cmd": "Commande",
"cnKeyboardComp": "Compatibilité avec Android chinois",
"cnKeyboardCompTip": "Si le terminal affiche un clavier sécurisé, vous pouvez l'activer.",
"collapseUI": "Réduire",
"collapseUITip": "Indique si les longues listes présentées dans l'interface utilisateur doivent être réduites par défaut.",
"conn": "Connexion",
"connected": "Connecté",
"container": "Conteneur",
"containerName": "Nom du conteneur",
"containerStatus": "État du conteneur",
"containerTrySudoTip": "Par exemple : Dans l'application, l'utilisateur est défini comme aaa, mais Docker est installé sous l'utilisateur root. Dans ce cas, vous devez activer cette option.",
"content": "Contenu",
"convert": "Convertir",
"copy": "Copier",
"copyPath": "Copier le chemin",
"cpuViewAsProgressTip": "Afficher le taux d'utilisation de chaque CPU sous forme de barre de progression (ancien style)",
"createFile": "Créer un fichier",
"createFolder": "Créer un dossier",
"cursorType": "Type de curseur",
"customCmd": "Commandes personnalisées",
"customCmdDocUrl": "https://github.com/lollipopkit/flutter_server_box/wiki#custom-commands",
"customCmdHint": "\"Nom de la commande\": \"Commande\"",
"dark": "Sombre",
"day": "Jour",
"debug": "Débogage",
"decode": "Décoder",
"decompress": "Décompresser",
"delete": "Supprimer",
"deleteServers": "Supprimer des serveurs en lot",
"deviceName": "Nom de l'appareil",
"dirEmpty": "Assurez-vous que le répertoire est vide.",
"disabled": "Désactivé",
"disconnected": "Déconnecté",
"disk": "Disque",
"diskIgnorePath": "Chemin à ignorer pour le disque",
"displayCpuIndex": "Afficher l'index CPU",
"displayName": "Nom d'affichage",
"dl2Local": "Télécharger {fileName} localement ?",
"doc": "Documentation",
"dockerEditHost": "Modifier DOCKER_HOST",
"dockerEmptyRunningItems": "Aucun conteneur en cours d'exécution.\nCela peut être dû à :\n- L'utilisateur d'installation de Docker n'est pas le même que celui configuré dans l'application.\n- La variable d'environnement DOCKER_HOST n'a pas été lue correctement. Vous pouvez l'obtenir en exécutant `echo $DOCKER_HOST` dans le terminal.",
"dockerImagesFmt": "{count} images",
"dockerNotInstalled": "Docker non installé",
@@ -86,39 +44,24 @@
"dockerStatusRunningFmt": "{count} conteneur en cours d'exécution.",
"doubleColumnMode": "Mode double colonne",
"doubleColumnTip": "Cette option n'active que la fonctionnalité, qu'elle puisse être activée dépend de la largeur de l'appareil.",
"download": "Télécharger",
"edit": "Éditer",
"editVirtKeys": "Modifier les touches virtuelles",
"editor": "Éditeur",
"editorHighlightTip": "La performance actuelle de mise en surbrillance du code est pire et peut être désactivée en option pour s'améliorer.",
"encode": "Encoder",
"error": "Erreur",
"exampleName": "Nom de l'exemple",
"envVars": "Variable denvironnement",
"experimentalFeature": "Fonctionnalité expérimentale",
"export": "Exporter",
"extraArgs": "Arguments supplémentaires",
"failed": "Échoué",
"fallbackSshDest": "Destino SSH alternativo",
"fdroidReleaseTip": "Si vous avez téléchargé cette application depuis F-Droid, il est recommandé de désactiver cette option.",
"feedback": "Retour",
"feedbackOnGithub": "Si vous avez des questions, veuillez donner votre avis sur Github.",
"fieldMustNotEmpty": "Ces champs ne doivent pas être vides.",
"fileNotExist": "{file} n'existe pas",
"fileTooLarge": "Fichier '{file}' trop volumineux {size}, max {sizeMax}",
"files": "Fichiers",
"finished": "Terminé",
"followSystem": "Suivre le système",
"font": "Police",
"fontSize": "Taille de la police",
"forExample": "Par exemple",
"force": "Forcer",
"foundNUpdate": "{count} mise à jour trouvée",
"fullScreen": "Mode plein écran",
"fullScreenJitter": "Secousse en plein écran",
"fullScreenJitterHelp": "Pour éviter les brûlures d'écran",
"fullScreenTip": "Le mode plein écran doit-il être activé lorsque l'appareil est orienté en mode paysage ? Cette option s'applique uniquement à l'onglet serveur.",
"getPushTokenFailed": "Impossible de récupérer le jeton de notification",
"gettingToken": "Récupération du jeton...",
"goBackQ": "Revenir en arrière ?",
"goto": "Aller à",
"hideTitleBar": "Masquer la barre de titre",
@@ -126,40 +69,24 @@
"highlight": "Mise en surbrillance du code",
"homeWidgetUrlConfig": "Configurer l'URL du widget d'accueil",
"host": "Hôte",
"hour": "Heure",
"httpFailedWithCode": "Échec de la requête, code d'état : {code}",
"icloudSynced": "iCloud est en cours de synchronisation et certains paramètres peuvent nécessiter un redémarrage de l'application pour prendre effet.",
"ignoreCert": "Ignorer le certificat",
"image": "Image",
"imagesList": "Liste des images",
"import": "Importer",
"inAppUpdate": "Mettre à jour dans l'application ? Sinon, téléchargez en utilisant un navigateur.",
"init": "Initialiser",
"inner": "Interne",
"inputDomainHere": "Saisissez le domaine ici",
"install": "Installer",
"installDockerWithUrl": "Veuillez d'abord installer docker depuis https://docs.docker.com/engine/install.",
"invalid": "Invalide",
"invalidJson": "JSON invalide",
"invalidVersion": "Version invalide",
"invalidVersionHelp": "Assurez-vous que docker est correctement installé, ou que vous utilisez une version non compilée par vous-même. Si vous n'avez pas les problèmes ci-dessus, veuillez soumettre un problème sur {url}.",
"isBusy": "Est occupé maintenant",
"jumpServer": "Aller au serveur",
"keepForeground": "Garder l'application en premier plan !",
"keepStatusWhenErr": "Conserver l'état du dernier serveur",
"keepStatusWhenErrTip": "Uniquement en cas d'erreur lors de l'exécution du script",
"keyAuth": "Authentification par clé",
"language": "Langue",
"languageName": "Français",
"lastTry": "Dernière tentative",
"launchPage": "Page de lancement",
"letterCache": "Mise en cache des lettres",
"letterCacheTip": "Recommandé à activer, mais son activation empêche la saisie de caractères CJK (chinois, japonais, coréen)",
"letterCacheTip": "Recommandé de désactiver, mais après désactivation, il sera impossible de saisir des caractères CJK.",
"license": "Licence",
"light": "Clair",
"loadingFiles": "Chargement des fichiers...",
"location": "Emplacement",
"log": "Journal",
"loss": "Perte",
"madeWithLove": "Fabriqué avec ❤️ par {myGithub}",
"manual": "Manuel",
@@ -167,62 +94,36 @@
"maxRetryCount": "Nombre de reconnexions au serveur",
"maxRetryCountEqual0": "Il va réessayer encore et encore.",
"min": "min",
"minute": "Minute",
"mission": "Mission",
"more": "Plus",
"moveOutServerFuncBtnsHelp": "Activé : peut être affiché sous chaque carte sur la page de l'onglet Serveur. Désactivé : peut être affiché en haut de la page de détails du serveur.",
"ms": "ms",
"name": "Nom",
"needHomeDir": "Si vous êtes utilisateur Synology, [consultez ici](https://kb.synology.com/DSM/tutorial/user_enable_home_service). Les utilisateurs d'autres systèmes doivent rechercher comment créer un répertoire personnel.",
"needRestart": "Nécessite un redémarrage de l'application",
"net": "Réseau",
"netViewType": "Type de vue réseau",
"newContainer": "Nouveau conteneur",
"noClient": "Pas de client",
"noInterface": "Pas d'interface",
"noLineChart": "Ne pas utiliser de graphiques linéaires",
"noLineChartForCpu": "Ne pas utiliser de graphiques linéaires pour l'unité centrale",
"noNotiPerm": "Pas de permissions de notification, peut-être pas d'indication de progression lors de la mise à jour des applications.",
"noOptions": "Pas d'options",
"noPrivateKeyTip": "La clé privée n'existe pas, elle a peut-être été supprimée ou il y a une erreur de configuration.",
"noPromptAgain": "Ne pas demander à nouveau",
"noResult": "Pas de résultat",
"noSavedPrivateKey": "Aucune clé privée enregistrée.",
"noSavedSnippet": "Aucun extrait de code enregistré.",
"noServerAvailable": "Aucun serveur disponible.",
"noTask": "Pas de tâche",
"noUpdateAvailable": "Pas de mise à jour disponible",
"node": "Nœud",
"notAvailable": "Indisponible",
"notSelected": "Non sélectionné",
"note": "Note",
"nullToken": "Jeton nul",
"ok": "OK",
"onServerDetailPage": "Sur la page de détails du serveur",
"onlyOneLine": "Afficher uniquement en une seule ligne (défilement)",
"onlyWhenCoreBiggerThan8": "Fonctionne uniquement lorsque le nombre de cœurs est > 8",
"open": "Ouvrir",
"openLastPath": "Ouvrir le dernier chemin",
"openLastPathTip": "Les différents serveurs auront des journaux différents, et le journal est le chemin vers la sortie",
"parseContainerStats": "Analyser l'état d'occupation du conteneur",
"parseContainerStatsTip": "L'analyse de l'occupation des conteneurs Docker est relativement lente.",
"paste": "Coller",
"path": "Chemin",
"percentOfSize": "{percent}% de {size}",
"permission": "Permissions",
"pickFile": "Choisir un fichier",
"pingAvg": "Moy.:",
"pingInputIP": "Veuillez saisir une adresse IP / un domaine cible.",
"pingNoServer": "Aucun serveur à pinger.\nVeuillez ajouter un serveur dans l'onglet serveur.",
"pkg": "Pkg",
"pkgUpgradeTip": "Veuillez sauvegarder votre système avant de procéder à la mise à jour.",
"platformNotSupportUpdate": "La plateforme actuelle ne prend pas en charge la mise à jour dans l'application.\nVeuillez le compiler depuis les sources et l'installer.",
"plugInType": "Type d'insertion",
"plzEnterHost": "Veuillez saisir l'hôte.",
"plzSelectKey": "Veuillez sélectionner une clé.",
"port": "Port",
"preview": "Aperçu",
"primaryColorSeed": "Graine de couleur primaire",
"privateKey": "Clé privée",
"process": "Processus",
"pushToken": "Jeton d'identification",
@@ -232,16 +133,11 @@
"pwd": "Mot de passe",
"read": "Lire",
"reboot": "Redémarrer",
"rememberChoice": "Se souvenir du choix",
"rememberPwdInMem": "Mémoriser le mot de passe en mémoire",
"rememberPwdInMemTip": "Utilisé pour les conteneurs, la suspension, etc.",
"rememberWindowSize": "Se souvenir de la taille de la fenêtre",
"remotePath": "Chemin distant",
"rename": "Renommer",
"reportBugsOnGithubIssue": "Veuillez signaler les bugs sur {url}",
"restart": "Redémarrer",
"restore": "Restaurer",
"restoreSuccess": "Restauration réussie. Redémarrez l'application pour appliquer.",
"result": "Résultat",
"rotateAngel": "Angle de rotation",
"route": "Routage",
@@ -256,14 +152,8 @@
"serverDetailOrder": "Ordre des widgets de la page de détails du serveur",
"serverFuncBtns": "Boutons de fonction du serveur",
"serverOrder": "Ordre du serveur",
"serverTabConnecting": "Connexion en cours...",
"serverTabEmpty": "Aucun serveur.\nCliquez sur le fab pour en ajouter un.",
"serverTabFailed": "Échec",
"serverTabLoading": "Chargement...",
"serverTabPlzSave": "Veuillez 'enregistrer' cette clé privée à nouveau.",
"serverTabUnkown": "État inconnu",
"setting": "Paramètres",
"sftpDlPrepare": "Préparation de la connexion...",
"sftpEditorTip": "Si vide, utilisez léditeur de fichiers intégré de lapplication. Si une valeur est présente, utilisez léditeur du serveur distant, par exemple `vim` (il est recommandé de détecter automatiquement selon `EDITOR`).",
"sftpRmrDirSummary": "Utilisez `rm -r` pour supprimer un dossier en SFTP.",
"sftpSSHConnected": "SFTP Connecté",
"sftpShowFoldersFirst": "Afficher d'abord les dossiers",
@@ -278,11 +168,11 @@
"sshTip": "Cette fonctionnalité est actuellement à l'étape expérimentale.\n\nVeuillez signaler les bugs sur {url} ou rejoindre notre développement.",
"sshVirtualKeyAutoOff": "Activation automatique des touches virtuelles",
"start": "Démarrer",
"stat": "Statistiques",
"stats": "Statistiques",
"stop": "Arrêter",
"stopped": "Arrêté",
"storage": "Stockage",
"success": "Succès",
"supportFmtArgs": "Les paramètres de mise en forme suivants sont pris en charge :",
"suspend": "Suspendre",
"suspendTip": "La fonction de suspension nécessite des privilèges root et le support de systemd.",
@@ -298,7 +188,6 @@
"textScaler": "Mise à l'échelle du texte",
"textScalerTip": "1.0 => 100% (taille originale), fonctionne uniquement sur la partie de la police de la page du serveur, il est déconseillé de la modifier.",
"theme": "Thème",
"themeMode": "Mode thème",
"time": "Temps",
"times": "Fois",
"total": "Total",
@@ -306,27 +195,18 @@
"trySudo": "Essayer d'utiliser sudo",
"ttl": "TTL",
"unknown": "Inconnu",
"unknownError": "Erreur inconnue",
"unkownConvertMode": "Mode de conversion inconnu",
"update": "Mettre à jour",
"updateAll": "Tout mettre à jour",
"updateIntervalEqual0": "Vous avez défini à 0, la mise à jour ne se fera pas automatiquement.\nImpossible de calculer l'état du CPU.",
"updateServerStatusInterval": "Intervalle de mise à jour de l'état du serveur",
"updateTip": "Mise à jour : v1.0.{newest}",
"updateTipTooLow": "La version actuelle est trop ancienne, veuillez mettre à jour vers v1.0.{newest}",
"upload": "Télécharger",
"upsideDown": "À l'envers",
"uptime": "Temps d'activité",
"urlOrJson": "URL ou JSON",
"useCdn": "Utiliser CDN",
"useCdnTip": "Il est recommandé aux utilisateurs non chinois d'utiliser le CDN. Souhaitez-vous l'utiliser ?",
"useNoPwd": "Aucun mot de passe ne sera utilisé",
"usePodmanByDefault": "Par défaut avec Podman",
"used": "Utilisé",
"user": "Utilisateur",
"versionHaveUpdate": "Trouvé : v1.0.{build}, cliquez pour mettre à jour",
"versionUnknownUpdate": "Actuelle : v1.0.{build}, cliquez pour vérifier les mises à jour",
"versionUpdated": "Actuelle : v1.0.{build}, est à jour",
"view": "Vue",
"viewErr": "Voir erreur",
"virtKeyHelpClipboard": "Copiez dans le presse-papiers si le terminal sélectionné n'est pas vide, sinon collez le contenu du presse-papiers dans le terminal.",
@@ -337,8 +217,8 @@
"watchNotPaired": "Aucune Apple Watch associée",
"webdavSettingEmpty": "Le paramètre Webdav est vide",
"whenOpenApp": "À l'ouverture de l'application",
"willTakEeffectImmediately": "Prendra effet immédiatement",
"wolTip": "Après avoir configuré le WOL (Wake-on-LAN), une requête WOL est envoyée chaque fois que le serveur est connecté.",
"write": "Écrire",
"writeScriptFailTip": "Échec de l'écriture dans le script, probablement en raison d'un manque de permissions ou que le répertoire n'existe pas."
"writeScriptFailTip": "Échec de l'écriture dans le script, probablement en raison d'un manque de permissions ou que le répertoire n'existe pas.",
"writeScriptTip": "Après la connexion au serveur, un script sera écrit dans ~/.config/server_box pour surveiller létat du système. Vous pouvez examiner le contenu du script."
}

View File

@@ -1,84 +1,42 @@
{
"@@locale": "id",
"about": "Tentang",
"aboutThanks": "Terima kasih kepada orang -orang berikut yang berpartisipasi.",
"acceptBeta": "Terima pembaruan versi uji coba",
"add": "Menambahkan",
"addAServer": "tambahkan server",
"addPrivateKey": "Tambahkan kunci pribadi",
"addSystemPrivateKeyTip": "Saat ini tidak memiliki kunci privat, apakah Anda menambahkan kunci yang disertakan dengan sistem (~/.ssh/id_rsa)?",
"added2List": "Ditambahkan ke Daftar Tugas",
"addr": "Alamat",
"all": "Semua",
"alreadyLastDir": "Sudah di direktori terakhir.",
"askContinue": "{msg}, lanjutkan?",
"attention": "Perhatian",
"authFailTip": "Otentikasi gagal, silakan periksa apakah kata sandi/kunci/host/pengguna, dll, salah.",
"authRequired": "Auth diperlukan",
"auto": "Auto",
"autoBackupConflict": "Hanya satu pencadangan otomatis yang dapat diaktifkan pada saat yang bersamaan.",
"autoCheckUpdate": "Periksa pembaruan otomatis",
"autoConnect": "Hubungkan otomatis",
"autoRun": "Berjalan Otomatis",
"autoUpdateHomeWidget": "Widget Rumah Pembaruan Otomatis",
"backup": "Cadangan",
"backupTip": "Data yang diekspor hanya dienkripsi.\nTolong jaga keamanannya.",
"backupVersionNotMatch": "Versi cadangan tidak cocok.",
"battery": "Baterai",
"bgRun": "Jalankan di Backgroud",
"bgRunTip": "Sakelar ini hanya berarti aplikasi akan mencoba berjalan di latar belakang, apakah aplikasi dapat berjalan di latar belakang tergantung pada apakah izin diaktifkan atau tidak. Untuk Android asli, nonaktifkan \"Pengoptimalan Baterai\" di aplikasi ini, dan untuk miui, ubah kebijakan penghematan daya ke \"Tidak Terbatas\".",
"bioAuth": "Biosertifikasi",
"browser": "Peramban",
"bulkImportServers": "Impor server secara massal",
"bulkImportServersTip": "Anda dapat menemukan [format]({url}) di sini.",
"canPullRefresh": "Anda dapat menarik untuk menyegarkan.",
"cancel": "Membatalkan",
"choose": "Memilih",
"chooseFontFile": "Pilih file font",
"choosePrivateKey": "Pilih Kunci Pribadi",
"clear": "Jernih",
"clipboard": "papan klip",
"close": "Menutup",
"cmd": "Memerintah",
"cnKeyboardComp": "Kompatibilitas dengan Android China",
"cnKeyboardCompTip": "Jika terminal munculkan keyboard aman, Anda bisa mengaktifkannya.",
"collapseUI": "Runtuh",
"collapseUITip": "Apakah akan menciutkan daftar panjang yang ada di UI secara default atau tidak",
"conn": "Koneksi",
"connected": "Terhubung",
"container": "Wadah",
"containerName": "Nama kontainer",
"containerStatus": "Status wadah",
"containerTrySudoTip": "Contohnya: Di dalam aplikasi, pengguna diatur sebagai aaa, tetapi Docker diinstal di bawah pengguna root. Dalam kasus ini, Anda perlu mengaktifkan opsi ini.",
"content": "Konten",
"convert": "Mengubah",
"copy": "Menyalin",
"copyPath": "Path Copy",
"cpuViewAsProgressTip": "Tampilkan tingkat penggunaan setiap CPU dalam gaya bilah kemajuan (gaya lama)",
"createFile": "Buat file",
"createFolder": "Membuat folder",
"cursorType": "Jenis kursor",
"customCmd": "Perintah kustom",
"customCmdDocUrl": "https://github.com/lollipopkit/flutter_server_box/wiki#custom-commands",
"customCmdHint": "\"Nama Perintah\": \"Perintah\"",
"dark": "Gelap",
"day": "Hari",
"debug": "Debug",
"decode": "Membaca sandi",
"decompress": "Dekompresi",
"delete": "Menghapus",
"deleteServers": "Penghapusan server secara batch",
"deviceName": "Nama perangkat",
"dirEmpty": "Pastikan dir kosong.",
"disabled": "Dengan disabilitas",
"disconnected": "Terputus",
"disk": "Disk",
"diskIgnorePath": "Abaikan jalan untuk disk",
"displayCpuIndex": "Tampilkan indeks CPU",
"displayName": "Nama tampilan",
"dl2Local": "Unduh {fileName} ke lokal?",
"doc": "Dokumentasi",
"dockerEditHost": "Edit Docker_host",
"dockerEmptyRunningItems": "Tidak ada wadah yang sedang berjalan.\nHal ini dapat terjadi karena:\n- Pengguna instalasi Docker tidak sama dengan nama pengguna yang dikonfigurasi di dalam Aplikasi.\n- Variabel lingkungan DOCKER_HOST tidak terbaca dengan benar. Anda bisa mendapatkannya dengan menjalankan `echo $DOCKER_HOST` di terminal.",
"dockerImagesFmt": "{count} gambar",
"dockerNotInstalled": "Docker tidak terpasang",
@@ -86,39 +44,24 @@
"dockerStatusRunningFmt": "{count} wadah berjalan.",
"doubleColumnMode": "Mode kolom ganda",
"doubleColumnTip": "Opsi ini hanya mengaktifkan fitur, apakah itu benar-benar dapat diaktifkan tergantung pada lebar perangkat",
"download": "Unduh",
"edit": "Edit",
"editVirtKeys": "Edit kunci virtual",
"editor": "Editor",
"editorHighlightTip": "Performa penyorotan kode saat ini lebih buruk, dan dapat dimatikan secara opsional untuk perbaikan.",
"encode": "Menyandi",
"error": "Kesalahan",
"exampleName": "Nama contoh",
"envVars": "Variabel lingkungan",
"experimentalFeature": "Fitur eksperimental",
"export": "Ekspor",
"extraArgs": "Args ekstra",
"failed": "Gagal",
"fallbackSshDest": "Tujuan SSH mundur",
"fdroidReleaseTip": "Jika Anda mengunduh aplikasi ini dari F-Droid, disarankan untuk mematikan opsi ini.",
"feedback": "Masukan",
"feedbackOnGithub": "Jika Anda memiliki pertanyaan, silakan umpan balik tentang GitHub.",
"fieldMustNotEmpty": "Bidang -bidang ini tidak boleh kosong.",
"fileNotExist": "{file} tidak ada",
"fileTooLarge": "File '{file}' terlalu besar {size}, max {sizeMax}",
"files": "File",
"finished": "Selesai",
"followSystem": "Ikuti sistem",
"font": "Font",
"fontSize": "Ukuran huruf",
"forExample": "Sebagai contoh",
"force": "sukarela",
"foundNUpdate": "Menemukan {count} pembaruan",
"fullScreen": "Mode Layar Penuh",
"fullScreenJitter": "Jitter layar penuh",
"fullScreenJitterHelp": "Untuk menghindari pembakaran layar",
"fullScreenTip": "Apakah mode layar penuh diaktifkan ketika perangkat diputar ke modus lanskap? Opsi ini hanya berlaku untuk tab server.",
"getPushTokenFailed": "Tidak bisa mengambil token dorong",
"gettingToken": "Mendapatkan token ...",
"goBackQ": "Datang kembali?",
"goto": "Pergi ke",
"hideTitleBar": "Sembunyikan bilah judul",
@@ -126,40 +69,24 @@
"highlight": "Sorotan kode",
"homeWidgetUrlConfig": "Konfigurasi URL Widget Rumah",
"host": "Host",
"hour": "Jam",
"httpFailedWithCode": "Permintaan gagal, kode status: {code}",
"icloudSynced": "iCloud disinkronkan dan beberapa pengaturan mungkin memerlukan pengaktifan ulang aplikasi agar dapat diterapkan.",
"ignoreCert": "Abaikan sertifikat",
"image": "Gambar",
"imagesList": "Daftar gambar",
"import": "Impor",
"inAppUpdate": "Perbarui di dalam aplikasi? Jika tidak, unduh menggunakan browser.",
"init": "Menginisialisasi",
"inner": "Batin",
"inputDomainHere": "Input domain di sini",
"install": "Install",
"installDockerWithUrl": "Silakan https://docs.docker.com/engine/install Docker pertama.",
"invalid": "Tidak valid",
"invalidJson": "JSON tidak valid",
"invalidVersion": "Versi tidak valid",
"invalidVersionHelp": "Pastikan Docker diinstal dengan benar, atau Anda menggunakan versi yang tidak dikompilasi. Jika Anda tidak memiliki masalah di atas, silakan kirimkan masalah pada {url}.",
"isBusy": "Sibuk sekarang",
"jumpServer": "Lompat server",
"keepForeground": "Simpan Aplikasi Foreground!",
"keepStatusWhenErr": "Menyimpan status server terakhir",
"keepStatusWhenErrTip": "Hanya ketika terjadi kesalahan saat menjalankan skrip",
"keyAuth": "Auth kunci",
"language": "Bahasa",
"languageName": "Indonesia",
"lastTry": "Percobaan terakhir",
"launchPage": "Halaman peluncuran",
"letterCache": "Caching huruf",
"letterCacheTip": "Disarankan untuk diaktifkan, tetapi mengaktifkannya mencegah input karakter CJK (Cina, Jepang, Korea)",
"letterCacheTip": "Direkomendasikan untuk menonaktifkan, tetapi setelah dinonaktifkan, tidak mungkin untuk memasukkan karakter CJK.",
"license": "Lisensi",
"light": "Terang",
"loadingFiles": "Memuat file ...",
"location": "Lokasi",
"log": "Catatan",
"loss": "kehilangan",
"madeWithLove": "Dibuat dengan ❤️ oleh {myGithub}",
"manual": "Manual",
@@ -167,62 +94,36 @@
"maxRetryCount": "Jumlah penyambungan kembali server",
"maxRetryCountEqual0": "Akan mencoba lagi lagi dan lagi.",
"min": "Min",
"minute": "Menit",
"mission": "Misi",
"more": "Lebih Banyak",
"moveOutServerFuncBtnsHelp": "Aktif: dapat ditampilkan di bawah setiap kartu pada halaman Tab Server. Nonaktif: dapat ditampilkan di bagian atas halaman Rincian Server.",
"ms": "MS",
"name": "Nama",
"needHomeDir": "Jika Anda pengguna Synology, [lihat di sini](https://kb.synology.com/DSM/tutorial/user_enable_home_service). Pengguna sistem lain perlu mencari cara membuat direktori home.",
"needRestart": "Perlu memulai ulang aplikasi",
"net": "Jaringan",
"netViewType": "Jenis tampilan bersih",
"newContainer": "Wadah baru",
"noClient": "Tidak ada klien",
"noInterface": "Tidak ada antarmuka",
"noLineChart": "Jangan gunakan grafik garis",
"noLineChartForCpu": "Jangan gunakan diagram garis untuk CPU",
"noNotiPerm": "Tidak ada izin notifikasi, mungkin tidak ada indikasi kemajuan saat mengunduh pembaruan aplikasi.",
"noOptions": "Tidak ada opsi",
"noPrivateKeyTip": "Kunci privat tidak ada, mungkin telah dihapus atau ada kesalahan konfigurasi.",
"noPromptAgain": "Jangan tanya lagi",
"noResult": "Tidak ada hasil",
"noSavedPrivateKey": "Tidak ada kunci pribadi yang disimpan.",
"noSavedSnippet": "Tidak ada cuplikan yang disimpan.",
"noServerAvailable": "Tidak ada server yang tersedia.",
"noTask": "Tidak bertanya",
"noUpdateAvailable": "Tidak ada pembaruan yang tersedia",
"node": "Node",
"notAvailable": "Tidak tersedia",
"notSelected": "Tidak terpilih",
"note": "Catatan",
"nullToken": "Token NULL",
"ok": "OKE",
"onServerDetailPage": "Di halaman detail server",
"onlyOneLine": "Hanya tampilkan sebagai satu baris (dapat digulir)",
"onlyWhenCoreBiggerThan8": "Berlaku hanya ketika jumlah inti > 8",
"open": "Membuka",
"openLastPath": "Buka jalur terakhir",
"openLastPathTip": "Server yang berbeda akan memiliki catatan yang berbeda, dan catatan tersebut adalah jalur menuju pintu keluar",
"parseContainerStats": "Memecahkan status okupansi kontainer",
"parseContainerStatsTip": "Parsing status okupansi oleh Docker agak lambat",
"paste": "Tempel",
"path": "Jalur",
"percentOfSize": "{percent}% dari {size}",
"permission": "Izin",
"pickFile": "Pilih file",
"pingAvg": "Rata -rata:",
"pingInputIP": "Harap masukkan IP / domain target.",
"pingNoServer": "Tidak ada server untuk melakukan ping.\nHarap tambahkan server di tab Server.",
"pkg": "Pkg",
"pkgUpgradeTip": "Harap cadangkan sistem Anda sebelum memperbarui.",
"platformNotSupportUpdate": "Platform saat ini tidak mendukung pembaruan aplikasi.\nSilakan bangun dari sumber dan instal.",
"plugInType": "Jenis Penyisipan",
"plzEnterHost": "Harap masukkan host.",
"plzSelectKey": "Pilih kunci.",
"port": "Port",
"preview": "Pratinjau",
"primaryColorSeed": "Warna utama",
"privateKey": "Kunci Pribadi",
"process": "Proses",
"pushToken": "Dorong token",
@@ -232,16 +133,11 @@
"pwd": "Kata sandi",
"read": "Baca",
"reboot": "Reboot",
"rememberChoice": "Ingat pilihan",
"rememberPwdInMem": "Ingat kata sandi di dalam memori",
"rememberPwdInMemTip": "Digunakan untuk kontainer, menangguhkan, dll.",
"rememberWindowSize": "Ingat ukuran jendela",
"remotePath": "Jalur jarak jauh",
"rename": "Ganti nama",
"reportBugsOnGithubIssue": "Harap laporkan bug di {url}",
"restart": "Mengulang kembali",
"restore": "Memulihkan",
"restoreSuccess": "Kembalikan kesuksesan. Mulai ulang aplikasi untuk diterapkan.",
"result": "Hasil",
"rotateAngel": "Sudut rotasi",
"route": "Routing",
@@ -256,14 +152,8 @@
"serverDetailOrder": "Detail pesanan widget halaman",
"serverFuncBtns": "Tombol fungsi server",
"serverOrder": "Pesanan server",
"serverTabConnecting": "Menghubungkan ...",
"serverTabEmpty": "Tidak ada server.\nKlik fab untuk menambahkan satu.",
"serverTabFailed": "Gagal",
"serverTabLoading": "Memuat...",
"serverTabPlzSave": "Harap 'simpan' kunci pribadi ini lagi.",
"serverTabUnkown": "Negara yang tidak diketahui",
"setting": "Pengaturan",
"sftpDlPrepare": "Bersiap untuk terhubung ...",
"sftpEditorTip": "Jika kosong, gunakan editor file bawaan aplikasi. Jika ada nilai, gunakan editor server jarak jauh, misalnya `vim` (disarankan untuk mendeteksi secara otomatis sesuai `EDITOR`).",
"sftpRmrDirSummary": "Gunakan `rm -r` untuk menghapus dir di SFTP",
"sftpSSHConnected": "Sftp terhubung",
"sftpShowFoldersFirst": "Folder ditampilkan lebih dulu",
@@ -278,11 +168,11 @@
"sshTip": "Fungsi ini sekarang dalam tahap eksperimen.\n\nHarap laporkan bug di {url} atau bergabunglah dengan pengembangan kami.",
"sshVirtualKeyAutoOff": "Switching Otomatis Kunci Virtual",
"start": "Awal",
"stat": "Statistik",
"stats": "Statistik",
"stop": "Berhenti",
"stopped": "dihentikan",
"storage": "Penyimpanan",
"success": "Kesuksesan",
"supportFmtArgs": "Parameter pemformatan berikut ini didukung:",
"suspend": "Suspend",
"suspendTip": "Fungsi penangguhan memerlukan hak akses root dan dukungan systemd.",
@@ -298,7 +188,6 @@
"textScaler": "Penskalaan font",
"textScalerTip": "1.0 => 100% (ukuran asli), hanya berfungsi pada bagian halaman server font, tidak disarankan untuk diubah.",
"theme": " Tema",
"themeMode": "Mode tema",
"time": "Waktu",
"times": "Waktu",
"total": "Total",
@@ -306,27 +195,18 @@
"trySudo": "Cobalah menggunakan sudo",
"ttl": "TTL",
"unknown": "Tidak dikenal",
"unknownError": "Kesalahan yang tidak diketahui",
"unkownConvertMode": "Mode Konversi Tidak Diketahui",
"update": "Memperbarui",
"updateAll": "Perbarui semua",
"updateIntervalEqual0": "Anda mengatur ke 0, tidak akan memperbarui secara otomatis.\nTidak dapat menghitung status CPU.",
"updateServerStatusInterval": "Interval Pembaruan Status Server",
"updateTip": "UPDATE: v1.0.{newest}",
"updateTipTooLow": "Versi saat ini terlalu rendah, harap perbarui ke v1.0.{newest}",
"upload": "Mengunggah",
"upsideDown": "Terbalik",
"uptime": "Uptime",
"urlOrJson": "URL atau JSON",
"useCdn": "Menggunakan CDN",
"useCdnTip": "Pengguna non-Cina disarankan menggunakan CDN. Apakah Anda ingin menggunakannya?",
"useNoPwd": "Tidak ada kata sandi yang akan digunakan",
"usePodmanByDefault": "Menggunakan Podman sebagai bawaan",
"used": "Digunakan",
"user": "Username",
"versionHaveUpdate": "Ditemukan: v1.0.{build}, klik untuk memperbarui",
"versionUnknownUpdate": "Saat ini: v1.0.{build}. Klik untuk memeriksa pembaruan.",
"versionUpdated": "Saat ini: v1.0.{build}, mutakhir",
"view": "Tampilan",
"viewErr": "Lihat kesalahan",
"virtKeyHelpClipboard": "Salin ke clipboard jika terminal yang dipilih tidak kosong, jika tidak, tempel isi clipboard ke terminal.",
@@ -337,8 +217,8 @@
"watchNotPaired": "Tidak ada Apple Watch yang dipasangkan",
"webdavSettingEmpty": "Pengaturan webdav kosong",
"whenOpenApp": "Saat membuka aplikasi",
"willTakEeffectImmediately": "Akan segera berlaku",
"wolTip": "Setelah mengonfigurasi WOL (Wake-on-LAN), permintaan WOL dikirim setiap kali server terhubung.",
"write": "Tulis",
"writeScriptFailTip": "Penulisan ke skrip gagal, mungkin karena tidak ada izin atau direktori tidak ada."
"writeScriptFailTip": "Penulisan ke skrip gagal, mungkin karena tidak ada izin atau direktori tidak ada.",
"writeScriptTip": "Setelah terhubung ke server, sebuah skrip akan ditulis ke ~/.config/server_box untuk memantau status sistem. Anda dapat meninjau konten skrip tersebut."
}

View File

@@ -1,84 +1,42 @@
{
"@@locale": "ja",
"about": "約",
"aboutThanks": "以下の参加者に感謝します。",
"acceptBeta": "テストバージョンの更新を受け入れる",
"add": "追加",
"addAServer": "サーバーを追加する",
"addPrivateKey": "秘密鍵を追加",
"addSystemPrivateKeyTip": "現在秘密鍵がありません。システムのデフォルト(~/.ssh/id_rsa)を追加しますか?",
"added2List": "タスクリストに追加されました",
"addr": "アドレス",
"all": "すべて",
"alreadyLastDir": "すでに最上位のディレクトリです",
"askContinue": "{msg}、続行しますか?",
"attention": "注意",
"authFailTip": "認証に失敗しました。パスワード/鍵/ホスト/ユーザーなどが間違っていないか確認してください。",
"authRequired": "認証が必要",
"auto": "自動",
"autoBackupConflict": "自動バックアップは一度に一つしか開始できません",
"autoCheckUpdate": "自動的に更新をチェック",
"autoConnect": "自動接続",
"autoRun": "自動実行",
"autoUpdateHomeWidget": "ホームウィジェットを自動更新",
"backup": "バックアップ",
"backupTip": "エクスポートされたデータは簡単に暗号化されています。適切に保管してください。",
"backupVersionNotMatch": "バックアップバージョンが一致しないため、復元できません",
"battery": "バッテリー",
"bgRun": "バックグラウンド実行",
"bgRunTip": "このスイッチはプログラムがバックグラウンドで実行を試みることを意味しますが、実際にバックグラウンドで実行できるかどうかは、権限が有効になっているかに依存します。AOSPベースのAndroid ROMでは、このアプリの「バッテリー最適化」をオフにしてください。MIUIでは、省エネモードを「無制限」に変更してください。",
"bioAuth": "生体認証",
"browser": "ブラウザ",
"bulkImportServers": "サーバーを一括インポートする",
"bulkImportServersTip": "[こちら]({url})でフォーマットを見つけることができます",
"canPullRefresh": "引っ張って更新できます",
"cancel": "キャンセル",
"choose": "選択",
"chooseFontFile": "フォントファイルを選択",
"choosePrivateKey": "秘密鍵を選択",
"clear": "クリア",
"clipboard": "クリップボード",
"close": "閉じる",
"cmd": "コマンド",
"cnKeyboardComp": "中国のAndroidとの互換性",
"cnKeyboardCompTip": "ターミナルがセキュアキーボードを表示した場合、それを有効にできます。",
"collapseUI": "UIを折りたたむ",
"collapseUITip": "UIの長いリストをデフォルトで折りたたむかどうか",
"conn": "接続",
"connected": "接続済み",
"container": "コンテナ",
"containerName": "コンテナ名",
"containerStatus": "コンテナの状態",
"containerTrySudoTip": "例アプリ内でユーザーをaaaに設定しているが、Dockerがrootユーザーでインストールされている場合、このオプションを有効にする必要があります",
"content": "コンテンツ",
"convert": "変換",
"copy": "コピー",
"copyPath": "パスをコピー",
"cpuViewAsProgressTip": "各CPUの使用率をプログレスバースタイルで表示する旧スタイル",
"createFile": "ファイルを作成",
"createFolder": "フォルダーを作成",
"cursorType": "カーソルタイプ",
"customCmd": "カスタムコマンド",
"customCmdDocUrl": "https://github.com/lollipopkit/flutter_server_box/wiki#custom-commands",
"customCmdHint": "\"コマンド名\": \"コマンド\"",
"dark": "ダーク",
"day": "日",
"debug": "デバッグ",
"decode": "デコード",
"decompress": "解凍",
"delete": "削除",
"deleteServers": "サーバーを一括削除",
"deviceName": "デバイス名",
"dirEmpty": "フォルダーが空であることを確認してください",
"disabled": "無効",
"disconnected": "接続が切断されました",
"disk": "ディスク",
"diskIgnorePath": "無視されたディスクパス",
"displayCpuIndex": "CPUインデックスを表示する",
"displayName": "表示名",
"dl2Local": "{fileName}をローカルにダウンロードしますか?",
"doc": "ドキュメント",
"dockerEditHost": "DOCKER_HOSTを編集",
"dockerEmptyRunningItems": "実行中のコンテナがありません。\nこれは次の理由による可能性があります\n- Dockerのインストールユーザーとアプリ内の設定されたユーザー名が異なる\n- 環境変数DOCKER_HOSTが正しく読み込まれていない。ターミナルで`echo $DOCKER_HOST`を実行して取得できます。",
"dockerImagesFmt": "合計{count}イメージ",
"dockerNotInstalled": "Dockerがインストールされていません",
@@ -86,39 +44,24 @@
"dockerStatusRunningFmt": "{count}個のコンテナが実行中",
"doubleColumnMode": "ダブルカラムモード",
"doubleColumnTip": "このオプションは機能を有効にするだけで、実際に有効にできるかどうかはデバイスの幅に依存します",
"download": "ダウンロード",
"edit": "編集",
"editVirtKeys": "仮想キーを編集",
"editor": "エディター",
"editorHighlightTip": "現在のコードハイライトのパフォーマンスはかなり悪いため、改善するために無効にすることを選択できます。",
"encode": "エンコード",
"error": "エラー",
"exampleName": "名前例",
"envVars": "環境変数",
"experimentalFeature": "実験的な機能",
"export": "エクスポート",
"extraArgs": "追加引数",
"failed": "失敗しました",
"fallbackSshDest": "フォールバックSSH宛先",
"fdroidReleaseTip": "このアプリをF-Droidからダウンロードした場合、このオプションをオフにすることをお勧めします。",
"feedback": "フィードバック",
"feedbackOnGithub": "問題がある場合は、GitHubでフィードバックしてください",
"fieldMustNotEmpty": "これらの入力フィールドは空にできません。",
"fileNotExist": "{file}は存在しません",
"fileTooLarge": "ファイル '{file}' は大きすぎます '{size}'、{sizeMax} を超えています",
"files": "ファイル",
"finished": "完了しました",
"followSystem": "システムに従う",
"font": "フォント",
"fontSize": "フォントサイズ",
"forExample": "例えば",
"force": "強制",
"foundNUpdate": "{count}個の更新が見つかりました",
"fullScreen": "フルスクリーンモード",
"fullScreenJitter": "フルスクリーンモードのジッター",
"fullScreenJitterHelp": "焼き付き防止",
"fullScreenTip": "デバイスが横向きに回転したときにフルスクリーンモードを有効にしますか?このオプションはサーバータブにのみ適用されます。",
"getPushTokenFailed": "プッシュトークンを取得できませんでした",
"gettingToken": "トークンを取得しています...",
"goBackQ": "戻りますか?",
"goto": "移動",
"hideTitleBar": "タイトルバーを非表示にする",
@@ -126,40 +69,24 @@
"highlight": "コードハイライト",
"homeWidgetUrlConfig": "ホームウィジェットURL設定",
"host": "ホスト",
"hour": "時間",
"httpFailedWithCode": "リクエスト失敗、ステータスコード: {code}",
"icloudSynced": "iCloudが同期されました。一部の設定はアプリを再起動する必要があります。",
"ignoreCert": "証明書を無視する",
"image": "イメージ",
"imagesList": "イメージリスト",
"import": "インポート",
"inAppUpdate": "アプリ内で更新しますか?それ以外の場合は、ブラウザを使用してダウンロードしてください。",
"init": "初期化する",
"inner": "内蔵",
"inputDomainHere": "ここにドメインを入力",
"install": "インストール",
"installDockerWithUrl": "最初に https://docs.docker.com/engine/install dockerをインストールしてください",
"invalid": "無効",
"invalidJson": "無効なJSON",
"invalidVersion": "サポートされていないバージョン",
"invalidVersionHelp": "dockerが正しくインストールされていること、または自己コンパイルされたバージョンを使用していないことを確認してください。問題がない場合は、{url}で問題を報告してください。",
"isBusy": "現在忙しいです",
"jumpServer": "ジャンプサーバー",
"keepForeground": "アプリを前面に保ってください!",
"keepStatusWhenErr": "エラー時に前回のサーバーステータスを保持",
"keepStatusWhenErrTip": "スクリプトの実行エラーに限ります",
"keyAuth": "キー認証",
"language": "言語",
"languageName": "日本語",
"lastTry": "最後の試み",
"launchPage": "起動ページ",
"letterCache": "文字キャッシング",
"letterCacheTip": "有効化を推奨しますが、効にするとCJK中国語、日本語、韓国語文字入力ができなくなります",
"letterCacheTip": "無効にすることを推奨しますが、効にした後はCJK文字入力することができなくなります",
"license": "オープンソースライセンス",
"light": "ライト",
"loadingFiles": "ディレクトリを読み込んでいます...",
"location": "場所",
"log": "ログ",
"loss": "パケットロス",
"madeWithLove": "❤️で作成された {myGithub}",
"manual": "マニュアル",
@@ -167,62 +94,36 @@
"maxRetryCount": "サーバーの再接続試行回数",
"maxRetryCountEqual0": "無限に再試行します",
"min": "最小",
"minute": "分",
"mission": "ミッション",
"more": "もっと",
"moveOutServerFuncBtnsHelp": "有効にする:サーバータブの各カードの下に表示されます。無効にする:サーバーの詳細ページの上部に表示されます。",
"ms": "ミリ秒",
"name": "名前",
"needHomeDir": "Synologyユーザーの場合は、[こちらをご覧ください](https://kb.synology.com/DSM/tutorial/user_enable_home_service)。他のシステムのユーザーは、ホームディレクトリの作成方法を検索する必要があります。",
"needRestart": "アプリを再起動する必要があります",
"net": "ネットワーク",
"netViewType": "ネットワークビュータイプ",
"newContainer": "新しいコンテナを作成",
"noClient": "SSH接続がありません",
"noInterface": "使用可能なインターフェースがありません",
"noLineChart": "折れ線グラフを使用しない",
"noLineChartForCpu": "CPUに折れ線グラフを使わない",
"noNotiPerm": "通知の権限がないため、アプリの更新のダウンロード中に進行状況が表示されない場合があります。",
"noOptions": "選択肢がありません",
"noPrivateKeyTip": "秘密鍵が存在しません。削除されたか、設定ミスがある可能性があります。",
"noPromptAgain": "再度確認しない",
"noResult": "結果なし",
"noSavedPrivateKey": "保存された秘密鍵がありません。",
"noSavedSnippet": "保存されたスニペットがありません。",
"noServerAvailable": "使用可能なサーバーがありません。",
"noTask": "タスクがありません",
"noUpdateAvailable": "利用可能な更新はありません",
"node": "ノード",
"notAvailable": "利用不可",
"notSelected": "選択されていません",
"note": "メモ",
"nullToken": "トークンなし",
"ok": "OK",
"onServerDetailPage": "サーバーの詳細ページで",
"onlyOneLine": "一行のみ表示(スクロール可能)",
"onlyWhenCoreBiggerThan8": "コア数が8より大きい場合にのみ有効",
"open": "開く",
"openLastPath": "最後のパスを開く",
"openLastPathTip": "異なるサーバーには異なる記録があり、記録されているのは退出時のパスです",
"parseContainerStats": "コンテナ使用状況を解析",
"parseContainerStatsTip": "Dockerの使用状況の解析は比較的遅いです",
"paste": "貼り付け",
"path": "パス",
"percentOfSize": "{size} の {percent}%",
"permission": "権限",
"pickFile": "ファイルを選択",
"pingAvg": "平均:",
"pingInputIP": "対象のIPまたはドメインを入力してください",
"pingNoServer": "Pingに使用するサーバーがありません\nサーバータブでサーバーを追加してから再試行してください",
"pkg": "パッケージ管理",
"pkgUpgradeTip": "アップデートする前にシステムのバックアップを取ってください。",
"platformNotSupportUpdate": "現在のプラットフォームは更新をサポートしていません。最新のソースコードをコンパイルして手動でインストールしてください",
"plugInType": "挿入タイプ",
"plzEnterHost": "ホストを入力してください",
"plzSelectKey": "秘密鍵を選択してください",
"port": "ポート",
"preview": "プレビュー",
"primaryColorSeed": "プライマリーカラーシード",
"privateKey": "秘密鍵",
"process": "プロセス",
"pushToken": "プッシュトークン",
@@ -232,16 +133,11 @@
"pwd": "パスワード",
"read": "読み取り",
"reboot": "再起動",
"rememberChoice": "選択を記憶する",
"rememberPwdInMem": "メモリにパスワードを記憶する",
"rememberPwdInMemTip": "コンテナ、一時停止などに使用されます。",
"rememberWindowSize": "ウィンドウサイズを記憶する",
"remotePath": "リモートパス",
"rename": "名前を変更",
"reportBugsOnGithubIssue": "{url}で問題を報告してください",
"restart": "再開",
"restore": "復元",
"restoreSuccess": "復元に成功しました。変更を適用するためにアプリを再起動する必要があります",
"result": "結果",
"rotateAngel": "回転角度",
"route": "ルーティング",
@@ -256,14 +152,8 @@
"serverDetailOrder": "詳細ページのウィジェット順序",
"serverFuncBtns": "サーバー機能ボタン",
"serverOrder": "サーバー順序",
"serverTabConnecting": "接続中...",
"serverTabEmpty": "現在サーバーはありません。\n右下のボタンをクリックして追加してください。",
"serverTabFailed": "失敗",
"serverTabLoading": "読み込み中...",
"serverTabPlzSave": "この秘密鍵を再保存してください",
"serverTabUnkown": "不明な状態",
"setting": "設定",
"sftpDlPrepare": "サーバーへの接続を準備中...",
"sftpEditorTip": "空の場合は、アプリ内蔵のファイルエディタを使用します。値がある場合は、リモートサーバーのエディタ(例:`vim`)を使用します(`EDITOR` に従って自動検出することをお勧めします)。",
"sftpRmrDirSummary": "SFTPで`rm -r`を使用してフォルダーを削除",
"sftpSSHConnected": "SFTPに接続されました...",
"sftpShowFoldersFirst": "フォルダーを先に表示",
@@ -278,11 +168,11 @@
"sshTip": "この機能は現在テスト段階にあります。\n\n問題がある場合は、{url}でフィードバックしてください。",
"sshVirtualKeyAutoOff": "仮想キーの自動オフ",
"start": "開始",
"stat": "統計",
"stats": "統計",
"stop": "停止",
"stopped": "停止しました",
"storage": "ストレージ",
"success": "成功",
"supportFmtArgs": "以下のフォーマット引数がサポートされています:",
"suspend": "中断",
"suspendTip": "suspend機能はroot権限とsystemdのサポートが必要です。",
@@ -298,7 +188,6 @@
"textScaler": "テキストスケーラー",
"textScalerTip": "1.0 => 100%(デフォルトサイズ)。サーバーページの一部のテキストにのみ適用されます。変更をお勧めしません。",
"theme": "テーマ",
"themeMode": "テーマモード",
"time": "時間",
"times": "回",
"total": "合計",
@@ -306,27 +195,18 @@
"trySudo": "sudoを試みる",
"ttl": "TTL",
"unknown": "不明",
"unknownError": "未知のエラー",
"unkownConvertMode": "未知の変換モード",
"update": "更新",
"updateAll": "すべて更新",
"updateIntervalEqual0": "0に設定すると、サーバーの状態は自動的に更新されず、CPU使用率も計算できません。",
"updateServerStatusInterval": "サーバー状態の更新間隔",
"updateTip": "新バージョン: v1.0.{newest}",
"updateTipTooLow": "現在のバージョンが古すぎます。v1.0.{newest}にアップグレードしてください",
"upload": "アップロード",
"upsideDown": "上下逆転",
"uptime": "稼働時間",
"urlOrJson": "URLまたはJSON",
"useCdn": "CDNの使用",
"useCdnTip": "中国以外のユーザーにはCDNの使用が推奨されています。ご利用しますか",
"useNoPwd": "パスワードなしで使用します",
"usePodmanByDefault": "デフォルトでPodmanを使用",
"used": "使用済み",
"user": "ユーザー",
"versionHaveUpdate": "新しいバージョンが見つかりましたv1.0.{build}、クリックして更新",
"versionUnknownUpdate": "現在v1.0.{build}、更新をチェックするためにクリック",
"versionUpdated": "現在v1.0.{build}、最新バージョンです",
"view": "ビュー",
"viewErr": "エラーを表示",
"virtKeyHelpClipboard": "端末に選択された文字がある場合は、選択された文字をクリップボードにコピーします。そうでない場合は、クリップボードの内容を端末に貼り付けます。",
@@ -337,8 +217,8 @@
"watchNotPaired": "ペアリングされたApple Watchがありません",
"webdavSettingEmpty": "Webdavの設定が空です",
"whenOpenApp": "アプリを開くとき",
"willTakEeffectImmediately": "変更は即座に有効になります",
"wolTip": "WOLWake-on-LANを設定した後、サーバーに接続するたびにWOLリクエストが送信されます。",
"write": "書き込み",
"writeScriptFailTip": "スクリプトの書き込みに失敗しました。権限がないかディレクトリが存在しない可能性があります。"
"writeScriptFailTip": "スクリプトの書き込みに失敗しました。権限がないかディレクトリが存在しない可能性があります。",
"writeScriptTip": "サーバーに接続すると、システムの状態を監視するためのスクリプトが ~/.config/server_box に書き込まれます。スクリプトの内容を確認できます。"
}

View File

@@ -1,84 +1,42 @@
{
"@@locale": "nl",
"about": "Over",
"aboutThanks": "Met dank aan de volgende mensen die hebben deelgenomen aan.",
"acceptBeta": "Accepteer testversie-updates",
"add": "Toevoegen",
"addAServer": "een server toevoegen",
"addPrivateKey": "Privésleutel toevoegen",
"addSystemPrivateKeyTip": "Er is momenteel geen privésleutel, wilt u degene toevoegen die bij het systeem wordt geleverd (~/.ssh/id_rsa)?",
"added2List": "Toegevoegd aan takenlijst",
"addr": "Adres",
"all": "Alle",
"alreadyLastDir": "Al in de laatst gebruikte map.",
"askContinue": "{msg}. Doorgaan?",
"attention": "Let op",
"authFailTip": "Authenticatie mislukt, controleer of het wachtwoord/sleutel/host/gebruiker, enz., incorrect zijn.",
"authRequired": "Authenticatie vereist",
"auto": "Auto",
"autoBackupConflict": "Er kan slechts één automatische back-up tegelijk worden ingeschakeld.",
"autoCheckUpdate": "Automatisch controleren op update",
"autoConnect": "Automatisch verbinden",
"autoRun": "Automatisch uitvoeren",
"autoUpdateHomeWidget": "Automatische update van home-widget",
"backup": "Back-up",
"backupTip": "De geëxporteerde gegevens zijn simpelweg versleuteld. \nBewaar deze aub veilig.",
"backupVersionNotMatch": "Back-upversie komt niet overeen.",
"battery": "Batterij",
"bgRun": "Uitvoeren op de achtergrond",
"bgRunTip": "Deze schakelaar betekent alleen dat het programma zal proberen op de achtergrond uit te voeren, of het in de achtergrond kan worden uitgevoerd, hangt af van of de toestemming is ingeschakeld of niet. Voor native Android, schakel \"Batterijoptimalisatie\" uit in deze app, en voor miui, wijzig de energiebesparingsbeleid naar \"Onbeperkt\".",
"bioAuth": "Biometrische authenticatie",
"browser": "Browser",
"bulkImportServers": "Servers batchgewijs importeren",
"bulkImportServersTip": "U kunt het [formaat]({url}) hier vinden.",
"canPullRefresh": "Je kunt verversen door te slepen.",
"cancel": "Annuleren",
"choose": "Kiezen",
"chooseFontFile": "Kies een font bestand",
"choosePrivateKey": "Privésleutel kiezen",
"clear": "Wissen",
"clipboard": "Klembord",
"close": "Sluiten",
"cmd": "Opdracht",
"cnKeyboardComp": "Compatibiliteit met Chinese Android",
"cnKeyboardCompTip": "Als de terminal een beveiligd toetsenbord weergeeft, kunt u dit inschakelen.",
"collapseUI": "Inklappen",
"collapseUITip": "Of lange lijsten in de UI standaard moeten worden ingeklapt",
"conn": "Verbinding",
"connected": "Verbonden",
"container": "Container",
"containerName": "Container naam",
"containerStatus": "Containerstatus",
"containerTrySudoTip": "Bijvoorbeeld: in de app is de gebruiker ingesteld op aaa, maar Docker is geïnstalleerd onder de rootgebruiker. In dit geval moet u deze optie inschakelen.",
"content": "Inhoud",
"convert": "Converteren",
"copy": "Kopiëren",
"copyPath": "Pad kopiëren",
"cpuViewAsProgressTip": "Toon het gebruik van elke CPU in een voortgangsbalkstijl (oude stijl)",
"createFile": "Bestand aanmaken",
"createFolder": "Map aanmaken",
"cursorType": "Cursortype",
"customCmd": "Aangepaste opdrachten",
"customCmdDocUrl": "https://github.com/lollipopkit/flutter_server_box/wiki#custom-commands",
"customCmdHint": "\"Opdrachtnaam\": \"Opdracht\"",
"dark": "Donker",
"day": "Dag",
"debug": "Debuggen",
"decode": "Decoderen",
"decompress": "Decomprimeren",
"delete": "Verwijderen",
"deleteServers": "Servers batchgewijs verwijderen",
"deviceName": "Apparaatnaam",
"dirEmpty": "Zorg ervoor dat de map leeg is.",
"disabled": "Uitgeschakeld",
"disconnected": "Verbroken",
"disk": "Schijf",
"diskIgnorePath": "Pad negeren voor schijf",
"displayCpuIndex": "Toon de CPU-index",
"displayName": "Weergavenaam",
"dl2Local": "Download {fileName} naar lokaal?",
"doc": "Documentatie",
"dockerEditHost": "DOCKER_HOST bewerken",
"dockerEmptyRunningItems": "Er zijn geen actieve containers.\nDit kan komen doordat:\n- De Docker-installatiegebruiker niet overeenkomt met de gebruikersnaam die is geconfigureerd binnen de app.\n- De omgevingsvariabele DOCKER_HOST is niet correct gelezen. U kunt deze krijgen door `echo $DOCKER_HOST` in de terminal uit te voeren.",
"dockerImagesFmt": "{count} afbeeldingen",
"dockerNotInstalled": "Docker niet geïnstalleerd",
@@ -86,39 +44,24 @@
"dockerStatusRunningFmt": "{count} container actief.",
"doubleColumnMode": "Dubbele kolommodus",
"doubleColumnTip": "Deze optie schakelt alleen de functie in, of deze daadwerkelijk kan worden ingeschakeld, hangt af van de breedte van het apparaat",
"download": "Downloaden",
"edit": "Bewerken",
"editVirtKeys": "Virtuele toetsen bewerken",
"editor": "Editor",
"editorHighlightTip": "De huidige codehighlighting-prestaties zijn slechter en kunnen optioneel worden uitgeschakeld om te verbeteren.",
"encode": "Coderen",
"error": "Fout",
"exampleName": "Voorbeeldnaam",
"envVars": "Omgevingsvariabele",
"experimentalFeature": "Experimentele functie",
"export": "Exporteren",
"extraArgs": "Extra argumenten",
"failed": "Mislukt",
"fallbackSshDest": "Fallback SSH-bestemming",
"fdroidReleaseTip": "Als u deze app van F-Droid heeft gedownload, wordt aanbevolen deze optie uit te schakelen.",
"feedback": "Feedback",
"feedbackOnGithub": "Als je vragen hebt, geef dan feedback op Github.",
"fieldMustNotEmpty": "Deze velden mogen niet leeg zijn.",
"fileNotExist": "{file} bestaat niet",
"fileTooLarge": "Bestand '{file}' te groot {size}, max {sizeMax}",
"files": "Bestanden",
"finished": "Voltooid",
"followSystem": "Volg systeem",
"font": "Lettertype",
"fontSize": "Lettergrootte",
"forExample": "Bijvoorbeeld",
"force": "Forceer",
"foundNUpdate": "{count} update gevonden",
"fullScreen": "Volledig schermmodus",
"fullScreenJitter": "Volledig scherm trilling",
"fullScreenJitterHelp": "Om inbranden van het scherm te voorkomen",
"fullScreenTip": "Moet de volledig schermmodus worden ingeschakeld wanneer het apparaat naar de liggende modus wordt gedraaid? Deze optie is alleen van toepassing op het servertabblad.",
"getPushTokenFailed": "Kan push-token niet ophalen",
"gettingToken": "Token ophalen...",
"goBackQ": "Terug gaan?",
"goto": "Ga naar",
"hideTitleBar": "Titelbalk verbergen",
@@ -126,40 +69,24 @@
"highlight": "Code-highlight",
"homeWidgetUrlConfig": "Home-widget-url configureren",
"host": "Host",
"hour": "Uur",
"httpFailedWithCode": "verzoek mislukt, statuscode: {code}",
"icloudSynced": "iCloud wordt gesynchroniseerd en sommige instellingen vereisen mogelijk een herstart van de app om van kracht te worden.",
"ignoreCert": "Certificaat negeren",
"image": "Afbeelding",
"imagesList": "Lijst met afbeeldingen",
"import": "Importeren",
"inAppUpdate": "Bijwerken binnen de app? Anders downloaden via een browser.",
"init": "Initialiseren",
"inner": "Intern",
"inputDomainHere": "Voer hier domein in",
"install": "Installeren",
"installDockerWithUrl": "Installeer eerst docker via https://docs.docker.com/engine/install.",
"invalid": "Ongeldig",
"invalidJson": "Ongeldige JSON",
"invalidVersion": "Ongeldige versie",
"invalidVersionHelp": "Zorg ervoor dat docker correct is geïnstalleerd, of dat u een niet-zelf-gecompileerde versie gebruikt. Als dat niet het geval is, meld dan een probleem op {url}.",
"isBusy": "Is momenteel bezig",
"jumpServer": "Spring naar server",
"keepForeground": "Houd de app op de voorgrond!",
"keepStatusWhenErr": "Behoud de laatste serverstatus",
"keepStatusWhenErrTip": "Alleen in geval van een fout tijdens de scriptuitvoering",
"keyAuth": "Sleutelauthenticatie",
"language": "Taal",
"languageName": "Nederlands",
"lastTry": "Laatste poging",
"launchPage": "Startpagina",
"letterCache": "Lettercaching",
"letterCacheTip": "Aanbevolen om in te schakelen, maar bij inschakeling wordt de invoer van CJK (Chinees, Japans, Koreaans) tekens voorkomen",
"letterCacheTip": "Aanbevolen om uit te schakelen, maar na het uitschakelen is het niet mogelijk om CJK-tekens in te voeren.",
"license": "Licentie",
"light": "Licht",
"loadingFiles": "Bestanden laden...",
"location": "Locatie",
"log": "Logboek",
"loss": "verlies",
"madeWithLove": "Gemaakt met ❤️ door {myGithub}",
"manual": "Handleiding",
@@ -167,62 +94,36 @@
"maxRetryCount": "Aantal serverherverbindingen",
"maxRetryCountEqual0": "Zal opnieuw blijven proberen.",
"min": "min",
"minute": "Minuut",
"mission": "Missie",
"more": "Meer",
"moveOutServerFuncBtnsHelp": "Aan: kan worden weergegeven onder elke kaart op de Server-tabbladpagina. Uit: kan worden weergegeven bovenaan de Serverdetails-pagina.",
"ms": "ms",
"name": "Naam",
"needHomeDir": "Als u een Synology-gebruiker bent, [zie hier](https://kb.synology.com/DSM/tutorial/user_enable_home_service). Gebruikers van andere systemen moeten zoeken hoe ze een home directory kunnen creëren.",
"needRestart": "App moet opnieuw worden gestart",
"net": "Netwerk",
"netViewType": "Netweergavetype",
"newContainer": "Nieuwe container",
"noClient": "Geen client",
"noInterface": "Geen interface",
"noLineChart": "lijndiagrammen gebruiken",
"noLineChartForCpu": "Gebruik geen lijndiagrammen voor CPU",
"noNotiPerm": "Geen meldingsmachtigingen, mogelijk geen voortgangsindicatie bij het downloaden van app-updates.",
"noOptions": "Geen opties",
"noPrivateKeyTip": "De privésleutel bestaat niet, deze is mogelijk verwijderd of er is een configuratiefout.",
"noPromptAgain": "Niet meer vragen",
"noResult": "Geen resultaat",
"noSavedPrivateKey": "Geen opgeslagen privésleutels.",
"noSavedSnippet": "Geen opgeslagen fragmenten.",
"noServerAvailable": "Geen server beschikbaar.",
"noTask": "Geen taak",
"noUpdateAvailable": "Geen update beschikbaar",
"node": "Node",
"notAvailable": "Niet beschikbaar",
"notSelected": "Niet geselecteerd",
"note": "Opmerking",
"nullToken": "Null-token",
"ok": "OK",
"onServerDetailPage": "Op serverdetailspagina",
"onlyOneLine": "Alleen als één regel weergeven (scrollbaar)",
"onlyWhenCoreBiggerThan8": "Alleen effectief wanneer het aantal cores > 8",
"open": "Openen",
"openLastPath": "Open het laatste pad",
"openLastPathTip": "Verschillende servers hebben verschillende logs, en de log is het pad naar de uitgang",
"parseContainerStats": "Parseer de containerbezettingstatus",
"parseContainerStatsTip": "Het parsen van de bezettingsstatus van Docker is relatief langzaam.",
"paste": "Plakken",
"path": "Pad",
"percentOfSize": "{percent}% van {size}",
"permission": "Machtigingen",
"pickFile": "Bestand kiezen",
"pingAvg": "Gem:",
"pingInputIP": "Voer een doel-IP / domein in.",
"pingNoServer": "Geen server om te pingen.\nVoeg een server toe in het servertabblad.",
"pkg": "Pkg",
"pkgUpgradeTip": "Maak een back-up van uw systeem voordat u een update uitvoert.",
"platformNotSupportUpdate": "Huidig platform ondersteunt geen updates in de app.\nBouw het alstublieft uit bron en installeer het.",
"plugInType": "Invoegingstype",
"plzEnterHost": "Voer host in a.u.b.",
"plzSelectKey": "Selecteer a.u.b. een sleutel.",
"port": "Poort",
"preview": "Voorbeeld",
"primaryColorSeed": "Basis kleurzaad",
"privateKey": "Privésleutel",
"process": "Proces",
"pushToken": "Push-token",
@@ -232,16 +133,11 @@
"pwd": "Wachtwoord",
"read": "Lezen",
"reboot": "Herstart",
"rememberChoice": "Selectie onthouden",
"rememberPwdInMem": "Wachtwoord onthouden in geheugen",
"rememberPwdInMemTip": "Gebruikt voor containers, opschorting, enz.",
"rememberWindowSize": "Venstergrootte onthouden",
"remotePath": "Extern pad",
"rename": "Hernoemen",
"reportBugsOnGithubIssue": "Meld alstublieft bugs op {url}",
"restart": "Herstarten",
"restore": "Herstellen",
"restoreSuccess": "Herstellen geslaagd. App herstarten om toe te passen.",
"result": "Resultaat",
"rotateAngel": "Rotatiehoek",
"route": "Route",
@@ -256,14 +152,8 @@
"serverDetailOrder": "Volgorde van widget op detailpagina",
"serverFuncBtns": "Server functieknoppen",
"serverOrder": "Servervolgorde",
"serverTabConnecting": "Verbinding maken...",
"serverTabEmpty": "Er is geen server.\nKlik op fab om er een toe te voegen.",
"serverTabFailed": "Mislukt",
"serverTabLoading": "Laden...",
"serverTabPlzSave": "Sla deze privésleutel opnieuw op.",
"serverTabUnkown": "Onbekende status",
"setting": "Instellingen",
"sftpDlPrepare": "Voorbereiden om verbinding te maken...",
"sftpEditorTip": "Indien leeg, gebruik de ingebouwde bestandseditor van de app. Indien een waarde aanwezig is, gebruik de editor van de externe server, bijvoorbeeld `vim` (aanbevolen om automatisch te detecteren volgens `EDITOR`).",
"sftpRmrDirSummary": "Gebruik `rm -r` om een map te verwijderen in SFTP.",
"sftpSSHConnected": "SFTP Verbonden",
"sftpShowFoldersFirst": "Mappen eerst weergeven",
@@ -278,11 +168,11 @@
"sshTip": "Deze functie bevindt zich momenteel in de experimentele fase.\n\nMeld alstublieft bugs op {url} of sluit je aan bij onze ontwikkeling.",
"sshVirtualKeyAutoOff": "Automatisch schakelen van virtuele toetsen",
"start": "Starten",
"stat": "Statistieken",
"stats": "Statistieken",
"stop": "Stoppen",
"stopped": "Gestopt",
"storage": "Opslag",
"success": "Succes",
"supportFmtArgs": "De volgende opmaakparameters worden ondersteund:",
"suspend": "Ophangen",
"suspendTip": "De opschortfunctie vereist rootrechten en systemd-ondersteuning.",
@@ -298,7 +188,6 @@
"textScaler": "Tekstschaler",
"textScalerTip": "1.0 => 100% (oorspronkelijke grootte), werkt alleen op het gedeelte van de serverpagina van het lettertype, niet aanbevolen om te wijzigen.",
"theme": "Thema",
"themeMode": "Themamodus",
"time": "Tijd",
"times": "Keer",
"total": "Totaal",
@@ -306,27 +195,18 @@
"trySudo": "Probeer sudo te gebruiken",
"ttl": "TTL",
"unknown": "Onbekend",
"unknownError": "Onbekende fout",
"unkownConvertMode": "Onbekende conversiemodus",
"update": "Bijwerken",
"updateAll": "Alles bijwerken",
"updateIntervalEqual0": "Het staat op 0, het zal niet automatisch bijwerken\nCPU status kan niet berekend worden.",
"updateServerStatusInterval": "Interne server status bijwerking interval",
"updateTip": "Bijwerking: v1.0.{newest}",
"updateTipTooLow": "Huidige versie is te oud, werk aub bij naar versie v1.0.{newest}",
"upload": "Upload",
"upsideDown": "Ondersteboven",
"uptime": "Uptime",
"urlOrJson": "URL of JSON",
"useCdn": "Gebruikt CDN",
"useCdnTip": "Niet-chinese gebruikers worden aangeraden om deze CDN te gebruiken. Wil je dat?",
"useNoPwd": "Er zal geen wachtwoord gebruikt worden",
"usePodmanByDefault": "Valt terug op Podman",
"used": "Gebruikt",
"user": "Gebruiker",
"versionHaveUpdate": "Gevonden: v1.0.{build}, klik om bij te werken",
"versionUnknownUpdate": "Huidig: v1.0.{build}, klik om te kijken naar een nieuwere versie",
"versionUpdated": "Huidig: v1.0.{build}, is bijgewerkt naar de laatste versie",
"view": "Weergave",
"viewErr": "Zie foutmelding",
"virtKeyHelpClipboard": "Kopiëren naar het klembord als de geselecteerde terminal niet leeg is, anders de inhoud van het klembord plakken in de terminal.",
@@ -337,8 +217,8 @@
"watchNotPaired": "Geen gekoppelde Apple Watch",
"webdavSettingEmpty": "Webdav-instelling is leeg",
"whenOpenApp": "Bij het openen van de app",
"willTakEeffectImmediately": "Zal onmiddellijk van kracht worden",
"wolTip": "Na het configureren van WOL (Wake-on-LAN), wordt elke keer dat de server wordt verbonden een WOL-verzoek verzonden.",
"write": "Schrijven",
"writeScriptFailTip": "Het schrijven naar het script is mislukt, mogelijk door gebrek aan rechten of omdat de map niet bestaat."
"writeScriptFailTip": "Het schrijven naar het script is mislukt, mogelijk door gebrek aan rechten of omdat de map niet bestaat.",
"writeScriptTip": "Na het verbinden met de server wordt een script geschreven naar ~/.config/server_box om de systeemstatus te monitoren. U kunt de inhoud van het script controleren."
}

View File

@@ -1,84 +1,42 @@
{
"@@locale": "pt",
"about": "Sobre",
"aboutThanks": "Agradecimentos a todos os participantes.",
"acceptBeta": "Aceitar atualizações da versão de teste",
"add": "Adicionar",
"addAServer": "Adicionar um servidor",
"addPrivateKey": "Adicionar uma chave privada",
"addSystemPrivateKeyTip": "Atualmente, não há nenhuma chave privada. Gostaria de adicionar a chave do sistema (~/.ssh/id_rsa)?",
"added2List": "Adicionado à lista de tarefas",
"addr": "Endereço",
"all": "Todos",
"alreadyLastDir": "Já é o diretório mais alto",
"askContinue": "{msg}, continuar?",
"attention": "Atenção",
"authFailTip": "Autenticação falhou, por favor verifique se a senha/chave/host/usuário, etc., estão incorretos.",
"authRequired": "Autenticação necessária",
"auto": "Automático",
"autoBackupConflict": "Apenas um backup automático pode ser ativado por vez",
"autoCheckUpdate": "Verificação automática de atualização",
"autoConnect": "Conexão automática",
"autoRun": "Execução automática",
"autoUpdateHomeWidget": "Atualização automática do widget da tela inicial",
"backup": "Backup",
"backupTip": "Os dados exportados são criptografados de forma simples, por favor, guarde-os com segurança.",
"backupVersionNotMatch": "Versão de backup não compatível, não é possível restaurar",
"battery": "Bateria",
"bgRun": "Execução em segundo plano",
"bgRunTip": "Este interruptor indica que o programa tentará rodar em segundo plano, mas a capacidade de fazer isso depende das permissões concedidas. No Android nativo, desative a 'Otimização de bateria' para este app, no MIUI, altere a estratégia de economia de energia para 'Sem restrições'.",
"bioAuth": "Autenticação biométrica",
"browser": "Navegador",
"bulkImportServers": "Importar servidores em lote",
"bulkImportServersTip": "Você pode encontrar o [formato]({url}) aqui.",
"canPullRefresh": "Pode puxar para atualizar",
"cancel": "Cancelar",
"choose": "Escolher",
"chooseFontFile": "Escolher arquivo de fonte",
"choosePrivateKey": "Escolher chave privada",
"clear": "Limpar",
"clipboard": "Área de transferência",
"close": "Fechar",
"cmd": "Comando",
"cnKeyboardComp": "Compatibilidade com Android chinês",
"cnKeyboardCompTip": "Se o terminal abrir um teclado seguro, você pode ativá-lo.",
"collapseUI": "Colapsar",
"collapseUITip": "Deve colapsar listas longas na UI por padrão?",
"conn": "Conectar",
"connected": "Conectado",
"container": "Contêiner",
"containerName": "Nome do contêiner",
"containerStatus": "Estado do contêiner",
"containerTrySudoTip": "Por exemplo: se o usuário for definido como aaa dentro do app, mas o Docker estiver instalado sob o usuário root, esta opção precisará ser ativada",
"content": "Conteúdo",
"convert": "Converter",
"copy": "Copiar",
"copyPath": "Copiar caminho",
"cpuViewAsProgressTip": "Exiba a taxa de uso de cada CPU em estilo de barra de progresso (estilo antigo)",
"createFile": "Criar arquivo",
"createFolder": "Criar pasta",
"cursorType": "Tipo de cursor",
"customCmd": "Comandos personalizados",
"customCmdDocUrl": "https://github.com/lollipopkit/flutter_server_box/wiki#custom-commands",
"customCmdHint": "\"Nome do comando\": \"Comando\"",
"dark": "Escuro",
"day": "Dia",
"debug": "Debugar",
"decode": "Decodificar",
"decompress": "Descomprimir",
"delete": "Excluir",
"deleteServers": "Excluir servidores em lote",
"deviceName": "Nome do dispositivo",
"dirEmpty": "Certifique-se de que a pasta está vazia",
"disabled": "Desativado",
"disconnected": "Desconectado",
"disk": "Disco",
"diskIgnorePath": "Caminhos de disco ignorados",
"displayCpuIndex": "Exiba o índice de CPU",
"displayName": "Nome de exibição",
"dl2Local": "Baixar {fileName} para o local?",
"doc": "Documentação",
"dockerEditHost": "Editar DOCKER_HOST",
"dockerEmptyRunningItems": "Não há contêineres em execução.\nIsso pode ser porque:\n- O usuário que instalou o Docker difere do usuário configurado no app\n- A variável de ambiente DOCKER_HOST não foi lida corretamente. Você pode verificar isso executando `echo $DOCKER_HOST` no terminal.",
"dockerImagesFmt": "Total de {count} imagens",
"dockerNotInstalled": "Docker não instalado",
@@ -86,39 +44,24 @@
"dockerStatusRunningFmt": "{count} contêiner(es) em execução",
"doubleColumnMode": "Modo de coluna dupla",
"doubleColumnTip": "Esta opção apenas ativa a funcionalidade, se ela será ativada depende também da largura do dispositivo",
"download": "Baixar",
"edit": "Editar",
"editVirtKeys": "Editar teclas virtuais",
"editor": "Editor",
"editorHighlightTip": "O desempenho do destaque de código atualmente é ruim, pode optar por desativá-lo para melhorar.",
"encode": "Codificar",
"error": "Erro",
"exampleName": "Exemplo de nome",
"envVars": "Variável de ambiente",
"experimentalFeature": "Recurso experimental",
"export": "Exportar",
"extraArgs": "Argumentos extras",
"failed": "Falhou",
"fallbackSshDest": "Destino SSH de fallback",
"fdroidReleaseTip": "Se você baixou este aplicativo do F-Droid, é recomendado desativar esta opção.",
"feedback": "Feedback",
"feedbackOnGithub": "Se você tem qualquer problema, por favor, dê feedback no GitHub",
"fieldMustNotEmpty": "Estes campos não podem estar vazios.",
"fileNotExist": "{file} não existe",
"fileTooLarge": "Arquivo '{file}' muito grande '{size}', excedendo {sizeMax}",
"files": "Arquivos",
"finished": "Finalizado",
"followSystem": "Seguir sistema",
"font": "Fonte",
"fontSize": "Tamanho da fonte",
"forExample": "Por exemplo",
"force": "Forçar",
"foundNUpdate": "Encontradas {count} atualizações",
"fullScreen": "Modo tela cheia",
"fullScreenJitter": "Tremulação em tela cheia",
"fullScreenJitterHelp": "Prevenir burn-in de tela",
"fullScreenTip": "Deve ser ativado o modo de tela cheia quando o dispositivo é girado para o modo paisagem? Esta opção aplica-se apenas à aba do servidor.",
"getPushTokenFailed": "Não foi possível obter token de notificação",
"gettingToken": "Obtendo Token...",
"goBackQ": "Voltar?",
"goto": "Ir para",
"hideTitleBar": "Ocultar barra de título",
@@ -126,40 +69,24 @@
"highlight": "Destaque de código",
"homeWidgetUrlConfig": "Configuração de URL do widget da tela inicial",
"host": "Host",
"hour": "Hora",
"httpFailedWithCode": "Falha na solicitação, código de status: {code}",
"icloudSynced": "iCloud sincronizado, algumas configurações podem precisar de reinicialização do app para serem aplicadas.",
"ignoreCert": "Ignorar certificado",
"image": "Imagem",
"imagesList": "Lista de imagens",
"import": "Importar",
"inAppUpdate": "Atualizar dentro do app? Caso contrário, baixe usando um navegador.",
"init": "Inicializar",
"inner": "Interno",
"inputDomainHere": "Insira o domínio aqui",
"install": "Instalar",
"installDockerWithUrl": "Por favor, instale o Docker primeiro em https://docs.docker.com/engine/install",
"invalid": "Inválido",
"invalidJson": "JSON inválido",
"invalidVersion": "Versão não suportada",
"invalidVersionHelp": "Por favor, assegure que o Docker está corretamente instalado, ou que não está usando uma versão compilada por si mesmo. Se não houver problemas, por favor, reporte em {url}.",
"isBusy": "Ocupado no momento",
"jumpServer": "Servidor de salto",
"keepForeground": "Por favor, mantenha o app em primeiro plano!",
"keepStatusWhenErr": "Manter o status anterior do servidor",
"keepStatusWhenErrTip": "Limitado a erros de execução de scripts",
"keyAuth": "Autenticação por chave",
"language": "Idioma",
"languageName": "Português",
"lastTry": "Última tentativa",
"launchPage": "Página de lançamento",
"letterCache": "Cache de letras",
"letterCacheTip": "Recomendado para ativar, mas a ativação impede a entrada de caracteres CJK (chinês, japonês, coreano)",
"letterCacheTip": "Recomendado desativar, mas após desativar, será impossível inserir caracteres CJK.",
"license": "Licença de código aberto",
"light": "Claro",
"loadingFiles": "Carregando diretórios...",
"location": "Localização",
"log": "Log",
"loss": "Taxa de perda",
"madeWithLove": "Feito com ❤️ por {myGithub}",
"manual": "Manual",
@@ -167,62 +94,36 @@
"maxRetryCount": "Número de tentativas de reconexão com o servidor",
"maxRetryCountEqual0": "Irá tentar indefinidamente",
"min": "Mínimo",
"minute": "Minuto",
"mission": "Missão",
"more": "Mais",
"moveOutServerFuncBtnsHelp": "Ativado: Mostra abaixo de cada cartão na aba do servidor. Desativado: Mostra no topo da página de detalhes do servidor.",
"ms": "ms",
"name": "Nome",
"needHomeDir": "Se você é usuário de Synology, [veja aqui](https://kb.synology.com/DSM/tutorial/user_enable_home_service). Usuários de outros sistemas precisam pesquisar como criar um diretório home.",
"needRestart": "Necessita reiniciar o app",
"net": "Rede",
"netViewType": "Tipo de visualização de rede",
"newContainer": "Novo contêiner",
"noClient": "Sem conexão SSH",
"noInterface": "Sem interface disponível",
"noLineChart": "Não usar gráficos de linha",
"noLineChartForCpu": "Não utilizar gráficos de linhas para a CPU",
"noNotiPerm": "Sem permissão de notificação, possivelmente sem indicação de progresso ao baixar atualizações de aplicativos.",
"noOptions": "Sem opções",
"noPrivateKeyTip": "A chave privada não existe, pode ter sido deletada ou há um erro de configuração.",
"noPromptAgain": "Não perguntar novamente",
"noResult": "Sem resultados",
"noSavedPrivateKey": "Nenhuma chave privada salva.",
"noSavedSnippet": "Nenhum snippet de código salvo.",
"noServerAvailable": "Nenhum servidor disponível.",
"noTask": "Sem tarefas",
"noUpdateAvailable": "Sem atualizações disponíveis",
"node": "Nó",
"notAvailable": "Indisponível",
"notSelected": "Não selecionado",
"note": "Nota",
"nullToken": "Token nulo",
"ok": "OK",
"onServerDetailPage": "Na página de detalhes do servidor",
"onlyOneLine": "Exibir apenas como uma linha (rolável)",
"onlyWhenCoreBiggerThan8": "Efetivo apenas quando o número de núcleos > 8",
"open": "Abrir",
"openLastPath": "Abrir o último caminho",
"openLastPathTip": "Registros diferentes para servidores diferentes, e registra o caminho ao sair",
"parseContainerStats": "Analisar status de uso do contêiner",
"parseContainerStatsTip": "Análise de status do Docker pode ser lenta",
"paste": "Colar",
"path": "Caminho",
"percentOfSize": "{percent}% de {size}",
"permission": "Permissões",
"pickFile": "Escolher arquivo",
"pingAvg": "Média:",
"pingInputIP": "Por favor, insira o IP ou domínio alvo",
"pingNoServer": "Nenhum servidor disponível para Ping\nPor favor, adicione um servidor na aba de servidores e tente novamente",
"pkg": "Gerenciamento de pacotes",
"pkgUpgradeTip": "Por favor, faça backup do seu sistema antes de atualizar.",
"platformNotSupportUpdate": "Atualização não suportada na plataforma atual, por favor, instale manualmente a versão mais recente do código-fonte",
"plugInType": "Tipo de Inserção",
"plzEnterHost": "Por favor, insira o host",
"plzSelectKey": "Por favor, selecione uma chave privada",
"port": "Porta",
"preview": "Pré-visualização",
"primaryColorSeed": "Semente da cor primária",
"privateKey": "Chave privada",
"process": "Processo",
"pushToken": "Token de notificação push",
@@ -232,16 +133,11 @@
"pwd": "Senha",
"read": "Leitura",
"reboot": "Reiniciar",
"rememberChoice": "Lembrar da seleção",
"rememberPwdInMem": "Lembrar senha na memória",
"rememberPwdInMemTip": "Usado para contêineres, suspensão, etc.",
"rememberWindowSize": "Lembrar o tamanho da janela",
"remotePath": "Caminho remoto",
"rename": "Renomear",
"reportBugsOnGithubIssue": "Por favor, reporte problemas em {url}",
"restart": "Reiniciar",
"restore": "Restaurar",
"restoreSuccess": "Restauração bem-sucedida, é necessário reiniciar o app para aplicar as mudanças",
"result": "Resultado",
"rotateAngel": "Ângulo de rotação",
"route": "Roteamento",
@@ -256,14 +152,8 @@
"serverDetailOrder": "Ordem dos componentes na página de detalhes do servidor",
"serverFuncBtns": "Botões de função do servidor",
"serverOrder": "Ordem do servidor",
"serverTabConnecting": "Conectando...",
"serverTabEmpty": "Não há servidores no momento.\nClique no botão inferior direito para adicionar um.",
"serverTabFailed": "Falha",
"serverTabLoading": "Carregando...",
"serverTabPlzSave": "Por favor, salve esta chave privada novamente",
"serverTabUnkown": "Estado desconhecido",
"setting": "Configurações",
"sftpDlPrepare": "Preparando para conectar ao servidor...",
"sftpEditorTip": "Se vazio, use o editor de arquivos integrado do aplicativo. Se houver um valor, use o editor do servidor remoto, por exemplo, `vim` (recomendado detectar automaticamente de acordo com `EDITOR`).",
"sftpRmrDirSummary": "Usar `rm -r` em SFTP para excluir pastas",
"sftpSSHConnected": "SFTP conectado...",
"sftpShowFoldersFirst": "Mostrar pastas primeiro",
@@ -278,11 +168,11 @@
"sshTip": "Esta funcionalidade está em fase de teste.\n\nPor favor, reporte problemas em {url} ou junte-se a nós no desenvolvimento.",
"sshVirtualKeyAutoOff": "Desativação automática das teclas virtuais",
"start": "Iniciar",
"stat": "Estatísticas",
"stats": "Estatísticas",
"stop": "Parar",
"stopped": "Parado",
"storage": "Armazenamento",
"success": "Sucesso",
"supportFmtArgs": "Suporta os seguintes argumentos formatados:",
"suspend": "Suspender",
"suspendTip": "A função de suspensão requer permissões de root e suporte do systemd.",
@@ -298,7 +188,6 @@
"textScaler": "Escala de texto",
"textScalerTip": "1.0 => 100% (tamanho original), afeta apenas algumas fontes na página do servidor, não é recomendado alterar.",
"theme": "Tema",
"themeMode": "Modo do tema",
"time": "Tempo",
"times": "Vezes",
"total": "Total",
@@ -306,27 +195,18 @@
"trySudo": "Tentar usar sudo",
"ttl": "TTL",
"unknown": "Desconhecido",
"unknownError": "Erro desconhecido",
"unkownConvertMode": "Modo de conversão desconhecido",
"update": "Atualizar",
"updateAll": "Atualizar tudo",
"updateIntervalEqual0": "Se definido como 0, o estado do servidor não será atualizado automaticamente.\nE o uso da CPU não poderá ser calculado.",
"updateServerStatusInterval": "Intervalo de atualização do estado do servidor",
"updateTip": "Nova versão: v1.0.{newest}",
"updateTipTooLow": "Versão atual muito antiga, por favor, atualize para v1.0.{newest}",
"upload": "Upload",
"upsideDown": "Inverter verticalmente",
"uptime": "Tempo de atividade",
"urlOrJson": "URL ou JSON",
"useCdn": "Utilizando CDN",
"useCdnTip": "Recomenda-se que usuários não chineses usem CDN. Gostaria de usá-lo?",
"useNoPwd": "Será usado sem senha",
"usePodmanByDefault": "Usar Podman por padrão",
"used": "Usado",
"user": "Usuário",
"versionHaveUpdate": "Nova versão encontrada: v1.0.{build}, clique para atualizar",
"versionUnknownUpdate": "Versão atual: v1.0.{build}, clique para verificar atualizações",
"versionUpdated": "Versão atual: v1.0.{build}, já está atualizado",
"view": "Visualização",
"viewErr": "Ver erro",
"virtKeyHelpClipboard": "Se houver texto selecionado no terminal, copia para a área de transferência, caso contrário, cola o conteúdo da área de transferência no terminal.",
@@ -337,8 +217,8 @@
"watchNotPaired": "Não há Apple Watch pareado",
"webdavSettingEmpty": "Configurações de Webdav estão vazias",
"whenOpenApp": "Ao abrir o app",
"willTakEeffectImmediately": "As alterações serão aplicadas imediatamente",
"wolTip": "Após configurar o WOL (Wake-on-LAN), um pedido de WOL é enviado cada vez que o servidor é conectado.",
"write": "Escrita",
"writeScriptFailTip": "Falha ao escrever no script, possivelmente devido à falta de permissões ou o diretório não existe."
"writeScriptFailTip": "Falha ao escrever no script, possivelmente devido à falta de permissões ou o diretório não existe.",
"writeScriptTip": "Após conectar ao servidor, um script será escrito em ~/.config/server_box para monitorar o status do sistema. Você pode revisar o conteúdo do script."
}

View File

@@ -1,84 +1,42 @@
{
"@@locale": "ru",
"about": "о",
"aboutThanks": "Благодарности всем участникам.",
"acceptBeta": "Принять обновления тестовой версии",
"add": "добавить",
"addAServer": "добавить сервер",
"addPrivateKey": "добавить приватный ключ",
"addSystemPrivateKeyTip": "В данный момент приватные ключи отсутствуют. Добавить системный приватный ключ (~/.ssh/id_rsa)?",
"added2List": "добавлено в список задач",
"addr": "Адрес",
"all": "все",
"alreadyLastDir": "Уже в корневом каталоге",
"askContinue": "{msg}, продолжить?",
"attention": "внимание",
"authFailTip": "Аутентификация не удалась, пожалуйста, проверьте, правильны ли пароль/ключ/хост/пользователь и т.д.",
"authRequired": "требуется аутентификация",
"auto": "авто",
"autoBackupConflict": "Может быть включено только одно автоматическое резервное копирование",
"autoCheckUpdate": "автоматическая проверка обновлений",
"autoConnect": "автоматическое подключение",
"autoRun": "автозапуск",
"autoUpdateHomeWidget": "автоматическое обновление виджета на главном экране",
"backup": "резервное копирование",
"backupTip": "Экспортированные данные зашифрованы простым способом, пожалуйста, храните их в безопасности.",
"backupVersionNotMatch": "Версия резервной копии не совпадает, восстановление невозможно",
"battery": "батарея",
"bgRun": "работа в фоновом режиме",
"bgRunTip": "Этот переключатель означает, что программа будет пытаться работать в фоновом режиме, но фактическое выполнение зависит от того, включено ли разрешение. Для нативного Android отключите «Оптимизацию батареи» для этого приложения, для MIUI измените стратегию энергосбережения на «Без ограничений».",
"bioAuth": "биометрическая аутентификация",
"browser": "Браузер",
"bulkImportServers": "Пакетный импорт серверов",
"bulkImportServersTip": "[Формат]({url}) можно найти здесь.",
"canPullRefresh": "можно обновить, потянув вниз",
"cancel": "отмена",
"choose": "выбрать",
"chooseFontFile": "выбрать файл шрифта",
"choosePrivateKey": "выбрать приватный ключ",
"clear": "очистить",
"clipboard": "буфер обмена",
"close": "закрыть",
"cmd": "команда",
"cnKeyboardComp": "Совместимость с китайским Android",
"cnKeyboardCompTip": "Если терминал отображает безопасную клавиатуру, вы можете ее активировать.",
"collapseUI": "свернуть",
"collapseUITip": "Свернуть длинные списки в UI по умолчанию",
"conn": "подключение",
"connected": "подключено",
"container": "контейнер",
"containerName": "имя контейнера",
"containerStatus": "статус контейнера",
"containerTrySudoTip": "Например: если пользователь в приложении установлен как aaa, но Docker установлен под пользователем root, тогда нужно включить эту опцию",
"content": "Содержимое",
"convert": "конвертировать",
"copy": "копировать",
"copyPath": "копировать путь",
"cpuViewAsProgressTip": "Отобразите уровень использования каждого процессора в виде индикатора выполнения (старый стиль)",
"createFile": "создать файл",
"createFolder": "создать папку",
"cursorType": "Тип курсора",
"customCmd": "Пользовательские команды",
"customCmdDocUrl": "https://github.com/lollipopkit/flutter_server_box/wiki#custom-commands",
"customCmdHint": "\"Имя команды\": \"Команда\"",
"dark": "темная",
"day": "День",
"debug": "отладка",
"decode": "декодировать",
"decompress": "разархивировать",
"delete": "удалить",
"deleteServers": "удалить серверы пакетно",
"deviceName": "Название устройства",
"dirEmpty": "Пожалуйста, убедитесь, что папка пуста",
"disabled": "отключено",
"disconnected": "отключено",
"disk": "диск",
"diskIgnorePath": "путь игнорирования диска",
"displayCpuIndex": "Показать индекс ЦПУ",
"displayName": "отображаемое имя",
"dl2Local": "Загрузить {fileName} на локальный диск?",
"doc": "Документация",
"dockerEditHost": "редактировать DOCKER_HOST",
"dockerEmptyRunningItems": "Нет запущенных контейнеров.\nЭто может быть из-за:\n- пользователя Docker, отличного от пользователя, настроенного в приложении\n- переменной окружения DOCKER_HOST, которая не была правильно считана. Вы можете выполнить `echo $DOCKER_HOST` в терминале, чтобы увидеть ее значение.",
"dockerImagesFmt": "Всего {count} образов",
"dockerNotInstalled": "Docker не установлен",
@@ -86,39 +44,24 @@
"dockerStatusRunningFmt": "{count} контейнеров запущено",
"doubleColumnMode": "режим двойной колонки",
"doubleColumnTip": "Эта опция лишь включает функцию; фактическое применение зависит от ширины устройства",
"download": "скачать",
"edit": "редактировать",
"editVirtKeys": "редактировать виртуальные клавиши",
"editor": "редактор",
"editorHighlightTip": "Текущая производительность подсветки кода неудовлетворительна, можно отключить для улучшения.",
"encode": "кодировать",
"error": "ошибка",
"exampleName": "пример имени",
"envVars": "Переменная окружения",
"experimentalFeature": "экспериментальная функция",
"export": "экспорт",
"extraArgs": "дополнительные аргументы",
"failed": "неудача",
"fallbackSshDest": "Резервное место назначения SSH",
"fdroidReleaseTip": "Если вы скачали это приложение с F-Droid, рекомендуется отключить эту опцию.",
"feedback": "обратная связь",
"feedbackOnGithub": "Если у вас есть какие-либо вопросы, пожалуйста, отправьте отзыв на GitHub",
"fieldMustNotEmpty": "Эти поля не могут быть пустыми.",
"fileNotExist": "{file} не существует",
"fileTooLarge": "Файл '{file}' слишком большой '{size}', превышает {sizeMax}",
"files": "файлы",
"finished": "завершено",
"followSystem": "следовать за системой",
"font": "шрифт",
"fontSize": "размер шрифта",
"forExample": "Например",
"force": "принудительно",
"foundNUpdate": "Найдено {count} обновлений",
"fullScreen": "полноэкранный режим",
"fullScreenJitter": "дрожание в полноэкранном режиме",
"fullScreenJitterHelp": "предотвращение выгорания экрана",
"fullScreenTip": "Следует ли включить полноэкранный режим, когда устройство поворачивается в альбомный режим? Эта опция применяется только к вкладке сервера.",
"getPushTokenFailed": "Не удалось получить токен уведомлений",
"gettingToken": "Получение токена...",
"goBackQ": "Вернуться?",
"goto": "перейти к",
"hideTitleBar": "Скрыть заголовок",
@@ -126,40 +69,24 @@
"highlight": "подсветка кода",
"homeWidgetUrlConfig": "конфигурация URL виджета домашнего экрана",
"host": "хост",
"hour": "Час",
"httpFailedWithCode": "Ошибка запроса, код: {code}",
"icloudSynced": "Синхронизация с iCloud выполнена, некоторые настройки могут потребовать перезапуска приложения для вступления в силу.",
"ignoreCert": "Игнорировать сертификат",
"image": "образ",
"imagesList": "список образов",
"import": "импорт",
"inAppUpdate": "Обновить в приложении? В противном случае загрузите с помощью браузера.",
"init": "Инициализировать",
"inner": "встроенный",
"inputDomainHere": "введите домен здесь",
"install": "установить",
"installDockerWithUrl": "Пожалуйста, сначала установите Docker по адресу https://docs.docker.com/engine/install",
"invalid": "Недействительный",
"invalidJson": "неверный JSON",
"invalidVersion": "неподдерживаемая версия",
"invalidVersionHelp": "Пожалуйста, убедитесь, что docker установлен корректно, или что используется не собственно собранная версия. Если проблема не в этом, пожалуйста, отправьте отчет о проблеме на {url}.",
"isBusy": "занято",
"jumpServer": "прыжковый сервер",
"keepForeground": "Пожалуйста, держите приложение в фокусе!",
"keepStatusWhenErr": "Сохранять статус сервера при ошибке",
"keepStatusWhenErrTip": "Применимо только в случае ошибки выполнения скрипта",
"keyAuth": "аутентификация по ключу",
"language": "язык",
"languageName": "Русский",
"lastTry": "последняя попытка",
"launchPage": "стартовая страница",
"letterCache": "Кэширование букв",
"letterCacheTip": "Рекомендуется включить, но его активация препятствует вводу символов CJK (китайский, японский, корейский)",
"letterCacheTip": "Рекомендуется отключить, но после отключения будет невозможно вводить символы CJK.",
"license": "лицензия",
"light": "светлая",
"loadingFiles": "Загрузка файлов...",
"location": "местоположение",
"log": "лог",
"loss": "потери пакетов",
"madeWithLove": "Создано с ❤️ by {myGithub}",
"manual": "вручную",
@@ -167,62 +94,36 @@
"maxRetryCount": "максимальное количество попыток переподключения к серверу",
"maxRetryCountEqual0": "будет бесконечно пытаться переподключиться",
"min": "минимум",
"minute": "Минута",
"mission": "задача",
"more": "больше",
"moveOutServerFuncBtnsHelp": "Включено: кнопки функций сервера отображаются под каждой карточкой на вкладке сервера. Выключено: отображается в верхней части страницы деталей сервера.",
"ms": "мс",
"name": "имя",
"needHomeDir": "Если вы пользователь Synology, [смотрите здесь](https://kb.synology.com/DSM/tutorial/user_enable_home_service). Пользователям других систем нужно искать, как создать домашний каталог.",
"needRestart": "требуется перезапуск приложения",
"net": "сеть",
"netViewType": "тип визуализации сети",
"newContainer": "создать контейнер",
"noClient": "нет SSH соединения",
"noInterface": "нет доступных интерфейсов",
"noLineChart": "Не использовать линейные графики",
"noLineChartForCpu": "Не используйте линейные графики для ЦП",
"noNotiPerm": "Нет разрешения на уведомления, возможно отсутствие индикации прогресса при загрузке обновлений приложений.",
"noOptions": "нет доступных опций",
"noPrivateKeyTip": "Приватный ключ не существует, возможно, он был удален или есть ошибка в настройках.",
"noPromptAgain": "Больше не спрашивать",
"noResult": "нет результатов",
"noSavedPrivateKey": "Нет сохраненных приватных ключей.",
"noSavedSnippet": "Нет сохраненных фрагментов кода.",
"noServerAvailable": "Нет доступных серверов.",
"noTask": "нет задач",
"noUpdateAvailable": "нет доступных обновлений",
"node": "Узел",
"notAvailable": "Недоступно",
"notSelected": "не выбрано",
"note": "заметка",
"nullToken": "нет токена",
"ok": "ок",
"onServerDetailPage": "на странице деталей сервера",
"onlyOneLine": "Отображать только в одной строке (прокручиваемо)",
"onlyWhenCoreBiggerThan8": "Действует только при количестве ядер > 8",
"open": "открыть",
"openLastPath": "открыть последний путь",
"openLastPathTip": "Для разных серверов будут сохранены разные записи, записывается путь при выходе",
"parseContainerStats": "анализ статуса использования контейнера",
"parseContainerStatsTip": "Анализ статуса использования Docker может быть медленным",
"paste": "вставить",
"path": "путь",
"percentOfSize": "{percent}% от {size}",
"permission": "Разрешения",
"pickFile": "выбрать файл",
"pingAvg": "Среднее:",
"pingInputIP": "Пожалуйста, введите целевой IP или доменное имя",
"pingNoServer": "Нет доступных серверов для Ping\nПожалуйста, добавьте серверы на вкладке серверов и попробуйте снова",
"pkg": "менеджер пакетов",
"pkgUpgradeTip": "Пожалуйста, сделайте резервную копию системы перед обновлением.",
"platformNotSupportUpdate": "Текущая платформа не поддерживает обновления, пожалуйста, вручную установите последнюю версию из исходного кода",
"plugInType": "Тип вставки",
"plzEnterHost": "Пожалуйста, введите хост",
"plzSelectKey": "Пожалуйста, выберите ключ",
"port": "порт",
"preview": "предпросмотр",
"primaryColorSeed": "основной цветовой тон",
"privateKey": "приватный ключ",
"process": "процесс",
"pushToken": "токен уведомлений",
@@ -232,16 +133,11 @@
"pwd": "пароль",
"read": "чтение",
"reboot": "перезагрузка",
"rememberChoice": "Запомнить выбор",
"rememberPwdInMem": "Запомнить пароль в памяти",
"rememberPwdInMemTip": "Используется для контейнеров, приостановки и т. д.",
"rememberWindowSize": "Запомнить размер окна",
"remotePath": "удаленный путь",
"rename": "переименовать",
"reportBugsOnGithubIssue": "Пожалуйста, сообщайте о проблемах на {url}",
"restart": "перезапустить",
"restore": "восстановить",
"restoreSuccess": "Восстановление успешно, требуется перезапуск приложения для применения изменений",
"result": "результат",
"rotateAngel": "угол поворота",
"route": "Маршрутизация",
@@ -256,14 +152,8 @@
"serverDetailOrder": "порядок элементов на странице деталей сервера",
"serverFuncBtns": "кнопки функций сервера",
"serverOrder": "порядок серверов",
"serverTabConnecting": "подключение...",
"serverTabEmpty": "Серверов пока нет.\nНажмите кнопку в правом нижнем углу, чтобы добавить.",
"serverTabFailed": "ошибка",
"serverTabLoading": "загрузка...",
"serverTabPlzSave": "Пожалуйста, сохраните этот приватный ключ еще раз",
"serverTabUnkown": "неизвестно",
"setting": "настройки",
"sftpDlPrepare": "Подготовка к подключению к серверу...",
"sftpEditorTip": "Если пусто, используйте встроенный редактор файлов приложения. Если значение указано, используйте редактор удаленного сервера, например, `vim` (рекомендуется автоматически определять согласно `EDITOR`).",
"sftpRmrDirSummary": "Использовать `rm -r` в SFTP для удаления папок",
"sftpSSHConnected": "SFTP подключен...",
"sftpShowFoldersFirst": "показывать папки в начале",
@@ -278,11 +168,11 @@
"sshTip": "Эта функция находится в стадии тестирования.\n\nПожалуйста, отправляйте отчеты о проблемах на {url} или присоединяйтесь к нашей разработке.",
"sshVirtualKeyAutoOff": "автоматическое отключение виртуальных клавиш",
"start": "старт",
"stat": "Статистика",
"stats": "статистика",
"stop": "остановить",
"stopped": "остановлено",
"storage": "Хранение",
"success": "успех",
"supportFmtArgs": "Поддерживаются следующие форматы аргументов:",
"suspend": "приостановить",
"suspendTip": "Функция приостановки требует прав root и поддержки systemd.",
@@ -298,7 +188,6 @@
"textScaler": "масштабирование текста",
"textScalerTip": "1.0 => 100% (исходный размер), применяется только к части шрифтов на странице сервера, изменение не рекомендуется.",
"theme": "тема",
"themeMode": "режим темы",
"time": "время",
"times": "раз",
"total": "всего",
@@ -306,27 +195,18 @@
"trySudo": "попробовать использовать sudo",
"ttl": "TTL",
"unknown": "неизвестно",
"unknownError": "неизвестная ошибка",
"unkownConvertMode": "неизвестный режим конвертации",
"update": "обновление",
"updateAll": "обновить все",
"updateIntervalEqual0": "Если установлено в 0, статус сервера не будет автоматически обновляться.\nТакже не будет рассчитано использование CPU.",
"updateServerStatusInterval": "интервал обновления статуса сервера",
"updateTip": "Новая версия: v1.0.{newest}",
"updateTipTooLow": "Текущая версия слишком старая, пожалуйста, обновитесь до v1.0.{newest}",
"upload": "загрузить",
"upsideDown": "перевернуть",
"uptime": "время работы",
"urlOrJson": "ссылка или JSON",
"useCdn": "Использование CDN",
"useCdnTip": "Не китайским пользователям рекомендуется использовать CDN. Хотели бы вы его использовать?",
"useNoPwd": "будет использоваться без пароля",
"usePodmanByDefault": "использовать Podman по умолчанию",
"used": "использовано",
"user": "пользователь",
"versionHaveUpdate": "Найдена новая версия: v1.0.{build}, нажмите для обновления",
"versionUnknownUpdate": "Текущая: v1.0.{build}, нажмите для проверки обновлений",
"versionUpdated": "Текущая: v1.0.{build}, последняя версия",
"view": "Вид",
"viewErr": "просмотр ошибок",
"virtKeyHelpClipboard": "Если в терминале выделен текст, то он копируется в буфер обмена, в противном случае содержимое буфера вставляется в терминал.",
@@ -337,8 +217,8 @@
"watchNotPaired": "Apple Watch не сопряжены",
"webdavSettingEmpty": "Настройки Webdav пусты",
"whenOpenApp": "при открытии приложения",
"willTakEeffectImmediately": "Изменения вступят в силу немедленно",
"wolTip": "После настройки WOL (Wake-on-LAN) при каждом подключении к серверу отправляется запрос WOL.",
"write": "запись",
"writeScriptFailTip": "Запись в скрипт не удалась, возможно, из-за отсутствия прав или директории не существует."
"writeScriptFailTip": "Запись в скрипт не удалась, возможно, из-за отсутствия прав или директории не существует.",
"writeScriptTip": "После подключения к серверу скрипт будет записан в ~/.config/server_box для мониторинга состояния системы. Вы можете проверить содержимое скрипта."
}

224
lib/l10n/app_tr.arb Normal file
View File

@@ -0,0 +1,224 @@
{
"@@locale": "tr",
"aboutThanks": "Katılım gösteren aşağıdaki kişilere teşekkür ederiz.",
"acceptBeta": "Beta sürüm güncellemelerini kabul et",
"addSystemPrivateKeyTip": "Şu anda özel anahtar yok, sistemle geleni (~/.ssh/id_rsa) eklemek ister misiniz?",
"added2List": "Görev listesine eklendi",
"addr": "Adres",
"alreadyLastDir": "Zaten son klasörde.",
"authFailTip": "Kimlik doğrulama başarısız, kimlik bilgilerinin doğru olup olmadığını kontrol edin",
"autoBackupConflict": "Aynı anda yalnızca bir otomatik yedekleme etkinleştirilebilir.",
"autoConnect": "Otomatik bağlan",
"autoRun": "Otomatik çalıştır",
"autoUpdateHomeWidget": "Ana widget'ı otomatik güncelle",
"backupTip": "Dışa aktarılan veriler zayıf bir şekilde şifrelenmiştir. \nLütfen güvenli bir yerde saklayın.",
"backupVersionNotMatch": "Yedekleme sürümü uyumlu değil.",
"battery": "Pil",
"bgRun": "Arka planda çalıştır",
"bgRunTip": "Bu anahtar yalnızca programın arka planda çalışmayı deneyeceğini ifade eder. Arka planda çalışıp çalışamayacağı, iznin etkinleştirilip etkinleştirilmediğine bağlıdır. AOSP tabanlı Android ROM'larda, bu uygulamada \"Pil Optimizasyonunu\" devre dışı bırakın. MIUI / HyperOS için, güç tasarrufu politikasını \"Sınırsız\" olarak değiştirin.",
"cmd": "Komut",
"collapseUITip": "UI'daki uzun listeleri varsayılan olarak gizleyip gizlememeyi belirler",
"conn": "Bağlantı",
"container": "Konteyner",
"containerTrySudoTip": "Örneğin: Uygulamada kullanıcı aaa olarak ayarlanmış, ancak Docker root kullanıcısı altında kurulmuş. Bu durumda, bu seçeneği etkinleştirmeniz gerekir.",
"convert": "Dönüştür",
"copyPath": "Yolu kopyala",
"cpuViewAsProgressTip": "Her CPU'nun kullanımını bir ilerleme çubuğu tarzında görüntüle (eski tarz)",
"cursorType": "İmleç türü",
"customCmd": "Özel komutlar",
"customCmdDocUrl": "https://github.com/lollipopkit/flutter_server_box/wiki#custom-commands",
"customCmdHint": "\"Komut Adı\": \"Komut\"",
"decode": "Çöz",
"decompress": "Sıkıştırmayı aç",
"deleteServers": "Toplu sunucu silme",
"dirEmpty": "Klasörün boş olduğundan emin olun.",
"disconnected": "Bağlantı kesildi",
"disk": "Disk",
"diskIgnorePath": "Disk için göz ardı edilen yol",
"displayCpuIndex": "CPU dizinini görüntüle",
"dl2Local": "{fileName} dosyasını yerel olarak indirmek istiyor musunuz?",
"dockerEmptyRunningItems": "Çalışan konteyner yok.\nBu şu sebeplerden kaynaklanabilir:\n- Docker kurulumu kullanıcı adı, uygulamada yapılandırılan kullanıcı adıyla aynı değil.\n- DOCKER_HOST ortam değişkeni doğru okunmadı. Terminalde `echo $DOCKER_HOST` komutunu çalıştırarak elde edebilirsiniz.",
"dockerImagesFmt": "{count} görüntü",
"dockerNotInstalled": "Docker kurulu değil",
"dockerStatusRunningAndStoppedFmt": "{runningCount} çalışıyor, {stoppedCount} konteyner durduruldu.",
"dockerStatusRunningFmt": "{count} konteyner çalışıyor.",
"doubleColumnMode": "Çift sütun modu",
"doubleColumnTip": "Bu seçenek yalnızca özelliği etkinleştirir, gerçekten etkinleştirilebilir olup olmadığını cihazın genişliği belirler",
"editVirtKeys": "Sanal tuşları düzenle",
"editor": "Editör",
"editorHighlightTip": "Mevcut kod vurgulama performansı ideal değil ve isteğe bağlı olarak kapatılabilir.",
"encode": "Kodla",
"envVars": "Ortam değişkeni",
"experimentalFeature": "Deneysel özellik",
"extraArgs": "Ek argümanlar",
"fallbackSshDest": "Yedek SSH hedefi",
"fdroidReleaseTip": "Bu uygulamayı F-Droid'den indirdiyseniz, bu seçeneği kapatmanız önerilir.",
"fileTooLarge": "'{file}' dosyası çok büyük {size}, maksimum {sizeMax}",
"followSystem": "Sistemi takip et",
"font": "Yazı tipi",
"fontSize": "Yazı tipi boyutu",
"force": "Zorla",
"fullScreen": "Tam ekran modu",
"fullScreenJitter": "Tam ekran titremesi",
"fullScreenJitterHelp": "Ekran yanıklarını önlemek için",
"fullScreenTip": "Cihaz yatay moda döndürüldüğünde tam ekran modu etkinleştirilsin mi? Bu seçenek yalnızca sunucu sekmesi için geçerlidir.",
"goBackQ": "Geri dön?",
"goto": "Git",
"hideTitleBar": "Başlık çubuğunu gizle",
"hideTitleBarTip": "Açtıktan sonra, sağ üst köşedeki üç düğmeyi basılı tutarak sürükleyin.",
"highlight": "Kod vurgulama",
"homeWidgetUrlConfig": "Ana sayfa widget URL'sini yapılandır",
"host": "Sunucu",
"httpFailedWithCode": "İstek başarısız oldu, durum kodu: {code}",
"ignoreCert": "Sertifikayı yoksay",
"image": "Resim",
"imagesList": "Resim listesi",
"init": "Başlat",
"inner": "İç",
"install": "Kur",
"installDockerWithUrl": "Lütfen önce Docker'ı https://docs.docker.com/engine/install adresinden kurun.",
"invalid": "Geçersiz",
"jumpServer": "Atlama sunucusu",
"keepForeground": "Uygulama ön planda kalsın!",
"keepStatusWhenErr": "Son sunucu durumunu koru",
"keepStatusWhenErrTip": "Yalnızca betik yürütme sırasında bir hata oluştuğunda",
"keyAuth": "Anahtar Doğrulama",
"letterCache": "Harf önbelleği",
"letterCacheTip": "Devre dışı bırakılması önerilir, ancak devre dışı bırakıldıktan sonra CJK karakterleri girilemez.",
"license": "Lisans",
"location": "Konum",
"loss": "kayıp",
"madeWithLove": "{myGithub} tarafından ❤️ ile yapıldı",
"manual": "Kılavuz",
"max": "maks",
"maxRetryCount": "Sunucu yeniden bağlanma sayısı",
"maxRetryCountEqual0": "Sürekli olarak tekrar denenecek.",
"min": "min",
"mission": "Görev",
"more": "Daha fazla",
"moveOutServerFuncBtnsHelp": "Açık: Sunucu sekmesi sayfasındaki her kartın altında görüntülenebilir. Kapalı: Sunucu Detayları sayfasının üst kısmında görüntülenebilir.",
"ms": "ms",
"needHomeDir": "Synology kullanıcısıysanız, [buraya bakın](https://kb.synology.com/DSM/tutorial/user_enable_home_service). Diğer sistem kullanıcılarının bir ana dizin oluşturmayı öğrenmeleri gerekir.",
"needRestart": "Uygulamanın yeniden başlatılması gerekiyor",
"net": "Ağ",
"netViewType": "Ağ görünümü türü",
"newContainer": "Yeni konteyner",
"noLineChart": "Çizgi grafik kullanma",
"noLineChartForCpu": "CPU için çizgi grafik kullanma",
"noPrivateKeyTip": "Özel anahtar mevcut değil, silinmiş olabilir veya bir yapılandırma hatası vardır.",
"noPromptAgain": "Tekrar hatırlatma",
"node": "Düğüm",
"notAvailable": "Kullanılamaz",
"onServerDetailPage": "Sunucu detay sayfasında",
"onlyOneLine": "Yalnızca bir satır olarak göster (kaydırılabilir)",
"onlyWhenCoreBiggerThan8": "Yalnızca çekirdek sayısı 8'den fazla olduğunda çalışır",
"openLastPath": "Son yolu aç",
"openLastPathTip": "Farklı sunucuların farklı günlükleri olacaktır ve çıkış yolu log dosyasıdır",
"parseContainerStatsTip": "Docker'ın işgal durumunu analiz etmek nispeten yavaştır.",
"percentOfSize": "{size}'nin %{percent}'i",
"permission": "İzinler",
"pingAvg": "Ortalama:",
"pingInputIP": "Lütfen bir hedef IP / etki alanı girin.",
"pingNoServer": "Ping yapılacak sunucu yok.\nLütfen sunucu sekmesine bir sunucu ekleyin.",
"pkg": "Paket",
"plugInType": "Takma Türü",
"port": "Port",
"preview": "Önizleme",
"privateKey": "Özel Anahtar",
"process": "Süreç",
"pushToken": "Push token",
"pveIgnoreCertTip": "Etkinleştirilmesi önerilmez, güvenlik risklerine dikkat edin! PVE'nin varsayılan sertifikasını kullanıyorsanız, bu seçeneği etkinleştirmeniz gerekir.",
"pveLoginFailed": "Giriş başarısız. Linux PAM girişi için sunucu yapılandırmasındaki kullanıcı adı/şifre ile kimlik doğrulaması yapılamadı.",
"pveVersionLow": "Bu özellik şu anda test aşamasında ve sadece PVE 8+ üzerinde test edilmiştir. Lütfen dikkatli kullanın.",
"pwd": "Şifre",
"read": "Oku",
"reboot": "Yeniden başlat",
"rememberPwdInMem": "Şifreyi bellekte sakla",
"rememberPwdInMemTip": "Konteynerler, askıya alma vb. için kullanılır.",
"rememberWindowSize": "Pencere boyutunu hatırla",
"remotePath": "Uzak yol",
"restart": "Yeniden başlat",
"result": "Sonuç",
"rotateAngel": "Dönme açısı",
"route": "Yönlendirme",
"run": "Çalıştır",
"running": "Çalışıyor",
"save": "Kaydet",
"saved": "Kaydedildi",
"second": "s",
"sensors": "Sensör",
"sequence": "Dizi",
"server": "Sunucu",
"serverDetailOrder": "Ayrıntı sayfası widget sırası",
"serverFuncBtns": "Sunucu işlev düğmeleri",
"serverOrder": "Sunucu sırası",
"sftpDlPrepare": "Bağlantı hazırlığı yapılıyor...",
"sftpEditorTip": "Boşsa, uygulamanın yerleşik dosya düzenleyicisini kullanın. Bir değer varsa, uzak sunucunun düzenleyicisini kullanın, örneğin, `vim` (otomatik olarak `EDITOR`'a göre algılamanız önerilir).",
"sftpRmrDirSummary": "SFTP'de bir klasörü silmek için `rm -r` kullanın.",
"sftpSSHConnected": "SFTP Bağlantısı",
"sftpShowFoldersFirst": "Önce klasörleri göster",
"showDistLogo": "Dağıtım logosunu göster",
"shutdown": "Kapat",
"size": "Boyut",
"snippet": "Parça",
"softWrap": "Yumuşak kaydırma",
"speed": "Hız",
"spentTime": "Harcanan zaman: {time}",
"sshTermHelp": "Terminal kaydırılabilir olduğunda, yatay sürükleme metni seçebilir. Klavye düğmesine tıklamak klavyeyi açar/kapatır. Dosya simgesi mevcut yolu SFTP'de açar. Pano düğmesi metin seçildiğinde içeriği kopyalar ve metin seçilmediğinde ve panoda içerik olduğunda panodaki içeriği terminale yapıştırır. Kod simgesi kod parçacıklarını terminale yapıştırır ve çalıştırır.",
"sshTip": "Bu işlev şu anda deneme aşamasındadır.\n\nLütfen hataları {url} adresine bildirin veya geliştirmemize katılın.",
"sshVirtualKeyAutoOff": "Sanal tuşların otomatik geçişi",
"start": "Başlat",
"stat": "İstatistik",
"stats": "İstatistikler",
"stop": "Durdur",
"stopped": "Durduruldu",
"storage": "Depolama",
"supportFmtArgs": "Aşağıdaki biçimlendirme parametreleri desteklenir:",
"suspend": "Askıya al",
"suspendTip": "Askıya alma işlevi kök izinleri ve systemd desteği gerektirir.",
"switchTo": "{val} öğesine geç",
"sync": "Senkronize et",
"syncTip": "Bazı değişikliklerin etkili olması için yeniden başlatma gerekebilir.",
"system": "Sistem",
"tag": "Etiketler",
"temperature": "Sıcaklık",
"termFontSizeTip": "Bu ayar terminal boyutunu (genişlik ve yükseklik) etkileyecektir. Terminal sayfasında yakınlaştırarak mevcut oturumun yazı tipi boyutunu ayarlayabilirsiniz.",
"terminal": "Terminal",
"test": "Test",
"textScaler": "Metin ölçekleyici",
"textScalerTip": "1.0 => %100 (orijinal boyut), yalnızca sunucu sayfası kısmındaki yazı tipine çalışır, değiştirilmesi önerilmez.",
"theme": "Tema",
"time": "Zaman",
"times": "Zamanlar",
"total": "Toplam",
"traffic": "Trafik",
"trySudo": "Sudo kullanmayı deneyin",
"ttl": "TTL",
"unknown": "Bilinmeyen",
"unkownConvertMode": "Bilinmeyen dönüştürme modu",
"update": "Güncelle",
"updateIntervalEqual0": "0 olarak ayarladınız, otomatik olarak güncellenmeyecek.\nCPU durumunu hesaplayamıyor.",
"updateServerStatusInterval": "Sunucu durumu güncelleme aralığı",
"upload": "Yükle",
"upsideDown": "Ters",
"uptime": "Çalışma süresi",
"useCdn": "CDN kullanılıyor",
"useCdnTip": "Çin dışındaki kullanıcıların CDN kullanması önerilir. Kullanmak ister misiniz?",
"useNoPwd": "Şifre kullanılmayacak",
"usePodmanByDefault": "Varsayılan olarak Podman kullan",
"used": "Kullanıldı",
"view": "Görünüm",
"viewErr": "Hataya bakın",
"virtKeyHelpClipboard": "Seçilen terminal boş değilse panoya kopyalayın, aksi takdirde panodaki içeriği terminale yapıştırın.",
"virtKeyHelpIME": "Klavye aç/kapat",
"virtKeyHelpSFTP": "Geçerli dizini SFTP'de açın.",
"waitConnection": "Lütfen bağlantının kurulmasını bekleyin.",
"wakeLock": "Uyanık tut",
"watchNotPaired": "Eşlenmiş Apple Watch yok",
"webdavSettingEmpty": "WebDav ayarı boş",
"whenOpenApp": "Uygulamayı açarken",
"wolTip": "WOL (Wake-on-LAN) yapılandırıldıktan sonra, her sunucuya bağlandığınızda bir WOL isteği gönderilir.",
"write": "Yaz",
"writeScriptFailTip": "Komut dosyasına yazma başarısız oldu, muhtemelen izin eksikliğinden veya dizin mevcut olmadığından kaynaklanıyor olabilir.",
"writeScriptTip": "Sunucuya bağlandıktan sonra, sistem durumunu izlemek için ~/.config/server_box'a bir komut dosyası yazılacaktır. Komut dosyası içeriğini inceleyebilirsiniz."
}

View File

@@ -1,84 +1,42 @@
{
"@@locale": "zh",
"about": "关于",
"aboutThanks": "感谢以下参与的各位。",
"acceptBeta": "接受测试版更新推送",
"add": "新增",
"addAServer": "添加服务器",
"addPrivateKey": "添加私钥",
"addSystemPrivateKeyTip": "当前没有任何私钥,是否添加系统自带的(~/.ssh/id_rsa",
"added2List": "已添加至任务列表",
"addr": "地址",
"all": "所有",
"alreadyLastDir": "已经是最上层目录了",
"askContinue": "{msg},继续吗?",
"attention": "注意",
"authFailTip": "认证失败,请检查密码/密钥/主机/用户等是否错误",
"authRequired": "需要认证",
"auto": "自动",
"autoBackupConflict": "只能同时开启一个自动备份",
"autoCheckUpdate": "自动检查更新",
"autoConnect": "自动连接",
"autoRun": "自动运行",
"autoUpdateHomeWidget": "自动更新桌面小部件",
"backup": "备份",
"backupTip": "导出的数据仅进行了简单加密,请妥善保管。",
"backupVersionNotMatch": "备份版本不匹配,无法恢复",
"battery": "电池",
"bgRun": "后台运行",
"bgRunTip": "此开关只代表程序会尝试在后台运行,具体能否后台运行取决于是否开启了权限。原生 Android 请关闭本 App 的“电池优化”MIUI / HyperOS 请修改省电策略为“无限制”。",
"bioAuth": "生物认证",
"browser": "浏览器",
"bulkImportServers": "批量导入服务器",
"bulkImportServersTip": "可以在这里找到[格式]({url})",
"canPullRefresh": "可以下拉刷新",
"cancel": "取消",
"choose": "选择",
"chooseFontFile": "选择字体文件",
"choosePrivateKey": "选择私钥",
"clear": "清除",
"clipboard": "剪切板",
"close": "关闭",
"cmd": "命令",
"cnKeyboardComp": "中国 Android 兼容性",
"cnKeyboardCompTip": "如果终端弹出安全键盘,可以开启",
"collapseUI": "折叠",
"collapseUITip": "是否默认折叠 UI 中的长列表",
"conn": "连接",
"connected": "已连接",
"container": "容器",
"containerName": "容器名",
"containerStatus": "容器状态",
"containerTrySudoTip": "例如:在应用内将用户设置为 aaa但是 Docker 安装在root用户下这时就需要启用此选项",
"content": "内容",
"convert": "转换",
"copy": "复制",
"copyPath": "复制路径",
"cpuViewAsProgressTip": "以进度条样式显示每个 CPU 的使用率(旧版样式)",
"createFile": "创建文件",
"createFolder": "创建文件夹",
"cursorType": "光标类型",
"customCmd": "自定义命令",
"customCmdDocUrl": "https://github.com/lollipopkit/flutter_server_box/wiki/主页#自定义命令",
"customCmdHint": "\"命令名称\": \"命令\"",
"dark": "暗",
"day": "天",
"debug": "调试",
"decode": "解码",
"decompress": "解压缩",
"delete": "删除",
"deleteServers": "批量删除服务器",
"deviceName": "设备名",
"dirEmpty": "请确保文件夹为空",
"disabled": "已禁用",
"disconnected": "连接断开",
"disk": "磁盘",
"diskIgnorePath": "忽略的磁盘路径",
"displayCpuIndex": "显示 CPU 索引",
"displayName": "显示名称",
"dl2Local": "下载 {fileName} 到本地?",
"doc": "文档",
"dockerEditHost": "编辑 DOCKER_HOST",
"dockerEmptyRunningItems": "没有正在运行的容器。\n这可能是因为\n- Docker 安装用户与 App 内配置的用户名不同\n- 环境变量 DOCKER_HOST 没有被正确读取。可以通过在终端内运行 `echo $DOCKER_HOST` 来获取。",
"dockerImagesFmt": "共 {count} 个镜像",
"dockerNotInstalled": "Docker 未安装",
@@ -86,39 +44,24 @@
"dockerStatusRunningFmt": "{count} 个容器正在运行",
"doubleColumnMode": "双列模式",
"doubleColumnTip": "此选项仅开启功能,实际是否能开启还取决于设备的宽度",
"download": "下载",
"edit": "编辑",
"editVirtKeys": "编辑虚拟按键",
"editor": "编辑器",
"editorHighlightTip": "目前的代码高亮性能较为糟糕,可以选择关闭以改善。",
"encode": "编码",
"error": "错误",
"exampleName": "名称示例",
"envVars": "环境变量",
"experimentalFeature": "实验性功能",
"export": "导出",
"extraArgs": "额外参数",
"failed": "失败",
"fallbackSshDest": "备选 SSH 目标",
"fdroidReleaseTip": "如果你是从 F-Droid 下载的本应用,推荐关闭此选项",
"feedback": "反馈",
"feedbackOnGithub": "如果你有任何问题请在GitHub反馈",
"fieldMustNotEmpty": "这些输入框不能为空。",
"fileNotExist": "{file} 不存在",
"fileTooLarge": "文件 '{file}' 过大 '{size}',超过了 {sizeMax}",
"files": "文件",
"finished": "已完成",
"followSystem": "跟随系统",
"font": "字体",
"fontSize": "字体大小",
"forExample": "例如",
"force": "强制",
"foundNUpdate": "找到 {count} 个更新",
"fullScreen": "全屏模式",
"fullScreenJitter": "全屏模式抖动",
"fullScreenJitterHelp": "防止烧屏",
"fullScreenTip": "当设备旋转为横屏时,是否开启全屏模式。此选项仅作用于服务器 Tab 页。",
"getPushTokenFailed": "未能获取到推送 token",
"gettingToken": "正在获取 Token...",
"goBackQ": "返回?",
"goto": "前往",
"hideTitleBar": "隐藏标题栏",
@@ -126,40 +69,24 @@
"highlight": "代码高亮",
"homeWidgetUrlConfig": "桌面部件链接配置",
"host": "主机",
"hour": "小时",
"httpFailedWithCode": "请求失败, 状态码: {code}",
"icloudSynced": "iCloud 已同步,某些设置可能需要重启才能生效。",
"ignoreCert": "忽略证书",
"image": "镜像",
"imagesList": "镜像列表",
"import": "导入",
"inAppUpdate": "在 App 内更新?否则使用浏览器下载",
"init": "初始化",
"inner": "内置",
"inputDomainHere": "在这里输入域名",
"install": "安装",
"installDockerWithUrl": "请先 https://docs.docker.com/engine/install docker",
"invalid": "无效",
"invalidJson": "无效的 JSON",
"invalidVersion": "不支持的版本",
"invalidVersionHelp": "请确保正确安装了 docker或者使用的非自编译版本。如果没有以上问题请在 {url} 提交问题。",
"isBusy": "当前正忙",
"jumpServer": "跳板服务器",
"keepForeground": "请保持应用处于前台!",
"keepStatusWhenErr": "保留上次的服务器状态",
"keepStatusWhenErrTip": "仅限于执行脚本出错",
"keyAuth": "密钥认证",
"language": "语言",
"languageName": "简体中文",
"lastTry": "最后尝试",
"launchPage": "启动页",
"letterCache": "输入法字符缓存",
"letterCacheTip": "推荐开启,但是开启后无法输入 CJK 等文字",
"license": "开源许可证",
"light": "亮",
"loadingFiles": "正在加载目录。。。",
"letterCacheTip": "推荐关闭,但是关闭后无法输入 CJK 等文字",
"license": "证",
"location": "位置",
"log": "日志",
"loss": "丢包率",
"madeWithLove": "用❤️制作 by {myGithub}",
"manual": "手动",
@@ -167,62 +94,36 @@
"maxRetryCount": "服务器尝试重连次数",
"maxRetryCountEqual0": "会无限重试",
"min": "最小",
"minute": "分钟",
"mission": "任务",
"more": "更多",
"moveOutServerFuncBtnsHelp": "开启:可以在服务器 Tab 页的每个卡片下方显示。关闭:在服务器详情页顶部显示。",
"ms": "毫秒",
"name": "名称",
"needHomeDir": "如果你是群晖用户,[看这里](https://kb.synology.cn/zh-cn/DSM/tutorial/ssh_could_not_chdir_to_home_directory)。其他系统用户需搜索如何创建家目录home directory.",
"needRestart": "需要重启 App",
"net": "网络",
"netViewType": "网络视图类型",
"newContainer": "新建容器",
"noClient": "没有 SSH 连接",
"noInterface": "没有可用的接口",
"noLineChart": "不使用折线图",
"noLineChartForCpu": "CPU 不使用折线图",
"noNotiPerm": "无通知权限,可能下载 App 更新时无进度提示。",
"noOptions": "无可选项",
"noPrivateKeyTip": "私钥不存在,可能已被删除/配置错误",
"noPromptAgain": "不再提示",
"noResult": "无结果",
"noSavedPrivateKey": "没有已保存的私钥。",
"noSavedSnippet": "没有已保存的代码片段。",
"noServerAvailable": "没有可用的服务器。",
"noTask": "没有任务",
"noUpdateAvailable": "没有可用更新",
"node": "节点",
"notAvailable": "不可用",
"notSelected": "未选择",
"note": "备注",
"nullToken": "无 Token",
"ok": "好",
"onServerDetailPage": "在服务器详情页",
"onlyOneLine": "仅显示为一行(可滚动)",
"onlyWhenCoreBiggerThan8": "仅当核心数大于 8 时生效",
"open": "打开",
"openLastPath": "打开上次的路径",
"openLastPathTip": "不同的服务器会有不同的记录,且记录的是退出时的路径",
"parseContainerStats": "解析容器占用状态",
"parseContainerStatsTip": "Docker 解析占用状态较为缓慢",
"paste": "粘贴",
"path": "路径",
"percentOfSize": "{size} 的 {percent}%",
"permission": "权限",
"pickFile": "选择文件",
"pingAvg": "平均:",
"pingInputIP": "请输入目标IP或域名",
"pingNoServer": "没有服务器可用于 Ping\n请在服务器 tab 添加服务器后再试",
"pkg": "包管理",
"pkgUpgradeTip": "请在更新前备份系统。",
"platformNotSupportUpdate": "当前平台不支持更新,请编译最新源码后手动安装",
"plugInType": "插入类型",
"plzEnterHost": "请输入主机",
"plzSelectKey": "请选择私钥",
"port": "端口",
"preview": "预览",
"primaryColorSeed": "主题色种子",
"privateKey": "私钥",
"process": "进程",
"pushToken": "消息推送 Token",
@@ -232,16 +133,11 @@
"pwd": "密码",
"read": "读",
"reboot": "重启",
"rememberChoice": "记住选择",
"rememberPwdInMem": "在内存中记住密码",
"rememberPwdInMemTip": "用于容器、挂起等",
"rememberWindowSize": "记住窗口大小",
"remotePath": "远端路径",
"rename": "重命名",
"reportBugsOnGithubIssue": "请到 {url} 提交问题",
"restart": "重启",
"restore": "恢复",
"restoreSuccess": "恢复成功,需要重启 App 来应用更改",
"result": "结果",
"rotateAngel": "旋转角度",
"route": "路由",
@@ -256,14 +152,8 @@
"serverDetailOrder": "详情页部件顺序",
"serverFuncBtns": "服务器功能按钮",
"serverOrder": "服务器顺序",
"serverTabConnecting": "连接中...",
"serverTabEmpty": "现在没有服务器。\n点击右下方按钮来添加。",
"serverTabFailed": "失败",
"serverTabLoading": "加载中...",
"serverTabPlzSave": "请再次保存该私钥",
"serverTabUnkown": "未知状态",
"setting": "设置",
"sftpDlPrepare": "准备连接至服务器...",
"sftpEditorTip": "如果为空, 使用App内置的文件编辑器. 如果有值, 这是用远程服务器的编辑器, 例如 `vim` (建议根据 `EDITOR` 自动获取).",
"sftpRmrDirSummary": "在 SFTP 中使用 `rm -r` 来删除文件夹",
"sftpSSHConnected": "SFTP 已连接...",
"sftpShowFoldersFirst": "文件夹显示在前",
@@ -278,11 +168,11 @@
"sshTip": "该功能目前处于测试阶段。\n\n请在 {url} 反馈问题,或者加入我们开发。",
"sshVirtualKeyAutoOff": "虚拟按键自动切换",
"start": "开始",
"stat": "统计",
"stats": "统计",
"stop": "停止",
"stopped": "已停止",
"storage": "存储",
"success": "成功",
"supportFmtArgs": "支持以下格式化参数:",
"suspend": "挂起",
"suspendTip": "suspend 功能需要 root 权限及 systemd 支持。",
@@ -298,7 +188,6 @@
"textScaler": "字体缩放",
"textScalerTip": "1.0 => 100%(原大小),仅作用于服务器页面部分字体,不建议修改。",
"theme": "主题",
"themeMode": "主题模式",
"time": "时间",
"times": "次",
"total": "总共",
@@ -306,27 +195,18 @@
"trySudo": "尝试使用 sudo",
"ttl": "TTL",
"unknown": "未知",
"unknownError": "未知错误",
"unkownConvertMode": "未知转换模式",
"update": "更新",
"updateAll": "更新全部",
"updateIntervalEqual0": "你设置为 0服务器状态不会自动刷新。\n且不能计算 CPU 使用情况。",
"updateServerStatusInterval": "服务器状态刷新间隔",
"updateTip": "新版本: v1.0.{newest}",
"updateTipTooLow": "当前版本过低,请升级至 v1.0.{newest}",
"upload": "上传",
"upsideDown": "上下交换",
"uptime": "启动时长",
"urlOrJson": "链接或 JSON",
"useCdn": "使用 CDN",
"useCdnTip": "非中国大陆用户推荐使用 CDN是否使用",
"useNoPwd": "将会使用无密码",
"usePodmanByDefault": "默认使用 Podman",
"used": "已用",
"user": "用户",
"versionHaveUpdate": "找到新版本v1.0.{build}, 点击更新",
"versionUnknownUpdate": "当前v1.0.{build},点击检查更新",
"versionUpdated": "当前v1.0.{build}, 已是最新版本",
"view": "视图",
"viewErr": "查看错误",
"virtKeyHelpClipboard": "如果终端有选中字符,则复制选中字符至剪切板,否则粘贴剪切板内容至终端。",
@@ -337,8 +217,8 @@
"watchNotPaired": "没有已配对的 Apple Watch",
"webdavSettingEmpty": "WebDav 设置项为空",
"whenOpenApp": "当打开 App 时",
"willTakEeffectImmediately": "更改将会立即生效",
"wolTip": "在配置 WOL 后,每次连接服务器都会先发送一次 WOL 请求",
"write": "写",
"writeScriptFailTip": "写入脚本失败,可能是没有权限/目录不存在等"
"writeScriptFailTip": "写入脚本失败,可能是没有权限/目录不存在等",
"writeScriptTip": "在连接服务器后,会向 ~/.config/server_box 写入脚本来监测系统状态,你可以审查脚本内容。"
}

View File

@@ -1,84 +1,42 @@
{
"@@locale": "zh_TW",
"about": "關於",
"aboutThanks": "感謝以下參與的各位。",
"acceptBeta": "接受測試版更新推送",
"add": "新增",
"addAServer": "新增伺服器",
"addPrivateKey": "新增私鑰",
"addSystemPrivateKeyTip": "當前沒有任何私鑰,是否添加系統自帶的 (~/.ssh/id_rsa)",
"added2List": "已添加至任務列表",
"addr": "位址",
"all": "所有",
"alreadyLastDir": "已經是最上層目錄了",
"askContinue": "{msg},繼續嗎?",
"attention": "注意",
"authFailTip": "認證失敗,請檢查密碼/密鑰/主機/用戶等是否錯誤。",
"authRequired": "需要認證",
"auto": "自動",
"autoBackupConflict": "只能同時開啓一個自動備份",
"autoCheckUpdate": "自動檢查更新",
"autoConnect": "自動連接",
"autoRun": "自動運行",
"autoUpdateHomeWidget": "自動更新桌面小部件",
"backup": "備份",
"backupTip": "匯出的資料僅進行了簡單加密,請妥善保管。",
"backupVersionNotMatch": "備份版本不匹配,無法還原",
"battery": "電池",
"bgRun": "後台運行",
"bgRunTip": "此開關只代表程式會嘗試在後台運行,具體能否在後臺運行取決於是否開啟了權限。 原生 Android 請關閉本 App 的“電池優化”MIUI / HyperOS 請修改省電策略為“無限制”。",
"bioAuth": "生物認證",
"browser": "瀏覽器",
"bulkImportServers": "批量導入伺服器",
"bulkImportServersTip": "您可以在此處找到[格式]({url})",
"canPullRefresh": "可以下拉更新",
"cancel": "取消",
"choose": "選擇",
"chooseFontFile": "選擇字型檔",
"choosePrivateKey": "選擇私鑰",
"clear": "清除",
"clipboard": "剪貼簿",
"close": "關閉",
"cmd": "命令",
"cnKeyboardComp": "中國 Android 兼容性",
"cnKeyboardCompTip": "如果終端彈出安全鍵盤,您可以啟用它。",
"collapseUI": "折疊",
"collapseUITip": "是否預設折疊 UI 中存在的長列表",
"conn": "連接",
"connected": "已連接",
"container": "容器",
"containerName": "容器名稱",
"containerStatus": "容器狀態",
"containerTrySudoTip": "例如App 內設置使用者為 aaa但是 Docker 安裝在 root 使用者,這時就需要開啟此選項",
"content": "內容",
"convert": "轉換",
"copy": "複製",
"copyPath": "複製路徑",
"cpuViewAsProgressTip": "以進度條樣式顯示每個CPU的使用率舊版樣式",
"createFile": "創建檔案",
"createFolder": "創建資料夾",
"cursorType": "游標類型",
"customCmd": "自訂命令",
"customCmdDocUrl": "https://github.com/lollipopkit/flutter_server_box/wiki/主页#自定义命令",
"customCmdHint": "\"命令名稱\": \"命令\"",
"dark": "暗",
"day": "亮",
"debug": "除錯",
"decode": "解碼",
"decompress": "解壓縮",
"delete": "刪除",
"deleteServers": "批量刪除伺服器",
"deviceName": "設備名",
"dirEmpty": "請確保資料夾為空",
"disabled": "已禁用",
"disconnected": "連接斷開",
"disk": "磁碟",
"diskIgnorePath": "忽略的磁碟路徑",
"displayCpuIndex": "顯示 CPU 索引",
"displayName": "顯示名稱",
"dl2Local": "下載 {fileName} 到本地?",
"doc": "文檔",
"dockerEditHost": "編輯 DOCKER_HOST",
"dockerEmptyRunningItems": "沒有正在運行的容器。\n這可能是因為\n- Docker 安裝使用者與 App 內配置的使用者名稱不同\n- 環境變量 DOCKER_HOST 沒有被正確讀取。你可以通過在終端內運行 `echo $DOCKER_HOST` 來獲取。",
"dockerImagesFmt": "共 {count} 個鏡像",
"dockerNotInstalled": "Docker 未安裝",
@@ -86,39 +44,24 @@
"dockerStatusRunningFmt": "{count} 個容器正在運行",
"doubleColumnMode": "雙列模式",
"doubleColumnTip": "此選項僅開啟功能,實際是否能開啟還取決於設備的寬度",
"download": "下載",
"edit": "編輯",
"editVirtKeys": "編輯虛擬按鍵",
"editor": "編輯器",
"editorHighlightTip": "目前的代碼高亮性能較為糟糕,可以選擇關閉以改善。",
"encode": "編碼",
"error": "錯誤",
"exampleName": "名稱範例",
"envVars": "環境變量",
"experimentalFeature": "實驗性功能",
"export": "匯出",
"extraArgs": "額外參數",
"failed": "失敗",
"fallbackSshDest": "備選 SSH 目標",
"fdroidReleaseTip": "如果你是從 F-Droid 下載的本應用,推薦關閉此選項",
"feedback": "反饋",
"feedbackOnGithub": "如果你有任何問題,請在 GitHub 反饋",
"fieldMustNotEmpty": "這些輸入框不能為空。",
"fileNotExist": "{file} 不存在",
"fileTooLarge": "文件 '{file}' 過大 '{size}',超過了 {sizeMax}",
"files": "文件",
"finished": "已完成",
"followSystem": "跟隨系統",
"font": "字型",
"fontSize": "字型大小",
"forExample": "例如",
"force": "強制",
"foundNUpdate": "找到 {count} 個更新",
"fullScreen": "全螢幕模式",
"fullScreenJitter": "全螢幕模式抖動",
"fullScreenJitterHelp": "防止燒屏",
"fullScreenTip": "當設備旋轉為橫屏時,是否開啟全熒幕模式?此選項僅適用於伺服器選項卡。",
"getPushTokenFailed": "未能獲取到推送 token",
"gettingToken": "正在獲取 Token...",
"goBackQ": "返回?",
"goto": "前往",
"hideTitleBar": "隱藏標題欄",
@@ -126,40 +69,24 @@
"highlight": "代碼高亮",
"homeWidgetUrlConfig": "桌面部件鏈接配置",
"host": "主機",
"hour": "小時",
"httpFailedWithCode": "請求失敗, 狀態碼: {code}",
"icloudSynced": "iCloud 已同步,某些設置可能需要重啟才能生效。",
"ignoreCert": "忽略證書",
"image": "鏡像",
"imagesList": "鏡像列表",
"import": "導入",
"inAppUpdate": "在 App 內更新?否則使用瀏覽器下載。",
"init": "初始化",
"inner": "內建",
"inputDomainHere": "在這裡輸入域名",
"install": "安裝",
"installDockerWithUrl": "請先 https://docs.docker.com/engine/install docker",
"invalid": "無效",
"invalidJson": "無效的 JSON",
"invalidVersion": "不支持的版本",
"invalidVersionHelp": "請確保正確安裝了 docker或者使用的非自編譯版本。如果沒有以上問題請在 {url} 提交問題。",
"isBusy": "當前正忙",
"jumpServer": "跳板伺服器",
"keepForeground": "請保持應用處於前台!",
"keepStatusWhenErr": "保留上次的伺服器狀態",
"keepStatusWhenErrTip": "僅在執行腳本出錯時",
"keyAuth": "密鑰認證",
"language": "語言",
"languageName": "繁體中文",
"lastTry": "最後嘗試",
"launchPage": "啓動頁",
"letterCache": "输入法字符緩存",
"letterCacheTip": "推薦開啟,但是開啟後無法輸入CJK(中文、日文、韓文)等文字",
"license": "開源許可證",
"light": "亮",
"loadingFiles": "正在加載目錄...",
"letterCacheTip": "建議關閉,但關閉後將無法輸入 CJK 等文字",
"license": "證",
"location": "位置",
"log": "日誌",
"loss": "丟包率",
"madeWithLove": "用❤️製作 by {myGithub}",
"manual": "手動",
@@ -167,62 +94,36 @@
"maxRetryCount": "伺服器嘗試重連次數",
"maxRetryCountEqual0": "會無限重試",
"min": "最小",
"minute": "分鐘",
"mission": "任務",
"more": "更多",
"moveOutServerFuncBtnsHelp": "開啟:可以在伺服器 Tab 頁的每個卡片下方顯示。關閉:在伺服器詳情頁頂部顯示。",
"ms": "毫秒",
"name": "名稱",
"needHomeDir": "如果你是群暉用戶,[看這裡](https://kb.synology.com/DSM/tutorial/user_enable_home_service)。其他系統用戶需搜索如何創建家目錄home directory。",
"needRestart": "需要重啓 App",
"net": "網路",
"netViewType": "網路視圖類型",
"newContainer": "新建容器",
"noClient": "沒有 SSH 連接",
"noInterface": "沒有可用的介面",
"noLineChart": "不使用折線圖",
"noLineChartForCpu": "CPU 不使用折線圖",
"noNotiPerm": "無通知權限,可能在下載應用程式更新時沒有進度提示。",
"noOptions": "無可選項",
"noPrivateKeyTip": "私鑰不存在,可能已被刪除/配置錯誤。",
"noPromptAgain": "不再提示",
"noResult": "無結果",
"noSavedPrivateKey": "沒有已保存的私鑰。",
"noSavedSnippet": "沒有已保存的程式片段。",
"noServerAvailable": "沒有可用的伺服器。",
"noTask": "沒有任務",
"noUpdateAvailable": "沒有可用更新",
"node": "節點",
"notAvailable": "不可用",
"notSelected": "未選擇",
"note": "備註",
"nullToken": "無 Token",
"ok": "好",
"onServerDetailPage": "在伺服器詳情頁",
"onlyOneLine": "僅顯示為一行(可滾動)",
"onlyWhenCoreBiggerThan8": "僅當核心數大於 8 時生效",
"open": "打開",
"openLastPath": "打開上次的路徑",
"openLastPathTip": "不同的伺服器會有不同的記錄,且記錄的是退出時的路徑",
"parseContainerStats": "解析容器佔用狀態",
"parseContainerStatsTip": "Docker 解析佔用狀態較為緩慢",
"paste": "貼上",
"path": "路徑",
"percentOfSize": "{size} 的 {percent}%",
"permission": "權限",
"pickFile": "選擇檔案",
"pingAvg": "平均:",
"pingInputIP": "請輸入目標 IP 或域名",
"pingNoServer": "沒有伺服器可用於 Ping\n請在伺服器 Tab 新增伺服器後再試",
"pkg": "包管理",
"pkgUpgradeTip": "請在更新前備份系統。",
"platformNotSupportUpdate": "當前平台不支持更新,請編譯最新原始碼後手動安裝",
"plugInType": "插入類型",
"plzEnterHost": "請輸入主機",
"plzSelectKey": "請選擇私鑰",
"port": "埠",
"preview": "預覽",
"primaryColorSeed": "主要色調種子",
"privateKey": "私鑰",
"process": "行程",
"pushToken": "消息推送 Token",
@@ -232,16 +133,11 @@
"pwd": "密碼",
"read": "读",
"reboot": "重启",
"rememberChoice": "記住選擇",
"rememberPwdInMem": "在記憶體中記住密碼",
"rememberPwdInMemTip": "用於容器、暫停等",
"rememberWindowSize": "記住窗口大小",
"remotePath": "遠端路徑",
"rename": "重命名",
"reportBugsOnGithubIssue": "請到 {url} 提交問題",
"restart": "重啓",
"restore": "恢復",
"restoreSuccess": "恢復成功,需要重啓 App 來應用更改",
"result": "結果",
"rotateAngel": "旋轉角度",
"route": "路由",
@@ -256,14 +152,8 @@
"serverDetailOrder": "詳情頁部件順序",
"serverFuncBtns": "伺服器功能按鈕",
"serverOrder": "伺服器順序",
"serverTabConnecting": "連接中...",
"serverTabEmpty": "現在沒有伺服器。\n點擊右下方按鈕來新增。",
"serverTabFailed": "失敗",
"serverTabLoading": "加載中...",
"serverTabPlzSave": "請再次保存該私鑰",
"serverTabUnkown": "未知狀態",
"setting": "設置",
"sftpDlPrepare": "準備連接至伺服器...",
"sftpEditorTip": "如果為空, 使用App內置的文件編輯器。如果有值, 則使用遠程伺服器的編輯器, 例如 `vim`(建議根據 `EDITOR` 自動獲取)。",
"sftpRmrDirSummary": "在 SFTP 中使用 `rm -r` 來刪除文件夾",
"sftpSSHConnected": "SFTP 已連接...",
"sftpShowFoldersFirst": "資料夾顯示在前",
@@ -278,11 +168,11 @@
"sshTip": "該功能目前處於測試階段。\n\n請在 {url} 反饋問題,或者加入我們開發。",
"sshVirtualKeyAutoOff": "虛擬按鍵自動切換",
"start": "開始",
"stat": "統計",
"stats": "統計",
"stop": "停止",
"stopped": "已停止",
"storage": "存儲",
"success": "成功",
"supportFmtArgs": "支援以下格式化參數:",
"suspend": "挂起",
"suspendTip": "suspend 功能需要 root 權限及 systemd 支持。",
@@ -298,7 +188,6 @@
"textScaler": "字型縮放",
"textScalerTip": "1.0 => 100%(原大小),僅作用於伺服器頁面部分字型,不建議修改。",
"theme": "主題",
"themeMode": "主題模式",
"time": "時間",
"times": "次",
"total": "總共",
@@ -306,27 +195,18 @@
"trySudo": "嘗試使用 sudo",
"ttl": "TTL",
"unknown": "未知",
"unknownError": "未知錯誤",
"unkownConvertMode": "未知轉換模式",
"update": "更新",
"updateAll": "更新全部",
"updateIntervalEqual0": "你設置為 0伺服器狀態不會自動更新。\n且不能計算CPU使用情況。",
"updateServerStatusInterval": "伺服器狀態更新間隔",
"updateTip": "新版本: v1.0.{newest}",
"updateTipTooLow": "當前版本過低,請升級至 v1.0.{newest}",
"upload": "上傳",
"upsideDown": "上下交換",
"uptime": "啟動時長",
"urlOrJson": "鏈接或 JSON",
"useCdn": "使用 CDN",
"useCdnTip": "非中國大陸用戶建議使用 CDN是否使用",
"useNoPwd": "将使用無密碼",
"usePodmanByDefault": "默認使用 Podman",
"used": "已用",
"user": "使用者",
"versionHaveUpdate": "找到新版本v1.0.{build}, 點擊更新",
"versionUnknownUpdate": "當前v1.0.{build},點擊檢查更新",
"versionUpdated": "當前v1.0.{build}, 已是最新版本",
"view": "視圖",
"viewErr": "查看錯誤",
"virtKeyHelpClipboard": "如果終端有選中字元,則復製選中字元至剪貼簿,否則粘貼剪貼簿內容至終端。",
@@ -337,8 +217,8 @@
"watchNotPaired": "沒有已配對的 Apple Watch",
"webdavSettingEmpty": "WebDav 設置項爲空",
"whenOpenApp": "當打開 App 時",
"willTakEeffectImmediately": "更改將會立即生效",
"wolTip": "在配置 WOL網絡喚醒每次連接伺服器都會先發送一次 WOL 請求。",
"write": "写",
"writeScriptFailTip": "寫入腳本失敗,可能是沒有權限/目錄不存在等。"
"writeScriptFailTip": "寫入腳本失敗,可能是沒有權限/目錄不存在等。",
"writeScriptTip": "連接到伺服器後,將會在 ~/.config/server_box 中寫入一個腳本來監測系統狀態。你可以審查腳本內容。"
}

View File

@@ -9,7 +9,6 @@ import 'package:flutter_displaymode/flutter_displaymode.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:logging/logging.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:server_box/app.dart';
import 'package:server_box/core/utils/sync/icloud.dart';
import 'package:server_box/core/utils/sync/webdav.dart';
@@ -54,9 +53,7 @@ void _runInZone(void Function() body) {
runZonedGuarded(
body,
(obj, trace) {
Loggers.root.warning(obj, null, trace);
},
(e, s) => print('[ZONE] $e\n$s'),
zoneSpecification: zoneSpec,
);
}
@@ -83,8 +80,8 @@ Future<void> _initApp() async {
}
Future<void> _initData() async {
// await SecureStore.init();
await Hive.initFlutter();
// Ordered by typeId
Hive.registerAdapter(PrivateKeyInfoAdapter()); // 1
Hive.registerAdapter(SnippetAdapter()); // 2
@@ -95,6 +92,8 @@ Future<void> _initData() async {
Hive.registerAdapter(ServerCustomAdapter()); // 7
Hive.registerAdapter(WakeOnLanCfgAdapter()); // 8
await PrefStore.init(); // Call this before accessing any store
await Stores.setting.init();
await Stores.server.init();
await Stores.key.init();
@@ -112,7 +111,7 @@ Future<void> _initData() async {
void _setupDebug() {
Logger.root.level = Level.ALL;
Logger.root.onRecord.listen((record) {
Pros.debug.addLog(record);
DebugProvider.addLog(record);
print(record);
if (record.error != null) print(record.error);
if (record.stackTrace != null) print(record.stackTrace);
@@ -121,8 +120,6 @@ void _setupDebug() {
void _doPlatformRelated() async {
if (isAndroid) {
// SharedPreferences is only used on Android for saving home widgets settings.
SharedPreferences.setPrefix('');
// try switch to highest refresh rate
FlutterDisplayMode.setHighRefreshRate();
}

View File

@@ -4,42 +4,44 @@ import 'dart:io';
import 'package:computer/computer.dart';
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:server_box/core/extension/context/locale.dart';
import 'package:server_box/core/utils/sync/icloud.dart';
import 'package:server_box/core/utils/sync/webdav.dart';
import 'package:server_box/data/model/app/backup.dart';
import 'package:server_box/data/model/server/server_private_info.dart';
import 'package:server_box/data/model/server/snippet.dart';
import 'package:server_box/data/res/misc.dart';
import 'package:server_box/data/res/provider.dart';
import 'package:server_box/data/res/store.dart';
import 'package:server_box/data/res/url.dart';
import 'package:icons_plus/icons_plus.dart';
final icloudLoading = false.vn;
final webdavLoading = false.vn;
class BackupPage extends StatelessWidget {
BackupPage({super.key});
final icloudLoading = ValueNotifier(false);
final webdavLoading = ValueNotifier(false);
const BackupPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
title: Text(l10n.backup, style: UIs.text18),
),
appBar: CustomAppBar(title: Text(libL10n.backup)),
body: _buildBody(context),
);
}
Widget _buildBody(BuildContext context) {
return ListView(
padding: const EdgeInsets.all(17),
padding: const EdgeInsets.all(13),
children: [
_buildTip(),
CenterGreyTitle(libL10n.sync),
if (isMacOS || isIOS) _buildIcloud(context),
_buildWebdav(context),
_buildFile(context),
_buildClipboard(context),
CenterGreyTitle(libL10n.import),
_buildBulkImportServers(context),
_buildImportSnippet(context),
],
);
}
@@ -48,7 +50,7 @@ class BackupPage extends StatelessWidget {
return CardX(
child: ListTile(
leading: const Icon(Icons.warning),
title: Text(l10n.attention),
title: Text(libL10n.attention),
subtitle: Text(l10n.backupTip, style: UIs.textGrey),
),
);
@@ -58,11 +60,11 @@ class BackupPage extends StatelessWidget {
return CardX(
child: ExpandTile(
leading: const Icon(Icons.file_open),
title: Text(l10n.files),
initiallyExpanded: true,
title: Text(libL10n.file),
initiallyExpanded: false,
children: [
ListTile(
title: Text(l10n.backup),
title: Text(libL10n.backup),
trailing: const Icon(Icons.save),
onTap: () async {
final path = await Backup.backup();
@@ -71,7 +73,7 @@ class BackupPage extends StatelessWidget {
),
ListTile(
trailing: const Icon(Icons.restore),
title: Text(l10n.restore),
title: Text(libL10n.restore),
onTap: () async => _onTapFileRestore(context),
),
],
@@ -110,15 +112,15 @@ class BackupPage extends StatelessWidget {
child: ExpandTile(
leading: const Icon(Icons.storage),
title: const Text('WebDAV'),
initiallyExpanded: true,
initiallyExpanded: false,
children: [
ListTile(
title: Text(l10n.setting),
title: Text(libL10n.setting),
trailing: const Icon(Icons.settings),
onTap: () async => _onTapWebdavSetting(context),
),
ListTile(
title: Text(l10n.auto),
title: Text(libL10n.auto),
trailing: StoreSwitch(
prop: Stores.setting.webdavSync,
validator: (p0) {
@@ -158,12 +160,12 @@ class BackupPage extends StatelessWidget {
children: [
TextButton(
onPressed: () async => _onTapWebdavDl(context),
child: Text(l10n.restore),
child: Text(libL10n.restore),
),
UIs.width7,
TextButton(
onPressed: () async => _onTapWebdavUp(context),
child: Text(l10n.backup),
child: Text(libL10n.backup),
),
],
);
@@ -179,20 +181,20 @@ class BackupPage extends StatelessWidget {
return CardX(
child: ExpandTile(
leading: const Icon(Icons.content_paste),
title: Text(l10n.clipboard),
title: Text(libL10n.clipboard),
children: [
ListTile(
title: Text(l10n.backup),
title: Text(libL10n.backup),
trailing: const Icon(Icons.save),
onTap: () async {
final path = await Backup.backup();
Pfs.copy(await File(path).readAsString());
context.showSnackBar(l10n.success);
context.showSnackBar(libL10n.success);
},
),
ListTile(
trailing: const Icon(Icons.restore),
title: Text(l10n.restore),
title: Text(libL10n.restore),
onTap: () async => _onTapClipboardRestore(context),
),
],
@@ -203,55 +205,104 @@ class BackupPage extends StatelessWidget {
Widget _buildBulkImportServers(BuildContext context) {
return CardX(
child: ListTile(
title: Text(l10n.bulkImportServers),
subtitle: SimpleMarkdown(
data: l10n.bulkImportServersTip(Urls.appWiki),
styleSheet: MarkdownStyleSheet(
p: UIs.textGrey,
),
),
leading: const Icon(Icons.import_export),
title: Text(l10n.server),
leading: const Icon(BoxIcons.bx_server),
onTap: () => _onBulkImportServers(context),
trailing: const Icon(Icons.keyboard_arrow_right),
),
);
}
Widget _buildImportSnippet(BuildContext context) {
return ListTile(
title: Text(l10n.snippet),
leading: const Icon(MingCute.code_line),
trailing: const Icon(Icons.keyboard_arrow_right),
onTap: () async {
final data = await context.showImportDialog(
title: l10n.snippet,
modelDef: Snippet.example.toJson(),
);
if (data == null) return;
final str = String.fromCharCodes(data);
final (list, _) = await context.showLoadingDialog(
fn: () => Computer.shared.start((s) {
return json.decode(s) as List;
}, str),
);
if (list == null || list.isEmpty) return;
final snippets = <Snippet>[];
final errs = <String>[];
for (final item in list) {
try {
final snippet = Snippet.fromJson(item);
snippets.add(snippet);
} catch (e) {
errs.add(e.toString());
}
}
if (snippets.isEmpty) {
context.showSnackBar(libL10n.empty);
return;
}
if (errs.isNotEmpty) {
context.showRoundDialog(
title: libL10n.error,
child: SingleChildScrollView(child: Text(errs.join('\n'))),
);
return;
}
final snippetNames = snippets.map((e) => e.name).join(', ');
context.showRoundDialog(
title: libL10n.attention,
child: SingleChildScrollView(
child: Text(
libL10n.askContinue('${libL10n.import} [$snippetNames]'),
),
),
actions: Btn.ok(
onTap: () {
for (final snippet in snippets) {
Pros.snippet.add(snippet);
}
context.pop();
context.pop();
},
).toList,
);
},
).cardx;
}
Future<void> _onTapFileRestore(BuildContext context) async {
final text = await Pfs.pickFileString();
if (text == null) return;
try {
final backup = await context.showLoadingDialog(
final (backup, err) = await context.showLoadingDialog(
fn: () => Computer.shared.start(Backup.fromJsonString, text.trim()),
);
if (err != null || backup == null) return;
if (backupFormatVersion != backup.version) {
context.showSnackBar(l10n.backupVersionNotMatch);
return;
}
await context.showRoundDialog(
title: l10n.restore,
child: Text(l10n.askContinue(
'${l10n.restore} ${l10n.backup}(${backup.date})',
title: libL10n.restore,
child: Text(libL10n.askContinue(
'${libL10n.restore} ${libL10n.backup}(${backup.date})',
)),
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.cancel),
),
TextButton(
onPressed: () async {
await backup.restore(force: true);
context.pop();
},
child: Text(l10n.ok),
),
],
actions: Btn.ok(
onTap: () async {
await backup.restore(force: true);
context.pop();
},
).toList,
);
} catch (e, s) {
Loggers.app.warning('Import backup failed', e, s);
context.showErrDialog(e: e, s: s, operation: l10n.restore);
context.showErrDialog(e: e, s: s, operation: libL10n.restore);
}
}
@@ -262,7 +313,7 @@ class BackupPage extends StatelessWidget {
if (files.isEmpty) return context.showSnackBar(l10n.dirEmpty);
final fileName = await context.showPickSingleDialog(
title: l10n.restore,
title: libL10n.restore,
items: files,
);
if (fileName == null) return;
@@ -275,7 +326,7 @@ class BackupPage extends StatelessWidget {
final dlBak = await Computer.shared.start(Backup.fromJsonString, dlFile);
await dlBak.restore(force: true);
} catch (e, s) {
context.showErrDialog(e: e, s: s, operation: l10n.restore);
context.showErrDialog(e: e, s: s, operation: libL10n.restore);
Loggers.app.warning('Download webdav backup failed', e, s);
} finally {
webdavLoading.value = false;
@@ -305,6 +356,8 @@ class BackupPage extends StatelessWidget {
final url = TextEditingController(text: Stores.setting.webdavUrl.fetch());
final user = TextEditingController(text: Stores.setting.webdavUser.fetch());
final pwd = TextEditingController(text: Stores.setting.webdavPwd.fetch());
final nodeUser = FocusNode();
final nodePwd = FocusNode();
final result = await context.showRoundDialog<bool>(
title: 'WebDAV',
child: Column(
@@ -314,25 +367,26 @@ class BackupPage extends StatelessWidget {
label: 'URL',
hint: 'https://example.com/webdav/',
controller: url,
suggestion: false,
onSubmitted: (p0) => FocusScope.of(context).requestFocus(nodeUser),
),
Input(
label: l10n.user,
label: libL10n.user,
controller: user,
node: nodeUser,
suggestion: false,
onSubmitted: (p0) => FocusScope.of(context).requestFocus(nodePwd),
),
Input(
label: l10n.pwd,
controller: pwd,
node: nodePwd,
suggestion: false,
onSubmitted: (_) => context.pop(true),
),
],
),
actions: [
TextButton(
onPressed: () {
context.pop(true);
},
child: Text(l10n.ok),
),
],
actions: Btnx.oks,
);
if (result == true) {
final result = await Webdav.test(url.text, user.text, pwd.text);
@@ -340,7 +394,7 @@ class BackupPage extends StatelessWidget {
context.showSnackBar(result);
return;
}
context.showSnackBar(l10n.success);
context.showSnackBar(libL10n.success);
Webdav.changeClient(url.text, user.text, pwd.text);
}
}
@@ -348,14 +402,15 @@ class BackupPage extends StatelessWidget {
void _onTapClipboardRestore(BuildContext context) async {
final text = await Pfs.paste();
if (text == null || text.isEmpty) {
context.showSnackBar(l10n.fieldMustNotEmpty);
context.showSnackBar(libL10n.empty);
return;
}
try {
final backup = await context.showLoadingDialog(
final (backup, err) = await context.showLoadingDialog(
fn: () => Computer.shared.start(Backup.fromJsonString, text.trim()),
);
if (err != null || backup == null) return;
if (backupFormatVersion != backup.version) {
context.showSnackBar(l10n.backupVersionNotMatch);
@@ -363,63 +418,58 @@ class BackupPage extends StatelessWidget {
}
await context.showRoundDialog(
title: l10n.restore,
child: Text(l10n.askContinue(
'${l10n.restore} ${l10n.backup}(${backup.date})',
title: libL10n.restore,
child: Text(libL10n.askContinue(
'${libL10n.restore} ${libL10n.backup}(${backup.date})',
)),
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.cancel),
),
TextButton(
onPressed: () async {
await backup.restore(force: true);
context.pop();
},
child: Text(l10n.ok),
),
],
actions: Btn.ok(
onTap: () async {
await backup.restore(force: true);
context.pop();
},
).toList,
);
} catch (e, s) {
Loggers.app.warning('Import backup failed', e, s);
context.showErrDialog(e: e, s: s, operation: l10n.restore);
context.showErrDialog(e: e, s: s, operation: libL10n.restore);
}
}
void _onBulkImportServers(BuildContext context) async {
final text = await Pfs.pickFileString();
if (text == null) return;
final data = await context.showImportDialog(
title: l10n.server,
modelDef: ServerPrivateInfo.example.toJson(),
);
if (data == null) return;
final text = String.fromCharCodes(data);
try {
final spis = await context.showLoadingDialog(
final (spis, err) = await context.showLoadingDialog(
fn: () => Computer.shared.start((val) {
final list = json.decode(val) as List;
return list.map((e) => ServerPrivateInfo.fromJson(e)).toList();
}, text.trim()),
);
if (err != null || spis == null) return;
final sure = await context.showRoundDialog<bool>(
title: l10n.import,
child: Text(l10n.askContinue('${spis.length} ${l10n.server}')),
actions: [
TextButton(
onPressed: () => context.pop(true),
child: Text(l10n.ok),
),
],
title: libL10n.import,
child: Text(libL10n.askContinue('${spis.length} ${l10n.server}')),
actions: Btnx.oks,
);
if (sure == true) {
await context.showLoadingDialog(
final (suc, err) = await context.showLoadingDialog(
fn: () async {
for (var spi in spis) {
Stores.server.put(spi);
}
return true;
},
);
context.showSnackBar(l10n.success);
if (err != null || suc != true) return;
context.showSnackBar(libL10n.success);
}
} catch (e, s) {
context.showErrDialog(e: e, s: s, operation: l10n.import);
context.showErrDialog(e: e, s: s, operation: libL10n.import);
Loggers.app.warning('Import servers failed', e, s);
}
}

View File

@@ -98,7 +98,7 @@ class _ContainerPageState extends State<ContainerPage> {
UIs.height13,
Padding(
padding: const EdgeInsets.symmetric(horizontal: 23),
child: Text(_container.error?.toString() ?? l10n.unknownError),
child: Text(_container.error.toString()),
),
const Spacer(),
_buildEditHost(),
@@ -285,16 +285,13 @@ class _ContainerPageState extends State<ContainerPage> {
if (emptyPs && emptyImgs) {
children.add(Padding(
padding: const EdgeInsets.fromLTRB(17, 17, 17, 0),
child: Text(
l10n.dockerEmptyRunningItems,
textAlign: TextAlign.center,
),
child: SimpleMarkdown(data: l10n.dockerEmptyRunningItems),
));
}
children.add(
TextButton(
onPressed: _showEditHostDialog,
child: Text(l10n.dockerEditHost),
child: Text('${libL10n.edit} DOCKER_HOST'),
),
);
return CardX(
@@ -328,51 +325,44 @@ class _ContainerPageState extends State<ContainerPage> {
final nameCtrl = TextEditingController();
final argsCtrl = TextEditingController();
await context.showRoundDialog(
title: l10n.newContainer,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Input(
autoFocus: true,
type: TextInputType.text,
label: l10n.image,
hint: 'xxx:1.1',
controller: imageCtrl,
),
Input(
type: TextInputType.text,
controller: nameCtrl,
label: l10n.containerName,
hint: 'xxx',
),
Input(
type: TextInputType.text,
controller: argsCtrl,
label: l10n.extraArgs,
hint: '-p 2222:22 -v ~/.xxx/:/xxx',
),
],
),
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.cancel),
title: l10n.newContainer,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Input(
autoFocus: true,
type: TextInputType.text,
label: l10n.image,
hint: 'xxx:1.1',
controller: imageCtrl,
suggestion: false,
),
Input(
type: TextInputType.text,
controller: nameCtrl,
label: libL10n.name,
hint: 'xxx',
suggestion: false,
),
Input(
type: TextInputType.text,
controller: argsCtrl,
label: l10n.extraArgs,
hint: '-p 2222:22 -v ~/.xxx/:/xxx',
suggestion: false,
),
],
),
TextButton(
onPressed: () async {
context.pop();
await _showAddCmdPreview(
_buildAddCmd(
imageCtrl.text.trim(),
nameCtrl.text.trim(),
argsCtrl.text.trim(),
),
);
},
child: Text(l10n.ok),
)
],
);
actions: Btn.ok(onTap: () async {
context.pop();
await _showAddCmdPreview(
_buildAddCmd(
imageCtrl.text.trim(),
nameCtrl.text.trim(),
argsCtrl.text.trim(),
),
);
}).toList);
}
Future<void> _showAddCmdPreview(String cmd) async {
@@ -382,17 +372,21 @@ class _ContainerPageState extends State<ContainerPage> {
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.cancel),
child: Text(libL10n.cancel),
),
TextButton(
onPressed: () async {
context.pop();
final result = await context.showLoadingDialog(
final (result, err) = await context.showLoadingDialog(
fn: () => _container.run(cmd),
);
if (result != null) {
context.showSnackBar(result.message ?? l10n.unknownError);
if (err != null || result != null) {
final e = result?.message ?? err?.toString();
context.showRoundDialog(
title: libL10n.error,
child: Text(e.toString()),
);
}
},
child: Text(l10n.run),
@@ -419,19 +413,15 @@ class _ContainerPageState extends State<ContainerPage> {
final host = Stores.container.fetch(id);
final ctrl = TextEditingController(text: host);
await context.showRoundDialog(
title: l10n.dockerEditHost,
title: libL10n.edit,
child: Input(
maxLines: 2,
controller: ctrl,
onSubmitted: _onSaveDockerHost,
hint: 'unix:///run/user/1000/docker.sock',
suggestion: false,
),
actions: [
TextButton(
onPressed: () => _onSaveDockerHost(ctrl.text),
child: Text(l10n.ok),
),
],
actions: Btn.ok(onTap: () => _onSaveDockerHost(ctrl.text)).toList,
);
}
@@ -443,24 +433,20 @@ class _ContainerPageState extends State<ContainerPage> {
void _showImageRmDialog(ContainerImg e) {
context.showRoundDialog(
title: l10n.attention,
child: Text(l10n.askContinue('${l10n.delete} Image(${e.repository})')),
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.cancel),
),
TextButton(
onPressed: () async {
context.pop();
final result = await _container.run('rmi ${e.id} -f');
if (result != null) {
context.showSnackBar(result.message ?? l10n.unknownError);
}
},
child: Text(l10n.ok, style: UIs.textRed),
),
],
title: libL10n.attention,
child: Text(
libL10n.askContinue('${libL10n.delete} Image(${e.repository})'),
),
actions: Btn.ok(
onTap: () async {
context.pop();
final result = await _container.run('rmi ${e.id} -f');
if (result != null) {
context.showSnackBar(result.message ?? 'null');
}
},
red: true,
).toList,
);
}
@@ -474,12 +460,12 @@ class _ContainerPageState extends State<ContainerPage> {
case ContainerMenu.rm:
var force = false;
context.showRoundDialog(
title: l10n.attention,
title: libL10n.attention,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(l10n.askContinue(
'${l10n.delete} Container(${dItem.name})',
Text(libL10n.askContinue(
'${libL10n.delete} Container(${dItem.name})',
)),
UIs.height13,
Row(
@@ -497,56 +483,55 @@ class _ContainerPageState extends State<ContainerPage> {
)
],
),
actions: [
TextButton(
onPressed: () async {
context.pop();
actions: Btn.ok(onTap: () async {
context.pop();
final result = await context.showLoadingDialog(
fn: () => _container.delete(id, force),
);
if (result != null) {
context.showRoundDialog(
title: l10n.error,
child: Text(result.message ?? l10n.unknownError),
);
}
},
child: Text(l10n.ok),
)
],
final (result, err) = await context.showLoadingDialog(
fn: () => _container.delete(id, force),
);
if (err != null || result != null) {
final e = result?.message ?? err?.toString();
context.showRoundDialog(
title: libL10n.error,
child: Text(e ?? 'null'),
);
}
}).toList,
);
break;
case ContainerMenu.start:
final result = await context.showLoadingDialog(
final (result, err) = await context.showLoadingDialog(
fn: () => _container.start(id),
);
if (result != null) {
if (err != null || result != null) {
final e = result?.message ?? err?.toString();
context.showRoundDialog(
title: l10n.error,
child: Text(result.message ?? l10n.unknownError),
title: libL10n.error,
child: Text(e ?? 'null'),
);
}
break;
case ContainerMenu.stop:
final result = await context.showLoadingDialog(
final (result, err) = await context.showLoadingDialog(
fn: () => _container.stop(id),
);
if (result != null) {
if (err != null || result != null) {
final e = result?.message ?? err?.toString();
context.showRoundDialog(
title: l10n.error,
child: Text(result.message ?? l10n.unknownError),
title: libL10n.error,
child: Text(e ?? 'null'),
);
}
break;
case ContainerMenu.restart:
final result = await context.showLoadingDialog(
final (result, err) = await context.showLoadingDialog(
fn: () => _container.restart(id),
);
if (result != null) {
if (err != null || result != null) {
final e = result?.message ?? err?.toString();
context.showRoundDialog(
title: l10n.error,
child: Text(result.message ?? l10n.unknownError),
title: libL10n.error,
child: Text(e ?? 'null'),
);
}
break;

View File

@@ -123,7 +123,7 @@ class _EditorPageState extends State<EditorPage> {
actions: [
PopupMenuButton<String>(
icon: const Icon(Icons.language),
tooltip: l10n.language,
tooltip: libL10n.language,
onSelected: (value) {
_controller.language = Highlights.all[value];
_langCode = value;
@@ -145,10 +145,13 @@ class _EditorPageState extends State<EditorPage> {
// If path is not null, then it's a file editor
// save the text and return true to pop the page
if (widget.path != null) {
await context.showLoadingDialog(
final (res, _) = await context.showLoadingDialog(
fn: () => File(widget.path!).writeAsString(_controller.text),
);
if (res == null) {
context.showSnackBar(libL10n.fail);
return;
}
context.pop(true);
return;
}

View File

@@ -44,7 +44,6 @@ class _HomePageState extends State<HomePage>
super.initState();
SystemUIs.switchStatusBar(hide: false);
WidgetsBinding.instance.addObserver(this);
_selectIndex.value = Stores.setting.launchPage.fetch();
// avoid index out of range
if (_selectIndex.value >= AppTab.values.length || _selectIndex.value < 0) {
_selectIndex.value = 0;
@@ -78,11 +77,7 @@ class _HomePageState extends State<HomePage>
switch (state) {
case AppLifecycleState.resumed:
if (_shouldAuth) {
if (Stores.setting.useBioAuth.fetch()) {
BioAuth.go().then((_) => _shouldAuth = false);
}
}
if (_shouldAuth) _goAuth();
if (!Pros.server.isAutoRefreshOn) {
Pros.server.startAutoRefresh();
}
@@ -132,7 +127,7 @@ class _HomePageState extends State<HomePage>
),
IconButton(
icon: const Icon(Icons.developer_mode, size: 21),
tooltip: l10n.debug,
tooltip: 'Debug',
onPressed: () => AppRoutes.debug().go(context),
),
],
@@ -238,7 +233,7 @@ class _HomePageState extends State<HomePage>
children: [
ListTile(
leading: const Icon(Icons.settings),
title: Text(l10n.setting),
title: Text(libL10n.setting),
onTap: () => AppRoutes.settings().go(context),
onLongPress: _onLongPressSetting,
),
@@ -249,17 +244,17 @@ class _HomePageState extends State<HomePage>
),
ListTile(
leading: const Icon(BoxIcons.bxs_file_blank),
title: Text(l10n.files),
title: Text(libL10n.file),
onTap: () => AppRoutes.localStorage().go(context),
),
ListTile(
leading: const Icon(MingCute.file_import_fill),
title: Text(l10n.backup),
title: Text(libL10n.backup),
onTap: () => AppRoutes.backup().go(context),
),
ListTile(
leading: const Icon(OctIcons.feed_discussion),
title: Text('${l10n.about} & ${l10n.feedback}'),
title: Text('${libL10n.about} & ${libL10n.feedback}'),
onTap: _showAboutDialog,
)
].map((e) => CardX(child: e)).toList(),
@@ -269,7 +264,7 @@ class _HomePageState extends State<HomePage>
void _showAboutDialog() {
context.showRoundDialog(
title: l10n.about,
title: libL10n.about,
child: _buildAboutContent(),
actions: [
TextButton(
@@ -278,7 +273,7 @@ class _HomePageState extends State<HomePage>
),
TextButton(
onPressed: () => Urls.appHelp.launch(),
child: Text(l10n.feedback),
child: Text(libL10n.feedback),
),
TextButton(
onPressed: () => showLicensePage(context: context),
@@ -323,7 +318,7 @@ ${GithubIds.participants.map((e) => '[$e](${e.url})').join(' ')}
@override
Future<void> afterFirstLayout(BuildContext context) async {
// Auth required for first launch
if (Stores.setting.useBioAuth.fetch()) BioAuth.go();
_goAuth();
//_reqNotiPerm();
@@ -361,6 +356,16 @@ ${GithubIds.participants.map((e) => '[$e](${e.url})').join(' ')}
// }
// }
void _goAuth() {
if (Stores.setting.useBioAuth.fetch()) {
if (BioAuthPage.route.isAlreadyIn) return;
BioAuthPage.route.go(
context,
args: BioAuthPageArgs(onAuthSuccess: () => _shouldAuth = false),
);
}
}
Future<void> _onLongPressSetting() async {
final map = Stores.setting.box.toJson(includeInternal: false);
final keys = map.keys;
@@ -370,7 +375,7 @@ ${GithubIds.participants.map((e) => '[$e](${e.url})').join(' ')}
final result = await AppRoutes.editor(
text: text,
langCode: 'json',
title: l10n.setting,
title: libL10n.setting,
).go<String>(context);
if (result == null) {
return;
@@ -385,7 +390,7 @@ ${GithubIds.participants.map((e) => '[$e](${e.url})').join(' ')}
}
} catch (e, trace) {
context.showRoundDialog(
title: l10n.error,
title: libL10n.error,
child: Text('${l10n.save}:\n$e'),
);
Loggers.app.warning('Update json settings failed', e, trace);

View File

@@ -3,7 +3,6 @@ import 'dart:async';
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:server_box/core/extension/context/locale.dart';
import 'package:server_box/data/model/server/server.dart';
import 'package:server_box/data/provider/server.dart';
import 'package:server_box/data/res/build_data.dart';
@@ -53,7 +52,7 @@ final class _WearHomeState extends State<WearHome> with AfterLayoutMixin {
children: [
IconButton(onPressed: () {}, icon: const Icon(Icons.add)),
UIs.height7,
Text(l10n.restore)
Text(libL10n.restore)
],
),
);

View File

@@ -33,7 +33,7 @@ class _IPerfPageState extends State<IPerfPage> {
child: const Icon(Icons.send),
onPressed: () {
if (_hostCtrl.text.isEmpty || _portCtrl.text.isEmpty) {
context.showSnackBar(l10n.fieldMustNotEmpty);
context.showSnackBar(libL10n.empty);
return;
}
AppRoutes.ssh(
@@ -52,12 +52,14 @@ class _IPerfPageState extends State<IPerfPage> {
controller: _hostCtrl,
label: l10n.host,
icon: Icons.computer,
suggestion: false,
),
Input(
controller: _portCtrl,
label: l10n.port,
type: TextInputType.number,
icon: Icons.numbers,
suggestion: false,
),
],
);

View File

@@ -53,17 +53,16 @@ class _PingPageState extends State<PingPage>
heroTag: 'ping',
onPressed: () {
context.showRoundDialog(
title: l10n.choose,
title: libL10n.select,
child: Input(
autoFocus: true,
controller: _textEditingController,
hint: l10n.inputDomainHere,
maxLines: 1,
hint: 'example.com',
maxLines: 2,
minLines: 1,
onSubmitted: (_) => _doPing(),
),
actions: [
TextButton(onPressed: _doPing, child: Text(l10n.ok)),
],
actions: Btn.ok(onTap: _doPing).toList,
);
},
child: const Icon(Icons.search),
@@ -76,12 +75,12 @@ class _PingPageState extends State<PingPage>
await doPing();
} catch (e) {
context.showRoundDialog(
title: l10n.error,
title: libL10n.error,
child: Text(e.toString()),
actions: [
TextButton(
onPressed: () => Pfs.copy(e.toString()),
child: Text(l10n.copy),
child: Text(libL10n.copy),
),
],
);
@@ -91,12 +90,7 @@ class _PingPageState extends State<PingPage>
Widget _buildBody() {
if (isInit) {
return Center(
child: Text(
l10n.noResult,
style: const TextStyle(fontSize: 15),
),
);
return Center(child: Text(libL10n.empty));
}
return ListView.builder(
padding: const EdgeInsets.all(11),
@@ -138,7 +132,7 @@ class _PingPageState extends State<PingPage>
String _buildPingSummary(PingResult result, String unknown, String ms) {
final ip = result.ip ?? unknown;
if (result.results == null || result.results!.isEmpty) {
return '$ip - ${l10n.noResult}';
return '$ip - ${libL10n.empty}';
}
final ttl = result.results?.firstOrNull?.ttl ?? unknown;
final loss = result.statistic?.loss ?? unknown;

View File

@@ -80,33 +80,28 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
CustomAppBar _buildAppBar() {
final actions = [
IconButton(
tooltip: l10n.delete,
tooltip: libL10n.delete,
onPressed: () {
context.showRoundDialog(
title: l10n.attention,
child: Text(l10n.askContinue(
'${l10n.delete} ${l10n.privateKey}(${widget.pki!.id})',
title: libL10n.attention,
child: Text(libL10n.askContinue(
'${libL10n.delete} ${l10n.privateKey}(${widget.pki!.id})',
)),
actions: [
TextButton(
onPressed: () {
Pros.key.delete(widget.pki!);
context.pop();
context.pop();
},
child: Text(
l10n.ok,
style: UIs.textRed,
),
),
],
actions: Btn.ok(
onTap: () {
Pros.key.delete(widget.pki!);
context.pop();
context.pop();
},
red: true,
).toList,
);
},
icon: const Icon(Icons.delete),
)
];
return CustomAppBar(
title: Text(l10n.edit, style: UIs.text18),
title: Text(libL10n.edit),
actions: widget.pki == null ? null : actions,
);
}
@@ -118,32 +113,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
Widget _buildFAB() {
return FloatingActionButton(
tooltip: l10n.save,
onPressed: () async {
final name = _nameController.text;
final key = _standardizeLineSeparators(_keyController.text.trim());
final pwd = _pwdController.text;
if (name.isEmpty || key.isEmpty) {
context.showSnackBar(l10n.fieldMustNotEmpty);
return;
}
FocusScope.of(context).unfocus();
_loading.value = UIs.centerSizedLoading;
try {
final decrypted = await Computer.shared.start(decyptPem, [key, pwd]);
final pki = PrivateKeyInfo(id: name, key: decrypted);
if (widget.pki != null) {
Pros.key.update(widget.pki!, pki);
} else {
Pros.key.add(pki);
}
} catch (e) {
context.showSnackBar(e.toString());
rethrow;
} finally {
_loading.value = null;
}
context.pop();
},
onPressed: _onTapSave,
child: const Icon(Icons.save),
);
}
@@ -158,8 +128,9 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
type: TextInputType.text,
node: _nameNode,
onSubmitted: (_) => _focusScope.requestFocus(_keyNode),
label: l10n.name,
label: libL10n.name,
icon: Icons.info,
suggestion: true,
),
Input(
controller: _keyController,
@@ -170,6 +141,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
onSubmitted: (_) => _focusScope.requestFocus(_pwdNode),
label: l10n.privateKey,
icon: Icons.vpn_key,
suggestion: false,
),
TextButton(
onPressed: () async {
@@ -178,7 +150,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
final file = File(path);
if (!file.existsSync()) {
context.showSnackBar(l10n.fileNotExist(path));
context.showSnackBar(libL10n.notExistFmt(path));
return;
}
final size = (await file.stat()).size;
@@ -197,7 +169,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
// dartssh2 accepts only LF (but not CRLF or CR)
_keyController.text = _standardizeLineSeparators(content.trim());
},
child: Text(l10n.pickFile),
child: Text(libL10n.file),
),
Input(
controller: _pwdController,
@@ -206,6 +178,8 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
obscureText: true,
label: l10n.pwd,
icon: Icons.password,
suggestion: false,
onSubmitted: (_) => _onTapSave(),
),
SizedBox(height: MediaQuery.of(context).size.height * 0.1),
ValBuilder(
@@ -215,4 +189,31 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
],
);
}
void _onTapSave() async {
final name = _nameController.text;
final key = _standardizeLineSeparators(_keyController.text.trim());
final pwd = _pwdController.text;
if (name.isEmpty || key.isEmpty) {
context.showSnackBar(libL10n.empty);
return;
}
FocusScope.of(context).unfocus();
_loading.value = UIs.centerSizedLoading;
try {
final decrypted = await Computer.shared.start(decyptPem, [key, pwd]);
final pki = PrivateKeyInfo(id: name, key: decrypted);
if (widget.pki != null) {
Pros.key.update(widget.pki!, pki);
} else {
Pros.key.add(pki);
}
} catch (e) {
context.showSnackBar(e.toString());
rethrow;
} finally {
_loading.value = null;
}
context.pop();
}
}

View File

@@ -24,7 +24,7 @@ class _PrivateKeyListState extends State<PrivateKeysListPage>
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
title: Text(l10n.privateKey, style: UIs.text18),
title: Text(l10n.privateKey),
),
body: _buildBody(),
floatingActionButton: FloatingActionButton(
@@ -38,9 +38,7 @@ class _PrivateKeyListState extends State<PrivateKeysListPage>
return Consumer<PrivateKeyProvider>(
builder: (_, key, __) {
if (key.pkis.isEmpty) {
return Center(
child: Text(l10n.noSavedPrivateKey),
);
return Center(child: Text(libL10n.empty));
}
return ListView.builder(
padding: const EdgeInsets.all(13),
@@ -80,21 +78,12 @@ class _PrivateKeyListState extends State<PrivateKeysListPage>
key: idRsaFile.readAsStringSync(),
);
context.showRoundDialog(
title: l10n.attention,
title: libL10n.attention,
child: Text(l10n.addSystemPrivateKeyTip),
actions: [
TextButton(
onPressed: () {
context.pop();
AppRoutes.keyEdit(pki: sysPk).go(context);
},
child: Text(l10n.ok),
),
TextButton(
onPressed: () => Navigator.pop(context),
child: Text(l10n.cancel),
),
],
actions: Btn.ok(onTap: () {
context.pop();
AppRoutes.keyEdit(pki: sysPk).go(context);
}).toList,
);
}
}

View File

@@ -51,9 +51,10 @@ class _ProcessPageState extends State<ProcessPage> {
Future<void> _refresh() async {
if (mounted) {
final result = await _client?.run(ShellFunc.process.exec).string;
final result =
await _client?.run(ShellFunc.process.exec(widget.spi.id)).string;
if (result == null || result.isEmpty) {
context.showSnackBar(l10n.noResult);
context.showSnackBar(libL10n.empty);
return;
}
_result = PsResult.parse(result, sort: _procSortMode);
@@ -100,12 +101,12 @@ class _ProcessPageState extends State<ProcessPage> {
actions.add(IconButton(
icon: const Icon(Icons.error),
onPressed: () => context.showRoundDialog(
title: l10n.error,
title: libL10n.error,
child: SingleChildScrollView(child: Text(_result.error!)),
actions: [
TextButton(
onPressed: () => Pfs.copy(_result.error!),
child: Text(l10n.copy),
child: Text(libL10n.copy),
),
],
),
@@ -153,20 +154,17 @@ class _ProcessPageState extends State<ProcessPage> {
onTap: () => _lastFocusId = proc.pid,
onLongPress: () {
context.showRoundDialog(
title: l10n.attention,
child: Text(l10n.askContinue(
title: libL10n.attention,
child: Text(libL10n.askContinue(
'${l10n.stop} ${l10n.process}(${proc.pid})',
)),
actions: [
TextButton(
onPressed: () async {
await _client?.run('kill ${proc.pid}');
await _refresh();
context.pop();
},
child: Text(l10n.ok),
),
],
actions: Btn.ok(onTap: () async {
context.pop();
await context.showLoadingDialog(fn: () async {
await _client?.run('kill ${proc.pid}');
await _refresh();
});
}).toList,
);
},
selected: _lastFocusId == proc.pid,

View File

@@ -59,8 +59,8 @@ final class _PvePageState extends State<PvePage> {
listenable: _pve.err,
builder: (val) => val == null
? UIs.placeholder
: IconBtn(
icon: Icons.refresh,
: Btn.icon(
icon: const Icon(Icons.refresh),
onTap: () {
_pve.err.value = null;
_pve.list();
@@ -378,7 +378,7 @@ final class _PvePageState extends State<PvePage> {
],
),
UIs.height7,
KvRow(k: l10n.content, v: item.content),
KvRow(k: libL10n.content, v: item.content),
KvRow(k: l10n.plugInType, v: item.plugintype),
],
),
@@ -393,51 +393,45 @@ final class _PvePageState extends State<PvePage> {
}
Widget _buildCtrlBtns(PveCtrlIface item) {
const pad = EdgeInsets.symmetric(horizontal: 7, vertical: 5);
if (!item.available) {
return IconBtn(
icon: Icons.play_arrow,
color: Colors.grey,
return Btn.icon(
icon: const Icon(Icons.play_arrow, color: Colors.grey),
onTap: () => _onCtrl(_pve.start, l10n.start, item));
}
return Row(
children: [
IconBtn(
icon: Icons.stop,
color: Colors.grey,
Btn.icon(
icon: const Icon(Icons.stop, color: Colors.grey, size: 20),
padding: pad,
onTap: () => _onCtrl(_pve.stop, l10n.stop, item)),
IconBtn(
icon: Icons.refresh,
color: Colors.grey,
Btn.icon(
icon: const Icon(Icons.refresh, color: Colors.grey, size: 20),
padding: pad,
onTap: () => _onCtrl(_pve.reboot, l10n.reboot, item)),
IconBtn(
icon: Icons.power_off,
color: Colors.grey,
onTap: () => _onCtrl(_pve.shutdown, l10n.shutdown, item),
),
Btn.icon(
icon: const Icon(Icons.power_off, color: Colors.grey, size: 20),
padding: pad,
onTap: () => _onCtrl(_pve.shutdown, l10n.shutdown, item)),
],
);
}
void _onCtrl(PveCtrlFunc func, String action, PveCtrlIface item) async {
final sure = await context.showRoundDialog<bool>(
title: l10n.attention,
child: Text(l10n.askContinue('$action ${item.id}')),
actions: [
TextButton(
onPressed: () => context.pop(true),
child: Text(l10n.ok, style: UIs.textRed),
),
],
title: libL10n.attention,
child: Text(libL10n.askContinue('$action ${item.id}')),
actions: Btnx.okReds,
);
if (sure != true) return;
bool? suc;
await context.showLoadingDialog(fn: () async {
suc = await func(item.node, item.id);
});
final (suc, err) = await context.showLoadingDialog(
fn: () => func(item.node, item.id),
);
if (suc == true) {
context.showSnackBar(l10n.success);
context.showSnackBar(libL10n.success);
} else {
context.showSnackBar(l10n.failed);
context.showSnackBar(err?.toString() ?? libL10n.fail);
}
}

View File

@@ -83,9 +83,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
if (s == null) {
return Scaffold(
appBar: const CustomAppBar(),
body: Center(
child: Text(l10n.noClient),
),
body: Center(child: Text(libL10n.empty)),
);
}
return _buildMainPage(s);
@@ -93,7 +91,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
}
Widget _buildMainPage(Server si) {
final buildFuncs = !Stores.setting.moveOutServerTabFuncBtns.fetch();
final buildFuncs = !Stores.setting.moveServerFuncs.fetch();
final logoUrl = si.spi.custom?.logoUrl ??
Stores.setting.serverLogoUrl.fetch().selfIfNotNullEmpty;
final buildLogo = logoUrl != null;
@@ -123,7 +121,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
CustomAppBar _buildAppBar(Server si) {
return CustomAppBar(
title: Text(si.spi.name, style: UIs.text18),
title: Text(si.spi.name),
actions: [
IconButton(
icon: const Icon(Icons.edit),
@@ -159,7 +157,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
child: ExpandTile(
leading: const Icon(MingCute.information_fill, size: 20),
initiallyExpanded: _getInitExpand(ss.more.entries.length),
title: Text(l10n.about),
title: Text(libL10n.about),
childrenPadding: const EdgeInsets.symmetric(
horizontal: 17,
vertical: 11,
@@ -198,6 +196,29 @@ class _ServerDetailPageState extends State<ServerDetailPage>
]);
}
final List<Widget> children = Stores.setting.cpuViewAsProgress.fetch()
? _buildCPUProgress(ss.cpu)
: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 17, vertical: 13),
child: SizedBox(
height: 137,
width: _media.size.width - 26 - 34,
child: _buildLineChart(
ss.cpu.spots,
//ss.cpu.rangeX,
tooltipPrefix: 'CPU',
),
),
),
];
if (ss.cpu.brand.isNotEmpty) {
children.add(Column(
children: ss.cpu.brand.entries.map(_buildCpuModelItem).toList(),
).paddingOnly(top: 13));
}
return CardX(
child: ExpandTile(
title: Align(
@@ -214,27 +235,34 @@ class _ServerDetailPageState extends State<ServerDetailPage>
mainAxisSize: MainAxisSize.min,
children: details,
),
children: Stores.setting.cpuViewAsProgress.fetch()
? _buildCPUProgress(ss.cpu)
: [
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 17, vertical: 13),
child: SizedBox(
height: 137,
width: _media.size.width - 26 - 34,
child: _buildLineChart(
ss.cpu.spots,
//ss.cpu.rangeX,
tooltipPrefix: 'CPU',
),
),
),
],
children: children,
),
);
}
Widget _buildCpuModelItem(MapEntry<String, int> e) {
final name = e.key
.replaceFirst('Intel(R)', '')
.replaceFirst('AMD', '')
.replaceFirst('with Radeon Graphics', '');
final child = Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SizedBox(
width: _media.size.width * .7,
child: Text(
name,
style: UIs.text13,
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
),
Text('x ${e.value}', style: UIs.text13Grey),
],
);
return child.paddingSymmetric(horizontal: 17);
}
Widget _buildDetailPercent(double percent, String timeType) {
return Column(
mainAxisSize: MainAxisSize.min,
@@ -454,7 +482,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.close),
child: Text(libL10n.close),
)
],
);
@@ -498,7 +526,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.close),
child: Text(libL10n.close),
)
],
);
@@ -575,18 +603,10 @@ class _ServerDetailPageState extends State<ServerDetailPage>
Widget _buildNetView(ServerStatus ss) {
final ns = ss.netSpeed;
final children = <Widget>[];
if (ns.devices.isEmpty) {
children.add(Center(
child: Text(
l10n.noInterface,
style: UIs.text13Grey,
),
));
} else {
final devices = ns.devices;
devices.sort(_netSortType.value.getSortFunc(ns));
children.addAll(devices.map((e) => _buildNetSpeedItem(ns, e)));
}
final devices = ns.devices;
devices.sort(_netSortType.value.getSortFunc(ns));
children.addAll(devices.map((e) => _buildNetSpeedItem(ns, e)));
return CardX(
child: ExpandTile(
leading: Icon(ServerDetailCards.net.icon, size: 17),
@@ -840,7 +860,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.close),
child: Text(libL10n.close),
),
],
);
@@ -874,6 +894,6 @@ class _ServerDetailPageState extends State<ServerDetailPage>
bool _getInitExpand(int len, [int? max]) {
if (!_collapse) return true;
return len <= (max ?? 3);
return len > 0 && len <= (max ?? 3);
}
}

View File

@@ -1,5 +1,3 @@
import 'dart:convert';
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:icons_plus/icons_plus.dart';
@@ -22,7 +20,7 @@ class ServerEditPage extends StatefulWidget {
State<ServerEditPage> createState() => _ServerEditPageState();
}
class _ServerEditPageState extends State<ServerEditPage> {
class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
final _nameController = TextEditingController();
final _ipController = TextEditingController();
final _altUrlController = TextEditingController();
@@ -30,7 +28,6 @@ class _ServerEditPageState extends State<ServerEditPage> {
final _usernameController = TextEditingController();
final _passwordController = TextEditingController();
final _pveAddrCtrl = TextEditingController();
final _customCmdCtrl = TextEditingController();
final _preferTempDevCtrl = TextEditingController();
final _logoUrlCtrl = TextEditingController();
final _wolMacCtrl = TextEditingController();
@@ -49,57 +46,9 @@ class _ServerEditPageState extends State<ServerEditPage> {
final _autoConnect = ValueNotifier(true);
final _jumpServer = ValueNotifier<String?>(null);
final _pveIgnoreCert = ValueNotifier(false);
var _tags = <String>[];
@override
void initState() {
super.initState();
final spi = widget.spi;
if (spi != null) {
_nameController.text = spi.name;
_ipController.text = spi.ip;
_portController.text = spi.port.toString();
_usernameController.text = spi.user;
if (spi.keyId == null) {
_passwordController.text = spi.pwd ?? '';
} else {
_keyIdx.value = Pros.key.pkis.indexWhere(
(e) => e.id == widget.spi!.keyId,
);
}
/// List in dart is passed by pointer, so you need to copy it here
_tags.addAll(spi.tags ?? []);
_altUrlController.text = spi.alterUrl ?? '';
_autoConnect.value = spi.autoConnect ?? true;
_jumpServer.value = spi.jumpId;
final custom = spi.custom;
if (custom != null) {
_pveAddrCtrl.text = custom.pveAddr ?? '';
_pveIgnoreCert.value = custom.pveIgnoreCert;
try {
// Add a null check here to prevent setting `null` to the controller
final encoded = json.encode(custom.cmds!);
if (encoded.isNotEmpty) {
_customCmdCtrl.text = encoded;
}
} catch (_) {}
_preferTempDevCtrl.text = custom.preferTempDev ?? '';
_logoUrlCtrl.text = custom.logoUrl ?? '';
}
final wol = spi.wolCfg;
if (wol != null) {
_wolMacCtrl.text = wol.mac;
_wolIpCtrl.text = wol.ip;
_wolPwdCtrl.text = wol.pwd ?? '';
}
}
}
final _env = <String, String>{}.vn;
final _customCmds = <String, String>{}.vn;
final _tags = <String>{}.vn;
@override
void dispose() {
@@ -116,7 +65,6 @@ class _ServerEditPageState extends State<ServerEditPage> {
_portFocus.dispose();
_usernameFocus.dispose();
_pveAddrCtrl.dispose();
_customCmdCtrl.dispose();
_preferTempDevCtrl.dispose();
_logoUrlCtrl.dispose();
_wolMacCtrl.dispose();
@@ -132,16 +80,19 @@ class _ServerEditPageState extends State<ServerEditPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: _buildAppBar(),
body: _buildForm(),
floatingActionButton: _buildFAB(),
return GestureDetector(
onTap: () => _focusScope.unfocus(),
child: Scaffold(
appBar: _buildAppBar(),
body: _buildForm(),
floatingActionButton: _buildFAB(),
),
);
}
PreferredSizeWidget _buildAppBar() {
return CustomAppBar(
title: Text(l10n.edit, style: UIs.text18),
title: Text(libL10n.edit),
actions: widget.spi != null ? [_buildDelBtn()] : null,
);
}
@@ -150,22 +101,20 @@ class _ServerEditPageState extends State<ServerEditPage> {
return IconButton(
onPressed: () {
context.showRoundDialog(
title: l10n.attention,
title: libL10n.attention,
child: StatefulBuilder(builder: (ctx, setState) {
return Text(l10n.askContinue(
'${l10n.delete} ${l10n.server}(${widget.spi!.name})',
return Text(libL10n.askContinue(
'${libL10n.delete} ${l10n.server}(${widget.spi!.name})',
));
}),
actions: [
TextButton(
onPressed: () async {
context.pop();
Pros.server.delServer(widget.spi!.id);
context.pop(true);
},
child: Text(l10n.ok, style: UIs.textRed),
),
],
actions: Btn.ok(
onTap: () async {
context.pop();
Pros.server.delServer(widget.spi!.id);
context.pop(true);
},
red: true,
).toList,
);
},
icon: const Icon(Icons.delete),
@@ -174,14 +123,15 @@ class _ServerEditPageState extends State<ServerEditPage> {
Widget _buildForm() {
final children = [
_buildWriteScriptTip(),
Input(
autoFocus: true,
controller: _nameController,
type: TextInputType.text,
node: _nameFocus,
onSubmitted: (_) => _focusScope.requestFocus(_ipFocus),
hint: l10n.exampleName,
label: l10n.name,
hint: libL10n.example,
label: libL10n.name,
icon: BoxIcons.bx_rename,
obscureText: false,
autoCorrect: true,
@@ -195,6 +145,7 @@ class _ServerEditPageState extends State<ServerEditPage> {
label: l10n.host,
icon: BoxIcons.bx_server,
hint: 'example.com',
suggestion: false,
),
Input(
controller: _portController,
@@ -204,30 +155,19 @@ class _ServerEditPageState extends State<ServerEditPage> {
label: l10n.port,
icon: Bootstrap.number_123,
hint: '22',
suggestion: false,
),
Input(
controller: _usernameController,
type: TextInputType.text,
node: _usernameFocus,
onSubmitted: (_) => _focusScope.requestFocus(_alterUrlFocus),
label: l10n.user,
label: libL10n.user,
icon: Icons.account_box,
hint: 'root',
suggestion: false,
),
Input(
controller: _altUrlController,
type: TextInputType.url,
node: _alterUrlFocus,
label: l10n.fallbackSshDest,
icon: MingCute.link_line,
hint: 'user@ip:port',
),
TagEditor(
tags: _tags,
onChanged: (p0) => _tags = p0,
allTags: [...Pros.server.tags.value],
onRenameTag: Pros.server.renameTag,
),
TagTile(tags: _tags, allTags: Pros.server.tags.value).cardx,
ListTile(
title: Text(l10n.autoConnect),
trailing: ListenableBuilder(
@@ -245,7 +185,7 @@ class _ServerEditPageState extends State<ServerEditPage> {
_buildMore(),
];
return SingleChildScrollView(
padding: const EdgeInsets.fromLTRB(17, 17, 17, 47),
padding: const EdgeInsets.fromLTRB(17, 7, 17, 47),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
@@ -287,6 +227,7 @@ class _ServerEditPageState extends State<ServerEditPage> {
label: l10n.pwd,
icon: Icons.password,
hint: l10n.pwd,
suggestion: false,
onSubmitted: (_) => _onSave(),
));
}
@@ -296,12 +237,13 @@ class _ServerEditPageState extends State<ServerEditPage> {
}
Widget _buildKeyAuth() {
const padding = EdgeInsets.only(left: 23, right: 13);
return Consumer<PrivateKeyProvider>(
builder: (_, key, __) {
final tiles = List<Widget>.generate(key.pkis.length, (index) {
final e = key.pkis[index];
return ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 17),
contentPadding: padding,
leading: Text(
'#${index + 1}',
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
@@ -322,8 +264,8 @@ class _ServerEditPageState extends State<ServerEditPage> {
});
tiles.add(
ListTile(
title: Text(l10n.addPrivateKey),
contentPadding: const EdgeInsets.symmetric(horizontal: 17),
title: Text(libL10n.add),
contentPadding: padding,
trailing: const Padding(
padding: EdgeInsets.only(right: 13),
child: Icon(Icons.add),
@@ -341,19 +283,42 @@ class _ServerEditPageState extends State<ServerEditPage> {
);
}
Widget _buildEnvs() {
return _env.listenVal((val) {
final subtitle =
val.isEmpty ? null : Text(val.keys.join(','), style: UIs.textGrey);
return ListTile(
leading: const Icon(HeroIcons.variable),
subtitle: subtitle,
title: Text(l10n.envVars),
trailing: const Icon(Icons.keyboard_arrow_right),
onTap: () async {
final res = await KvEditor.route.go(
context,
args: KvEditorArgs(data: widget.spi?.envs ?? {}),
);
if (res == null) return;
_env.value = res;
},
).cardx;
});
}
Widget _buildMore() {
return ExpandTile(
title: Text(l10n.more),
children: [
const Text('Logo', style: UIs.text13Grey),
UIs.height7,
Input(
controller: _logoUrlCtrl,
type: TextInputType.url,
icon: Icons.image,
label: 'URL',
label: 'Logo URL',
hint: 'https://example.com/logo.png',
suggestion: false,
),
_buildAltUrl(),
_buildEnvs(),
UIs.height7,
..._buildPVEs(),
UIs.height7,
@@ -364,9 +329,10 @@ class _ServerEditPageState extends State<ServerEditPage> {
Input(
controller: _preferTempDevCtrl,
type: TextInputType.text,
label: l10n.deviceName,
label: libL10n.device,
icon: MingCute.low_temperature_line,
hint: 'nvme-pci-0400',
suggestion: false,
),
UIs.height7,
..._buildWOLs(),
@@ -374,6 +340,18 @@ class _ServerEditPageState extends State<ServerEditPage> {
);
}
Widget _buildAltUrl() {
return Input(
controller: _altUrlController,
type: TextInputType.url,
node: _alterUrlFocus,
label: l10n.fallbackSshDest,
icon: MingCute.link_line,
hint: 'user@ip:port',
suggestion: false,
);
}
List<Widget> _buildPVEs() {
const addr = 'https://127.0.0.1:8006';
return [
@@ -395,13 +373,11 @@ class _ServerEditPageState extends State<ServerEditPage> {
node: node,
label: 'URL',
hint: addr,
suggestion: false,
),
),
ListTile(
leading: const Padding(
padding: EdgeInsets.only(left: 10),
child: Icon(MingCute.certificate_line),
),
leading: const Icon(MingCute.certificate_line),
title: Text('PVE ${l10n.ignoreCert}'),
subtitle: Text(l10n.pveIgnoreCertTip, style: UIs.text12Grey),
trailing: ListenableBuilder(
@@ -421,20 +397,29 @@ class _ServerEditPageState extends State<ServerEditPage> {
return [
Text(l10n.customCmd, style: UIs.text13Grey),
UIs.height7,
Input(
controller: _customCmdCtrl,
type: TextInputType.text,
maxLines: 3,
label: 'JSON',
icon: Icons.code,
hint: '{${l10n.customCmdHint}}',
),
_customCmds.listenVal(
(vals) {
return ListTile(
leading: const Icon(BoxIcons.bxs_file_json),
title: const Text('JSON'),
subtitle: vals.isEmpty
? null
: Text(vals.keys.join(','), style: UIs.textGrey),
trailing: const Icon(Icons.keyboard_arrow_right),
onTap: () async {
final res = await KvEditor.route.go(
context,
args: KvEditorArgs(data: _customCmds.value),
);
if (res == null) return;
_customCmds.value = res;
},
);
},
).cardx,
ListTile(
leading: const Padding(
padding: EdgeInsets.only(left: 10),
child: Icon(MingCute.doc_line),
),
title: Text(l10n.doc),
leading: const Icon(MingCute.doc_line),
title: Text(libL10n.doc),
trailing: const Icon(Icons.open_in_new, size: 17),
onTap: () => l10n.customCmdDocUrl.launch(),
).cardx,
@@ -443,14 +428,11 @@ class _ServerEditPageState extends State<ServerEditPage> {
List<Widget> _buildWOLs() {
return [
const Text('Wake On LAN', style: UIs.text13Grey),
const Text('Wake On LAN (beta)', style: UIs.text13Grey),
UIs.height7,
ListTile(
leading: const Padding(
padding: EdgeInsets.only(left: 10),
child: Icon(BoxIcons.bxs_help_circle),
),
title: Text(l10n.about),
leading: const Icon(BoxIcons.bxs_help_circle),
title: Text(libL10n.about),
subtitle: Text(l10n.wolTip, style: UIs.text12Grey),
).cardx,
Input(
@@ -459,13 +441,15 @@ class _ServerEditPageState extends State<ServerEditPage> {
label: 'MAC ${l10n.addr}',
icon: Icons.computer,
hint: '00:11:22:33:44:55',
suggestion: false,
),
Input(
controller: _wolIpCtrl,
type: TextInputType.text,
label: 'IP ${l10n.addr}',
icon: Icons.network_cell,
icon: ZondIcons.network,
hint: '192.168.1.x',
suggestion: false,
),
Input(
controller: _wolPwdCtrl,
@@ -474,6 +458,7 @@ class _ServerEditPageState extends State<ServerEditPage> {
label: l10n.pwd,
icon: Icons.password,
hint: l10n.pwd,
suggestion: false,
),
];
}
@@ -507,20 +492,14 @@ class _ServerEditPageState extends State<ServerEditPage> {
)
.toList();
children.add(ListTile(
title: Text(l10n.clear),
trailing: const Padding(
padding: EdgeInsets.only(right: 13),
child: Icon(Icons.clear),
),
title: Text(libL10n.clear),
trailing: const Icon(Icons.clear),
onTap: () => _jumpServer.value = null,
contentPadding: const EdgeInsets.symmetric(horizontal: 17),
));
return CardX(
child: ExpandTile(
leading: const Padding(
padding: EdgeInsets.only(left: 10),
child: Icon(Icons.map),
),
leading: const Icon(Icons.map),
initiallyExpanded: _jumpServer.value != null,
title: Text(l10n.jumpServer),
children: children,
@@ -532,31 +511,31 @@ class _ServerEditPageState extends State<ServerEditPage> {
void _onSave() async {
if (_ipController.text.isEmpty) {
context.showSnackBar(l10n.plzEnterHost);
context.showSnackBar('${libL10n.empty} ${l10n.host}');
return;
}
if (_keyIdx.value == null && _passwordController.text.isEmpty) {
final cancel = await context.showRoundDialog<bool>(
title: l10n.attention,
child: Text(l10n.askContinue(l10n.useNoPwd)),
title: libL10n.attention,
child: Text(libL10n.askContinue(l10n.useNoPwd)),
actions: [
TextButton(
onPressed: () => context.pop(false),
child: Text(l10n.ok),
child: Text(libL10n.ok),
),
TextButton(
onPressed: () => context.pop(true),
child: Text(l10n.cancel),
child: Text(libL10n.cancel),
)
],
);
if (cancel != false) {
return;
}
if (cancel != false) return;
}
// If [_pubKeyIndex] is -1, it means that the user has not selected
if (_keyIdx.value == -1) {
context.showSnackBar(l10n.plzSelectKey);
context.showSnackBar(libL10n.empty);
return;
}
if (_usernameController.text.isEmpty) {
@@ -565,19 +544,11 @@ class _ServerEditPageState extends State<ServerEditPage> {
if (_portController.text.isEmpty) {
_portController.text = '22';
}
final customCmds = () {
if (_customCmdCtrl.text.isEmpty) return null;
try {
return json.decode(_customCmdCtrl.text).cast<String, String>();
} catch (e) {
context.showSnackBar(l10n.invalidJson);
return null;
}
}();
final customCmds = _customCmds.value;
final custom = ServerCustom(
pveAddr: _pveAddrCtrl.text.selfIfNotNullEmpty,
pveIgnoreCert: _pveIgnoreCert.value,
cmds: customCmds,
cmds: customCmds.isEmpty ? null : customCmds,
preferTempDev: _preferTempDevCtrl.text.selfIfNotNullEmpty,
logoUrl: _logoUrlCtrl.text.selfIfNotNullEmpty,
);
@@ -595,7 +566,7 @@ class _ServerEditPageState extends State<ServerEditPage> {
if (wol != null) {
final wolValidation = wol.validate();
if (!wolValidation.$2) {
context.showSnackBar('${l10n.failed}: ${wolValidation.$1}');
context.showSnackBar('${libL10n.fail}: ${wolValidation.$1}');
return;
}
}
@@ -611,25 +582,15 @@ class _ServerEditPageState extends State<ServerEditPage> {
keyId: _keyIdx.value != null
? Pros.key.pkis.elementAt(_keyIdx.value!).id
: null,
tags: _tags,
tags: _tags.value.isEmpty ? null : _tags.value.toList(),
alterUrl: _altUrlController.text.selfIfNotNullEmpty,
autoConnect: _autoConnect.value,
jumpId: _jumpServer.value,
custom: custom,
wolCfg: wol,
envs: _env.value.isEmpty ? null : _env.value,
);
// final tipShown = Stores.history.writeScriptTipShown;
// if (!tipShown.fetch()) {
// final ok = await context.showRoundDialog(
// title: l10n.attention,
// child: SimpleMarkdown(data: l10n.beforeConnect(Urls.thisRepo)),
// actions: Btns.oks(onTap: () => context.pop(true)),
// );
// if (ok != true) return;
// tipShown.put(true);
// }
if (widget.spi == null) {
Pros.server.addServer(spi);
} else {
@@ -638,4 +599,70 @@ class _ServerEditPageState extends State<ServerEditPage> {
context.pop();
}
Widget _buildWriteScriptTip() {
return Center(
child: InkWell(
borderRadius: BorderRadius.circular(10),
onTap: () {
context.showRoundDialog(
title: libL10n.attention,
child: SimpleMarkdown(data: l10n.writeScriptTip),
actions: [Btn.ok()],
);
},
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(Icons.tips_and_updates, size: 15, color: Colors.grey),
UIs.width13,
Text(libL10n.attention, style: UIs.textGrey)
],
).paddingSymmetric(horizontal: 13, vertical: 3),
),
).paddingOnly(bottom: 13);
}
@override
void afterFirstLayout(BuildContext context) {
final spi = widget.spi;
if (spi != null) {
_nameController.text = spi.name;
_ipController.text = spi.ip;
_portController.text = spi.port.toString();
_usernameController.text = spi.user;
if (spi.keyId == null) {
_passwordController.text = spi.pwd ?? '';
} else {
_keyIdx.value = Pros.key.pkis.indexWhere(
(e) => e.id == widget.spi!.keyId,
);
}
/// List in dart is passed by pointer, so you need to copy it here
_tags.value = spi.tags?.toSet() ?? {};
_altUrlController.text = spi.alterUrl ?? '';
_autoConnect.value = spi.autoConnect ?? true;
_jumpServer.value = spi.jumpId;
final custom = spi.custom;
if (custom != null) {
_pveAddrCtrl.text = custom.pveAddr ?? '';
_pveIgnoreCert.value = custom.pveIgnoreCert;
_customCmds.value = custom.cmds ?? {};
_preferTempDevCtrl.text = custom.preferTempDev ?? '';
_logoUrlCtrl.text = custom.logoUrl ?? '';
}
final wol = spi.wolCfg;
if (wol != null) {
_wolMacCtrl.text = wol.mac;
_wolIpCtrl.text = wol.ip;
_wolPwdCtrl.text = wol.pwd ?? '';
}
_env.value = spi.envs ?? {};
}
}
}

View File

@@ -27,6 +27,9 @@ class ServerPage extends StatefulWidget {
State<ServerPage> createState() => _ServerPageState();
}
const _cardPad = 74.0;
const _cardPadSingle = 13.0;
class _ServerPageState extends State<ServerPage>
with AutomaticKeepAliveClientMixin, AfterLayoutMixin {
late MediaQueryData _media;
@@ -97,13 +100,13 @@ class _ServerPageState extends State<ServerPage>
),
floatingActionButton: AutoHide(
key: _autoHideKey,
direction: AxisDirection.down,
direction: AxisDirection.right,
offset: 75,
controller: _scrollController,
child: FloatingActionButton(
heroTag: 'addServer',
onPressed: () => AppRoutes.serverEdit().go(context),
tooltip: l10n.addAServer,
tooltip: libL10n.add,
child: const Icon(Icons.add),
),
),
@@ -138,10 +141,7 @@ class _ServerPageState extends State<ServerPage>
return Consumer<ServerProvider>(builder: (_, pro, __) {
if (pro.serverOrder.isEmpty) {
return Center(
child: Text(
l10n.serverTabEmpty,
textAlign: TextAlign.center,
),
child: Text(libL10n.empty, textAlign: TextAlign.center),
);
}
@@ -187,10 +187,7 @@ class _ServerPageState extends State<ServerPage>
}
if (pro.serverOrder.isEmpty) {
return Center(
child: Text(
l10n.serverTabEmpty,
textAlign: TextAlign.center,
),
child: Text(libL10n.empty, textAlign: TextAlign.center),
);
}
@@ -289,7 +286,12 @@ class _ServerPageState extends State<ServerPage>
}
},
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 13, horizontal: 7),
padding: const EdgeInsets.only(
left: _cardPadSingle,
right: 3,
top: _cardPadSingle,
bottom: _cardPadSingle,
),
child: _buildRealServerCard(srv),
),
),
@@ -299,7 +301,7 @@ class _ServerPageState extends State<ServerPage>
/// The child's width mat not equal to 1/4 of the screen width,
/// so we need to wrap it with a SizedBox.
Widget _wrapWithSizedbox(Widget child, [bool circle = false]) {
var width = (_media.size.width - 74) / (circle ? 4 : 4.3);
var width = (_media.size.width - _cardPad) / (circle ? 4 : 4.3);
if (_useDoubleColumn) width /= 2;
return SizedBox(
width: width,
@@ -340,66 +342,77 @@ class _ServerPageState extends State<ServerPage>
}
List<Widget> _buildFlippedCard(Server srv) {
const textStyle = TextStyle(color: Colors.grey);
final children = [
Btn.column(
onTap: () => _askFor(
func: () async {
if (Stores.setting.showSuspendTip.fetch()) {
await context.showRoundDialog(
title: libL10n.attention,
child: Text(l10n.suspendTip),
);
Stores.setting.showSuspendTip.put(false);
}
srv.client?.execWithPwd(
ShellFunc.suspend.exec(srv.spi.id),
context: context,
id: srv.id,
);
},
typ: l10n.suspend,
name: srv.spi.name,
),
icon: const Icon(Icons.stop, color: Colors.grey),
text: l10n.suspend,
textStyle: textStyle,
),
Btn.column(
onTap: () => _askFor(
func: () => srv.client?.execWithPwd(
ShellFunc.shutdown.exec(srv.spi.id),
context: context,
id: srv.id,
),
typ: l10n.shutdown,
name: srv.spi.name,
),
icon: const Icon(Icons.power_off, color: Colors.grey),
text: l10n.shutdown,
textStyle: textStyle,
),
Btn.column(
onTap: () => _askFor(
func: () => srv.client?.execWithPwd(
ShellFunc.reboot.exec(srv.spi.id),
context: context,
id: srv.id,
),
typ: l10n.reboot,
name: srv.spi.name,
),
icon: const Icon(Icons.restart_alt, color: Colors.grey),
text: l10n.reboot,
textStyle: textStyle,
),
Btn.column(
onTap: () => AppRoutes.serverEdit(spi: srv.spi).go(context),
icon: const Icon(Icons.edit, color: Colors.grey),
text: libL10n.edit,
textStyle: textStyle,
)
];
final width = (_media.size.width - _cardPad) / children.length;
return [
UIs.height13,
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
IconTextBtn(
onPressed: () => _askFor(
func: () async {
if (Stores.setting.showSuspendTip.fetch()) {
await context.showRoundDialog(
title: l10n.attention,
child: Text(l10n.suspendTip),
);
Stores.setting.showSuspendTip.put(false);
}
srv.client?.execWithPwd(
ShellFunc.suspend.exec,
context: context,
id: srv.id,
);
},
typ: l10n.suspend,
name: srv.spi.name,
),
icon: Icons.stop,
text: l10n.suspend,
),
IconTextBtn(
onPressed: () => _askFor(
func: () => srv.client?.execWithPwd(
ShellFunc.shutdown.exec,
context: context,
id: srv.id,
),
typ: l10n.shutdown,
name: srv.spi.name,
),
icon: Icons.power_off,
text: l10n.shutdown,
),
IconTextBtn(
onPressed: () => _askFor(
func: () => srv.client?.execWithPwd(
ShellFunc.reboot.exec,
context: context,
id: srv.id,
),
typ: l10n.reboot,
name: srv.spi.name,
),
icon: Icons.restart_alt,
text: l10n.reboot,
),
IconTextBtn(
onPressed: () => AppRoutes.serverEdit(spi: srv.spi).go(context),
icon: Icons.edit,
text: l10n.edit,
)
],
)
children: children.map((e) {
if (width == 0) return e;
return SizedBox(width: width, child: e);
}).toList(),
),
];
}
@@ -419,7 +432,7 @@ class _ServerPageState extends State<ServerPage>
],
),
UIs.height13,
if (Stores.setting.moveOutServerTabFuncBtns.fetch() &&
if (Stores.setting.moveServerFuncs.fetch() &&
// Discussion #146
!Stores.setting.serverTabUseOldUI.fetch())
SizedBox(
@@ -431,7 +444,7 @@ class _ServerPageState extends State<ServerPage>
Widget _buildServerCardTitle(Server s) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 7),
padding: const EdgeInsets.only(left: 7, right: 13),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@@ -458,13 +471,9 @@ class _ServerPageState extends State<ServerPage>
}
Widget _buildTopRightWidget(Server s) {
return switch (s.conn) {
ServerConn.connecting ||
ServerConn.loading ||
ServerConn.connected =>
Padding(
padding: const EdgeInsets.only(left: 11, right: 3),
child: SizedBox(
final (child, onTap) = switch (s.conn) {
ServerConn.connecting || ServerConn.loading || ServerConn.connected => (
SizedBox(
width: 19,
height: 19,
child: CircularProgressIndicator(
@@ -472,59 +481,67 @@ class _ServerPageState extends State<ServerPage>
valueColor: AlwaysStoppedAnimation(UIs.primaryColor),
),
),
null,
),
ServerConn.failed => InkWell(
onTap: () {
ServerConn.failed => (
const Icon(
Icons.refresh,
size: 21,
color: Colors.grey,
),
() {
TryLimiter.reset(s.spi.id);
Pros.server.refresh(spi: s.spi);
},
child: const Padding(
padding: EdgeInsets.only(left: 11, right: 3),
child: Icon(
Icons.refresh,
size: 21,
color: Colors.grey,
),
),
),
ServerConn.disconnected => InkWell(
onTap: () => Pros.server.refresh(spi: s.spi),
child: const Padding(
padding: EdgeInsets.only(left: 11, right: 3),
child: Icon(
BoxIcons.bx_link,
size: 21,
color: Colors.grey,
),
ServerConn.disconnected => (
const Icon(
MingCute.link_3_line,
size: 19,
color: Colors.grey,
),
() => Pros.server.refresh(spi: s.spi)
),
ServerConn.finished => InkWell(
onTap: () => Pros.server.closeServer(id: s.spi.id),
child: const Padding(
padding: EdgeInsets.only(left: 11, right: 3),
child: Icon(
BoxIcons.bx_unlink,
size: 17,
color: Colors.grey,
),
ServerConn.finished => (
const Icon(
MingCute.unlink_2_line,
size: 17,
color: Colors.grey,
),
() => Pros.server.closeServer(id: s.spi.id),
),
_ when Stores.setting.serverTabUseOldUI.fetch() => (
ServerFuncBtnsTopRight(spi: s.spi),
null,
),
_ when Stores.setting.serverTabUseOldUI.fetch() =>
ServerFuncBtnsTopRight(spi: s.spi),
};
// Or the loading icon will be rescaled.
final wrapped = child is SizedBox
? child
: SizedBox(
height: _kCardHeightMin,
width: 27,
child: child,
);
if (onTap == null) return wrapped.paddingOnly(left: 10);
return InkWell(
borderRadius: BorderRadius.circular(7),
onTap: onTap,
child: wrapped,
).paddingOnly(left: 5);
}
Widget _buildTopRightText(Server s) {
final hasErr = s.conn == ServerConn.failed && s.status.err != null;
final str = s.getTopRightStr(s.spi);
if (str == null) return UIs.placeholder;
return GestureDetector(
onTap: () {
if (!hasErr) return;
_showFailReason(s.status);
},
child: Text(
s.getTopRightStr(s.spi),
style: UIs.text13Grey,
),
child: Text(str, style: UIs.text13Grey),
);
}
@@ -533,15 +550,15 @@ class _ServerPageState extends State<ServerPage>
${ss.err?.solution ?? l10n.unknown}
```sh
${ss.err?.message ?? l10n.unknownError}
${ss.err?.message ?? 'null'}
''';
context.showRoundDialog(
title: l10n.error,
title: libL10n.error,
child: SingleChildScrollView(child: SimpleMarkdown(data: md)),
actions: [
TextButton(
onPressed: () => Pfs.copy(md),
child: Text(l10n.copy),
child: Text(libL10n.copy),
)
],
);
@@ -646,20 +663,25 @@ ${ss.err?.message ?? l10n.unknownError}
_tag == null || (pro.pick(id: e)?.spi.tags?.contains(_tag) ?? false))
.toList();
static const _kCardHeightMin = 23.0;
static const _kCardHeightFlip = 99.0;
static const _kCardHeightNormal = 108.0;
static const _kCardHeightMoveOutFuncs = 135.0;
double? _calcCardHeight(ServerConn cs, bool flip) {
if (_textFactorDouble != 1.0) return null;
if (cs != ServerConn.finished) {
return 23.0;
return _kCardHeightMin;
}
if (flip) {
return 97.0;
return _kCardHeightFlip;
}
if (Stores.setting.moveOutServerTabFuncBtns.fetch() &&
if (Stores.setting.moveServerFuncs.fetch() &&
// Discussion #146
!Stores.setting.serverTabUseOldUI.fetch()) {
return 132;
return _kCardHeightMoveOutFuncs;
}
return 106;
return _kCardHeightNormal;
}
void _askFor({
@@ -668,17 +690,14 @@ ${ss.err?.message ?? l10n.unknownError}
required String name,
}) {
context.showRoundDialog(
title: l10n.attention,
child: Text(l10n.askContinue('$typ ${l10n.server}($name)')),
actions: [
TextButton(
onPressed: () {
context.pop();
func();
},
child: Text(l10n.ok),
),
],
title: libL10n.attention,
child: Text(libL10n.askContinue('$typ ${l10n.server}($name)')),
actions: Btn.ok(
onTap: () {
context.pop();
func();
},
).toList,
);
}
@@ -726,3 +745,60 @@ class _CardStatus {
);
}
}
extension _ServerX on Server {
String? getTopRightStr(ServerPrivateInfo spi) {
switch (conn) {
case ServerConn.disconnected:
return null;
case ServerConn.finished:
// Highest priority of temperature display
final cmdTemp = () {
final val = status.customCmds['server_card_top_right'];
if (val == null) return null;
// This returned value is used on server card top right, so it should
// be a single line string.
return val.split('\n').lastOrNull;
}();
final temperatureVal = () {
// Second priority
final preferTempDev = spi.custom?.preferTempDev;
if (preferTempDev != null) {
final preferTemp = status.sensors
.firstWhereOrNull((e) => e.device == preferTempDev)
?.summary
?.split(' ')
.firstOrNull;
if (preferTemp != null) {
return double.tryParse(preferTemp.replaceFirst('°C', ''));
}
}
// Last priority
final temp = status.temps.first;
if (temp != null) {
return temp;
}
return null;
}();
final upTime = status.more[StatusCmdType.uptime];
final items = [
cmdTemp ??
(temperatureVal != null
? '${temperatureVal.toStringAsFixed(1)}°C'
: null),
upTime
];
final str = items.where((e) => e != null && e.isNotEmpty).join(' | ');
if (str.isEmpty) return libL10n.empty;
return str;
case ServerConn.loading:
return null;
case ServerConn.connected:
return null;
case ServerConn.connecting:
return null;
case ServerConn.failed:
return status.err != null ? l10n.viewErr : libL10n.fail;
}
}
}

View File

@@ -31,29 +31,25 @@ class _SettingPageState extends State<SettingPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
title: Text(l10n.setting),
title: Text(libL10n.setting),
actions: [
IconButton(
icon: const Icon(Icons.delete),
onPressed: () => context.showRoundDialog(
title: l10n.attention,
title: libL10n.attention,
child: SimpleMarkdown(
data: l10n.askContinue(
'${l10n.delete} **${l10n.all}** ${l10n.setting}',
)),
actions: [
TextButton(
onPressed: () {
context.pop();
_setting.box.deleteAll(_setting.box.keys);
context.showSnackBar(l10n.success);
},
child: Text(
l10n.ok,
style: const TextStyle(color: Colors.red),
),
data: libL10n.askContinue(
'${libL10n.delete} **${libL10n.all}** ${libL10n.setting}',
),
],
),
actions: Btn.ok(
onTap: () {
context.pop();
_setting.box.deleteAll(_setting.box.keys);
context.showSnackBar(libL10n.success);
},
red: true,
).toList,
),
),
],
@@ -61,22 +57,22 @@ class _SettingPageState extends State<SettingPage> {
body: ListView(
padding: const EdgeInsets.symmetric(horizontal: 17),
children: [
_buildTitle('App'),
const CenterGreyTitle('App'),
_buildApp(),
_buildTitle(l10n.server),
CenterGreyTitle(l10n.server),
_buildServer(),
_buildTitle(l10n.container),
CenterGreyTitle(l10n.container),
_buildContainer(),
_buildTitle('SSH'),
const CenterGreyTitle('SSH'),
_buildSSH(),
_buildTitle('SFTP'),
const CenterGreyTitle('SFTP'),
_buildSFTP(),
_buildTitle(l10n.editor),
CenterGreyTitle(l10n.editor),
_buildEditor(),
/// Fullscreen Mode is designed for old mobile phone which can be
/// used as a status screen.
if (isMobile) _buildTitle(l10n.fullScreen),
if (isMobile) CenterGreyTitle(l10n.fullScreen),
if (isMobile) _buildFullScreen(),
const SizedBox(height: 37),
],
@@ -84,18 +80,6 @@ class _SettingPageState extends State<SettingPage> {
);
}
Widget _buildTitle(String text) {
return Padding(
padding: const EdgeInsets.only(top: 23, bottom: 17),
child: Center(
child: Text(
text,
style: UIs.textGrey,
),
),
);
}
Widget _buildApp() {
final specific = _buildPlatformSetting();
final children = [
@@ -181,19 +165,19 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildCheckUpdate() {
return ListTile(
leading: const Icon(Icons.update),
title: Text(l10n.autoCheckUpdate),
title: Text(libL10n.autoCheckUpdate),
subtitle: ValBuilder(
listenable: AppUpdateIface.newestBuild,
builder: (val) {
String display;
if (val != null) {
if (val > BuildData.build) {
display = l10n.versionHaveUpdate(val);
display = libL10n.versionHasUpdate(val);
} else {
display = l10n.versionUpdated(BuildData.build);
display = libL10n.versionUpdated(BuildData.build);
}
} else {
display = l10n.versionUnknownUpdate(BuildData.build);
display = libL10n.versionUnknownUpdate(BuildData.build);
}
return Text(display, style: UIs.textGrey);
},
@@ -212,16 +196,10 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildUpdateInterval() {
return ListTile(
title: Text(
l10n.updateServerStatusInterval,
),
subtitle: Text(
l10n.willTakEeffectImmediately,
style: UIs.textGrey,
),
title: Text(l10n.updateServerStatusInterval),
onTap: () async {
final val = await context.showPickSingleDialog(
title: l10n.setting,
title: libL10n.setting,
items: List.generate(10, (idx) => idx == 1 ? null : idx),
initial: _setting.serverStatusUpdateInterval.fetch(),
name: (p0) => p0 == 0 ? l10n.manual : '$p0 ${l10n.second}',
@@ -243,14 +221,17 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildAppColor() {
return ListTile(
leading: const Icon(Icons.colorize),
title: Text(l10n.primaryColorSeed),
trailing: ClipOval(
child: Container(color: UIs.primaryColor, height: 27, width: 27),
title: Text(libL10n.primaryColorSeed),
trailing: _setting.colorSeed.listenable().listenVal(
(val) {
final c = Color(val);
return ClipOval(child: Container(color: c, height: 27, width: 27));
},
),
onTap: () async {
final ctrl = TextEditingController(text: UIs.primaryColor.toHex);
await context.showRoundDialog(
title: l10n.primaryColorSeed,
title: libL10n.primaryColorSeed,
child: StatefulBuilder(builder: (context, setState) {
final children = <Widget>[
/// Plugin [dynamic_color] is not supported on iOS
@@ -270,9 +251,10 @@ class _SettingPageState extends State<SettingPage> {
controller: ctrl,
hint: '#8b2252',
icon: Icons.colorize,
suggestion: false,
),
ColorPicker(
color: Color(_setting.primaryColor.fetch()),
color: Color(_setting.colorSeed.fetch()),
onColorChanged: (c) => ctrl.text = c.toHex,
)
]);
@@ -282,12 +264,7 @@ class _SettingPageState extends State<SettingPage> {
children: children,
);
}),
actions: [
TextButton(
onPressed: () => _onSaveColor(ctrl.text),
child: Text(l10n.ok),
),
],
actions: Btn.ok(onTap: () => _onSaveColor(ctrl.text)).toList,
);
},
);
@@ -296,16 +273,13 @@ class _SettingPageState extends State<SettingPage> {
void _onSaveColor(String s) {
final color = s.hexToColor;
if (color == null) {
context.showSnackBar(l10n.failed);
context.showSnackBar(libL10n.fail);
return;
}
// Change [primaryColor] first, then change [_selectedColorValue],
// So the [ValueBuilder] will be triggered with the new value
UIs.colorSeed = color;
_setting.primaryColor.put(color.value);
_setting.colorSeed.put(color.value);
context.pop();
context.pop();
RNodes.app.notify();
Future.delayed(Durations.medium1, RNodes.app.notify);
}
// Widget _buildLaunchPage() {
@@ -352,13 +326,7 @@ class _SettingPageState extends State<SettingPage> {
return ValBuilder(
listenable: _setting.maxRetryCount.listenable(),
builder: (val) => ListTile(
title: Text(
l10n.maxRetryCount,
textAlign: TextAlign.start,
),
subtitle: Text(
val == 0 ? l10n.maxRetryCountEqual0 : l10n.canPullRefresh,
style: UIs.textGrey),
title: Text(l10n.maxRetryCount),
onTap: () async {
final selected = await context.showPickSingleDialog(
title: l10n.maxRetryCount,
@@ -383,10 +351,10 @@ class _SettingPageState extends State<SettingPage> {
final len = ThemeMode.values.length;
return ListTile(
leading: const Icon(MingCute.moon_stars_fill),
title: Text(l10n.themeMode),
title: Text(libL10n.themeMode),
onTap: () async {
final selected = await context.showPickSingleDialog(
title: l10n.themeMode,
title: libL10n.themeMode,
items: List.generate(len + 2, (index) => index),
name: (p0) => _buildThemeModeStr(p0),
initial: _setting.themeMode.fetch(),
@@ -409,26 +377,30 @@ class _SettingPageState extends State<SettingPage> {
String _buildThemeModeStr(int n) {
switch (n) {
case 1:
return l10n.light;
return libL10n.bright;
case 2:
return l10n.dark;
return libL10n.dark;
case 3:
return 'AMOLED';
case 4:
return '${l10n.auto} AMOLED';
return '${libL10n.auto} AMOLED';
default:
return l10n.auto;
return libL10n.auto;
}
}
Widget _buildFont() {
final fontName = _setting.fontPath.fetch().getFileName();
return ListTile(
leading: const Icon(MingCute.font_fill),
title: Text(l10n.font),
trailing: Text(
fontName ?? l10n.notSelected,
style: UIs.text15,
trailing: _setting.fontPath.listenable().listenVal(
(val) {
final fontName = val.getFileName();
return Text(
fontName ?? libL10n.empty,
style: UIs.text15,
);
},
),
onTap: () {
context.showRoundDialog(
@@ -436,7 +408,7 @@ class _SettingPageState extends State<SettingPage> {
actions: [
TextButton(
onPressed: () async => await _pickFontFile(),
child: Text(l10n.pickFile),
child: Text(libL10n.file),
),
TextButton(
onPressed: () {
@@ -444,7 +416,7 @@ class _SettingPageState extends State<SettingPage> {
context.pop();
RNodes.app.notify();
},
child: Text(l10n.clear),
child: Text(libL10n.clear),
)
],
);
@@ -472,8 +444,9 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildTermFontSize() {
return ListTile(
leading: const Icon(MingCute.font_size_line),
title: Text(l10n.fontSize),
subtitle: Text(l10n.termFontSizeTip, style: UIs.textGrey),
// title: Text(l10n.fontSize),
// subtitle: Text(l10n.termFontSizeTip, style: UIs.textGrey),
title: TipText(l10n.fontSize, l10n.termFontSizeTip),
trailing: ValBuilder(
listenable: _setting.termFontSize.listenable(),
builder: (val) => Text(
@@ -525,12 +498,12 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildLocale() {
return ListTile(
leading: const Icon(IonIcons.language),
title: Text(l10n.language),
title: Text(libL10n.language),
onTap: () async {
final selected = await context.showPickSingleDialog(
title: l10n.language,
title: libL10n.language,
items: AppLocalizations.supportedLocales,
name: (p0) => p0.code,
name: (p0) => p0.nativeName,
initial: _setting.locale.fetch().toLocale,
);
if (selected != null) {
@@ -542,7 +515,7 @@ class _SettingPageState extends State<SettingPage> {
trailing: ListenBuilder(
listenable: _setting.locale.listenable(),
builder: () => Text(
l10n.languageName,
context.localeNativeName,
style: UIs.text15,
),
),
@@ -561,7 +534,7 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildEditorTheme() {
return ListTile(
leading: const Icon(MingCute.sun_fill),
title: Text('${l10n.light} ${l10n.theme.toLowerCase()}'),
title: Text('${libL10n.bright} ${l10n.theme.toLowerCase()}'),
trailing: ValBuilder(
listenable: _setting.editorTheme.listenable(),
builder: (val) => Text(val, style: UIs.text15),
@@ -583,7 +556,7 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildEditorDarkTheme() {
return ListTile(
leading: const Icon(MingCute.moon_stars_fill),
title: Text('${l10n.dark} ${l10n.theme.toLowerCase()}'),
title: Text('${libL10n.dark} ${l10n.theme.toLowerCase()}'),
trailing: ValBuilder(
listenable: _setting.editorDarkTheme.listenable(),
builder: (val) => Text(val, style: UIs.text15),
@@ -605,8 +578,9 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildFullScreenSwitch() {
return ListTile(
leading: const Icon(Bootstrap.phone_landscape_fill),
title: Text(l10n.fullScreen),
subtitle: Text(l10n.fullScreenTip, style: UIs.textGrey),
// title: Text(l10n.fullScreen),
// subtitle: Text(l10n.fullScreenTip, style: UIs.textGrey),
title: TipText(l10n.fullScreen, l10n.fullScreenTip),
trailing: StoreSwitch(
prop: _setting.fullScreen,
callback: (_) => RNodes.app.notify(),
@@ -661,14 +635,6 @@ class _SettingPageState extends State<SettingPage> {
// );
// }
// Widget _buildCNKeyboardComp() {
// return ListTile(
// title: Text(l10n.cnKeyboardComp),
// subtitle: Text(l10n.cnKeyboardCompTip, style: UIs.textGrey),
// trailing: StoreSwitch(prop: _setting.cnKeyboardComp),
// );
// }
Widget _buildSSHVirtKeys() {
return ListTile(
leading: const Icon(BoxIcons.bxs_keyboard),
@@ -681,6 +647,7 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildSFTP() {
return Column(
children: [
_buildSftpEditor(),
_buildSftpRmrDir(),
_buildSftpOpenLastPath(),
_buildSftpShowFoldersFirst(),
@@ -691,8 +658,9 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildSftpOpenLastPath() {
return ListTile(
leading: const Icon(MingCute.history_line),
title: Text(l10n.openLastPath),
subtitle: Text(l10n.openLastPathTip, style: UIs.textGrey),
// title: Text(l10n.openLastPath),
// subtitle: Text(l10n.openLastPathTip, style: UIs.textGrey),
title: TipText(l10n.openLastPath, l10n.openLastPathTip),
trailing: StoreSwitch(prop: _setting.sftpOpenLastPath),
);
}
@@ -750,7 +718,7 @@ class _SettingPageState extends State<SettingPage> {
final md = deleteKeys.map((e) => '- $e').join('\n');
final sure = await context.showRoundDialog(
title: l10n.attention,
title: libL10n.attention,
child: SimpleMarkdown(data: md),
);
@@ -758,7 +726,7 @@ class _SettingPageState extends State<SettingPage> {
for (final key in deleteKeys) {
Stores.server.box.delete(key);
}
context.showSnackBar(l10n.success);
context.showSnackBar(libL10n.success);
},
);
}
@@ -766,8 +734,9 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildTextScaler() {
final ctrl = TextEditingController(text: _setting.textFactor.toString());
return ListTile(
title: Text(l10n.textScaler),
subtitle: Text(l10n.textScalerTip, style: UIs.textGrey),
// title: Text(l10n.textScaler),
// subtitle: Text(l10n.textScalerTip, style: UIs.textGrey),
title: TipText(l10n.textScaler, l10n.textScalerTip),
trailing: ValBuilder(
listenable: _setting.textFactor.listenable(),
builder: (val) => Text(
@@ -784,13 +753,9 @@ class _SettingPageState extends State<SettingPage> {
icon: Icons.format_size,
controller: ctrl,
onSubmitted: _onSaveTextScaler,
suggestion: false,
),
actions: [
TextButton(
onPressed: () => _onSaveTextScaler(ctrl.text),
child: Text(l10n.ok),
),
],
actions: Btn.ok(onTap: () => _onSaveTextScaler(ctrl.text)).toList,
),
);
}
@@ -798,7 +763,7 @@ class _SettingPageState extends State<SettingPage> {
void _onSaveTextScaler(String s) {
final val = double.tryParse(s);
if (val == null) {
context.showSnackBar(l10n.failed);
context.showSnackBar(libL10n.fail);
return;
}
_setting.textFactor.put(val);
@@ -819,9 +784,10 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildServerFuncBtnsSwitch() {
return ListTile(
title: Text(l10n.location),
subtitle: Text(l10n.moveOutServerFuncBtnsHelp, style: UIs.text13Grey),
trailing: StoreSwitch(prop: _setting.moveOutServerTabFuncBtns),
// title: Text(l10n.location),
// subtitle: Text(l10n.moveOutServerFuncBtnsHelp, style: UIs.text13Grey),
title: TipText(l10n.location, l10n.moveOutServerFuncBtnsHelp),
trailing: StoreSwitch(prop: _setting.moveServerFuncs),
);
}
@@ -873,7 +839,7 @@ class _SettingPageState extends State<SettingPage> {
final fontSize = double.tryParse(ctrller.text);
if (fontSize == null) {
context.showRoundDialog(
title: l10n.failed,
title: libL10n.fail,
child: Text('Parsed failed: ${ctrller.text}'),
);
return;
@@ -888,30 +854,26 @@ class _SettingPageState extends State<SettingPage> {
autoFocus: true,
type: TextInputType.number,
icon: Icons.font_download,
suggestion: false,
onSubmitted: (_) => onSave(),
),
actions: [
TextButton(
onPressed: onSave,
child: Text(l10n.ok),
),
],
actions: Btn.ok(onTap: onSave).toList,
);
}
Widget _buildSftpRmrDir() {
return ListTile(
leading: const Icon(MingCute.delete_2_fill),
title: const Text('rm -r'),
subtitle: Text(l10n.sftpRmrDirSummary, style: UIs.textGrey),
title: TipText('rm -r', l10n.sftpRmrDirSummary),
trailing: StoreSwitch(prop: _setting.sftpRmrDir),
);
}
Widget _buildDoubleColumnServersPage() {
return ListTile(
title: Text(l10n.doubleColumnMode),
subtitle: Text(l10n.doubleColumnTip, style: UIs.textGrey),
// title: Text(l10n.doubleColumnMode),
// subtitle: Text(l10n.doubleColumnTip, style: UIs.textGrey),
title: TipText(l10n.doubleColumnMode, l10n.doubleColumnTip),
trailing: StoreSwitch(prop: _setting.doubleColumnServersPage),
);
}
@@ -925,7 +887,7 @@ class _SettingPageState extends State<SettingPage> {
if (func == null) return null;
return ListTile(
leading: const Icon(Icons.phone_android),
title: Text('${Pfs.type} ${l10n.setting}'),
title: Text('${Pfs.type} ${libL10n.setting}'),
trailing: const Icon(Icons.keyboard_arrow_right),
onTap: () => func(context),
);
@@ -934,16 +896,16 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildEditorHighlight() {
return ListTile(
leading: const Icon(MingCute.code_line, size: _kIconSize),
title: Text(l10n.highlight),
subtitle: Text(l10n.editorHighlightTip, style: UIs.textGrey),
// title: Text(l10n.highlight),
// subtitle: Text(l10n.editorHighlightTip, style: UIs.textGrey),
title: TipText(l10n.highlight, l10n.editorHighlightTip),
trailing: StoreSwitch(prop: _setting.editorHighlight),
);
}
Widget _buildCollapseUI() {
return ListTile(
title: Text(l10n.collapseUI),
subtitle: Text(l10n.collapseUITip, style: UIs.textGrey),
title: TipText('UI ${libL10n.fold}', l10n.collapseUITip),
trailing: StoreSwitch(prop: _setting.collapseUIDefault),
);
}
@@ -958,9 +920,8 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildContainerTrySudo() {
return ListTile(
leading: const Icon(Clarity.administrator_solid),
title: Text(l10n.trySudo),
subtitle: Text(l10n.containerTrySudoTip, style: UIs.textGrey),
leading: const Icon(EvaIcons.person_done),
title: TipText(l10n.trySudo, l10n.containerTrySudoTip),
trailing: StoreSwitch(prop: _setting.containerTrySudo),
);
}
@@ -975,9 +936,10 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildContainerParseStat() {
return ListTile(
leading: const Icon(IonIcons.stats_chart, size: _kIconSize),
title: Text(l10n.parseContainerStats),
subtitle: Text(l10n.parseContainerStatsTip, style: UIs.textGrey),
leading: const Icon(MingCute.chart_line_line, size: _kIconSize),
// title: Text(l10n.parseContainerStats),
// subtitle: Text(l10n.parseContainerStatsTip, style: UIs.textGrey),
title: TipText(l10n.stat, l10n.parseContainerStatsTip),
trailing: StoreSwitch(prop: _setting.containerParseStat),
);
}
@@ -999,8 +961,9 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildRememberPwdInMem() {
return ListTile(
title: Text(l10n.rememberPwdInMem),
subtitle: Text(l10n.rememberPwdInMemTip, style: UIs.textGrey),
// title: Text(l10n.rememberPwdInMem),
// subtitle: Text(l10n.rememberPwdInMemTip, style: UIs.textGrey),
title: TipText(l10n.rememberPwdInMem, l10n.rememberPwdInMemTip),
trailing: StoreSwitch(prop: _setting.rememberPwdInMem),
);
}
@@ -1011,11 +974,11 @@ class _SettingPageState extends State<SettingPage> {
case 0:
return l10n.system;
case 1:
return l10n.light;
return libL10n.bright;
case 2:
return l10n.dark;
return libL10n.dark;
default:
return l10n.error;
return libL10n.error;
}
}
@@ -1118,14 +1081,9 @@ class _SettingPageState extends State<SettingPage> {
void onSave(String url) {
if (url.isEmpty || !url.startsWith('http')) {
context.showRoundDialog(
title: l10n.failed,
title: libL10n.fail,
child: Text('${l10n.invalid} URL'),
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.ok),
),
],
actions: Btnx.oks,
);
return;
}
@@ -1151,21 +1109,17 @@ class _SettingPageState extends State<SettingPage> {
hint: 'https://example.com/logo.png',
icon: Icons.link,
maxLines: 2,
suggestion: false,
onSubmitted: onSave,
),
ListTile(
title: Text(l10n.doc),
title: Text(libL10n.doc),
trailing: const Icon(Icons.open_in_new),
onTap: () => Urls.appWiki.launch(),
),
],
),
actions: [
TextButton(
onPressed: () => onSave(ctrl.text),
child: Text(l10n.ok),
),
],
actions: Btn.ok(onTap: () => onSave(ctrl.text)).toList,
);
},
);
@@ -1173,21 +1127,59 @@ class _SettingPageState extends State<SettingPage> {
Widget _buildBeta() {
return ListTile(
title: const Text('Beta Program'),
subtitle: Text(l10n.acceptBeta, style: UIs.textGrey),
title: TipText('Beta Program', l10n.acceptBeta),
trailing: StoreSwitch(prop: _setting.betaTest),
);
}
Widget _buildLetterCache() {
return ListTile(
leading: const Icon(Bootstrap.input_cursor),
title: Text(l10n.letterCache),
subtitle: Text(
'${l10n.letterCacheTip}\n${l10n.needRestart}',
style: UIs.textGrey,
),
leading: const Icon(Bootstrap.alphabet),
// title: Text(l10n.letterCache),
// subtitle: Text(
// '${l10n.letterCacheTip}\n${l10n.needRestart}',
// style: UIs.textGrey,
// ),
title: TipText(
l10n.letterCache, '${l10n.letterCacheTip}\n${l10n.needRestart}'),
trailing: StoreSwitch(prop: _setting.letterCache),
);
}
Widget _buildSftpEditor() {
return _setting.sftpEditor.listenable().listenVal(
(val) {
return ListTile(
leading: const Icon(MingCute.edit_fill),
title: TipText(l10n.editor, l10n.sftpEditorTip),
trailing: Text(
val.isEmpty ? l10n.inner : val,
style: UIs.text15,
),
onTap: () async {
final ctrl = TextEditingController(text: val);
void onSave() {
final s = ctrl.text.trim();
_setting.sftpEditor.put(s);
context.pop();
}
await context.showRoundDialog<bool>(
title: libL10n.select,
child: Input(
controller: ctrl,
autoFocus: true,
label: l10n.editor,
hint: '\$EDITOR / vim / nano ...',
icon: Icons.edit,
suggestion: false,
onSubmitted: (_) => onSave(),
),
actions: Btn.ok(onTap: onSave).toList,
);
},
);
},
);
}
}

View File

@@ -1,11 +1,8 @@
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:server_box/core/extension/context/locale.dart';
import 'package:server_box/core/route.dart';
import 'package:server_box/data/res/store.dart';
import 'package:server_box/view/page/setting/platform/platform_pub.dart';
import 'package:watch_connectivity/watch_connectivity.dart';
class AndroidSettingsPage extends StatefulWidget {
const AndroidSettingsPage({super.key});
@@ -15,21 +12,10 @@ class AndroidSettingsPage extends StatefulWidget {
}
class _AndroidSettingsPageState extends State<AndroidSettingsPage> {
late SharedPreferences _sp;
final wc = WatchConnectivity();
@override
void initState() {
super.initState();
SharedPreferences.getInstance().then((value) => _sp = value);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const CustomAppBar(
title: Text('Android'),
),
appBar: const CustomAppBar(title: Text('Android')),
body: ListView(
padding: const EdgeInsets.symmetric(horizontal: 17),
children: [
@@ -44,8 +30,7 @@ class _AndroidSettingsPageState extends State<AndroidSettingsPage> {
Widget _buildBgRun() {
return ListTile(
title: Text(l10n.bgRun),
subtitle: Text(l10n.bgRunTip, style: UIs.textGrey),
title: TipText(l10n.bgRun, l10n.bgRunTip),
trailing: StoreSwitch(prop: Stores.setting.bgRun),
);
}
@@ -54,12 +39,12 @@ class _AndroidSettingsPageState extends State<AndroidSettingsPage> {
try {
final keysDel = old.keys.toSet().difference(map.keys.toSet());
for (final key in keysDel) {
_sp.remove(key);
PrefStore.remove(key);
}
map.forEach((key, value) {
_sp.setString(key, value);
PrefStore.set(key, value);
});
context.showSnackBar(l10n.success);
context.showSnackBar(libL10n.success);
} catch (e) {
context.showSnackBar(e.toString());
}
@@ -71,27 +56,18 @@ class _AndroidSettingsPageState extends State<AndroidSettingsPage> {
trailing: const Icon(Icons.keyboard_arrow_right),
onTap: () async {
final data = <String, String>{};
_sp.getKeys().forEach((key) {
final val = _sp.getString(key);
for (final key in PrefStore.keys()) {
final val = PrefStore.get<String>(key);
if (val != null) {
data[key] = val;
}
});
final result = await AppRoutes.kvEditor(data: data).go(context);
}
final result = await KvEditor.route.go(
context,
args: KvEditorArgs(data: data, prefix: 'widget_'),
);
if (result != null) {
if (result is Map<String, String>) {
_saveWidgetSP(result, data);
} else {
final err = 'Save Android widget SharedPreference failed: '
'unexpected type: ${result.runtimeType}';
Loggers.app.warning(err);
context.showRoundDialog(
title: l10n.error,
child: SingleChildScrollView(
child: SimpleMarkdown(data: '$err\n\n```$result```'),
),
);
}
_saveWidgetSP(result, data);
}
},
);

View File

@@ -1,7 +1,6 @@
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:server_box/core/extension/context/locale.dart';
import 'package:server_box/core/route.dart';
import 'package:server_box/core/utils/misc.dart';
import 'package:server_box/data/res/store.dart';
import 'package:server_box/view/page/setting/platform/platform_pub.dart';
@@ -22,9 +21,7 @@ class _IOSSettingsPageState extends State<IOSSettingsPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const CustomAppBar(
title: Text('iOS'),
),
appBar: const CustomAppBar(title: Text('iOS')),
body: ListView(
padding: const EdgeInsets.symmetric(horizontal: 17),
children: [
@@ -46,22 +43,23 @@ class _IOSSettingsPageState extends State<IOSSettingsPage> {
alignment: Alignment.centerRight,
padding: EdgeInsets.zero,
onPressed: () {
if (_pushToken.value != null) {
Pfs.copy(_pushToken.value!);
context.showSnackBar(l10n.success);
final val = _pushToken.value;
if (val != null) {
Pfs.copy(val);
context.showSnackBar(libL10n.success);
} else {
context.showSnackBar(l10n.getPushTokenFailed);
context.showSnackBar(libL10n.fail);
}
},
),
subtitle: FutureWidget<String?>(
future: getToken(),
loading: Text(l10n.gettingToken),
error: (error, trace) => Text('${l10n.error}: $error'),
loading: const Text('...'),
error: (error, trace) => Text('${libL10n.error}: $error'),
success: (text) {
_pushToken.value = text;
return Text(
text ?? l10n.nullToken,
text ?? 'null',
style: UIs.textGrey,
overflow: TextOverflow.ellipsis,
maxLines: 1,
@@ -90,7 +88,7 @@ class _IOSSettingsPageState extends State<IOSSettingsPage> {
Loggers.app.warning('WatchOS error', e, trace);
return ListTile(
title: const Text('Watch app'),
subtitle: Text('${l10n.error}: $e', style: UIs.textGrey),
subtitle: Text('${libL10n.error}: $e', style: UIs.textGrey),
);
},
success: (ctx) {
@@ -111,16 +109,17 @@ class _IOSSettingsPageState extends State<IOSSettingsPage> {
void _onTapWatchApp(Map<String, dynamic> map) async {
final urls = Map<String, String>.from(map['urls'] as Map? ?? {});
final result = await AppRoutes.kvEditor(data: urls).go(context);
if (result == null || result is! Map<String, String>) return;
final result = await KvEditor.route.go(
context,
args: KvEditorArgs(data: urls),
);
if (result == null) return;
try {
await context.showLoadingDialog(fn: () async {
await wc.updateApplicationContext({'urls': result});
});
} catch (e, s) {
context.showErrDialog(e: e, s: s, operation: 'Watch Context');
Loggers.app.warning('Update watch config failed', e, s);
final (_, err) = await context.showLoadingDialog(fn: () async {
await wc.updateApplicationContext({'urls': result});
});
if (err == null) {
context.showSnackBar(libL10n.success);
}
}
}

View File

@@ -9,16 +9,16 @@ abstract final class PlatformPublicSettings {
return FutureWidget<bool>(
future: BioAuth.isAvail,
loading: ListTile(
title: Text(l10n.bioAuth),
subtitle: Text(l10n.serverTabLoading, style: UIs.textGrey),
title: Text(libL10n.bioAuth),
subtitle: const Text('...', style: UIs.textGrey),
),
error: (e, __) => ListTile(
title: Text(l10n.bioAuth),
subtitle: Text('${l10n.failed}: $e', style: UIs.textGrey),
title: Text(libL10n.bioAuth),
subtitle: Text('${libL10n.fail}: $e', style: UIs.textGrey),
),
success: (can) {
return ListTile(
title: Text(l10n.bioAuth),
title: Text(libL10n.bioAuth),
subtitle: can == true
? null
: const Text(

View File

@@ -17,9 +17,7 @@ class _ServerDetailOrderPageState extends State<ServerDetailOrderPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
title: Text(l10n.serverDetailOrder),
),
appBar: CustomAppBar(title: Text(l10n.serverDetailOrder)),
body: _buildBody(),
);
}
@@ -52,7 +50,7 @@ class _ServerDetailOrderPageState extends State<ServerDetailOrderPage> {
itemCount: allKeys.length,
onReorder: (o, n) {
if (o >= keys.length || n >= keys.length) {
context.showSnackBar(l10n.disabled);
context.showSnackBar(libL10n.disabled);
return;
}
keys.moveByItem(o, n, property: prop);

View File

@@ -17,9 +17,7 @@ class _ServerDetailOrderPageState extends State<ServerFuncBtnsOrderPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
title: Text(l10n.sequence),
),
appBar: CustomAppBar(title: Text(l10n.sequence)),
body: _buildBody(),
);
}
@@ -45,7 +43,7 @@ class _ServerDetailOrderPageState extends State<ServerFuncBtnsOrderPage> {
text: TextSpan(
children: [
WidgetSpan(child: Icon(funcBtn.icon)),
const WidgetSpan(child: UIs.width7),
const WidgetSpan(child: UIs.width13),
TextSpan(text: funcBtn.toStr, style: UIs.textGrey),
],
),
@@ -57,7 +55,7 @@ class _ServerDetailOrderPageState extends State<ServerFuncBtnsOrderPage> {
itemCount: allKeys.length,
onReorder: (o, n) {
if (o >= keys.length || n >= keys.length) {
context.showSnackBar(l10n.disabled);
context.showSnackBar(libL10n.disabled);
return;
}
keys.moveByItem(o, n, property: prop);

View File

@@ -16,9 +16,7 @@ class _ServerOrderPageState extends State<ServerOrderPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
title: Text(l10n.serverOrder),
),
appBar: CustomAppBar(title: Text(l10n.serverOrder)),
body: _buildBody(),
);
}
@@ -48,7 +46,7 @@ class _ServerOrderPageState extends State<ServerOrderPage> {
Widget _buildBody() {
if (Pros.server.serverOrder.isEmpty) {
return Center(child: Text(l10n.noServerAvailable));
return Center(child: Text(libL10n.empty));
}
return ReorderableListView.builder(
footer: const SizedBox(height: 77),

View File

@@ -17,9 +17,7 @@ class _SSHVirtKeySettingPageState extends State<SSHVirtKeySettingPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
title: Text(l10n.editVirtKeys),
),
appBar: CustomAppBar(title: Text(l10n.editVirtKeys)),
body: Column(
children: [
Padding(
@@ -67,7 +65,7 @@ class _SSHVirtKeySettingPageState extends State<SSHVirtKeySettingPage> {
itemCount: allKeys.length,
onReorder: (o, n) {
if (o >= keys.length || n >= keys.length) {
context.showSnackBar(l10n.disabled);
context.showSnackBar(libL10n.disabled);
return;
}
keys.moveByItem(o, n, property: prop);

View File

@@ -2,10 +2,9 @@ import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:server_box/core/extension/context/locale.dart';
import 'package:server_box/data/model/server/snippet.dart';
import 'package:server_box/data/res/provider.dart';
import '../../../data/model/server/snippet.dart';
class SnippetEditPage extends StatefulWidget {
const SnippetEditPage({super.key, this.snippet});
@@ -22,7 +21,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
final _noteController = TextEditingController();
final _scriptNode = FocusNode();
final _autoRunOn = ValueNotifier(<String>[]);
final _tags = ValueNotifier(<String>[]);
final _tags = <String>{}.vn;
@override
void dispose() {
@@ -36,7 +35,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
title: Text(l10n.edit, style: UIs.text18),
title: Text(libL10n.edit),
actions: _buildAppBarActions(),
),
body: _buildBody(),
@@ -45,30 +44,26 @@ class _SnippetEditPageState extends State<SnippetEditPage>
}
List<Widget>? _buildAppBarActions() {
if (widget.snippet == null) {
return null;
}
if (widget.snippet == null) return null;
return [
IconButton(
onPressed: () {
context.showRoundDialog(
title: l10n.attention,
child: Text(l10n.askContinue(
'${l10n.delete} ${l10n.snippet}(${widget.snippet!.name})',
title: libL10n.attention,
child: Text(libL10n.askContinue(
'${libL10n.delete} ${l10n.snippet}(${widget.snippet!.name})',
)),
actions: [
TextButton(
onPressed: () {
Pros.snippet.del(widget.snippet!);
context.pop();
context.pop();
},
child: Text(l10n.ok, style: UIs.textRed),
),
],
actions: Btn.ok(
onTap: () {
Pros.snippet.del(widget.snippet!);
context.pop();
context.pop();
},
red: true,
).toList,
);
},
tooltip: l10n.delete,
tooltip: libL10n.delete,
icon: const Icon(Icons.delete),
)
];
@@ -82,14 +77,14 @@ class _SnippetEditPageState extends State<SnippetEditPage>
final name = _nameController.text;
final script = _scriptController.text;
if (name.isEmpty || script.isEmpty) {
context.showSnackBar(l10n.fieldMustNotEmpty);
context.showSnackBar(libL10n.empty);
return;
}
final note = _noteController.text;
final snippet = Snippet(
name: name,
script: script,
tags: _tags.value.isEmpty ? null : _tags.value,
tags: _tags.value.isEmpty ? null : _tags.value.toList(),
note: note.isEmpty ? null : note,
autoRunOn: _autoRunOn.value.isEmpty ? null : _autoRunOn.value,
);
@@ -105,39 +100,27 @@ class _SnippetEditPageState extends State<SnippetEditPage>
Widget _buildBody() {
return ListView(
padding: const EdgeInsets.all(13),
padding: const EdgeInsets.symmetric(horizontal: 13),
children: [
Input(
autoFocus: true,
controller: _nameController,
type: TextInputType.text,
onSubmitted: (_) => FocusScope.of(context).requestFocus(_scriptNode),
label: l10n.name,
label: libL10n.name,
icon: Icons.info,
suggestion: true,
),
Input(
controller: _noteController,
minLines: 3,
maxLines: 3,
type: TextInputType.multiline,
label: l10n.note,
label: libL10n.note,
icon: Icons.note,
suggestion: true,
),
ValBuilder(
listenable: _tags,
builder: (vals) {
return TagEditor(
tags: _tags.value,
onChanged: (p0) => setState(() {
_tags.value = p0;
}),
allTags: [...Pros.snippet.tags.value],
onRenameTag: (old, n) => setState(() {
Pros.snippet.renameTag(old, n);
}),
);
},
),
TagTile(tags: _tags, allTags: Pros.snippet.tags.value).cardx,
Input(
controller: _scriptController,
node: _scriptNode,
@@ -146,6 +129,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
type: TextInputType.multiline,
label: l10n.snippet,
icon: Icons.code,
suggestion: false,
),
_buildAutoRunOn(),
_buildTip(),
@@ -164,7 +148,10 @@ class _SnippetEditPageState extends State<SnippetEditPage>
.map((e) => Pros.server.pick(id: e)?.spi.name ?? e)
.join(', ');
return ListTile(
leading: const Icon(Icons.settings_remote, size: 19),
leading: const Padding(
padding: EdgeInsets.only(left: 5),
child: Icon(Icons.settings_remote, size: 19),
),
title: Text(l10n.autoRun),
trailing: const Icon(Icons.keyboard_arrow_right),
subtitle: subtitle == null
@@ -204,7 +191,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
${Snippet.fmtArgs.keys.map((e) => '`$e`').join(', ')}\n
${Snippet.fmtTermKeys.keys.map((e) => '`$e+?}`').join(', ')}\n
${l10n.forExample}:
${libL10n.example}:
- `\${ctrl+c}` (Control + C)
- `\${ctrl+b}d` (Tmux Detach)
''',
@@ -229,7 +216,7 @@ ${l10n.forExample}:
}
if (snippet.tags != null) {
_tags.value = snippet.tags!;
_tags.value = snippet.tags!.toSet();
}
if (snippet.autoRunOn != null) {

View File

@@ -1,7 +1,6 @@
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:server_box/core/extension/context/locale.dart';
import 'package:server_box/data/res/store.dart';
import '../../../data/model/server/snippet.dart';
@@ -42,9 +41,7 @@ class _SnippetListPageState extends State<SnippetListPage> {
return Consumer<SnippetProvider>(
builder: (_, provider, __) {
if (provider.snippets.isEmpty) {
return Center(
child: Text(l10n.noSavedSnippet),
);
return Center(child: Text(libL10n.empty));
}
final filtered = provider.snippets
@@ -52,7 +49,7 @@ class _SnippetListPageState extends State<SnippetListPage> {
.toList();
return ReorderableListView.builder(
padding: const EdgeInsets.symmetric(horizontal: 13),
padding: const EdgeInsets.symmetric(horizontal: 11),
itemCount: filtered.length,
onReorder: (oldIdx, newIdx) => setState(() {
provider.snippets.moveByItem(
@@ -100,16 +97,8 @@ class _SnippetListPageState extends State<SnippetListPage> {
maxLines: 3,
style: UIs.textGrey,
),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
onPressed: () =>
AppRoutes.snippetEdit(snippet: snippet).go(context),
icon: const Icon(Icons.edit),
),
],
),
trailing: const Icon(Icons.keyboard_arrow_right),
onTap: () => AppRoutes.snippetEdit(snippet: snippet).go(context),
),
);
}

View File

@@ -11,9 +11,7 @@ class SnippetResultPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
title: Text(l10n.result),
),
appBar: CustomAppBar(title: Text(l10n.result)),
body: _buildBody(),
);
}

View File

@@ -145,9 +145,8 @@ class SSHPageState extends State<SSHPage>
_terminal,
key: _termKey,
controller: _terminalController,
keyboardType:
letterCache ? TextInputType.text : TextInputType.visiblePassword,
enableSuggestions: !letterCache,
keyboardType: TextInputType.text,
enableSuggestions: letterCache,
textStyle: _terminalStyle,
theme: _terminalTheme,
deleteDetection: isMobile,
@@ -326,7 +325,7 @@ class SSHPageState extends State<SSHPage>
final initPath = cmds[idx + 1].toString();
if (initPath.isEmpty || !initPath.startsWith('/')) {
context.showRoundDialog(
title: l10n.error,
title: libL10n.error,
child: const Text('Failed to get current path'),
);
return;
@@ -393,12 +392,13 @@ class SSHPageState extends State<SSHPage>
width: _terminal.viewWidth,
height: _terminal.viewHeight,
),
environment: widget.spi.envs,
);
//_setupDiscontinuityTimer();
if (session == null) {
_writeLn('Null session');
_writeLn('Null session, please back and retry\r\n');
return;
}
@@ -524,7 +524,7 @@ class SSHPageState extends State<SSHPage>
if (Stores.setting.sshTermHelpShown.fetch()) return;
return await context.showRoundDialog(
title: l10n.doc,
title: libL10n.doc,
child: Text(l10n.sshTermHelp),
actions: [
TextButton(

View File

@@ -22,7 +22,7 @@ typedef _TabMap = Map<String, ({Widget page, GlobalKey<SSHPageState>? key})>;
class _SSHTabPageState extends State<SSHTabPage>
with TickerProviderStateMixin, AutomaticKeepAliveClientMixin {
late final _TabMap _tabMap = {
l10n.add: (page: _buildAddPage(), key: null),
libL10n.add: (page: _buildAddPage(), key: null),
};
final _pageCtrl = PageController();
final _fabVN = 0.vn;
@@ -51,7 +51,7 @@ class _SSHTabPageState extends State<SSHTabPage>
return FloatingActionButton(
heroTag: 'sshAddServer',
onPressed: () => AppRoutes.serverEdit().go(context),
tooltip: l10n.addAServer,
tooltip: libL10n.add,
child: const Icon(Icons.add),
);
},
@@ -71,18 +71,9 @@ class _SSHTabPageState extends State<SSHTabPage>
context: context,
builder: (context) {
return AlertDialog(
title: Text(l10n.attention),
content: Text('${l10n.close} SSH ${l10n.conn}($name) ?'),
actions: [
TextButton(
onPressed: () => context.pop(true),
child: Text(l10n.ok, style: UIs.textRed),
),
TextButton(
onPressed: () => context.pop(false),
child: Text(l10n.cancel),
),
],
title: Text(libL10n.attention),
content: Text('${libL10n.close} SSH ${l10n.conn}($name) ?'),
actions: Btnx.okReds,
);
},
);
@@ -101,10 +92,7 @@ class _SSHTabPageState extends State<SSHTabPage>
child: Consumer<ServerProvider>(builder: (_, pro, __) {
if (pro.serverOrder.isEmpty) {
return Center(
child: Text(
l10n.serverTabEmpty,
textAlign: TextAlign.center,
),
child: Text(libL10n.empty, textAlign: TextAlign.center),
);
}
return GridView.builder(
@@ -231,7 +219,7 @@ final class _TabBar extends StatelessWidget implements PreferredSizeWidget {
builder: () {
return ListView.separated(
scrollDirection: Axis.horizontal,
padding: const EdgeInsets.symmetric(horizontal: 11, vertical: 5),
padding: const EdgeInsets.symmetric(horizontal: 7, vertical: 5),
itemCount: names.length,
itemBuilder: (_, idx) => _buillItem(idx),
separatorBuilder: (_, __) => Padding(
@@ -268,34 +256,37 @@ final class _TabBar extends StatelessWidget implements PreferredSizeWidget {
textWidthBasis: TextWidthBasis.parent,
);
child = AnimatedContainer(
width: selected ? 90 : 50,
width: selected ? 90 : 57,
duration: Durations.medium3,
padding: selected ? const EdgeInsets.symmetric(horizontal: 7) : null,
curve: Curves.fastEaseInToSlowEaseOut,
child: switch (selected) {
true => Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(width: 55, child: text),
if (selected)
FadeIn(
child: IconBtn(
icon: MingCute.close_circle_fill,
color: color,
child: Btn.icon(
icon: Icon(
MingCute.close_circle_fill,
color: color,
size: 17,
),
onTap: () => onClose(name),
),
),
const Spacer(),
SizedBox(width: 50, child: text),
],
),
false => Center(child: text),
},
).paddingOnly(left: 3, right: 3);
);
}
return InkWell(
borderRadius: BorderRadius.circular(13),
onTap: () => onTap(idx),
child: child,
).paddingSymmetric(horizontal: 13);
).paddingSymmetric(horizontal: 7);
}
}

View File

@@ -4,7 +4,7 @@ import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:server_box/core/extension/context/locale.dart';
import 'package:server_box/data/model/server/server_private_info.dart';
import 'package:server_box/data/model/sftp/req.dart';
import 'package:server_box/data/model/sftp/worker.dart';
import 'package:server_box/data/res/misc.dart';
import 'package:server_box/data/res/provider.dart';
import 'package:server_box/view/widget/omit_start_text.dart';
@@ -57,7 +57,7 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
context.pop();
},
),
title: Text(l10n.files),
title: Text(libL10n.file),
actions: [
IconButton(
icon: const Icon(Icons.downloading),
@@ -72,7 +72,7 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
return [
PopupMenuItem(
value: _SortType.name,
child: Text(l10n.name),
child: Text(libL10n.name),
),
PopupMenuItem(
value: _SortType.size,
@@ -111,7 +111,7 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
OmitStartText(_path?.path ?? l10n.loadingFiles),
OmitStartText(_path?.path ?? '...'),
_buildBtns(),
],
),
@@ -203,7 +203,7 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
context.pop();
_showRenameDialog(file);
},
title: Text(l10n.rename),
title: Text(libL10n.rename),
leading: const Icon(Icons.abc),
),
ListTile(
@@ -211,7 +211,7 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
context.pop();
_showDeleteDialog(file);
},
title: Text(l10n.delete),
title: Text(libL10n.delete),
leading: const Icon(Icons.delete),
),
],
@@ -223,17 +223,15 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
final fileName = file.path.split('/').last;
if (widget.isPickFile) {
await context.showRoundDialog(
title: l10n.pickFile,
child: Text(fileName),
actions: [
TextButton(
onPressed: () {
context.pop();
context.pop(file.path);
},
child: Text(l10n.ok),
),
]);
title: libL10n.file,
child: Text(fileName),
actions: [
Btn.ok(onTap: () {
context.pop();
context.pop(file.path);
}),
],
);
return;
}
context.showRoundDialog(
@@ -242,13 +240,13 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
children: [
ListTile(
leading: const Icon(Icons.edit),
title: Text(l10n.edit),
title: Text(libL10n.edit),
onTap: () async {
context.pop();
final stat = await file.stat();
if (stat.size > Miscs.editorMaxSize) {
context.showRoundDialog(
title: l10n.attention,
title: libL10n.attention,
child: Text(l10n.fileTooLarge(fileName, stat.size, '1m')),
);
return;
@@ -264,7 +262,7 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
),
ListTile(
leading: const Icon(Icons.abc),
title: Text(l10n.rename),
title: Text(libL10n.rename),
onTap: () {
context.pop();
_showRenameDialog(file);
@@ -272,7 +270,7 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
),
ListTile(
leading: const Icon(Icons.delete),
title: Text(l10n.delete),
title: Text(libL10n.delete),
onTap: () {
context.pop();
_showDeleteDialog(file);
@@ -285,7 +283,7 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
context.pop();
final spi = await context.showPickSingleDialog<ServerPrivateInfo>(
title: l10n.choose,
title: libL10n.select,
items: Pros.server.serverOrder
.map((e) => Pros.server.pick(id: e)?.spi)
.toList(),
@@ -312,7 +310,7 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
),
ListTile(
leading: const Icon(Icons.open_in_new),
title: Text(l10n.open),
title: Text(libL10n.open),
onTap: () {
Pfs.share(path: file.absolute.path);
},
@@ -325,17 +323,18 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
void _showRenameDialog(FileSystemEntity file) {
final fileName = file.path.split('/').last;
context.showRoundDialog(
title: l10n.rename,
title: libL10n.rename,
child: Input(
autoFocus: true,
controller: TextEditingController(text: fileName),
suggestion: true,
onSubmitted: (p0) {
context.pop();
final newPath = '${file.parent.path}/$p0';
try {
file.renameSync(newPath);
} catch (e) {
context.showSnackBar('${l10n.failed}:\n$e');
context.showSnackBar('${libL10n.fail}:\n$e');
return;
}
@@ -348,27 +347,20 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
void _showDeleteDialog(FileSystemEntity file) {
final fileName = file.path.split('/').last;
context.showRoundDialog(
title: l10n.delete,
child: Text(l10n.askContinue('${l10n.delete} $fileName')),
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.cancel),
),
TextButton(
onPressed: () {
context.pop();
try {
file.deleteSync(recursive: true);
} catch (e) {
context.showSnackBar('${l10n.failed}:\n$e');
return;
}
setState(() {});
},
child: Text(l10n.ok),
),
],
title: libL10n.delete,
child: Text(libL10n.askContinue('${libL10n.delete} $fileName')),
actions: Btn.ok(
onTap: () async {
context.pop();
try {
await file.delete(recursive: true);
} catch (e) {
context.showSnackBar('${libL10n.fail}:\n$e');
return;
}
setState(() {});
},
).toList,
);
}
}

View File

@@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:io';
import 'package:dartssh2/dartssh2.dart';
import 'package:fl_lib/fl_lib.dart';
@@ -10,16 +11,16 @@ import 'package:server_box/core/utils/comparator.dart';
import 'package:server_box/data/model/server/server_private_info.dart';
import 'package:server_box/data/model/sftp/absolute_path.dart';
import 'package:server_box/data/model/sftp/browser_status.dart';
import 'package:server_box/data/model/sftp/req.dart';
import 'package:server_box/data/model/sftp/worker.dart';
import 'package:server_box/data/res/misc.dart';
import 'package:server_box/data/res/provider.dart';
import 'package:server_box/data/res/store.dart';
import 'package:server_box/view/widget/omit_start_text.dart';
import 'package:icons_plus/icons_plus.dart';
import 'package:server_box/view/widget/two_line_text.dart';
import 'package:server_box/view/widget/unix_perm.dart';
import 'package:icons_plus/icons_plus.dart';
class SftpPage extends StatefulWidget {
final ServerPrivateInfo spi;
final String? initPath;
@@ -68,7 +69,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
itemBuilder: (context) {
final currentSelectedOption = _sortOption.value;
final options = [
(_SortType.name, l10n.name),
(_SortType.name, libL10n.name),
(_SortType.size, l10n.size),
(_SortType.time, l10n.time),
];
@@ -141,7 +142,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
OmitStartText(_status.path?.path ?? l10n.loadingFiles),
OmitStartText(_status.path?.path ?? '...'),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: children,
@@ -212,7 +213,8 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
context.showSnackBar('remote path is null');
return;
}
final remotePath = '$remoteDir/${path.split('/').last}';
final fileName = path.split(Platform.pathSeparator).lastOrNull;
final remotePath = '$remoteDir/$fileName';
Loggers.app.info('SFTP upload local: $path, remote: $remotePath');
Pros.sftp.add(
SftpReq(widget.spi, remotePath, path, SftpReqType.upload),
@@ -230,12 +232,12 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
children: [
ListTile(
leading: const Icon(Icons.folder),
title: Text(l10n.createFolder),
title: Text(libL10n.folder),
onTap: _mkdir,
),
ListTile(
leading: const Icon(Icons.insert_drive_file),
title: Text(l10n.createFile),
title: Text(libL10n.file),
onTap: _newFile,
),
],
@@ -264,9 +266,10 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
return Input(
autoFocus: true,
icon: Icons.abc,
label: l10n.path,
label: libL10n.path,
node: node,
controller: controller,
suggestion: true,
onSubmitted: (value) => context.pop(value),
);
},
@@ -278,7 +281,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
}
_status.path?.update(p);
final suc = await _listDir();
final suc = await _listDir() ?? false;
if (suc && Stores.setting.recordHistory.fetch()) {
Stores.history.sftpGoPath.add(p);
}
@@ -366,21 +369,21 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
final children = [
ListTile(
leading: const Icon(Icons.delete),
title: Text(l10n.delete),
title: Text(libL10n.delete),
onTap: () => _delete(file),
),
ListTile(
leading: const Icon(Icons.abc),
title: Text(l10n.rename),
title: Text(libL10n.rename),
onTap: () => _rename(file),
),
ListTile(
leading: const Icon(MingCute.copy_line),
title: Text(l10n.copyPath),
onTap: () {
Pfs.copy(_getRemotePath(file));
context.pop();
context.showSnackBar(l10n.success);
Pfs.copy(_getRemotePath(file));
context.showSnackBar(libL10n.success);
},
),
ListTile(
@@ -393,20 +396,15 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
var newPerm = perm.copyWith();
final ok = await context.showRoundDialog(
child: UnixPermEditor(perm: perm, onChanged: (p) => newPerm = p),
actions: Btns.oks(onTap: () => context.pop(true)),
actions: Btnx.okReds,
);
final permStr = newPerm.perm;
if (ok == true && permStr != perm.perm) {
await context.showLoadingDialog(
fn: () async {
await _client!.run('chmod $permStr "${_getRemotePath(file)}"');
await _listDir();
},
onErr: (e, s) {
context.showErrDialog(e: e, s: s, operation: l10n.permission);
},
);
await context.showLoadingDialog(fn: () async {
await _client!.run('chmod $permStr "${_getRemotePath(file)}"');
await _listDir();
});
}
},
),
@@ -415,12 +413,12 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
children.addAll([
ListTile(
leading: const Icon(Icons.edit),
title: Text(l10n.edit),
title: Text(libL10n.edit),
onTap: () => _edit(file),
),
ListTile(
leading: const Icon(Icons.download),
title: Text(l10n.download),
title: Text(libL10n.download),
onTap: () => _download(file),
),
// Only show decompress option when the file is a compressed file
@@ -441,6 +439,18 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
}
Future<void> _edit(SftpName name) async {
context.pop();
// #489
final editor = Stores.setting.sftpEditor.fetch();
if (editor.isNotEmpty) {
// Use single quote to avoid escape
final cmd = "$editor '${_getRemotePath(name)}'";
await AppRoutes.ssh(spi: widget.spi, initCmd: cmd).go(context);
await _listDir();
return;
}
final size = name.attr.size;
if (size == null || size > Miscs.editorMaxSize) {
context.showSnackBar(l10n.fileTooLarge(
@@ -450,7 +460,6 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
));
return;
}
context.pop();
final remotePath = _getRemotePath(name);
final localPath = await _getLocalPath(remotePath);
@@ -462,7 +471,10 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
SftpReqType.download,
);
Pros.sftp.add(req, completer: completer);
await context.showLoadingDialog(fn: () => completer.future);
final (suc, err) = await context.showLoadingDialog(
fn: () => completer.future,
);
if (suc == null || err != null) return;
final result = await AppRoutes.editor(path: localPath).go<bool>(context);
if (result != null && result) {
@@ -478,12 +490,12 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
void _download(SftpName name) {
context.showRoundDialog(
title: l10n.attention,
title: libL10n.attention,
child: Text('${l10n.dl2Local(name.filename)}\n${l10n.keepForeground}'),
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.cancel),
child: Text(libL10n.cancel),
),
TextButton(
onPressed: () async {
@@ -501,7 +513,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
context.pop();
},
child: Text(l10n.download),
child: Text(libL10n.download),
)
],
);
@@ -513,15 +525,15 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
var useRmr = Stores.setting.sftpRmrDir.fetch();
final text = () {
if (isDir && !useRmr) {
return l10n.askContinue('${l10n.delete} ${file.filename}');
return libL10n.askContinue('${libL10n.delete} ${file.filename}');
}
return l10n.askContinue('${l10n.delete} ${file.filename}');
return libL10n.askContinue('${libL10n.delete} ${file.filename}');
}();
// Most users don't know that SFTP can't delete a directory which is not
// empty, so we provide a checkbox to let user choose to use `rm -r` or not
context.showRoundDialog(
title: l10n.attention,
title: libL10n.attention,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
@@ -548,31 +560,30 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.cancel),
child: Text(libL10n.cancel),
),
TextButton(
onPressed: () async {
context.pop();
try {
await context.showLoadingDialog(
fn: () async {
final remotePath = _getRemotePath(file);
if (useRmr) {
await _client!.run('rm -r "$remotePath"');
} else if (file.attr.isDirectory) {
await _status.client!.rmdir(remotePath);
} else {
await _status.client!.remove(remotePath);
}
},
onErr: (e, s) {},
);
_listDir();
} catch (e, s) {
context.showErrDialog(e: e, s: s, operation: l10n.delete);
}
final (suc, err) = await context.showLoadingDialog(
fn: () async {
final remotePath = _getRemotePath(file);
if (useRmr) {
await _client!.run('rm -r "$remotePath"');
} else if (file.attr.isDirectory) {
await _status.client!.rmdir(remotePath);
} else {
await _status.client!.remove(remotePath);
}
return true;
},
);
if (suc == null || err != null) return;
_listDir();
},
child: Text(l10n.delete, style: UIs.textRed),
child: Text(libL10n.delete, style: UIs.textRed),
),
],
);
@@ -581,143 +592,132 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
void _mkdir() {
context.pop();
final textController = TextEditingController();
void onSubmitted() async {
final text = textController.text.trim();
if (text.isEmpty) {
context.showRoundDialog(
child: Text(libL10n.empty),
actions: Btnx.oks,
);
return;
}
context.pop();
final (suc, err) = await context.showLoadingDialog(
fn: () async {
final dir = '${_status.path!.path}/$text';
await _status.client!.mkdir(dir);
return true;
},
);
if (suc == null || err != null) return;
_listDir();
}
context.showRoundDialog(
title: l10n.createFolder,
title: libL10n.folder,
child: Input(
autoFocus: true,
icon: Icons.folder,
controller: textController,
label: l10n.name,
label: libL10n.name,
suggestion: true,
onSubmitted: (_) => onSubmitted(),
),
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.cancel),
),
TextButton(
onPressed: () async {
if (textController.text.isEmpty) {
context.showRoundDialog(
child: Text(l10n.fieldMustNotEmpty),
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.ok),
),
],
);
return;
}
context.pop();
try {
await context.showLoadingDialog(
fn: () async {
final dir = '${_status.path!.path}/${textController.text}';
await _status.client!.mkdir(dir);
},
onErr: (e, s) {},
);
_listDir();
} catch (e, s) {
context.showErrDialog(e: e, s: s, operation: l10n.createFolder);
}
},
child: Text(l10n.ok, style: UIs.textRed),
),
],
actions: Btn.ok(
onTap: onSubmitted,
red: true,
).toList,
);
}
void _newFile() {
context.pop();
final textController = TextEditingController();
void onSubmitted() async {
final text = textController.text.trim();
if (text.isEmpty) {
context.showRoundDialog(
title: libL10n.attention,
child: Text(libL10n.empty),
actions: Btnx.oks,
);
return;
}
context.pop();
final (suc, err) = await context.showLoadingDialog(
fn: () async {
final path = '${_status.path!.path}/$text';
await _client!.run('touch "$path"');
return true;
},
);
if (suc == null || err != null) return;
_listDir();
}
context.showRoundDialog(
title: l10n.createFile,
title: libL10n.file,
child: Input(
autoFocus: true,
icon: Icons.insert_drive_file,
controller: textController,
label: l10n.name,
label: libL10n.name,
suggestion: true,
onSubmitted: (_) => onSubmitted(),
),
actions: [
TextButton(
onPressed: () async {
if (textController.text.isEmpty) {
context.showRoundDialog(
title: l10n.attention,
child: Text(l10n.fieldMustNotEmpty),
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.ok),
),
],
);
return;
}
context.pop();
try {
await context.showLoadingDialog(
fn: () async {
final path = '${_status.path!.path}/${textController.text}';
await _client!.run('touch "$path"');
},
onErr: (e, s) {},
);
_listDir();
} catch (e, s) {
context.showErrDialog(e: e, s: s, operation: l10n.createFile);
}
},
child: Text(l10n.ok, style: UIs.textRed),
),
],
actions: Btn.ok(onTap: onSubmitted, red: true).toList,
);
}
void _rename(SftpName file) {
context.pop();
final textController = TextEditingController(text: file.filename);
void onSubmitted() async {
final text = textController.text.trim();
if (text.isEmpty) {
context.showRoundDialog(
title: libL10n.attention,
child: Text(libL10n.empty),
actions: Btnx.oks,
);
return;
}
context.pop();
final (suc, err) = await context.showLoadingDialog(
fn: () async {
final newName = textController.text;
await _status.client?.rename(file.filename, newName);
return true;
},
);
if (suc == null || err != null) return;
_listDir();
}
context.showRoundDialog(
title: l10n.rename,
title: libL10n.rename,
child: Input(
autoFocus: true,
icon: Icons.abc,
controller: textController,
label: l10n.name,
label: libL10n.name,
suggestion: true,
onSubmitted: (_) => onSubmitted(),
),
actions: [
TextButton(onPressed: () => context.pop(), child: Text(l10n.cancel)),
TextButton(onPressed: () => context.pop(), child: Text(libL10n.cancel)),
TextButton(
onPressed: () async {
if (textController.text.isEmpty) {
context.showRoundDialog(
title: l10n.attention,
child: Text(l10n.fieldMustNotEmpty),
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.ok),
),
],
);
return;
}
context.pop();
try {
await context.showLoadingDialog(
fn: () async {
final newName = textController.text;
await _status.client?.rename(file.filename, newName);
},
onErr: (e, s) {},
);
_listDir();
} catch (e, s) {
context.showErrDialog(e: e, s: s, operation: l10n.rename);
}
},
child: Text(l10n.rename, style: UIs.textRed),
onPressed: onSubmitted,
child: Text(libL10n.rename, style: UIs.textRed),
),
],
);
@@ -729,18 +729,21 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
final cmd = _getDecompressCmd(absPath);
if (cmd == null) {
context.showRoundDialog(
title: l10n.error,
title: libL10n.error,
child: Text('Unsupport file: ${name.filename}'),
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.ok),
),
],
actions: [Btn.ok()],
);
return;
}
await context.showLoadingDialog(fn: () async => _client?.run(cmd));
final confirm = await context.showRoundDialog(
title: libL10n.attention,
child: SimpleMarkdown(data: '```sh\n$cmd\n```'),
actions: Btnx.cancelRedOk,
);
if (confirm != true) return;
await AppRoutes.ssh(spi: widget.spi, initCmd: cmd).go(context);
_listDir();
}
@@ -755,66 +758,48 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
}
/// Only return true if the path is changed
Future<bool> _listDir() async {
return context.showLoadingDialog(
Future<bool?> _listDir() async {
final (ret, err) = await context.showLoadingDialog(
fn: () async {
_status.client ??= await _client?.sftp();
try {
final listPath = _status.path?.path ?? '/';
final fs = await _status.client?.listdir(listPath);
if (fs == null) {
return false;
}
fs.sort((a, b) => a.filename.compareTo(b.filename));
/// Issue #97
/// In order to compatible with the Synology NAS
/// which not has '.' and '..' in listdir
if (fs.isNotEmpty && fs.firstOrNull?.filename == '.') {
fs.removeAt(0);
}
/// Issue #96
/// Due to [WillPopScope] added in this page
/// There is no need to keep '..' folder in listdir
/// So remove it
if (fs.isNotEmpty && fs.firstOrNull?.filename == '..') {
fs.removeAt(0);
}
if (mounted) {
setState(() {
_status.files = fs;
});
// Only update history when success
if (Stores.setting.sftpOpenLastPath.fetch()) {
Stores.history.sftpLastPath.put(widget.spi.id, listPath);
}
return true;
}
return false;
} catch (e, trace) {
Loggers.app.warning('List dir failed', e, trace);
await _backward();
Future.delayed(
const Duration(milliseconds: 177),
() => context.showRoundDialog(
title: l10n.error,
child: Text(e.toString()),
actions: [
TextButton(
onPressed: () => context.pop(),
child: Text(l10n.ok),
)
],
),
);
final listPath = _status.path?.path ?? '/';
final fs = await _status.client?.listdir(listPath);
if (fs == null) {
return false;
}
fs.sort((a, b) => a.filename.compareTo(b.filename));
/// Issue #97
/// In order to compatible with the Synology NAS
/// which not has '.' and '..' in listdir
if (fs.isNotEmpty && fs.firstOrNull?.filename == '.') {
fs.removeAt(0);
}
/// Issue #96
/// Due to [WillPopScope] added in this page
/// There is no need to keep '..' folder in listdir
/// So remove it
if (fs.isNotEmpty && fs.firstOrNull?.filename == '..') {
fs.removeAt(0);
}
if (mounted) {
setState(() {
_status.files = fs;
});
// Only update history when success
if (Stores.setting.sftpOpenLastPath.fetch()) {
Stores.history.sftpLastPath.put(widget.spi.id, listPath);
}
return true;
}
return false;
},
barrierDismiss: true,
);
return ret ?? err == null;
}
Future<void> _backward() async {

View File

@@ -3,11 +3,10 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:server_box/core/extension/context/locale.dart';
import 'package:server_box/core/route.dart';
import 'package:server_box/data/model/sftp/worker.dart';
import 'package:server_box/data/provider/sftp.dart';
import 'package:server_box/data/res/provider.dart';
import '../../../data/model/sftp/req.dart';
import '../../../data/provider/sftp.dart';
class SftpMissionPage extends StatefulWidget {
const SftpMissionPage({super.key});
@@ -29,9 +28,7 @@ class _SftpMissionPageState extends State<SftpMissionPage> {
Widget _buildBody() {
return Consumer<SftpProvider>(builder: (__, pro, _) {
if (pro.status.isEmpty) {
return Center(
child: Text(l10n.noTask),
);
return Center(child: Text(libL10n.empty));
}
return ListView.builder(
padding: const EdgeInsets.all(11),
@@ -49,10 +46,10 @@ class _SftpMissionPageState extends State<SftpMissionPage> {
if (err != null) {
return _wrapInCard(
status: status,
subtitle: l10n.error,
subtitle: libL10n.error,
trailing: IconButton(
onPressed: () => context.showRoundDialog(
title: l10n.error,
title: libL10n.error,
child: Text(err.toString()),
),
icon: const Icon(Icons.error),
@@ -82,7 +79,7 @@ class _SftpMissionPageState extends State<SftpMissionPage> {
subtitle: l10n.unknown,
trailing: IconButton(
onPressed: () => context.showRoundDialog(
title: l10n.error,
title: libL10n.error,
child: Text((status.error ?? l10n.unknown).toString()),
),
icon: const Icon(Icons.error),
@@ -110,9 +107,9 @@ class _SftpMissionPageState extends State<SftpMissionPage> {
Widget _buildFinished(SftpReqStatus status) {
final time = status.spentTime.toString();
final str = '${l10n.finished} ${l10n.spentTime(
final str = l10n.spentTime(
time == 'null' ? l10n.unknown : (time.substring(0, time.length - 7)),
)}';
);
final btns = Row(
mainAxisSize: MainAxisSize.min,
@@ -162,19 +159,17 @@ class _SftpMissionPageState extends State<SftpMissionPage> {
Widget _buildDelete(String name, int id) {
return IconButton(
onPressed: () => context.showRoundDialog(
title: l10n.attention,
child: Text(l10n.askContinue(
'${l10n.delete} ${l10n.mission}($name)',
)),
actions: [
TextButton(
onPressed: () {
Pros.sftp.cancel(id);
context.pop();
},
child: Text(l10n.ok),
),
]),
title: libL10n.attention,
child: Text(libL10n.askContinue(
'${libL10n.delete} ${l10n.mission}($name)',
)),
actions: Btn.ok(
onTap: () {
Pros.sftp.cancel(id);
context.pop();
},
).toList,
),
icon: const Icon(Icons.delete),
);
}

View File

@@ -3,19 +3,14 @@ import 'dart:io';
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:server_box/core/extension/context/locale.dart';
import 'package:server_box/core/extension/ssh_client.dart';
import 'package:server_box/data/model/app/menu/base.dart';
import 'package:server_box/data/model/app/menu/server_func.dart';
import 'package:server_box/data/model/app/shell_func.dart';
import 'package:server_box/data/model/pkg/manager.dart';
import 'package:server_box/data/model/server/dist.dart';
import 'package:server_box/data/model/server/snippet.dart';
import 'package:server_box/data/res/provider.dart';
import 'package:server_box/data/res/store.dart';
import '../../core/route.dart';
import '../../core/utils/server.dart';
import '../../data/model/pkg/upgrade_info.dart';
import '../../data/model/server/server_private_info.dart';
class ServerFuncBtnsTopRight extends StatelessWidget {
@@ -65,7 +60,7 @@ class ServerFuncBtns extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: btns
.map(
(e) => Stores.setting.moveOutServerTabFuncBtns.fetch()
(e) => Stores.setting.moveServerFuncs.fetch()
? IconButton(
onPressed: () => _onTapMoreBtns(e, spi, context),
padding: EdgeInsets.zero,
@@ -98,9 +93,9 @@ void _onTapMoreBtns(
BuildContext context,
) async {
switch (value) {
case ServerFuncBtn.pkg:
_onPkg(context, spi);
break;
// case ServerFuncBtn.pkg:
// _onPkg(context, spi);
// break;
case ServerFuncBtn.sftp:
AppRoutes.sftp(spi: spi).checkGo(
context: context,
@@ -109,7 +104,7 @@ void _onTapMoreBtns(
break;
case ServerFuncBtn.snippet:
if (Pros.snippet.snippets.isEmpty) {
context.showSnackBar(l10n.noSavedSnippet);
context.showSnackBar(libL10n.empty);
return;
}
final snippets = await context.showPickWithTagDialog<Snippet>(
@@ -128,7 +123,7 @@ void _onTapMoreBtns(
if (snippet == null) return;
final fmted = snippet.fmtWithSpi(spi);
final sure = await context.showRoundDialog<bool>(
title: l10n.attention,
title: libL10n.attention,
child: SingleChildScrollView(
child: SimpleMarkdown(data: '```shell\n$fmted\n```'),
),
@@ -224,81 +219,3 @@ bool _checkClient(BuildContext context, String id) {
}
return true;
}
Future<void> _onPkg(BuildContext context, ServerPrivateInfo spi) async {
final server = spi.server;
final client = server?.client;
if (server == null || client == null) {
context.showSnackBar(l10n.noClient);
return;
}
final sys = server.status.more[StatusCmdType.sys];
if (sys == null) {
context.showSnackBar(l10n.noResult);
return;
}
final pkg = PkgManager.fromDist(sys.dist);
if (pkg == null) {
context.showSnackBar('Unsupported dist: $sys');
return;
}
// Update pkg list
await context.showLoadingDialog(
fn: () async {
final updateCmd = pkg.update;
if (updateCmd != null) {
await client.execWithPwd(
updateCmd,
context: context,
id: spi.id,
);
}
},
barrierDismiss: true,
);
final listCmd = pkg.listUpdate;
if (listCmd == null) {
context.showSnackBar('Unsupported dist: $sys');
return;
}
// Get upgrade list
final result = await context.showLoadingDialog(fn: () async {
return await client.run(listCmd).string;
});
final list = pkg.updateListRemoveUnused(result.split('\n'));
final upgradeable = list.map((e) => UpgradePkgInfo(e, pkg)).toList();
if (upgradeable.isEmpty) {
context.showSnackBar(l10n.noUpdateAvailable);
return;
}
final args = upgradeable.map((e) => e.package).join(' ');
final isSU = server.spi.user == 'root';
final upgradeCmd = isSU ? pkg.upgrade(args) : 'sudo ${pkg.upgrade(args)}';
// Confirm upgrade
final gotoUpgrade = await context.showRoundDialog<bool>(
title: l10n.attention,
child: SingleChildScrollView(
child: Text(
'${l10n.pkgUpgradeTip}\n${l10n.foundNUpdate(upgradeable.length)}\n\n$upgradeCmd'),
),
actions: [
CountDownBtn(
onTap: () => context.pop(true),
text: l10n.update,
afterColor: Colors.red,
),
],
);
if (gotoUpgrade != true) return;
AppRoutes.ssh(spi: spi, initCmd: upgradeCmd).checkGo(
context: context,
check: () => _checkClient(context, spi.id),
);
}

View File

@@ -471,7 +471,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1018;
CURRENT_PROJECT_VERSION = 1051;
DEVELOPMENT_TEAM = BA88US33G6;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Server Box";
@@ -481,7 +481,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.0.1018;
MARKETING_VERSION = 1.0.1051;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "Server Box";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -608,7 +608,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1018;
CURRENT_PROJECT_VERSION = 1051;
DEVELOPMENT_TEAM = BA88US33G6;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Server Box";
@@ -618,7 +618,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.0.1018;
MARKETING_VERSION = 1.0.1051;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "Server Box";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -638,7 +638,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1018;
CURRENT_PROJECT_VERSION = 1051;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=macosx*]" = BA88US33G6;
INFOPLIST_FILE = Runner/Info.plist;
@@ -649,7 +649,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.0.1018;
MARKETING_VERSION = 1.0.1051;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "Server Box";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@@ -368,8 +368,8 @@ packages:
dependency: "direct dev"
description:
path: "."
ref: "v1.0.34"
resolved-ref: "9d8afa6b0bc72223213ca30f67c3be2eb129f928"
ref: "v1.0.40"
resolved-ref: c4ed4c74151d96f2b52f9d6c1366b14a926a43c9
url: "https://github.com/lppcg/fl_build.git"
source: git
version: "1.0.0"
@@ -385,8 +385,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: "v1.0.72"
resolved-ref: "7b57c8e08ff199247bb174d499876627b10f86b5"
ref: "v1.0.118"
resolved-ref: "3c55c8b4b7b4cf503a8013087b5480be3669ff63"
url: "https://github.com/lppcg/fl_lib"
source: git
version: "0.0.1"
@@ -662,10 +662,10 @@ packages:
dependency: transitive
description:
name: js
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.7.1"
version: "0.6.7"
json_annotation:
dependency: transitive
description:
@@ -754,6 +754,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.10"
locale_names:
dependency: transitive
description:
name: locale_names
sha256: "7a89ca54072f4f13d0f5df5a9ba69337554bf2fd057d1dd2a238898f3f159374"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
logging:
dependency: transitive
description:
@@ -1047,18 +1055,18 @@ packages:
dependency: transitive
description:
name: share_plus
sha256: ef3489a969683c4f3d0239010cc8b7a2a46543a8d139e111c06c558875083544
sha256: "59dfd53f497340a0c3a81909b220cfdb9b8973a91055c4e5ab9b9b9ad7c513c0"
url: "https://pub.dev"
source: hosted
version: "9.0.0"
version: "10.0.0"
share_plus_platform_interface:
dependency: transitive
description:
name: share_plus_platform_interface
sha256: "0f9e4418835d1b2c3ae78fdb918251959106cefdbc4dd43526e182f80e82f6d4"
sha256: "6ababf341050edff57da8b6990f11f4e99eaba837865e2e6defe16d039619db5"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
version: "5.0.0"
shared_preferences:
dependency: "direct main"
description:

View File

@@ -1,7 +1,7 @@
name: server_box
description: server status & toolbox app.
publish_to: 'none'
version: 1.0.1018+1018
version: 1.0.1051+1051
environment:
sdk: ">=3.0.0"
@@ -21,7 +21,6 @@ dependencies:
code_text_field: ^1.1.0
shared_preferences: ^2.1.1
dynamic_color: ^1.6.6
#flutter_secure_storage: ^9.0.0
xml: ^6.4.2 # for parsing nvidia-smi
flutter_displaymode: ^0.6.0
flutter_background_service: ^5.0.5
@@ -62,15 +61,17 @@ dependencies:
fl_lib:
git:
url: https://github.com/lppcg/fl_lib
ref: v1.0.72
ref: v1.0.118
dependency_overrides:
# dartssh2:
# path: ../dartssh2
# fl_lib:
# path: ../fl_lib
# dartssh2:
# path: ../dartssh2
# xterm:
# path: ../xterm.dart
# fl_lib:
# path: ../fl_lib
# fl_build:
# path: ../fl_build
dev_dependencies:
flutter_native_splash: ^2.1.6
@@ -80,10 +81,9 @@ dev_dependencies:
flutter_test:
sdk: flutter
fl_build:
# path: ../fl_build
git:
url: https://github.com/lppcg/fl_build.git
ref: v1.0.34
ref: v1.0.40
flutter:
generate: true