Compare commits

...

59 Commits

Author SHA1 Message Date
lollipopkit🏳️‍⚧️
0a0928e2f6 fix: treat empty jumpChainIds as no jump 2026-01-17 23:55:41 +08:00
lollipopkit🏳️‍⚧️
61f161d8a6 opt. 2026-01-15 20:52:11 +08:00
lollipopkit🏳️‍⚧️
52c80795f4 opt. 2026-01-15 20:21:28 +08:00
lollipopkit🏳️‍⚧️
09f1ab2cf2 fix 2026-01-15 20:09:33 +08:00
lollipopkit🏳️‍⚧️
2eeb55c1d8 fix 2026-01-15 13:46:53 +08:00
lollipopkit🏳️‍⚧️
6738ac94f8 opt. 2026-01-15 13:15:31 +08:00
lollipopkit🏳️‍⚧️
827d40b8b5 opt. 2026-01-15 13:02:17 +08:00
lollipopkit🏳️‍⚧️
928f2becf1 fix 2026-01-15 12:41:10 +08:00
lollipopkit🏳️‍⚧️
7d30af44d6 fix 2026-01-15 10:10:21 +08:00
lollipopkit🏳️‍⚧️
35349a90eb opt.: deduplicate & merge 2026-01-15 10:10:14 +08:00
lollipopkit🏳️‍⚧️
8be9b9b10b impl: jump logic
Fixes #356
2026-01-15 09:42:34 +08:00
lollipopkit🏳️‍⚧️
c51cf62015 feat: jump server chain
Fixes #356
2026-01-14 22:36:47 +08:00
lollipopkit🏳️‍⚧️
8589b3b4d7 opt.: add a btn to minimize ai dialog (#1004)
* opt.: add a btn to minimize ai dialog
Fixes #1003

* opt.

* opt.
2026-01-14 15:15:33 +08:00
GT610
7693e30cbf opt: Better performance on server refreshing (#999)
* refactor(server): Replace Future.wait with an explicit list of futures to enhance readability

Refactor the nested map and async functions into explicit for loops and future lists to make the code logic clearer

* fix(server): Fixed the auto-refresh logic and concurrency control issues

- Add `_refreshCompleter` to prevent concurrent refreshes
- Fixed the issue where the status was not updated after the automatic refresh timer was canceled
- Remove the invalid check for `duration == 1`

* refactor(server): Optimize the server refresh logic by filtering out servers that do not need to be refreshed in advance

Move the server filtering logic outside the loop and use the `where` method to filter the servers that need to be refreshed, avoiding repeated condition checks within the loop. This improves code readability and reduces redundant condition checks.

* refactor: Optimize server refresh logic to enhance readability

Break down complex conditional checks into clearer steps, separating the logic for server refresh and rate limiter reset. Replace chained calls with explicit loops to make the code easier to maintain and understand.

* refactor(server): Remove `updateFuture` from `ServerState` and use the `_isRefreshing` flag instead

Simplify the server refresh logic, replace Future state tracking with a boolean flag, and avoid unnecessary state updates

* refactor(server_detail): Extract the setting items as local variables to improve performance

Extract the globally set items that are accessed repeatedly as local variables, reduce unnecessary state retrieval operations, and optimize page performance

* refactor: Rename `_displayCpuIndexSetting` to `_displayCpuIndex` for consistency

* refactor(server): Fix the issue of parallel blocking in server refresh

The original code uses Future.wait to wait for all refresh operations to complete, but in fact, there is no need to wait for the results of these operations. Instead, directly calling ignore() to ignore the results can avoid blocking caused by the slowest server

* fix: Adjust the order of logging and default value settings

Ensure to set the default value after recording the invalid duration warning

* refactor(server): Rename _refreshCompleter to _refreshInProgress to enhance readability

Change the variable name from `_refreshCompleter` to `_refreshInProgress`, so that it more accurately reflects the actual purpose of the variable, which is to indicate whether the refresh operation is in progress

* refactor(server): Remove unnecessary refresh progress status management

Simplify the server refresh logic, remove the unused _refreshInProgress state variable and related Completer handling, making the code more concise and straightforward

* chore: Update dependent package versions

Update the following dependent package versions:
- camera_web has been upgraded from 0.3.5 to 0.3.5+3
- ffi has been upgraded from 2.1.4 to 2.1.5
- hive_ce_flutter is upgraded from 2.3.3 to 2.3.4
- watcher is upgraded from 1.1.4 to 1.2.1

* opt.

---------

Co-authored-by: lollipopkit🏳️‍⚧️ <10864310+lollipopkit@users.noreply.github.com>
2026-01-14 13:47:06 +08:00
lollipopkit🏳️‍⚧️
874d28be12 bump: v1291 2026-01-14 13:32:30 +08:00
GT610
06070c29b9 fix(color-picking): Fix color picking failure and card overflow (#998) 2026-01-11 00:21:48 +08:00
GT610
bb0ada12e6 bump: Update Android build tools and Actions version (#997) 2026-01-10 20:03:37 +08:00
GT610
9ceeaf7cc4 feat(local file page): Display server names for server folders (#996)
* feat(local file page): Display server names for server folders

In the local file list, server folders will display their corresponding server names, enhancing the user experience.

* fix(storage page): Use ref.read instead of ref.watch to fetch the server list

Avoid unnecessary watch operations during construction, reducing potential performance overhead
2026-01-08 18:57:02 +08:00
GT610
29a57ad742 fix(container): Modify container execution commands to prioritize bash or ash (#995) 2026-01-08 09:11:23 +08:00
GT610
2c495a44c3 fix(log): Logging System Improvements and Error Handling Enhancements (#994)
* fix: Added logging to exception handling

Added detailed error logging to exception handling across multiple files, including exception information and stack traces, to facilitate troubleshooting.

* refactor(logging): Standardize logging output methods

Replace existing debugPrint and lprint with Loggers.app.warning to enhance logging consistency and maintainability.

* refactor: Remove redundant debug log prints

Clean up unnecessary log print statements in debug code

* feat(i18n): Added internationalization support for the logging feature
2026-01-07 15:09:22 +08:00
GT610
cc300c141a refactor(sftp): Replace hard-coded path separators with Pfs.seperator (#993)
Unify the use of Pfs.seperator for handling file path separators to enhance cross-platform compatibility.
2026-01-06 23:50:11 +08:00
GT610
26efb8e185 fix: Add input validation and bounds checking to parsing methods (#990)
* fix: Resolved boundary condition issues in string processing

Addressed null and length checks during string splitting across multiple model classes to prevent potential null pointer exceptions and array out-of-bounds errors

* fix: Throw exceptions instead of silently returning when package manager output formats are invalid

Modified the _pacman, _opkg, and _apk parsing methods to throw exceptions when input formats are invalid, rather than silently returning, to prevent potential error handling issues.
2026-01-06 23:47:49 +08:00
GT610
06ed38ff45 fix(container): Fix Podman 5.x Network Traffic Statistics Not Displaying (#991)
* fix(container): Added version parameter to accommodate Podman 5.x network statistics format

Modified the parseStats method to accept a version parameter, handling changes in Podman 5.x's network statistics data structure. When the version is 5.x, network traffic data is retrieved from the RxBytes/TxBytes fields of the Network interface.

* fix(container): Fixed Podman version detection logic to correctly retrieve network statistics

Addressed Podman version number parsing issues and improved version comparison logic to support all 4.x and below versions as well as 5.x and above versions

* fix(container): Resolved display formatting issues for network and disk I/O statistics

Handled default values when NetIO and BlockIO are null, and reformatted display strings to distinguish upstream/downstream traffic and read/write operations.

* fix: Why did I mess up the tag order?
2026-01-06 23:44:54 +08:00
GT610
7c35abe30e fix(cpu): Resolved boundary condition issues when calculating CPU utilization (#988)
Added checks for coreIdx out-of-bounds and totalDelta being zero to prevent array out-of-bounds and division-by-zero errors
2026-01-06 12:48:13 +08:00
lxdklp
78ef181d4a feat: support macOS menubar (#976)
* feat: macOS menubar

* feat: Dynamic NavigateMenuItems

* fix: simplify shortcut config

* fix: Simplify the code

* fix: More suitable tab name
2025-12-10 18:05:30 +08:00
lollipopkit🏳️‍⚧️
3f15caeaf2 new: add copy btn for ask ai (#975) 2025-12-07 17:51:07 +08:00
lollipopkit🏳️‍⚧️
6458e736fa fix: tag switcher ui (#974)
Fixes #964
2025-12-07 17:29:12 +08:00
lollipopkit🏳️‍⚧️
99fda8b747 opt. 2025-12-07 17:19:24 +08:00
lxdklp
c5cbb12ac3 feat: Automatic line wrapping of time (#973) 2025-12-07 17:14:45 +08:00
lollipopkit🏳️‍⚧️
038f0d4d77 chore: bump: v1276 2025-12-06 12:03:10 +08:00
lxdklp
141519d952 fix: SFTP err caused by known host key (#970)
Fixes #965
2025-11-25 10:35:14 +08:00
lxdklp
75d1a59e77 fix: Unable to obtain Windows server information (#963)
* fix: FormatException: Unexpected extension byte (at offset 8) error

* fix: PowerShell script error repair, Windows data parsing repair

* fix: Unable to obtain network card information

* fix: Unable to obtain system startup time

* fix conversation as resolved.
2025-11-22 19:17:40 +08:00
lollipopkit🏳️‍⚧️
ca4e65d7a5 chore: flutter 3.38 2025-11-13 15:24:22 +08:00
Korb
ffda27d057 add: fdroid Russian metadata translation (#947)
* Create ru/short_description.txt

* Create ru/full_description.txt
2025-10-23 02:24:04 +08:00
lollipopkit🏳️‍⚧️
c548b4ef48 fix: container parsing (#948) 2025-10-23 02:21:14 +08:00
lollipopkit🏳️‍⚧️
70040c5840 bump: v1270 2025-10-20 09:32:07 +08:00
lollipopkit🏳️‍⚧️
5272324be6 feat: prompt user on host key verification (#943) 2025-10-20 09:31:20 +08:00
lollipopkit🏳️‍⚧️
8cbb48ed67 feat: support windows clipboard shortcuts (#941)
Fixes #902
2025-10-20 00:56:33 +08:00
lollipopkit🏳️‍⚧️
03720fa322 Merge branch 'main' of github.com:lollipopkit/flutter_server_box 2025-10-20 00:35:07 +08:00
lollipopkit🏳️‍⚧️
0b51719070 fix: synthesize hardware backspace repeat (#940) 2025-10-20 00:34:52 +08:00
lollipopkit🏳️‍⚧️
a84231393d opt.: ask ai hint 2025-10-19 23:38:08 +08:00
lollipopkit🏳️‍⚧️
d6c2cafce7 opt.: ssh disconnection helper (#937) 2025-10-19 13:40:17 +08:00
lollipopkit🏳️‍⚧️
729b76177e feat: ask ai (#936)
* feat: ask ai in ssh terminal
Fixes #934

* new(ask_ai): settings

* fix: app hot reload

* new: l10n

* chore: deps.

* opt.
2025-10-18 01:15:43 +08:00
lollipopkit🏳️‍⚧️
860c11d4a8 bump: v1262 2025-10-10 09:18:38 +08:00
lollipopkit🏳️‍⚧️
bd949288ed fix: code editor tool bar (#933) 2025-10-10 09:14:41 +08:00
lollipopkit🏳️‍⚧️
bb3e3b4848 opt.: no Tag Switcher on desktop (#932) 2025-10-08 21:21:23 +08:00
lollipopkit🏳️‍⚧️
3307fca620 fix: cant sort servers order (#930) 2025-10-08 17:35:07 +08:00
lollipopkit🏳️‍⚧️
da8517bcf7 migrate: riverpod 3 2025-10-08 17:03:13 +08:00
lollipopkit🏳️‍⚧️
f68c4a851b feat: discover local ssh server (#921) 2025-09-19 23:29:01 +08:00
lollipopkit🏳️‍⚧️
17db393c12 bump: v1256 2025-09-15 02:35:42 +08:00
lollipopkit🏳️‍⚧️
275581cfa3 fix: notification permission (#914) 2025-09-14 22:34:01 +08:00
lollipopkit🏳️‍⚧️
d7168ea1ff fix: version code err caused by Flutter (#913) 2025-09-14 14:23:17 +08:00
lollipopkit🏳️‍⚧️
fd2bf08f78 bump: v1253 2025-09-09 13:32:17 +08:00
lollipopkit🏳️‍⚧️
98e13c39cf fix: android channel invoke 2025-09-09 13:30:37 +08:00
lollipopkit🏳️‍⚧️
e70abeef04 bump: v1251 2025-09-09 13:14:01 +08:00
lollipopkit🏳️‍⚧️
194774d6fb opt.: system detect logic to avoid creating useless file (#905) 2025-09-09 13:10:40 +08:00
lollipopkit🏳️‍⚧️
640d61bab9 fix: holding Backspace doesnt work on desktop (#903) 2025-09-08 14:06:35 +08:00
lollipopkit🏳️‍⚧️
7f4cf22cc9 fix: rm camera perm on mac 2025-09-08 12:37:30 +08:00
lollipopkit🏳️‍⚧️
05a927753f feat: stop all servers in noti center (#901) 2025-09-06 14:04:53 +08:00
158 changed files with 9842 additions and 4040 deletions

View File

@@ -16,26 +16,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 1
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Cache pub dependencies
uses: actions/cache@v4
with:
path: |
${{ env.PUB_CACHE }}
~/.pub-cache
${{ runner.tool_cache }}/flutter
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install dependencies
run: flutter pub get

View File

@@ -17,15 +17,15 @@ permissions:
jobs:
releaseAndroid:
name: Release android
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.35.3"
flutter-version: "3.38.0"
- uses: actions/setup-java@v4
with:
distribution: "zulu"
@@ -53,10 +53,10 @@ jobs:
releaseLinux:
name: Release linux
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install Flutter
uses: subosito/flutter-action@v2
- name: Install dependencies
@@ -82,7 +82,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install Flutter
uses: subosito/flutter-action@v2
- name: Build
@@ -100,7 +100,7 @@ jobs:
# runs-on: macos-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# uses: actions/checkout@v6
# - name: Install Flutter
# uses: subosito/flutter-action@v2
# - name: Build

143
LICENSE
View File

@@ -1,5 +1,5 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
@@ -7,17 +7,15 @@
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
@@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
@@ -72,7 +60,7 @@ modification follow.
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
@@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
@@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found.
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU Affero General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.

View File

@@ -5,7 +5,7 @@ English | [简体中文](README_zh.md)
<div align="center">
<a href="https://cdn.lpkt.cn/donate"><img alt="donate" src="https://img.shields.io/badge/donate-me-pink"></a>
<img alt="lang" src="https://img.shields.io/badge/lang-dart-cyan">
<img alt="license" src="https://img.shields.io/badge/license-GPLv3-yellow">
<img alt="license" src="https://img.shields.io/badge/license-AGPLv3-yellow">
<a href="https://deepwiki.com/lollipopkit/flutter_server_box"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
</div>
@@ -85,4 +85,4 @@ If I forgot to add your name to the contributors list, please add a comment in t
## 📝 License
`GPL v3 lollipopkit`
`AGPL v3 lollipopkit & all contributors`

View File

@@ -5,7 +5,7 @@
<div align="center">
<a href="https://cdn.lpkt.cn/donate"><img alt="donate" src="https://img.shields.io/badge/捐赠-我-pink"></a>
<img alt="语言" src="https://img.shields.io/badge/语言-dart-cyan">
<img alt="license" src="https://img.shields.io/badge/证书-GPLv3-yellow">
<img alt="license" src="https://img.shields.io/badge/证书-AGPLv3-yellow">
<a href="https://deepwiki.com/lollipopkit/flutter_server_box"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
</div>
@@ -86,4 +86,4 @@ Linux / Windows | [GitHub](https://github.com/lollipopkit/flutter_server_box/rel
## 📝 协议
`GPL v3 lollipopkit`
`AGPL v3 lollipopkit & 所有贡献者`

View File

@@ -113,7 +113,7 @@ android.applicationVariants.all { variant ->
variant.outputs.each { output ->
def abiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
if (abiVersionCode != null) {
output.versionCodeOverride = variant.versionCode * 10 + abiVersionCode
output.versionCodeOverride = variant.versionCode * 100 + abiVersionCode
}
}
}

View File

@@ -2,6 +2,8 @@ package tech.lolli.toolbox
import android.app.*
import android.content.Intent
import android.content.pm.ServiceInfo
import android.graphics.drawable.Icon
import android.os.Build
import android.os.IBinder
import android.util.Log
@@ -16,8 +18,7 @@ class ForegroundService : Service() {
var isRunning: Boolean = false
}
private val chanId = "ForegroundServiceChannel"
private val GROUP_KEY = "ssh_sessions_group"
private val SUMMARY_ID = 1000
private val NOTIFICATION_ID = 1000
private val ACTION_STOP_FOREGROUND = "ACTION_STOP_FOREGROUND"
private val ACTION_UPDATE_SESSIONS = "tech.lolli.toolbox.ACTION_UPDATE_SESSIONS"
private val ACTION_DISCONNECT_SESSION = "tech.lolli.toolbox.ACTION_DISCONNECT_SESSION"
@@ -49,19 +50,22 @@ class ForegroundService : Service() {
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
try {
// Check notification permission for Android 13+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
androidx.core.content.ContextCompat.checkSelfPermission(
this, android.Manifest.permission.POST_NOTIFICATIONS
) != android.content.pm.PackageManager.PERMISSION_GRANTED
) {
Log.w("ForegroundService", "Notification permission denied. Stopping service.")
stopForegroundService()
Log.w("ForegroundService", "Notification permission denied. Stopping service gracefully.")
// Don't call stopForegroundService() here as we haven't started foreground yet
stopSelf()
return START_NOT_STICKY
}
if (intent == null) {
Log.w("ForegroundService", "onStartCommand called with null intent")
stopForegroundService()
// Don't call stopForegroundService() here as we haven't started foreground yet
stopSelf()
return START_NOT_STICKY
}
@@ -70,6 +74,9 @@ class ForegroundService : Service() {
return when (action) {
ACTION_STOP_FOREGROUND -> {
// Notify Flutter to stop all connections before stopping service
val stopAllIntent = Intent("tech.lolli.toolbox.STOP_ALL_CONNECTIONS")
sendBroadcast(stopAllIntent)
clearAll()
stopForegroundService()
START_NOT_STICKY
@@ -81,7 +88,7 @@ class ForegroundService : Service() {
}
else -> {
// Default bring up foreground with placeholder
ensureForeground(createSummaryNotification(0, emptyList()))
ensureForeground(createMergedNotification(0, emptyList(), emptyList()))
START_STICKY
}
}
@@ -99,37 +106,67 @@ class ForegroundService : Service() {
private fun createNotificationChannel() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val manager = getSystemService(NotificationManager::class.java)
if (manager == null) {
Log.e("ForegroundService", "Failed to get NotificationManager")
return
try {
val manager = getSystemService(NotificationManager::class.java)
if (manager == null) {
Log.e("ForegroundService", "Failed to get NotificationManager")
return
}
val serviceChannel = NotificationChannel(
chanId,
"ForegroundServiceChannel",
NotificationManager.IMPORTANCE_DEFAULT
).apply {
description = "For foreground service"
}
manager.createNotificationChannel(serviceChannel)
Log.d("ForegroundService", "Notification channel created successfully")
} catch (e: Exception) {
logError("Failed to create notification channel", e)
}
val serviceChannel = NotificationChannel(
chanId,
"ForegroundServiceChannel",
NotificationManager.IMPORTANCE_DEFAULT
).apply {
description = "For foreground service"
}
manager.createNotificationChannel(serviceChannel)
}
}
private fun ensureForeground(notification: Notification) {
try {
// Double-check notification permission before starting foreground service
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
androidx.core.content.ContextCompat.checkSelfPermission(
this, android.Manifest.permission.POST_NOTIFICATIONS
) != android.content.pm.PackageManager.PERMISSION_GRANTED
) {
Log.w("ForegroundService", "Cannot start foreground service without notification permission")
stopSelf()
return
}
if (!isFgStarted) {
startForeground(SUMMARY_ID, notification)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
startForeground(NOTIFICATION_ID, notification, ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC)
} else {
startForeground(NOTIFICATION_ID, notification)
}
isFgStarted = true
Log.d("ForegroundService", "Foreground service started successfully")
} else {
val nm = getSystemService(NotificationManager::class.java)
nm?.notify(SUMMARY_ID, notification)
if (nm != null) {
nm.notify(NOTIFICATION_ID, notification)
} else {
Log.w("ForegroundService", "NotificationManager is null, cannot update notification")
}
}
} catch (e: SecurityException) {
logError("Security exception when starting foreground service (likely missing permission)", e)
stopSelf()
} catch (e: Exception) {
logError("Failed to start/update foreground", e)
// Don't stop the service for other exceptions, just log them
}
}
private fun createSummaryNotification(count: Int, lines: List<String>): Notification {
private fun createMergedNotification(count: Int, lines: List<String>, sessions: List<SessionItem>): Notification {
val notificationIntent = Intent(this, MainActivity::class.java)
val pendingIntent = PendingIntent.getActivity(
this, 0, notificationIntent, PendingIntent.FLAG_IMMUTABLE
@@ -140,24 +177,66 @@ class ForegroundService : Service() {
val builder = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Notification.Builder(this, chanId)
} else {
@Suppress("DEPRECATION")
Notification.Builder(this)
}
val inbox = Notification.InboxStyle()
lines.forEach { inbox.addLine(it) }
// Use the earliest session's start time for chronometer
val earliestStartTime = sessions.minOfOrNull { it.startWhen } ?: System.currentTimeMillis()
return builder
.setContentTitle("SSH sessions: $count active")
.setContentText(if (lines.isNotEmpty()) lines.first() else "Running")
val title = when (count) {
0 -> "Server Box"
1 -> sessions.first().title
else -> "SSH sessions: $count active"
}
val contentText = when (count) {
0 -> "Ready for connections"
1 -> {
val session = sessions.first()
"${session.subtitle} · ${session.status}"
}
else -> "Multiple SSH connections active"
}
// For multiple sessions, show details in expanded view
val style = if (count > 1) {
val inbox = Notification.InboxStyle()
val maxLines = 5
val displayLines = if (lines.size > maxLines) {
lines.take(maxLines) + "...and ${lines.size - maxLines} more"
} else {
lines
}
displayLines.forEach { inbox.addLine(it) }
inbox.setBigContentTitle(title)
inbox
} else {
null
}
val notification = builder
.setContentTitle(title)
.setContentText(contentText)
.setSmallIcon(R.mipmap.ic_launcher)
.setStyle(inbox)
.setWhen(earliestStartTime)
.setUsesChronometer(true)
.setOngoing(true)
.setOnlyAlertOnce(true)
.setGroup(GROUP_KEY)
.setGroupSummary(true)
.setContentIntent(pendingIntent)
.addAction(android.R.drawable.ic_delete, "Stop", stopPending)
.build()
.addAction(
Notification.Action.Builder(
Icon.createWithResource(this, android.R.drawable.ic_delete),
"Stop All",
stopPending
).build()
)
if (style != null) {
notification.setStyle(style)
}
return notification.build()
}
private fun handleUpdateSessions(payload: String) {
@@ -192,71 +271,21 @@ class ForegroundService : Service() {
return
}
// Build per-session notifications
val currentIds = mutableSetOf<Int>()
val summaryLines = mutableListOf<String>()
sessions.forEach { s ->
// Assign a stable, collision-resistant id per session for this service lifecycle
val nid = notificationIdMap.getOrPut(s.id) { nextNotificationId.getAndIncrement() }
currentIds.add(nid)
summaryLines.add("${s.title}: ${s.status}")
val disconnectIntent = Intent(this, MainActivity::class.java).apply {
action = ACTION_DISCONNECT_SESSION
putExtra("session_id", s.id)
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_SINGLE_TOP)
}
val disconnectPending = PendingIntent.getActivity(
this, nid, disconnectIntent, PendingIntent.FLAG_IMMUTABLE
)
val builder = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Notification.Builder(this, chanId)
} else {
Notification.Builder(this)
}
val noti = builder
.setContentTitle(s.title)
.setContentText("${s.subtitle} · ${s.status}")
.setSmallIcon(R.mipmap.ic_launcher)
.setWhen(s.startWhen)
.setUsesChronometer(true)
.setOngoing(true)
.setOnlyAlertOnce(true)
.setGroup(GROUP_KEY)
.addAction(android.R.drawable.ic_media_pause, "Disconnect", disconnectPending)
.build()
nm.notify(nid, noti)
}
// Cancel stale ones
val toCancel = postedIds - currentIds
// Cancel any existing individual notifications (we only show merged notification now)
val toCancel = postedIds.toSet()
toCancel.forEach { nm.cancel(it) }
// Clean up id mappings for canceled notifications to prevent growth
if (toCancel.isNotEmpty()) {
val keysToRemove = notificationIdMap.filterValues { it in toCancel }.keys
keysToRemove.forEach { notificationIdMap.remove(it) }
}
postedIds.clear()
postedIds.addAll(currentIds)
notificationIdMap.clear()
// Post/update summary and ensure foreground
val maxSummaryLines = 5
val truncated = summaryLines.size > maxSummaryLines
val displaySummaryLines = if (truncated) {
summaryLines.take(maxSummaryLines) + "...and ${summaryLines.size - maxSummaryLines} more"
} else {
summaryLines
}
val summary = createSummaryNotification(sessions.size, displaySummaryLines)
ensureForeground(summary)
// Create merged notification content
val summaryLines = sessions.map { "${it.title}: ${it.status}" }
val mergedNotification = createMergedNotification(sessions.size, summaryLines, sessions)
ensureForeground(mergedNotification)
}
private fun clearAll() {
val nm = getSystemService(NotificationManager::class.java)
nm?.cancel(SUMMARY_ID)
nm?.cancel(NOTIFICATION_ID)
postedIds.forEach { id -> nm?.cancel(id) }
postedIds.clear()
isFgStarted = false
@@ -272,7 +301,10 @@ class ForegroundService : Service() {
private fun stopForegroundService() {
try {
stopForeground(true)
if (isFgStarted) {
stopForeground(STOP_FOREGROUND_REMOVE)
isFgStarted = false
}
} catch (e: Exception) {
logError("Error stopping foreground", e)
}

View File

@@ -4,6 +4,9 @@ import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import android.Manifest
import android.content.BroadcastReceiver
import android.content.Context
import android.content.IntentFilter
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import io.flutter.embedding.android.FlutterFragmentActivity
@@ -16,6 +19,8 @@ class MainActivity: FlutterFragmentActivity() {
private lateinit var channel: MethodChannel
private val ACTION_UPDATE_SESSIONS = "tech.lolli.toolbox.ACTION_UPDATE_SESSIONS"
private val ACTION_DISCONNECT_SESSION = "tech.lolli.toolbox.ACTION_DISCONNECT_SESSION"
private val ACTION_STOP_ALL_CONNECTIONS = "tech.lolli.toolbox.STOP_ALL_CONNECTIONS"
private var stopAllReceiver: BroadcastReceiver? = null
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
@@ -92,24 +97,32 @@ class MainActivity: FlutterFragmentActivity() {
// Handle intent if launched via notification action
handleActionIntent(intent)
// Register broadcast receiver for stop all connections
setupStopAllReceiver()
}
private fun reqPerm() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) return
// Check if we already have the permission to avoid unnecessary prompts
if (ContextCompat.checkSelfPermission(this, Manifest.permission.POST_NOTIFICATIONS)
!= PackageManager.PERMISSION_GRANTED) {
try {
try {
// Check if we already have the permission to avoid unnecessary prompts
if (ContextCompat.checkSelfPermission(this, Manifest.permission.POST_NOTIFICATIONS)
!= PackageManager.PERMISSION_GRANTED) {
// Check if we should show rationale
if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.POST_NOTIFICATIONS)) {
android.util.Log.i("MainActivity", "User previously denied notification permission")
}
ActivityCompat.requestPermissions(
this,
arrayOf(Manifest.permission.POST_NOTIFICATIONS),
123,
)
} catch (e: Exception) {
// Log error but don't crash
android.util.Log.e("MainActivity", "Failed to request permissions: ${e.message}")
}
} catch (e: Exception) {
// Log error but don't crash
android.util.Log.e("MainActivity", "Failed to request permissions: ${e.message}")
}
}
@@ -141,4 +154,52 @@ class MainActivity: FlutterFragmentActivity() {
}
}
}
private fun setupStopAllReceiver() {
stopAllReceiver = object : BroadcastReceiver() {
override fun onReceive(context: Context?, intent: Intent?) {
if (intent?.action == ACTION_STOP_ALL_CONNECTIONS && ::channel.isInitialized) {
try {
channel.invokeMethod("stopAllConnections", null)
} catch (e: Exception) {
android.util.Log.e("MainActivity", "Failed to invoke stopAllConnections: ${e.message}")
}
}
}
}
val filter = IntentFilter(ACTION_STOP_ALL_CONNECTIONS)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
ContextCompat.registerReceiver(this, stopAllReceiver, filter, ContextCompat.RECEIVER_NOT_EXPORTED)
} else {
registerReceiver(stopAllReceiver, filter)
}
}
override fun onRequestPermissionsResult(
requestCode: Int,
permissions: Array<out String>,
grantResults: IntArray
) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
if (requestCode == 123) {
if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
android.util.Log.i("MainActivity", "Notification permission granted")
} else {
android.util.Log.w("MainActivity", "Notification permission denied")
// Optionally inform user about the limitation
}
}
}
override fun onDestroy() {
super.onDestroy()
stopAllReceiver?.let {
try {
unregisterReceiver(it)
} catch (e: Exception) {
android.util.Log.e("MainActivity", "Failed to unregister receiver: ${e.message}")
}
stopAllReceiver = null
}
}
}

View File

@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip

View File

@@ -19,7 +19,7 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.6.0' apply false
id "com.android.application" version '8.9.1' apply false
id "org.jetbrains.kotlin.android" version "2.1.21" apply false
}

View File

@@ -0,0 +1,7 @@
Проект на базе Flutter, предоставляющий диаграммы состояний серверов под Linux, Unix и Windows и инструменты для управления ими.
Особая благодарность dartssh2 и xterm.dart.
* Диаграмма состояния (ЦП, датчики, видеокарта…), SSH Term, SFTP, Docker, пакеты, процессы…
* Платформозависимые: биометрическая аутентификация, push-уведомления, виджет, приложение для watchOS…
* Многоязычная поддержка: English, 简体中文; Deutsch, 繁體中文, Indonesian, Français, Dutch; Español, Русский язык, Português, 日本語

View File

@@ -0,0 +1 @@
Приложение для мониторинга серверов и набор инструментов управления ими

Submodule flutter_server_box.wiki deleted from f440010313

View File

@@ -88,19 +88,19 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
app_links: 3dbc685f76b1693c66a6d9dd1e9ab6f73d97dc0a
camera_avfoundation: be3be85408cd4126f250386828e9b1dfa40ab436
camera_avfoundation: 5675ca25298b6f81fa0a325188e7df62cc217741
file_picker: fb04e739ae6239a76ce1f571863a196a922c87d4
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13
icloud_storage: e55639f0c0d7cb2b0ba9c0b3d5968ccca9cd9aa2
local_auth_darwin: d2e8c53ef0c4f43c646462e3415432c4dab3ae19
local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
plain_notification_token: 047876b9d80a5b93565ddcc13a487a7e7b906f7d
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
watch_connectivity: 88e5bea25b473e66ef8d3f960954d154ed0356d6

View File

@@ -748,7 +748,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 1246;
CURRENT_PROJECT_VERSION = 1291;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -758,7 +758,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1246;
MARKETING_VERSION = 1.0.1291;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -884,7 +884,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 1246;
CURRENT_PROJECT_VERSION = 1291;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -894,7 +894,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1246;
MARKETING_VERSION = 1.0.1291;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -912,7 +912,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 1246;
CURRENT_PROJECT_VERSION = 1291;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -922,7 +922,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1246;
MARKETING_VERSION = 1.0.1291;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -943,7 +943,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1246;
CURRENT_PROJECT_VERSION = 1291;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -956,7 +956,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.1246;
MARKETING_VERSION = 1.0.1291;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
@@ -982,7 +982,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1246;
CURRENT_PROJECT_VERSION = 1291;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -995,7 +995,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.1246;
MARKETING_VERSION = 1.0.1291;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1018,7 +1018,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1246;
CURRENT_PROJECT_VERSION = 1291;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -1031,7 +1031,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.1246;
MARKETING_VERSION = 1.0.1291;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1054,7 +1054,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1246;
CURRENT_PROJECT_VERSION = 1291;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
@@ -1066,7 +1066,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1246;
MARKETING_VERSION = 1.0.1291;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
@@ -1095,7 +1095,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1246;
CURRENT_PROJECT_VERSION = 1291;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
@@ -1107,7 +1107,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1246;
MARKETING_VERSION = 1.0.1291;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox;
@@ -1133,7 +1133,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1246;
CURRENT_PROJECT_VERSION = 1291;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
@@ -1145,7 +1145,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1246;
MARKETING_VERSION = 1.0.1291;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox;

View File

@@ -3,6 +3,7 @@ import 'package:fl_lib/fl_lib.dart';
import 'package:fl_lib/generated/l10n/lib_l10n.dart';
import 'package:flutter/material.dart';
import 'package:icons_plus/icons_plus.dart';
import 'package:server_box/core/app_navigator.dart';
import 'package:server_box/core/extension/context/locale.dart';
import 'package:server_box/data/res/build_data.dart';
import 'package:server_box/data/res/store.dart';
@@ -11,12 +12,20 @@ import 'package:server_box/view/page/home.dart';
part 'intro.dart';
class MyApp extends StatelessWidget {
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
late final Future<List<IntroPageBuilder>> _introFuture = _IntroPage.builders;
@override
Widget build(BuildContext context) {
_setup(context);
return ListenableBuilder(
listenable: RNodes.app,
builder: (context, _) {
@@ -31,6 +40,7 @@ class MyApp extends StatelessWidget {
Widget _build(BuildContext context) {
final colorSeed = Color(Stores.setting.colorSeed.fetch());
UIs.colorSeed = colorSeed;
UIs.primaryColor = colorSeed;
@@ -53,12 +63,31 @@ class MyApp extends StatelessWidget {
Widget _buildDynamicColor(BuildContext context) {
return DynamicColorBuilder(
builder: (light, dark) {
final lightTheme = ThemeData(useMaterial3: true, colorScheme: light);
final darkTheme = ThemeData(useMaterial3: true, brightness: Brightness.dark, colorScheme: dark);
final lightSeed = light?.primary;
final darkSeed = dark?.primary;
final lightTheme = ThemeData(
useMaterial3: true,
colorSchemeSeed: lightSeed,
appBarTheme: AppBarTheme(scrolledUnderElevation: 0.0),
);
final darkTheme = ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
colorSchemeSeed: darkSeed,
appBarTheme: AppBarTheme(scrolledUnderElevation: 0.0),
);
if (context.isDark && dark != null) {
UIs.primaryColor = dark.primary;
UIs.colorSeed = dark.primary;
} else if (!context.isDark && light != null) {
UIs.primaryColor = light.primary;
UIs.colorSeed = light.primary;
} else {
final fallbackColor = Color(Stores.setting.colorSeed.fetch());
UIs.primaryColor = fallbackColor;
UIs.colorSeed = fallbackColor;
}
return _buildApp(context, light: lightTheme, dark: darkTheme);
@@ -78,6 +107,7 @@ class MyApp extends StatelessWidget {
return MaterialApp(
key: ValueKey(locale),
navigatorKey: AppNavigator.key,
builder: ResponsivePoints.builder,
locale: locale,
localizationsDelegates: const [LibLocalizations.delegate, ...AppLocalizations.localizationsDelegates],
@@ -89,7 +119,7 @@ class MyApp extends StatelessWidget {
theme: light.fixWindowsFont,
darkTheme: (tMode < 3 ? dark : dark.toAmoled).fixWindowsFont,
home: FutureBuilder<List<IntroPageBuilder>>(
future: _IntroPage.builders,
future: _introFuture,
builder: (context, snapshot) {
context.setLibL10n();
final appL10n = AppLocalizations.of(context);

View File

@@ -0,0 +1,8 @@
import 'package:flutter/widgets.dart';
/// Global navigator access used for cross-cutting flows (e.g. dialogs).
abstract final class AppNavigator {
static final key = GlobalKey<NavigatorState>();
static BuildContext? get context => key.currentContext;
}

View File

@@ -35,8 +35,8 @@ abstract final class MethodChans {
try {
Loggers.app.info('Updating Android sessions: $payload');
await _channel.invokeMethod('updateSessions', payload);
} catch (_) {
// ignore
} catch (e, s) {
Loggers.app.warning('Failed to update Android sessions', e, s);
}
}
@@ -46,7 +46,8 @@ abstract final class MethodChans {
try {
final res = await _channel.invokeMethod('isServiceRunning');
return res == true;
} catch (_) {
} catch (e, s) {
Loggers.app.warning('Failed to check if Android service is running', e, s);
return false;
}
}
@@ -57,7 +58,9 @@ abstract final class MethodChans {
try {
Loggers.app.info('Starting iOS Live Activity: $payload');
await _channel.invokeMethod('startLiveActivity', payload);
} catch (_) {}
} catch (e, s) {
Loggers.app.warning('Failed to start iOS Live Activity', e, s);
}
}
static Future<void> updateLiveActivity(String payload) async {
@@ -65,7 +68,9 @@ abstract final class MethodChans {
try {
Loggers.app.info('Updating iOS Live Activity: $payload');
await _channel.invokeMethod('updateLiveActivity', payload);
} catch (_) {}
} catch (e, s) {
Loggers.app.warning('Failed to update iOS Live Activity', e, s);
}
}
static Future<void> stopLiveActivity() async {
@@ -73,12 +78,16 @@ abstract final class MethodChans {
try {
Loggers.app.info('Stopping iOS Live Activity');
await _channel.invokeMethod('stopLiveActivity');
} catch (_) {}
} catch (e, s) {
Loggers.app.warning('Failed to stop iOS Live Activity', e, s);
}
}
/// Register a handler for native -> Flutter callbacks.
/// Currently handles: `disconnectSession` with argument map {id: string}
static void registerHandler(Future<void> Function(String id) onDisconnect) {
/// Currently handles:
/// - `disconnectSession` with argument map {id: string}
/// - `stopAllConnections` with no arguments
static void registerHandler(Future<void> Function(String id) onDisconnect, [VoidCallback? onStopAll]) {
_channel.setMethodCallHandler((call) async {
switch (call.method) {
case 'disconnectSession':
@@ -88,6 +97,9 @@ abstract final class MethodChans {
await onDisconnect(id);
}
return;
case 'stopAllConnections':
onStopAll?.call();
return;
default:
return;
}

View File

@@ -4,6 +4,7 @@ import 'dart:typed_data';
import 'package:dartssh2/dartssh2.dart';
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/widgets.dart';
import 'package:server_box/data/helper/ssh_decoder.dart';
import 'package:server_box/data/model/server/system.dart';
import 'package:server_box/data/res/misc.dart';
@@ -170,4 +171,98 @@ extension SSHClientX on SSHClient {
);
return ret.$2;
}
/// Runs a command and decodes output safely with encoding fallback
///
/// [systemType] - The system type (affects encoding choice)
/// Runs a command and safely decodes the result
Future<String> runSafe(
String command, {
SystemType? systemType,
String? context,
}) async {
// Let SSH errors propagate with their original type (e.g., SSHError subclasses)
final result = await run(command);
// Only catch decoding failures and add context
try {
return SSHDecoder.decode(
result,
isWindows: systemType == SystemType.windows,
context: context,
);
} on FormatException catch (e) {
throw Exception(
'Failed to decode command output${context != null ? " [$context]" : ""}: $e',
);
}
}
/// Executes a command with stdin and safely decodes stdout/stderr
Future<(String stdout, String stderr)> execSafe(
void Function(SSHSession session) callback, {
required String entry,
SystemType? systemType,
String? context,
}) async {
final stdoutBuilder = BytesBuilder(copy: false);
final stderrBuilder = BytesBuilder(copy: false);
final stdoutDone = Completer<void>();
final stderrDone = Completer<void>();
final session = await execute(entry);
session.stdout.listen(
(e) {
stdoutBuilder.add(e);
},
onDone: stdoutDone.complete,
onError: stdoutDone.completeError,
);
session.stderr.listen(
(e) {
stderrBuilder.add(e);
},
onDone: stderrDone.complete,
onError: stderrDone.completeError,
);
callback(session);
await stdoutDone.future;
await stderrDone.future;
final stdoutBytes = stdoutBuilder.takeBytes();
final stderrBytes = stderrBuilder.takeBytes();
// Only catch decoding failures, let other errors propagate
String stdout;
try {
stdout = SSHDecoder.decode(
stdoutBytes,
isWindows: systemType == SystemType.windows,
context: context != null ? '$context (stdout)' : 'stdout',
);
} on FormatException catch (e) {
throw Exception(
'Failed to decode stdout${context != null ? " [$context]" : ""}: $e',
);
}
String stderr;
try {
stderr = SSHDecoder.decode(
stderrBytes,
isWindows: systemType == SystemType.windows,
context: context != null ? '$context (stderr)' : 'stderr',
);
} on FormatException catch (e) {
throw Exception(
'Failed to decode stderr${context != null ? " [$context]" : ""}: $e',
);
}
return (stdout, stderr);
}
}

View File

@@ -0,0 +1,411 @@
import 'dart:async';
import 'dart:collection';
import 'dart:convert';
import 'dart:io';
import 'package:fl_lib/fl_lib.dart';
import 'package:server_box/data/model/server/discovery_result.dart';
class SshDiscoveryService {
static const _sshPort = 22;
static Future<SshDiscoveryReport> discover([SshDiscoveryConfig config = const SshDiscoveryConfig()]) async {
final t0 = DateTime.now();
final candidates = <InternetAddress>{};
// 1) Get neighbors from ARP/NDP tables
candidates.addAll(await _neighborsIPv4());
candidates.addAll(await _neighborsIPv6());
// 2) Enumerate small subnets from local interfaces (IPv4 only)
final cidrs = await _localIPv4Cidrs();
for (final c in cidrs) {
if (c.prefix >= 24 && c.prefix <= 30) {
candidates.addAll(c.enumerateHosts(limit: config.hostEnumerationLimit));
}
}
// 3) Optional: mDNS/Bonjour SSH services
if (config.enableMdns) {
candidates.addAll(await _mdnsSshCandidates());
}
// Filter out unwanted addresses: loopback, link-local, 0.0.0.0, broadcast, multicast
candidates.removeWhere(
(a) => a.isLoopback || a.isLinkLocal || a.address == '0.0.0.0' || _isBroadcastOrMulticast(a),
);
// 4) Concurrent SSH port scanning
final scanner = _Scanner(
timeout: Duration(milliseconds: config.timeoutMs),
maxConcurrency: config.maxConcurrency,
);
final results = await scanner.scan(candidates.toList(growable: false));
results.sort((a, b) => a.addr.address.compareTo(b.addr.address));
final discoveryResults = results
.map((r) => SshDiscoveryResult(ip: r.addr.address, port: _sshPort, banner: r.banner?.trim()))
.toList();
return SshDiscoveryReport(
generatedAt: DateTime.now().toIso8601String(),
durationMs: DateTime.now().difference(t0).inMilliseconds,
count: discoveryResults.length,
items: discoveryResults,
);
}
static Future<String?> _run(String exe, List<String> args, {Duration? timeout}) async {
try {
final p = await Process.start(exe, args, runInShell: false);
final out = await p.stdout
.transform(utf8.decoder)
.join()
.timeout(
timeout ?? const Duration(seconds: 5),
onTimeout: () {
p.kill();
return '';
},
);
final code = await p.exitCode;
if (code == 0) return out;
// Some tools return non-zero but still have useful output
if (out.trim().isNotEmpty) return out;
return null;
} catch (e, s) {
Loggers.app.warning('Failed to run command: $exe ${args.join(' ')}', e, s);
return null;
}
}
static bool get _isLinux => Platform.isLinux;
static bool get _isMac => Platform.isMacOS;
static Future<Set<InternetAddress>> _neighborsIPv4() async {
final set = <InternetAddress>{};
if (_isLinux) {
final s = await _run('ip', ['neigh']);
if (s != null) {
for (final line in const LineSplitter().convert(s)) {
final tok = line.split(RegExp(r'\s+'));
if (tok.isNotEmpty) {
final ip = tok[0];
if (InternetAddress.tryParse(ip)?.type == InternetAddressType.IPv4) {
set.add(InternetAddress(ip));
}
}
}
}
} else if (_isMac) {
final s = await _run('/usr/sbin/arp', ['-an']);
if (s != null) {
int matchCount = 0;
for (final line in const LineSplitter().convert(s)) {
final m = RegExp(r'\((\d+\.\d+\.\d+\.\d+)\)').firstMatch(line);
if (m != null) {
set.add(InternetAddress(m.group(1)!));
matchCount++;
}
}
if (matchCount == 0) {
Loggers.app.warning(
'[ssh_discovery] Warning: No ARP entries parsed on macOS. Output may be unexpected or localized. Output sample: ${s.length > 100 ? '${s.substring(0, 100)}...' : s}',
);
}
}
}
return set;
}
static Future<Set<InternetAddress>> _neighborsIPv6() async {
final set = <InternetAddress>{};
if (_isLinux) {
final s = await _run('ip', ['-6', 'neigh']);
if (s != null) {
for (final line in const LineSplitter().convert(s)) {
final ip = line.split(RegExp(r'\s+')).firstOrNull;
if (ip != null && InternetAddress.tryParse(ip)?.type == InternetAddressType.IPv6) {
set.add(InternetAddress(ip));
}
}
}
} else if (_isMac) {
final s = await _run('/usr/sbin/ndp', ['-a']);
if (s != null) {
for (final line in const LineSplitter().convert(s)) {
final ip = line.trim().split(RegExp(r'\s+')).firstOrNull;
if (ip != null && InternetAddress.tryParse(ip)?.type == InternetAddressType.IPv6) {
set.add(InternetAddress(ip));
}
}
}
}
return set;
}
static Future<List<_Cidr>> _localIPv4Cidrs() async {
final res = <_Cidr>[];
if (_isLinux) {
final s = await _run('ip', ['-o', '-4', 'addr', 'show', 'scope', 'global']);
if (s != null) {
for (final line in const LineSplitter().convert(s)) {
final m = RegExp(r'inet\s+(\d+\.\d+\.\d+\.\d+)\/(\d+)').firstMatch(line);
if (m != null) {
final ip = InternetAddress(m.group(1)!);
final prefix = int.parse(m.group(2)!);
final mask = _prefixToMask(prefix);
final net = _networkAddress(ip, mask);
final brd = _broadcastAddress(ip, mask);
res.add(_Cidr(ip, prefix, mask, net, brd));
}
}
}
} else if (_isMac) {
final s = await _run('/sbin/ifconfig', []);
if (s != null) {
for (final raw in const LineSplitter().convert(s)) {
final line = raw.trimRight();
final ifMatch = RegExp(r'^([a-z0-9]+):').firstMatch(line);
if (ifMatch != null) {
continue;
}
if (line.contains('inet ') && !line.contains('127.0.0.1')) {
try {
final ipm = RegExp(
r'inet\s+(\d+\.\d+\.\d+\.\d+)\s+netmask\s+0x([0-9a-fA-F]+)(?:\s+broadcast\s+(\d+\.\d+\.\d+\.\d+))?',
).firstMatch(line);
if (ipm == null) {
Loggers.app.warning('[ssh_discovery] Warning: Unexpected ifconfig line format: $line');
continue;
}
final ip = InternetAddress(ipm.group(1)!);
final hexMask = int.parse(ipm.group(2)!, radix: 16);
final dotted =
'${(hexMask >> 24) & 0xff}.${(hexMask >> 16) & 0xff}.${(hexMask >> 8) & 0xff}.${hexMask & 0xff}';
final mask = InternetAddress(dotted);
final prefix = _maskToPrefix(mask.address);
final net = _networkAddress(ip, mask);
final brd = InternetAddress(ipm.group(3) ?? _broadcastAddress(ip, mask).address);
res.add(_Cidr(ip, prefix, mask, net, brd));
} catch (e) {
Loggers.app.warning('[ssh_discovery] Error parsing ifconfig output: $e, line: $line');
continue;
}
}
}
}
}
return res;
}
static bool _isBroadcastOrMulticast(InternetAddress a) {
// IPv4 broadcast: ends with .255 or is 255.255.255.255
if (a.type == InternetAddressType.IPv4) {
if (a.address == '255.255.255.255') return true;
if (a.address.split('.').last == '255') return true;
// Multicast: 224.0.0.0 - 239.255.255.255
final firstOctet = int.tryParse(a.address.split('.').first) ?? 0;
if (firstOctet >= 224 && firstOctet <= 239) return true;
} else if (a.type == InternetAddressType.IPv6) {
// IPv6 multicast: starts with ff
if (a.address.toLowerCase().startsWith('ff')) return true;
}
return false;
}
static Future<Set<InternetAddress>> _mdnsSshCandidates() async {
final set = <InternetAddress>{};
if (_isMac) {
try {
final proc = await Process.start('/usr/bin/dns-sd', ['-B', '_ssh._tcp']);
final lines = <String>[];
final subscription = proc.stdout
.transform(utf8.decoder)
.transform(const LineSplitter())
.listen(lines.add);
await Future<void>.delayed(const Duration(seconds: 2));
proc.kill();
await subscription.cancel();
for (final l in lines) {
final m = RegExp(r'Add\s+\d+\s+(\S+)\.\s+_ssh\._tcp\.').firstMatch(l);
if (m != null) {
final name = m.group(1)!;
final det = await _run('/usr/bin/dns-sd', [
'-L',
name,
'_ssh._tcp',
'local.',
], timeout: const Duration(seconds: 3));
if (det != null) {
for (final ip in RegExp(
r'Address\s*=\s*([0-9a-fA-F:\.]+)',
).allMatches(det).map((e) => e.group(1)!)) {
final parsed = InternetAddress.tryParse(ip);
if (parsed != null) set.add(parsed);
}
}
}
}
} catch (e, s) {
Loggers.app.warning('Failed to discover mDNS SSH candidates on macOS', e, s);
}
} else if (_isLinux) {
final s = await _run('/usr/bin/avahi-browse', ['-rat', '_ssh._tcp']);
if (s != null) {
for (final ip in RegExp(
r'address = \[(.*?)\]',
).allMatches(s).map((m) => m.group(1)!).where((e) => e.isNotEmpty)) {
final parsed = InternetAddress.tryParse(ip);
if (parsed != null) set.add(parsed);
}
}
}
return set;
}
}
class _Cidr {
final InternetAddress ip;
final int prefix;
final InternetAddress netmask;
final InternetAddress network;
final InternetAddress broadcast;
_Cidr(this.ip, this.prefix, this.netmask, this.network, this.broadcast);
Iterable<InternetAddress> enumerateHosts({int? limit}) sync* {
final n = _ipv4ToInt(network.address);
final b = _ipv4ToInt(broadcast.address);
int emitted = 0;
for (int v = n + 1; v <= b - 1; v++) {
if (limit != null && emitted >= limit) break;
emitted++;
yield InternetAddress(_intToIPv4(v));
}
}
@override
String toString() => '${network.address}/$prefix';
}
class _ScanResult {
final InternetAddress addr;
final String? banner;
_ScanResult(this.addr, this.banner);
}
class _Scanner {
final Duration timeout;
final int maxConcurrency;
_Scanner({required this.timeout, required this.maxConcurrency});
Future<List<_ScanResult>> scan(List<InternetAddress> addrs) async {
final sem = _Semaphore(maxConcurrency);
final futures = <Future<_ScanResult?>>[];
for (final a in addrs) {
futures.add(_guarded(sem, () => _probeSsh(a)));
}
final out = await Future.wait(futures);
return out.whereType<_ScanResult>().toList();
}
Future<_ScanResult?> _probeSsh(InternetAddress ip) async {
Socket? socket;
StreamSubscription? sub;
try {
socket = await Socket.connect(ip, SshDiscoveryService._sshPort, timeout: timeout);
socket.timeout(timeout);
final c = Completer<String?>();
sub = socket.listen(
(data) {
final s = utf8.decode(data, allowMalformed: true);
final line = s.split('\n').firstWhere((_) => true, orElse: () => s);
if (!c.isCompleted) {
c.complete(line.trim());
sub?.cancel();
}
},
onDone: () {
if (!c.isCompleted) c.complete(null);
},
onError: (_) {
if (!c.isCompleted) c.complete(null);
},
);
final banner = await c.future.timeout(timeout, onTimeout: () => null);
return _ScanResult(ip, banner);
} catch (e, s) {
Loggers.app.warning('Failed to probe SSH at ${ip.address}', e, s);
return null;
} finally {
sub?.cancel();
socket?.destroy();
}
}
}
class _Semaphore {
int _permits;
final Queue<Completer<void>> _q = Queue();
_Semaphore(this._permits);
Future<T> withPermit<T>(Future<T> Function() fn) async {
if (_permits > 0) {
_permits--;
try {
return await fn();
} finally {
_permits++;
if (_q.isNotEmpty) _q.removeFirst().complete();
}
} else {
final c = Completer<void>();
_q.add(c);
await c.future;
return withPermit(fn);
}
}
}
Future<T> _guarded<T>(_Semaphore sem, Future<T> Function() fn) => sem.withPermit(fn);
// IPv4 utilities
int _ipv4ToInt(String ip) {
final p = ip.split('.').map(int.parse).toList();
return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
}
String _intToIPv4(int v) => '${(v >> 24) & 0xff}.${(v >> 16) & 0xff}.${(v >> 8) & 0xff}.${v & 0xff}';
InternetAddress _prefixToMask(int prefix) {
final mask = prefix == 0 ? 0 : 0xffffffff << (32 - prefix);
return InternetAddress(_intToIPv4(mask & 0xffffffff));
}
int _maskToPrefix(String mask) {
final v = _ipv4ToInt(mask);
int c = 0;
for (int i = 31; i >= 0; i--) {
if ((v & (1 << i)) != 0) {
c++;
} else {
break;
}
}
return c;
}
InternetAddress _networkAddress(InternetAddress ip, InternetAddress mask) {
final v = _ipv4ToInt(ip.address) & _ipv4ToInt(mask.address);
return InternetAddress(_intToIPv4(v));
}
InternetAddress _broadcastAddress(InternetAddress ip, InternetAddress mask) {
final n = _ipv4ToInt(ip.address) & _ipv4ToInt(mask.address);
final b = n | (~_ipv4ToInt(mask.address) & 0xffffffff);
return InternetAddress(_intToIPv4(b));
}

View File

@@ -26,7 +26,8 @@ final class BakSyncer extends SyncIface {
return MergeableUtils.fromJsonString(content, pwd).$1;
}
return MergeableUtils.fromJsonString(content).$1;
} catch (_) {
} catch (e, s) {
Loggers.app.warning('Failed to parse backup file with password, trying without password', e, s);
// Fallback: try without password if detection failed
return MergeableUtils.fromJsonString(content).$1;
}

View File

@@ -0,0 +1,26 @@
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:server_box/core/utils/server.dart';
import 'package:server_box/core/utils/ssh_auth.dart';
import 'package:server_box/data/model/server/server_private_info.dart';
import 'package:server_box/data/res/store.dart';
Future<bool> ensureHostKeyAcceptedForSftp(BuildContext context, Spi spi) async {
final known = Stores.setting.sshKnownHostFingerprints.get();
final hostId = spi.id.isNotEmpty ? spi.id : spi.oldId;
final prefix = '$hostId::';
if (known.keys.any((key) => key.startsWith(prefix))) {
return true;
}
final (result, error) = await context.showLoadingDialog<bool>(
fn: () async {
await ensureKnownHostKey(
spi,
onKeyboardInteractive: (_) => KeybordInteractive.defaultHandle(spi, ctx: context),
);
return true;
},
);
return error == null && result == true;
}

View File

@@ -1,8 +1,12 @@
import 'dart:async';
import 'dart:convert';
import 'package:dartssh2/dartssh2.dart';
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:server_box/core/app_navigator.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/server/server_private_info.dart';
import 'package:server_box/data/res/store.dart';
@@ -29,11 +33,82 @@ enum GenSSHClientStatus { socket, key, pwd }
String getPrivateKey(String id) {
final pki = Stores.key.fetchOne(id);
if (pki == null) {
throw SSHErr(type: SSHErrType.noPrivateKey, message: 'key [$id] not found');
throw SSHErr(type: SSHErrType.noPrivateKey, message: l10n.privateKeyNotFoundFmt(id));
}
return pki.key;
}
List<Spi> resolveMergedJumpChain(
Spi target, {
List<Spi>? jumpChain,
}) {
final injectedSpiMap = <String, Spi>{};
if (jumpChain != null) {
for (final s in jumpChain) {
injectedSpiMap[s.id] = s;
if (s.oldId.isNotEmpty) {
injectedSpiMap[s.oldId] = s;
}
}
}
Spi resolveSpi(String id) {
final injected = injectedSpiMap[id];
if (injected != null) return injected;
if (jumpChain != null) {
throw SSHErr(type: SSHErrType.connect, message: 'Jump server not found in provided chain: $id');
}
final fromStore = Stores.server.box.get(id);
if (fromStore == null) {
throw SSHErr(type: SSHErrType.connect, message: 'Jump server not found: $id');
}
return fromStore;
}
return _resolveMergedJumpChainInternal(target, resolveSpi: resolveSpi);
}
List<Spi> _resolveMergedJumpChainInternal(
Spi target, {
required Spi Function(String id) resolveSpi,
}) {
final roots = target.jumpChainIds ?? (target.jumpId == null ? const <String>[] : [target.jumpId!]);
if (roots.isEmpty) return const <Spi>[];
final seen = <String>{};
final stack = <String>{};
final out = <Spi>[];
String normId(Spi spi) => spi.id.isNotEmpty ? spi.id : spi.oldId;
void dfs(String id) {
final hop = resolveSpi(id);
final norm = normId(hop);
if (stack.contains(norm)) {
throw SSHErr(type: SSHErrType.connect, message: 'Jump loop detected at $norm');
}
if (seen.contains(norm)) return;
stack.add(norm);
final deps = hop.jumpChainIds ?? (hop.jumpId == null ? const <String>[] : [hop.jumpId!]);
for (final dep in deps) {
dfs(dep);
}
stack.remove(norm);
if (seen.add(norm)) {
out.add(hop);
}
}
for (final r in roots) {
dfs(r);
}
return out;
}
Future<SSHClient> genClient(
Spi spi, {
void Function(GenSSHClientStatus)? onStatus,
@@ -41,46 +116,187 @@ Future<SSHClient> genClient(
/// Only pass this param if using multi-threading and key login
String? privateKey,
/// Only pass this param if using multi-threading and key login
String? jumpPrivateKey,
Duration timeout = const Duration(seconds: 5),
/// [Spi] of the jump server
/// Pre-resolved jump chain (in `spi.jumpId` order: immediate -> farthest).
///
/// Must pass this param if using multi-threading and key login
Spi? jumpSpi,
/// This is mainly used when `Stores` is unavailable (e.g. in an isolate).
List<Spi>? jumpChain,
/// Private keys for [jumpChain], aligned by index.
///
/// If a jump server uses key auth (`keyId != null`), you must provide the
/// decrypted key pem here (or `genClient` will try to read from `Stores`).
List<String?>? jumpPrivateKeys,
Duration timeout = const Duration(seconds: 5),
/// Handle keyboard-interactive authentication
SSHUserInfoRequestHandler? onKeyboardInteractive,
Map<String, String>? knownHostFingerprints,
void Function(String storageKey, String fingerprintHex)? onHostKeyAccepted,
Future<bool> Function(HostKeyPromptInfo info)? onHostKeyPrompt,
}) async {
return _genClientInternal(
spi,
onStatus: onStatus,
privateKey: privateKey,
jumpChain: jumpChain,
jumpPrivateKeys: jumpPrivateKeys,
timeout: timeout,
onKeyboardInteractive: onKeyboardInteractive,
knownHostFingerprints: knownHostFingerprints,
onHostKeyAccepted: onHostKeyAccepted,
onHostKeyPrompt: onHostKeyPrompt,
visited: <String>{},
);
}
Future<SSHClient> _genClientInternal(
Spi spi, {
void Function(GenSSHClientStatus)? onStatus,
String? privateKey,
List<Spi>? jumpChain,
List<String?>? jumpPrivateKeys,
Duration timeout = const Duration(seconds: 5),
SSHUserInfoRequestHandler? onKeyboardInteractive,
Map<String, String>? knownHostFingerprints,
void Function(String storageKey, String fingerprintHex)? onHostKeyAccepted,
Future<bool> Function(HostKeyPromptInfo info)? onHostKeyPrompt,
required Set<String> visited,
SSHSocket? socketOverride,
bool followJumpConfig = true,
}) async {
final identifier = _hostIdentifier(spi);
if (!visited.add(identifier)) {
throw SSHErr(type: SSHErrType.connect, message: 'Jump loop detected at ${spi.name} ($identifier)');
}
onStatus?.call(GenSSHClientStatus.socket);
final hostKeyCache = Map<String, String>.from(knownHostFingerprints ?? _loadKnownHostFingerprints());
final hostKeyPersist = onHostKeyAccepted ?? _persistHostKeyFingerprint;
final hostKeyPrompt = onHostKeyPrompt ?? _defaultHostKeyPrompt;
String? alterUser;
final socket = await () async {
// Proxy
final jumpSpi_ = () {
// Multi-thread or key login
if (jumpSpi != null) return jumpSpi;
// Main thread
if (spi.jumpId != null) return Stores.server.box.get(spi.jumpId);
}();
if (jumpSpi_ != null) {
final jumpClient = await genClient(jumpSpi_, privateKey: jumpPrivateKey, timeout: timeout);
final (socket, hopClients) = await () async {
if (socketOverride != null) return (socketOverride, <SSHClient>[]);
return await jumpClient.forwardLocal(spi.ip, spi.port);
if (followJumpConfig) {
final injectedSpiMap = <String, Spi>{};
final injectedKeyMap = <String, String?>{};
if (jumpChain != null) {
for (var i = 0; i < jumpChain.length; i++) {
final s = jumpChain[i];
injectedSpiMap[s.id] = s;
if (s.oldId.isNotEmpty) injectedSpiMap[s.oldId] = s;
if (jumpPrivateKeys != null && i < jumpPrivateKeys.length) {
injectedKeyMap[s.id] = jumpPrivateKeys[i];
if (s.oldId.isNotEmpty) injectedKeyMap[s.oldId] = jumpPrivateKeys[i];
}
}
}
Spi resolveSpi(String id) {
final injected = injectedSpiMap[id];
if (injected != null) return injected;
if (jumpChain != null) {
throw SSHErr(type: SSHErrType.connect, message: 'Jump server not found in provided chain: $id');
}
final fromStore = Stores.server.box.get(id);
if (fromStore == null) {
throw SSHErr(type: SSHErrType.connect, message: 'Jump server not found: $id');
}
return fromStore;
}
String? resolveHopPrivateKey(Spi hop) {
final keyId = hop.keyId;
if (keyId == null) return null;
final injected = injectedKeyMap[hop.id] ?? injectedKeyMap[hop.oldId];
return injected ?? getPrivateKey(keyId);
}
final hops = _resolveMergedJumpChainInternal(spi, resolveSpi: resolveSpi);
if (hops.isNotEmpty) {
// Build multi-hop forward chain with dedup/merge.
final createdClients = <SSHClient>[];
SSHClient? currentClient;
try {
final firstHop = hops.first;
final firstKey = resolveHopPrivateKey(firstHop);
if (firstHop.keyId != null && firstKey == null) {
throw SSHErr(type: SSHErrType.noPrivateKey, message: l10n.privateKeyNotFoundFmt(firstHop.keyId ?? ''));
}
currentClient = await _genClientInternal(
firstHop,
privateKey: firstKey,
jumpChain: jumpChain,
jumpPrivateKeys: jumpPrivateKeys,
timeout: timeout,
onKeyboardInteractive: onKeyboardInteractive,
knownHostFingerprints: hostKeyCache,
onHostKeyAccepted: hostKeyPersist,
onHostKeyPrompt: hostKeyPrompt,
visited: visited,
followJumpConfig: false,
);
createdClients.add(currentClient);
for (var i = 1; i < hops.length; i++) {
final hop = hops[i];
final forwarded = await currentClient!.forwardLocal(hop.ip, hop.port);
final hopKey = resolveHopPrivateKey(hop);
if (hop.keyId != null && hopKey == null) {
throw SSHErr(type: SSHErrType.noPrivateKey, message: l10n.privateKeyNotFoundFmt(hop.keyId ?? ''));
}
currentClient = await _genClientInternal(
hop,
privateKey: hopKey,
jumpChain: jumpChain,
jumpPrivateKeys: jumpPrivateKeys,
timeout: timeout,
onKeyboardInteractive: onKeyboardInteractive,
knownHostFingerprints: hostKeyCache,
onHostKeyAccepted: hostKeyPersist,
onHostKeyPrompt: hostKeyPrompt,
visited: visited,
socketOverride: forwarded,
followJumpConfig: false,
);
createdClients.add(currentClient);
}
final forwardedSocket = await currentClient!.forwardLocal(spi.ip, spi.port);
return (forwardedSocket, createdClients);
} catch (e) {
// Close all created clients on error to avoid leaks
for (final client in createdClients) {
try {
client.close();
} catch (_) {
// Ignore close errors during cleanup
}
}
rethrow;
}
// Note: On success, all intermediate clients must remain open
// because the returned socket tunnels through them.
}
}
// Direct
try {
return await SSHSocket.connect(spi.ip, spi.port, timeout: timeout);
return (await SSHSocket.connect(spi.ip, spi.port, timeout: timeout), <SSHClient>[]);
} catch (e) {
Loggers.app.warning('genClient', e);
if (spi.alterUrl == null) rethrow;
try {
final res = spi.parseAlterUrl();
alterUser = res.$2;
return await SSHSocket.connect(res.$1, res.$3, timeout: timeout);
return (await SSHSocket.connect(res.$1, res.$3, timeout: timeout), <SSHClient>[]);
} catch (e) {
Loggers.app.warning('genClient alterUrl', e);
rethrow;
@@ -88,28 +304,307 @@ Future<SSHClient> genClient(
}
}();
final keyId = spi.keyId;
if (keyId == null) {
onStatus?.call(GenSSHClientStatus.pwd);
final hostKeyVerifier = _HostKeyVerifier(
spi: spi,
cache: hostKeyCache,
persistCallback: hostKeyPersist,
prompt: hostKeyPrompt,
);
Future<SSHClient> buildClient(SSHSocket socket) async {
final keyId = spi.keyId;
if (keyId == null) {
onStatus?.call(GenSSHClientStatus.pwd);
return SSHClient(
socket,
username: alterUser ?? spi.user,
onPasswordRequest: () => spi.pwd,
onUserInfoRequest: onKeyboardInteractive,
onVerifyHostKey: hostKeyVerifier.call,
// printDebug: debugPrint,
// printTrace: debugPrint,
);
}
privateKey ??= getPrivateKey(keyId);
onStatus?.call(GenSSHClientStatus.key);
return SSHClient(
socket,
username: alterUser ?? spi.user,
onPasswordRequest: () => spi.pwd,
username: spi.user,
// Must use [compute] here, instead of [Computer.shared.start]
identities: await compute(loadIndentity, privateKey!),
onUserInfoRequest: onKeyboardInteractive,
onVerifyHostKey: hostKeyVerifier.call,
// printDebug: debugPrint,
// printTrace: debugPrint,
);
}
privateKey ??= getPrivateKey(keyId);
onStatus?.call(GenSSHClientStatus.key);
return SSHClient(
socket,
username: spi.user,
// Must use [compute] here, instead of [Computer.shared.start]
identities: await compute(loadIndentity, privateKey),
onUserInfoRequest: onKeyboardInteractive,
// printDebug: debugPrint,
// printTrace: debugPrint,
final client = await buildClient(socket);
// Tie hop clients' lifetime to the final client: close all hop clients
// when the target client disconnects to avoid leaking SSH connections.
if (hopClients.isNotEmpty) {
client.done.whenComplete(() {
for (final hopClient in hopClients) {
try {
hopClient.close();
} catch (_) {
// Ignore close errors during cleanup
}
}
});
}
return client;
}
typedef _HostKeyPersistCallback = void Function(String storageKey, String fingerprintHex);
class HostKeyPromptInfo {
HostKeyPromptInfo({
required this.spi,
required this.keyType,
required this.fingerprintHex,
required this.fingerprintBase64,
required this.isMismatch,
this.previousFingerprintHex,
});
final Spi spi;
final String keyType;
final String fingerprintHex;
final String fingerprintBase64;
final bool isMismatch;
final String? previousFingerprintHex;
}
class _HostKeyVerifier {
_HostKeyVerifier({
required this.spi,
required Map<String, String> cache,
required this.prompt,
this.persistCallback,
}) : _cache = cache;
final Spi spi;
final Map<String, String> _cache;
final _HostKeyPersistCallback? persistCallback;
final Future<bool> Function(HostKeyPromptInfo info) prompt;
Future<bool> call(String keyType, Uint8List fingerprintBytes) async {
final storageKey = _hostKeyStorageKey(spi, keyType);
final fingerprintHex = _fingerprintToHex(fingerprintBytes);
final fingerprintBase64 = _fingerprintToBase64(fingerprintBytes);
final existing = _cache[storageKey];
if (existing == null) {
final accepted = await prompt(
HostKeyPromptInfo(
spi: spi,
keyType: keyType,
fingerprintHex: fingerprintHex,
fingerprintBase64: fingerprintBase64,
isMismatch: false,
),
);
if (!accepted) {
Loggers.app.warning('User rejected new SSH host key for ${spi.name} ($keyType).');
return false;
}
_cache[storageKey] = fingerprintHex;
persistCallback?.call(storageKey, fingerprintHex);
Loggers.app.info('Trusted SSH host key for ${spi.name} ($keyType).');
return true;
}
if (existing == fingerprintHex) {
return true;
}
final accepted = await prompt(
HostKeyPromptInfo(
spi: spi,
keyType: keyType,
fingerprintHex: fingerprintHex,
fingerprintBase64: fingerprintBase64,
isMismatch: true,
previousFingerprintHex: existing,
),
);
if (!accepted) {
Loggers.app.warning(
'SSH host key mismatch for ${spi.name}',
'expected $existing but received $fingerprintHex ($keyType)',
);
return false;
}
_cache[storageKey] = fingerprintHex;
persistCallback?.call(storageKey, fingerprintHex);
Loggers.app.warning('Updated stored SSH host key for ${spi.name} ($keyType) after user confirmation.');
return true;
}
}
Map<String, String> _loadKnownHostFingerprints() {
try {
final prop = Stores.setting.sshKnownHostFingerprints;
return Map<String, String>.from(prop.get());
} catch (e, stack) {
Loggers.app.warning('Load SSH host key fingerprints failed', e, stack);
return <String, String>{};
}
}
void _persistHostKeyFingerprint(String storageKey, String fingerprintHex) {
try {
final prop = Stores.setting.sshKnownHostFingerprints;
final updated = Map<String, String>.from(prop.get());
if (updated[storageKey] == fingerprintHex) {
return;
}
updated[storageKey] = fingerprintHex;
prop.put(updated);
Loggers.app.info('Stored SSH host key fingerprint for $storageKey');
} catch (e, stack) {
Loggers.app.warning('Persist SSH host key fingerprint failed', e, stack);
}
}
Future<bool> _defaultHostKeyPrompt(HostKeyPromptInfo info) async {
final ctx = AppNavigator.context;
if (ctx == null) {
Loggers.app.warning('Host key prompt skipped: navigator context unavailable.');
return false;
}
final hostLine = '${info.spi.user}@${info.spi.ip}:${info.spi.port}';
final description = info.isMismatch
? l10n.sshHostKeyChangedDesc(info.spi.name)
: l10n.sshHostKeyNewDesc(info.spi.name);
final result = await ctx.showRoundDialog<bool>(
title: libL10n.attention,
barrierDismiss: false,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(description),
const SizedBox(height: 12),
SelectableText('${l10n.server}: ${info.spi.name}'),
SelectableText('${libL10n.addr}: $hostLine'),
SelectableText('${l10n.sshHostKeyType}: ${info.keyType}'),
SelectableText(l10n.sshHostKeyFingerprintMd5Hex(info.fingerprintHex)),
SelectableText(l10n.sshHostKeyFingerprintMd5Base64(info.fingerprintBase64)),
if (info.previousFingerprintHex != null) ...[
const SizedBox(height: 12),
SelectableText(l10n.sshHostKeyStoredFingerprint(info.previousFingerprintHex!)),
],
],
),
actions: [
TextButton(onPressed: () => ctx.pop(false), child: Text(libL10n.cancel)),
TextButton(onPressed: () => ctx.pop(true), child: Text(libL10n.ok)),
],
);
return result ?? false;
}
Future<void> ensureKnownHostKey(
Spi spi, {
Duration timeout = const Duration(seconds: 5),
SSHUserInfoRequestHandler? onKeyboardInteractive,
}) async {
var cache = _loadKnownHostFingerprints();
final hops = resolveMergedJumpChain(spi);
// Check each hop's host key, routing through preceding hops
for (var i = 0; i < hops.length; i++) {
final hop = hops[i];
// Preceding hops needed to reach this hop
final precedingHops = i > 0 ? hops.sublist(0, i) : null;
final precedingKeys = precedingHops?.map((h) =>
h.keyId != null ? getPrivateKey(h.keyId!) : null
).toList();
cache = await _ensureKnownHostKeyForSingle(
hop,
cache: cache,
timeout: timeout,
onKeyboardInteractive: onKeyboardInteractive,
jumpChain: precedingHops,
jumpPrivateKeys: precedingKeys,
);
}
// Check the target's host key, routing through all hops
final allKeys = hops.isNotEmpty
? hops.map((h) => h.keyId != null ? getPrivateKey(h.keyId!) : null).toList()
: null;
await _ensureKnownHostKeyForSingle(
spi,
cache: cache,
timeout: timeout,
onKeyboardInteractive: onKeyboardInteractive,
jumpChain: hops.isNotEmpty ? hops : null,
jumpPrivateKeys: allKeys,
);
}
Future<Map<String, String>> _ensureKnownHostKeyForSingle(
Spi spi, {
required Map<String, String> cache,
Duration timeout = const Duration(seconds: 5),
SSHUserInfoRequestHandler? onKeyboardInteractive,
List<Spi>? jumpChain,
List<String?>? jumpPrivateKeys,
}) async {
if (_hasKnownHostFingerprintForSpi(spi, cache)) {
return cache;
}
final client = await genClient(
spi,
timeout: timeout,
onKeyboardInteractive: onKeyboardInteractive,
knownHostFingerprints: cache,
jumpChain: jumpChain,
jumpPrivateKeys: jumpPrivateKeys,
);
try {
await client.authenticated;
} finally {
client.close();
}
cache.addAll(_loadKnownHostFingerprints());
return cache;
}
bool _hasKnownHostFingerprintForSpi(Spi spi, Map<String, String> cache) {
final prefix = '${_hostIdentifier(spi)}::';
return cache.keys.any((key) => key.startsWith(prefix));
}
String _hostKeyStorageKey(Spi spi, String keyType) {
final base = _hostIdentifier(spi);
return '$base::$keyType';
}
String _hostIdentifier(Spi spi) => spi.id.isNotEmpty ? spi.id : spi.oldId;
String _fingerprintToHex(Uint8List fingerprint) {
final buffer = StringBuffer();
for (var i = 0; i < fingerprint.length; i++) {
if (i > 0) buffer.write(':');
buffer.write(fingerprint[i].toRadixString(16).padLeft(2, '0'));
}
return buffer.toString();
}
String _fingerprintToBase64(Uint8List fingerprint) => base64.encode(fingerprint);

View File

@@ -149,10 +149,12 @@ abstract final class SSHConfig {
/// Extract jump host from ProxyJump or ProxyCommand
static String? _extractJumpHost(String value) {
if (value.isEmpty) return null;
// For ProxyJump, the format is usually: user@host:port
// For ProxyCommand, it's more complex and might need custom parsing
if (value.contains('@')) {
return value.split(' ').first;
final parts = value.split(' ');
return parts.isNotEmpty ? parts[0] : null;
}
return null;
}

View File

@@ -0,0 +1,66 @@
import 'dart:convert';
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter_gbk2utf8/flutter_gbk2utf8.dart';
/// Utility class for decoding SSH command output with encoding fallback
class SSHDecoder {
/// Decodes bytes to string with multiple encoding fallback strategies
///
/// Tries in order:
/// 1. UTF-8 (with allowMalformed for lenient parsing)
/// - Windows PowerShell scripts now set UTF-8 output encoding by default
/// 2. GBK (for Windows Chinese systems)
/// - In some cases, Windows will still revert to GBK.
/// - Only attempted if UTF-8 produces replacement characters (<28>)
static String decode(
List<int> bytes, {
bool isWindows = false,
String? context,
}) {
if (bytes.isEmpty) return '';
// Try UTF-8 first with allowMalformed
try {
final result = utf8.decode(bytes, allowMalformed: true);
// Check if there are replacement characters indicating decode failure
// For non-Windows systems, always use UTF-8 result
if (!result.contains('<EFBFBD>') || !isWindows) {
return result;
}
// For Windows with replacement chars, log and try GBK fallback
if (isWindows && result.contains('<EFBFBD>')) {
final contextInfo = context != null ? ' [$context]' : '';
Loggers.app.info('UTF-8 decode has replacement chars$contextInfo, trying GBK fallback');
}
} catch (e) {
final contextInfo = context != null ? ' [$context]' : '';
Loggers.app.warning('UTF-8 decode failed$contextInfo: $e');
}
// For Windows or when UTF-8 has replacement chars, try GBK
try {
return gbk.decode(bytes);
} catch (e) {
final contextInfo = context != null ? ' [$context]' : '';
Loggers.app.warning('GBK decode failed$contextInfo: $e');
// Return empty string if all decoding attempts fail
return '';
}
}
/// Encodes string to bytes for SSH command input
///
/// Uses GBK for Windows, UTF-8 for others
static List<int> encode(String text, {bool isWindows = false}) {
if (isWindows) {
try {
return gbk.encode(text);
} catch (e) {
Loggers.app.warning('GBK encode failed: $e, falling back to UTF-8');
return utf8.encode(text);
}
}
return utf8.encode(text);
}
}

View File

@@ -1,5 +1,6 @@
import 'package:dartssh2/dartssh2.dart';
import 'package:fl_lib/fl_lib.dart';
import 'package:server_box/core/extension/ssh_client.dart';
import 'package:server_box/data/model/server/server_private_info.dart';
import 'package:server_box/data/model/server/system.dart';
@@ -9,8 +10,8 @@ class SystemDetector {
///
/// First checks if a custom system type is configured in [spi].
/// If not, attempts to detect the system by running commands:
/// 1. 'ver' command to detect Windows
/// 2. 'uname -a' command to detect Linux/BSD/Darwin
/// 1. 'uname -a' command to detect Linux/BSD/Darwin
/// 2. 'ver' command to detect Windows (if uname fails)
///
/// Returns [SystemType.linux] as default if detection fails.
static Future<SystemType> detect(SSHClient client, Spi spi) async {
@@ -22,17 +23,11 @@ class SystemDetector {
}
try {
// Try to detect Windows systems first (more reliable detection)
final powershellResult = await client.run('ver 2>nul').string;
if (powershellResult.isNotEmpty &&
(powershellResult.contains('Windows') || powershellResult.contains('NT'))) {
detectedSystemType = SystemType.windows;
dprint('Detected Windows system type for ${spi.oldId}');
return detectedSystemType;
}
// Try to detect Unix/Linux/BSD systems
final unixResult = await client.run('uname -a').string;
// Try to detect Unix/Linux/BSD systems first (more reliable and doesn't create files)
final unixResult = await client.runSafe(
'uname -a 2>/dev/null',
context: 'uname detection for ${spi.oldId}',
);
if (unixResult.contains('Linux')) {
detectedSystemType = SystemType.linux;
dprint('Detected Linux system type for ${spi.oldId}');
@@ -42,8 +37,21 @@ class SystemDetector {
dprint('Detected BSD system type for ${spi.oldId}');
return detectedSystemType;
}
} catch (e) {
Loggers.app.warning('System detection failed for ${spi.oldId}: $e');
// If uname fails, try to detect Windows systems
final powershellResult = await client.runSafe(
'ver 2>nul',
systemType: SystemType.windows,
context: 'ver detection for ${spi.oldId}',
);
if (powershellResult.isNotEmpty &&
(powershellResult.contains('Windows') || powershellResult.contains('NT'))) {
detectedSystemType = SystemType.windows;
dprint('Detected Windows system type for ${spi.oldId}');
return detectedSystemType;
}
} catch (e, stackTrace) {
Loggers.app.warning('System detection failed for ${spi.oldId}: $e\n$stackTrace');
}
// Default fallback

View File

@@ -0,0 +1,74 @@
import 'package:meta/meta.dart';
/// Chat message exchanged with the Ask AI service.
enum AskAiMessageRole { user, assistant }
@immutable
class AskAiMessage {
const AskAiMessage({
required this.role,
required this.content,
});
final AskAiMessageRole role;
final String content;
String get apiRole {
switch (role) {
case AskAiMessageRole.user:
return 'user';
case AskAiMessageRole.assistant:
return 'assistant';
}
}
}
/// Recommended command returned by the AI tool call.
@immutable
class AskAiCommand {
const AskAiCommand({
required this.command,
this.description = '',
this.toolName,
});
final String command;
final String description;
final String? toolName;
}
@immutable
sealed class AskAiEvent {
const AskAiEvent();
}
/// Incremental text delta emitted while streaming the AI response.
class AskAiContentDelta extends AskAiEvent {
const AskAiContentDelta(this.delta);
final String delta;
}
/// Emits when a tool call returns a runnable command suggestion.
class AskAiToolSuggestion extends AskAiEvent {
const AskAiToolSuggestion(this.command);
final AskAiCommand command;
}
/// Signals that the stream finished successfully.
class AskAiCompleted extends AskAiEvent {
const AskAiCompleted({
required this.fullText,
required this.commands,
});
final String fullText;
final List<AskAiCommand> commands;
}
/// Signals that the stream terminated with an error before completion.
class AskAiStreamError extends AskAiEvent {
const AskAiStreamError(this.error, this.stackTrace);
final Object error;
final StackTrace? stackTrace;
}

View File

@@ -55,9 +55,9 @@ abstract class BackupV2 with _$BackupV2 implements Mergeable {
await Mergeable.mergeStore(backupData: history, store: Stores.history, force: force);
await Mergeable.mergeStore(backupData: settings, store: Stores.setting, force: force);
if (serverChanged) GlobalRef.gRef?.read(serversNotifierProvider.notifier).reload();
if (snippetChanged) GlobalRef.gRef?.read(snippetNotifierProvider.notifier).reload();
if (keyChanged) GlobalRef.gRef?.read(privateKeyNotifierProvider.notifier).reload();
if (serverChanged) GlobalRef.gRef?.read(serversProvider.notifier).reload();
if (snippetChanged) GlobalRef.gRef?.read(snippetProvider.notifier).reload();
if (keyChanged) GlobalRef.gRef?.read(privateKeyProvider.notifier).reload();
_loggerV2.info('Merge completed');
}

View File

@@ -74,8 +74,8 @@ class BackupService {
await _confirmAndRestore(context, backup);
return;
}
} catch (e) {
// Saved password failed, will prompt for manual input
} catch (e, s) {
Loggers.app.warning('Failed to restore with saved password, will prompt for manual input', e, s);
}
}

View File

@@ -0,0 +1,119 @@
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:server_box/core/extension/context/locale.dart';
import 'package:server_box/data/model/app/tab.dart';
import 'package:server_box/data/res/store.dart';
import 'package:server_box/data/res/url.dart';
import 'package:server_box/generated/l10n/l10n.dart';
import 'package:server_box/view/page/setting/entry.dart';
import 'package:url_launcher/url_launcher.dart';
/// macOS Menu Bar
class MacOSMenuBarManager {
static List<PlatformMenu> buildMenuBar(BuildContext context, Function(int) onTabChanged) {
final l10n = context.l10n;
final homeTabs = Stores.setting.homeTabs.fetch();
return [
PlatformMenu(
label: 'Server Box',
menus: [
PlatformMenuItem(
label: libL10n.about,
onSelected: () => _showAboutDialog(context),
),
PlatformMenuItem(
label: l10n.menuSettings,
shortcut: const SingleActivator(LogicalKeyboardKey.comma, meta: true),
onSelected: () => _openSettings(context),
),
PlatformMenuItem(
label: l10n.menuQuit,
shortcut: const SingleActivator(LogicalKeyboardKey.keyQ, meta: true),
onSelected: () => SystemNavigator.pop(),
),
],
),
PlatformMenu(
label: l10n.menuNavigate,
menus: _buildNavigateMenuItems(l10n, homeTabs, onTabChanged),
),
PlatformMenu(
label: l10n.menuInfo,
menus: [
PlatformMenuItem(
label: l10n.menuGitHubRepository,
onSelected: () => _openURL(Urls.thisRepo),
),
PlatformMenuItem(
label: l10n.menuWiki,
onSelected: () => _openURL(Urls.appWiki),
),
PlatformMenuItem(
label: l10n.menuHelp,
onSelected: () => _openURL(Urls.appHelp),
),
],
),
];
}
static List<PlatformMenuItem> _buildNavigateMenuItems(
AppLocalizations l10n,
List<AppTab> homeTabs,
Function(int) onTabChanged,
) {
final menuItems = <PlatformMenuItem>[];
final tabLabels = {
AppTab.server: l10n.server,
AppTab.ssh: 'SSH',
AppTab.file: libL10n.file,
AppTab.snippet: l10n.snippet,
};
for (var i = 0; i < homeTabs.length; i++) {
final tab = homeTabs[i];
final label = tabLabels[tab];
if (label == null) continue;
final shortcutKey = _getShortcutKeyForIndex(i);
menuItems.add(PlatformMenuItem(
label: label,
shortcut: shortcutKey != null
? SingleActivator(shortcutKey, meta: true)
: null,
onSelected: () => onTabChanged(i),
));
}
return menuItems;
}
static LogicalKeyboardKey? _getShortcutKeyForIndex(int index) {
const keys = [
LogicalKeyboardKey.digit1,
LogicalKeyboardKey.digit2,
LogicalKeyboardKey.digit3,
LogicalKeyboardKey.digit4,
LogicalKeyboardKey.digit5,
LogicalKeyboardKey.digit6,
LogicalKeyboardKey.digit7,
LogicalKeyboardKey.digit8,
LogicalKeyboardKey.digit9,
];
return index < keys.length ? keys[index] : null;
}
static Future<void> _showAboutDialog(BuildContext context) async {
const channel = MethodChannel('about');
await channel.invokeMethod('showAboutPanel');
}
static void _openSettings(BuildContext context) {
SettingsPage.route.go(context);
}
static Future<void> _openURL(String url) async {
final uri = Uri.parse(url);
if (await canLaunchUrl(uri)) {
await launchUrl(uri);
}
}
}

View File

@@ -166,25 +166,34 @@ enum WindowsStatusCmdType implements ShellCmdType {
echo('echo ${SystemType.windowsSign}'),
time('[DateTimeOffset]::UtcNow.ToUnixTimeSeconds()'),
/// Get network interface statistics using Windows Performance Counters
/// Get network interface statistics using WMI
///
/// Uses Get-Counter to collect network I/O metrics from all network interfaces:
/// - Collects bytes received and sent per second for all network interfaces
/// Uses WMI Win32_PerfRawData_Tcpip_NetworkInterface for cross-language compatibility:
/// - Takes 2 samples with 1 second interval to calculate rates
/// - Outputs results in JSON format for easy parsing
/// - Counter paths use double backslashes to escape PowerShell string literals
net(
r'Get-Counter -Counter '
r'"\\NetworkInterface(*)\\Bytes Received/sec", '
r'"\\NetworkInterface(*)\\Bytes Sent/sec" '
r'-SampleInterval 1 -MaxSamples 2 | ConvertTo-Json',
r'$s1 = @(Get-WmiObject Win32_PerfRawData_Tcpip_NetworkInterface | '
r'Select-Object Name, BytesReceivedPersec, BytesSentPersec, Timestamp_Sys100NS); '
r'Start-Sleep -Seconds 1; '
r'$s2 = @(Get-WmiObject Win32_PerfRawData_Tcpip_NetworkInterface | '
r'Select-Object Name, BytesReceivedPersec, BytesSentPersec, Timestamp_Sys100NS); '
r'@($s1, $s2) | ConvertTo-Json -Depth 5',
),
sys('(Get-ComputerInfo).OsName'),
cpu(
'Get-WmiObject -Class Win32_Processor | '
'Select-Object Name, LoadPercentage | ConvertTo-Json',
'Select-Object Name, LoadPercentage, NumberOfCores, NumberOfLogicalProcessors | ConvertTo-Json',
),
/// Get system uptime by calculating time since last boot
///
/// Calculates uptime directly in PowerShell to avoid date format parsing issues:
/// - Gets LastBootUpTime from Win32_OperatingSystem
/// - Calculates difference from current time
/// - Returns pre-formatted string: "X days, H:MM" or "H:MM" (if less than 1 day)
/// - Uses ToString('00') for zero-padding to avoid quote escaping issues
uptime(
r"""$up = (Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime; if ($up.Days -gt 0) { "$($up.Days) days, $($up.Hours):$($up.Minutes.ToString('00'))" } else { "$($up.Hours):$($up.Minutes.ToString('00'))" }""",
),
uptime('(Get-CimInstance -ClassName Win32_OperatingSystem).LastBootUpTime'),
conn('(netstat -an | findstr ESTABLISHED | Measure-Object -Line).Count'),
disk(
'Get-WmiObject -Class Win32_LogicalDisk | '
@@ -213,19 +222,19 @@ enum WindowsStatusCmdType implements ShellCmdType {
),
host(r'Write-Output $env:COMPUTERNAME'),
/// Get disk I/O statistics using Windows Performance Counters
/// Get disk I/O statistics using WMI
///
/// Uses Get-Counter to collect disk I/O metrics from all physical disks:
/// Uses WMI Win32_PerfRawData_PerfDisk_PhysicalDisk:
/// - Monitors read and write bytes per second for all physical disks
/// - Takes 2 samples with 1 second interval to calculate I/O rates
/// - Physical disk counters provide hardware-level I/O statistics
/// - Outputs results in JSON format for parsing
/// - Counter names use wildcard (*) to capture all disk instances
/// - Takes 2 samples with 1 second interval to calculate rates
/// - DiskReadBytesPersec and DiskWriteBytesPersec are cumulative counters
diskio(
r'Get-Counter -Counter '
r'"\\PhysicalDisk(*)\\Disk Read Bytes/sec", '
r'"\\PhysicalDisk(*)\\Disk Write Bytes/sec" '
r'-SampleInterval 1 -MaxSamples 2 | ConvertTo-Json',
r'$s1 = @(Get-WmiObject Win32_PerfRawData_PerfDisk_PhysicalDisk | '
r'Select-Object Name, DiskReadBytesPersec, DiskWriteBytesPersec, Timestamp_Sys100NS); '
r'Start-Sleep -Seconds 1; '
r'$s2 = @(Get-WmiObject Win32_PerfRawData_PerfDisk_PhysicalDisk | '
r'Select-Object Name, DiskReadBytesPersec, DiskWriteBytesPersec, Timestamp_Sys100NS); '
r'@($s1, $s2) | ConvertTo-Json -Depth 5',
),
battery(
'Get-WmiObject -Class Win32_Battery | '
@@ -287,7 +296,7 @@ enum WindowsStatusCmdType implements ShellCmdType {
String get separator => ScriptConstants.getCmdSeparator(name);
@override
String get divider => ScriptConstants.getCmdDivider(name);
String get divider => ScriptConstants.getWindowsCmdDivider(name);
@override
CmdTypeSys get sysType => CmdTypeSys.windows;

View File

@@ -29,6 +29,9 @@ class ScriptConstants {
/// Generate command-specific divider
static String getCmdDivider(String cmdName) => '\necho ${getCmdSeparator(cmdName)}\n\t';
/// Generate command-specific divider for Windows PowerShell
static String getWindowsCmdDivider(String cmdName) => '\n Write-Host "${getCmdSeparator(cmdName)}"\n ';
/// Parse script output into command-specific map
static Map<String, String> parseScriptOutput(String raw) {
final result = <String, String>{};
@@ -102,6 +105,7 @@ exec 2>/dev/null
# DO NOT delete this file while app is running
\$ErrorActionPreference = "SilentlyContinue"
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
''';
}

View File

@@ -37,12 +37,12 @@ final class PodmanImg implements ContainerImg {
String toRawJson() => json.encode(toJson());
factory PodmanImg.fromJson(Map<String, dynamic> json) => PodmanImg(
repository: json['repository'],
tag: json['tag'],
id: json['Id'],
created: json['Created'],
size: json['Size'],
containers: json['Containers'],
repository: _asString(json['repository']),
tag: _asString(json['tag']),
id: _asString(json['Id']),
created: _asInt(json['Created']),
size: _asInt(json['Size']),
containers: _asInt(json['Containers']),
);
Map<String, dynamic> toJson() => {
@@ -119,3 +119,16 @@ final class DockerImg implements ContainerImg {
'Tag': tag,
};
}
String? _asString(dynamic val) {
if (val == null) return null;
if (val is String) return val;
return val.toString();
}
int? _asInt(dynamic val) {
if (val == null) return null;
if (val is int) return val;
if (val is double) return val.toInt();
return int.tryParse(val.toString());
}

View File

@@ -20,7 +20,7 @@ sealed class ContainerPs {
factory ContainerPs.fromRaw(String s, ContainerType typ) => typ.ps(s);
void parseStats(String s);
void parseStats(String s, [String? version]);
}
final class PodmanPs implements ContainerPs {
@@ -55,7 +55,7 @@ final class PodmanPs implements ContainerPs {
ContainerStatus get status => ContainerStatus.fromPodmanExited(exited);
@override
void parseStats(String s) {
void parseStats(String s, [String? version]) {
final stats = json.decode(s);
final cpuD = (stats['CPU'] as double? ?? 0).toStringAsFixed(1);
final cpuAvgD = (stats['AvgCPU'] as double? ?? 0).toStringAsFixed(1);
@@ -63,12 +63,32 @@ final class PodmanPs implements ContainerPs {
final memLimit = (stats['MemLimit'] as int? ?? 0).bytes2Str;
final memUsage = (stats['MemUsage'] as int? ?? 0).bytes2Str;
mem = '$memUsage / $memLimit';
final netIn = (stats['NetInput'] as int? ?? 0).bytes2Str;
final netOut = (stats['NetOutput'] as int? ?? 0).bytes2Str;
net = '$netIn / ↑ $netOut';
int netIn = 0;
int netOut = 0;
final majorVersion = version?.split('.').firstOrNull;
final majorVersionNum = majorVersion != null ? int.tryParse(majorVersion) : null;
// Podman 4.x and earlier use top-level NetInput/NetOutput fields.
// Podman 5.x changed network backend (Netavark) and uses nested
// Network.{iface}.RxBytes/TxBytes structure instead.
if (majorVersionNum == null || majorVersionNum <= 4) {
netIn = stats['NetInput'] as int? ?? 0;
netOut = stats['NetOutput'] as int? ?? 0;
} else if (majorVersionNum >= 5) {
final network = stats['Network'] as Map<String, dynamic>?;
if (network != null) {
for (final interface in network.values) {
netIn += interface['RxBytes'] as int? ?? 0;
netOut += interface['TxBytes'] as int? ?? 0;
}
}
}
net = '${netIn.bytes2Str} / ↑ ${netOut.bytes2Str}';
final diskIn = (stats['BlockInput'] as int? ?? 0).bytes2Str;
final diskOut = (stats['BlockOutput'] as int? ?? 0).bytes2Str;
disk = '${l10n.read} $diskOut / ${l10n.write} $diskIn';
disk = '${l10n.read} $diskIn / ${l10n.write} $diskOut';
}
factory PodmanPs.fromRawJson(String str) => PodmanPs.fromJson(json.decode(str));
@@ -125,12 +145,18 @@ final class DockerPs implements ContainerPs {
ContainerStatus get status => ContainerStatus.fromDockerState(state);
@override
void parseStats(String s) {
void parseStats(String s, [String? version]) {
final stats = json.decode(s);
cpu = stats['CPUPerc'];
mem = stats['MemUsage'];
net = stats['NetIO'];
disk = stats['BlockIO'];
final netIO = stats['NetIO'] as String? ?? '0B / 0B';
final netParts = netIO.split(' / ');
net = '${netParts.firstOrNull ?? '0B'} / ↑ ${netParts.length > 1 ? netParts[1] : '0B'}';
final blockIO = stats['BlockIO'] as String? ?? '0B / 0B';
final blockParts = blockIO.split(' / ');
disk = '${l10n.read} ${blockParts.firstOrNull ?? '0B'} / ${l10n.write} ${blockParts.length > 1 ? blockParts[1] : '0B'}';
}
/// CONTAINER ID NAMES IMAGE STATUS

View File

@@ -62,6 +62,7 @@ class UpgradePkgInfo {
void _parsePacman(String raw) {
final parts = raw.split(' ');
if (parts.length < 4) throw Exception('Invalid pacman output format');
package = parts[0];
nowVersion = parts[1];
newVersion = parts[3];
@@ -70,6 +71,7 @@ class UpgradePkgInfo {
void _parseOpkg(String raw) {
final parts = raw.split(' - ');
if (parts.length < 3) throw Exception('Invalid opkg output format');
package = parts[0];
nowVersion = parts[1];
newVersion = parts[2];
@@ -80,6 +82,7 @@ class UpgradePkgInfo {
void _parseApk(String raw) {
final parts = raw.split(' ');
final len = parts.length;
if (len < 2) throw Exception('Invalid apk output format');
newVersion = parts[len - 1];
nowVersion = parts[0];
newVersion = newVersion.substring(0, newVersion.length - 1);

View File

@@ -6,7 +6,7 @@ import 'package:server_box/data/res/status.dart';
/// Capacity of the FIFO queue
const _kCap = 30;
class Cpus extends TimeSeq<List<SingleCpuCore>> {
class Cpus extends TimeSeq<SingleCpuCore> {
Cpus(super.init1, super.init2);
final Map<String, int> brand = {};
@@ -14,21 +14,30 @@ class Cpus extends TimeSeq<List<SingleCpuCore>> {
@override
void onUpdate() {
_coresCount = now.length;
if (pre.isEmpty || now.isEmpty || pre.length != now.length) {
_totalDelta = 0;
_user = 0;
_sys = 0;
_iowait = 0;
_idle = 0;
return;
}
_totalDelta = now[0].total - pre[0].total;
_user = _getUser();
_sys = _getSys();
_iowait = _getIowait();
_idle = _getIdle();
_updateSpots();
//_updateRange();
}
double usedPercent({int coreIdx = 0}) {
if (now.length != pre.length) return 0;
if (now.isEmpty) return 0;
if (coreIdx >= now.length) return 0;
try {
final idleDelta = now[coreIdx].idle - pre[coreIdx].idle;
final totalDelta = now[coreIdx].total - pre[coreIdx].total;
if (totalDelta == 0) return 0;
final used = idleDelta / totalDelta;
return used.isNaN ? 0 : 100 - used * 100;
} catch (e, s) {
@@ -157,6 +166,7 @@ class SingleCpuCore extends TimeSeqIface<SingleCpuCore> {
final id = item.split(' ').firstOrNull;
if (id == null) continue;
final matches = item.replaceFirst(id, '').trim().split(' ');
if (matches.length < 7) continue;
cpus.add(
SingleCpuCore(
id,

View File

@@ -20,11 +20,11 @@ ServerCustom _$ServerCustomFromJson(Map<String, dynamic> json) => ServerCustom(
Map<String, dynamic> _$ServerCustomToJson(ServerCustom instance) =>
<String, dynamic>{
if (instance.pveAddr case final value?) 'pveAddr': value,
'pveAddr': ?instance.pveAddr,
'pveIgnoreCert': instance.pveIgnoreCert,
if (instance.cmds case final value?) 'cmds': value,
if (instance.preferTempDev case final value?) 'preferTempDev': value,
if (instance.logoUrl case final value?) 'logoUrl': value,
if (instance.netDev case final value?) 'netDev': value,
if (instance.scriptDir case final value?) 'scriptDir': value,
'cmds': ?instance.cmds,
'preferTempDev': ?instance.preferTempDev,
'logoUrl': ?instance.logoUrl,
'netDev': ?instance.netDev,
'scriptDir': ?instance.scriptDir,
};

View File

@@ -0,0 +1,49 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'discovery_result.freezed.dart';
part 'discovery_result.g.dart';
@freezed
abstract class SshDiscoveryResult with _$SshDiscoveryResult {
const factory SshDiscoveryResult({
required String ip,
required int port,
String? banner,
@Default(false) bool isSelected,
}) = _SshDiscoveryResult;
factory SshDiscoveryResult.fromJson(Map<String, dynamic> json) => _$SshDiscoveryResultFromJson(json);
}
@freezed
abstract class SshDiscoveryReport with _$SshDiscoveryReport {
const factory SshDiscoveryReport({
required String generatedAt,
required int durationMs,
required int count,
required List<SshDiscoveryResult> items,
}) = _SshDiscoveryReport;
factory SshDiscoveryReport.fromJson(Map<String, dynamic> json) => _$SshDiscoveryReportFromJson(json);
}
@freezed
abstract class SshDiscoveryConfig with _$SshDiscoveryConfig {
const factory SshDiscoveryConfig({
@Default(700) int timeoutMs,
@Default(128) int maxConcurrency,
@Default(false) bool enableMdns,
@Default(4096) int hostEnumerationLimit,
}) = _SshDiscoveryConfig;
}
extension SshDiscoveryConfigX on SshDiscoveryConfig {
List<String> toArgs() {
final args = <String>[];
args.add('--timeout-ms=$timeoutMs');
args.add('--max-concurrency=$maxConcurrency');
args.add('--host-enumeration-limit=$hostEnumerationLimit');
if (enableMdns) args.add('--enable-mdns');
return args;
}
}

View File

@@ -0,0 +1,830 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'discovery_result.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$SshDiscoveryResult {
String get ip; int get port; String? get banner; bool get isSelected;
/// Create a copy of SshDiscoveryResult
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SshDiscoveryResultCopyWith<SshDiscoveryResult> get copyWith => _$SshDiscoveryResultCopyWithImpl<SshDiscoveryResult>(this as SshDiscoveryResult, _$identity);
/// Serializes this SshDiscoveryResult to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SshDiscoveryResult&&(identical(other.ip, ip) || other.ip == ip)&&(identical(other.port, port) || other.port == port)&&(identical(other.banner, banner) || other.banner == banner)&&(identical(other.isSelected, isSelected) || other.isSelected == isSelected));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,ip,port,banner,isSelected);
@override
String toString() {
return 'SshDiscoveryResult(ip: $ip, port: $port, banner: $banner, isSelected: $isSelected)';
}
}
/// @nodoc
abstract mixin class $SshDiscoveryResultCopyWith<$Res> {
factory $SshDiscoveryResultCopyWith(SshDiscoveryResult value, $Res Function(SshDiscoveryResult) _then) = _$SshDiscoveryResultCopyWithImpl;
@useResult
$Res call({
String ip, int port, String? banner, bool isSelected
});
}
/// @nodoc
class _$SshDiscoveryResultCopyWithImpl<$Res>
implements $SshDiscoveryResultCopyWith<$Res> {
_$SshDiscoveryResultCopyWithImpl(this._self, this._then);
final SshDiscoveryResult _self;
final $Res Function(SshDiscoveryResult) _then;
/// Create a copy of SshDiscoveryResult
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? ip = null,Object? port = null,Object? banner = freezed,Object? isSelected = null,}) {
return _then(_self.copyWith(
ip: null == ip ? _self.ip : ip // ignore: cast_nullable_to_non_nullable
as String,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable
as int,banner: freezed == banner ? _self.banner : banner // ignore: cast_nullable_to_non_nullable
as String?,isSelected: null == isSelected ? _self.isSelected : isSelected // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// Adds pattern-matching-related methods to [SshDiscoveryResult].
extension SshDiscoveryResultPatterns on SshDiscoveryResult {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SshDiscoveryResult value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _SshDiscoveryResult() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SshDiscoveryResult value) $default,){
final _that = this;
switch (_that) {
case _SshDiscoveryResult():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SshDiscoveryResult value)? $default,){
final _that = this;
switch (_that) {
case _SshDiscoveryResult() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String ip, int port, String? banner, bool isSelected)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _SshDiscoveryResult() when $default != null:
return $default(_that.ip,_that.port,_that.banner,_that.isSelected);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String ip, int port, String? banner, bool isSelected) $default,) {final _that = this;
switch (_that) {
case _SshDiscoveryResult():
return $default(_that.ip,_that.port,_that.banner,_that.isSelected);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String ip, int port, String? banner, bool isSelected)? $default,) {final _that = this;
switch (_that) {
case _SshDiscoveryResult() when $default != null:
return $default(_that.ip,_that.port,_that.banner,_that.isSelected);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _SshDiscoveryResult implements SshDiscoveryResult {
const _SshDiscoveryResult({required this.ip, required this.port, this.banner, this.isSelected = false});
factory _SshDiscoveryResult.fromJson(Map<String, dynamic> json) => _$SshDiscoveryResultFromJson(json);
@override final String ip;
@override final int port;
@override final String? banner;
@override@JsonKey() final bool isSelected;
/// Create a copy of SshDiscoveryResult
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$SshDiscoveryResultCopyWith<_SshDiscoveryResult> get copyWith => __$SshDiscoveryResultCopyWithImpl<_SshDiscoveryResult>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SshDiscoveryResultToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SshDiscoveryResult&&(identical(other.ip, ip) || other.ip == ip)&&(identical(other.port, port) || other.port == port)&&(identical(other.banner, banner) || other.banner == banner)&&(identical(other.isSelected, isSelected) || other.isSelected == isSelected));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,ip,port,banner,isSelected);
@override
String toString() {
return 'SshDiscoveryResult(ip: $ip, port: $port, banner: $banner, isSelected: $isSelected)';
}
}
/// @nodoc
abstract mixin class _$SshDiscoveryResultCopyWith<$Res> implements $SshDiscoveryResultCopyWith<$Res> {
factory _$SshDiscoveryResultCopyWith(_SshDiscoveryResult value, $Res Function(_SshDiscoveryResult) _then) = __$SshDiscoveryResultCopyWithImpl;
@override @useResult
$Res call({
String ip, int port, String? banner, bool isSelected
});
}
/// @nodoc
class __$SshDiscoveryResultCopyWithImpl<$Res>
implements _$SshDiscoveryResultCopyWith<$Res> {
__$SshDiscoveryResultCopyWithImpl(this._self, this._then);
final _SshDiscoveryResult _self;
final $Res Function(_SshDiscoveryResult) _then;
/// Create a copy of SshDiscoveryResult
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? ip = null,Object? port = null,Object? banner = freezed,Object? isSelected = null,}) {
return _then(_SshDiscoveryResult(
ip: null == ip ? _self.ip : ip // ignore: cast_nullable_to_non_nullable
as String,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable
as int,banner: freezed == banner ? _self.banner : banner // ignore: cast_nullable_to_non_nullable
as String?,isSelected: null == isSelected ? _self.isSelected : isSelected // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
mixin _$SshDiscoveryReport {
String get generatedAt; int get durationMs; int get count; List<SshDiscoveryResult> get items;
/// Create a copy of SshDiscoveryReport
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SshDiscoveryReportCopyWith<SshDiscoveryReport> get copyWith => _$SshDiscoveryReportCopyWithImpl<SshDiscoveryReport>(this as SshDiscoveryReport, _$identity);
/// Serializes this SshDiscoveryReport to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SshDiscoveryReport&&(identical(other.generatedAt, generatedAt) || other.generatedAt == generatedAt)&&(identical(other.durationMs, durationMs) || other.durationMs == durationMs)&&(identical(other.count, count) || other.count == count)&&const DeepCollectionEquality().equals(other.items, items));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,generatedAt,durationMs,count,const DeepCollectionEquality().hash(items));
@override
String toString() {
return 'SshDiscoveryReport(generatedAt: $generatedAt, durationMs: $durationMs, count: $count, items: $items)';
}
}
/// @nodoc
abstract mixin class $SshDiscoveryReportCopyWith<$Res> {
factory $SshDiscoveryReportCopyWith(SshDiscoveryReport value, $Res Function(SshDiscoveryReport) _then) = _$SshDiscoveryReportCopyWithImpl;
@useResult
$Res call({
String generatedAt, int durationMs, int count, List<SshDiscoveryResult> items
});
}
/// @nodoc
class _$SshDiscoveryReportCopyWithImpl<$Res>
implements $SshDiscoveryReportCopyWith<$Res> {
_$SshDiscoveryReportCopyWithImpl(this._self, this._then);
final SshDiscoveryReport _self;
final $Res Function(SshDiscoveryReport) _then;
/// Create a copy of SshDiscoveryReport
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? generatedAt = null,Object? durationMs = null,Object? count = null,Object? items = null,}) {
return _then(_self.copyWith(
generatedAt: null == generatedAt ? _self.generatedAt : generatedAt // ignore: cast_nullable_to_non_nullable
as String,durationMs: null == durationMs ? _self.durationMs : durationMs // ignore: cast_nullable_to_non_nullable
as int,count: null == count ? _self.count : count // ignore: cast_nullable_to_non_nullable
as int,items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable
as List<SshDiscoveryResult>,
));
}
}
/// Adds pattern-matching-related methods to [SshDiscoveryReport].
extension SshDiscoveryReportPatterns on SshDiscoveryReport {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SshDiscoveryReport value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _SshDiscoveryReport() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SshDiscoveryReport value) $default,){
final _that = this;
switch (_that) {
case _SshDiscoveryReport():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SshDiscoveryReport value)? $default,){
final _that = this;
switch (_that) {
case _SshDiscoveryReport() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String generatedAt, int durationMs, int count, List<SshDiscoveryResult> items)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _SshDiscoveryReport() when $default != null:
return $default(_that.generatedAt,_that.durationMs,_that.count,_that.items);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String generatedAt, int durationMs, int count, List<SshDiscoveryResult> items) $default,) {final _that = this;
switch (_that) {
case _SshDiscoveryReport():
return $default(_that.generatedAt,_that.durationMs,_that.count,_that.items);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String generatedAt, int durationMs, int count, List<SshDiscoveryResult> items)? $default,) {final _that = this;
switch (_that) {
case _SshDiscoveryReport() when $default != null:
return $default(_that.generatedAt,_that.durationMs,_that.count,_that.items);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _SshDiscoveryReport implements SshDiscoveryReport {
const _SshDiscoveryReport({required this.generatedAt, required this.durationMs, required this.count, required final List<SshDiscoveryResult> items}): _items = items;
factory _SshDiscoveryReport.fromJson(Map<String, dynamic> json) => _$SshDiscoveryReportFromJson(json);
@override final String generatedAt;
@override final int durationMs;
@override final int count;
final List<SshDiscoveryResult> _items;
@override List<SshDiscoveryResult> get items {
if (_items is EqualUnmodifiableListView) return _items;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_items);
}
/// Create a copy of SshDiscoveryReport
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$SshDiscoveryReportCopyWith<_SshDiscoveryReport> get copyWith => __$SshDiscoveryReportCopyWithImpl<_SshDiscoveryReport>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SshDiscoveryReportToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SshDiscoveryReport&&(identical(other.generatedAt, generatedAt) || other.generatedAt == generatedAt)&&(identical(other.durationMs, durationMs) || other.durationMs == durationMs)&&(identical(other.count, count) || other.count == count)&&const DeepCollectionEquality().equals(other._items, _items));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,generatedAt,durationMs,count,const DeepCollectionEquality().hash(_items));
@override
String toString() {
return 'SshDiscoveryReport(generatedAt: $generatedAt, durationMs: $durationMs, count: $count, items: $items)';
}
}
/// @nodoc
abstract mixin class _$SshDiscoveryReportCopyWith<$Res> implements $SshDiscoveryReportCopyWith<$Res> {
factory _$SshDiscoveryReportCopyWith(_SshDiscoveryReport value, $Res Function(_SshDiscoveryReport) _then) = __$SshDiscoveryReportCopyWithImpl;
@override @useResult
$Res call({
String generatedAt, int durationMs, int count, List<SshDiscoveryResult> items
});
}
/// @nodoc
class __$SshDiscoveryReportCopyWithImpl<$Res>
implements _$SshDiscoveryReportCopyWith<$Res> {
__$SshDiscoveryReportCopyWithImpl(this._self, this._then);
final _SshDiscoveryReport _self;
final $Res Function(_SshDiscoveryReport) _then;
/// Create a copy of SshDiscoveryReport
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? generatedAt = null,Object? durationMs = null,Object? count = null,Object? items = null,}) {
return _then(_SshDiscoveryReport(
generatedAt: null == generatedAt ? _self.generatedAt : generatedAt // ignore: cast_nullable_to_non_nullable
as String,durationMs: null == durationMs ? _self.durationMs : durationMs // ignore: cast_nullable_to_non_nullable
as int,count: null == count ? _self.count : count // ignore: cast_nullable_to_non_nullable
as int,items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable
as List<SshDiscoveryResult>,
));
}
}
/// @nodoc
mixin _$SshDiscoveryConfig {
int get timeoutMs; int get maxConcurrency; bool get enableMdns; int get hostEnumerationLimit;
/// Create a copy of SshDiscoveryConfig
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SshDiscoveryConfigCopyWith<SshDiscoveryConfig> get copyWith => _$SshDiscoveryConfigCopyWithImpl<SshDiscoveryConfig>(this as SshDiscoveryConfig, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SshDiscoveryConfig&&(identical(other.timeoutMs, timeoutMs) || other.timeoutMs == timeoutMs)&&(identical(other.maxConcurrency, maxConcurrency) || other.maxConcurrency == maxConcurrency)&&(identical(other.enableMdns, enableMdns) || other.enableMdns == enableMdns)&&(identical(other.hostEnumerationLimit, hostEnumerationLimit) || other.hostEnumerationLimit == hostEnumerationLimit));
}
@override
int get hashCode => Object.hash(runtimeType,timeoutMs,maxConcurrency,enableMdns,hostEnumerationLimit);
@override
String toString() {
return 'SshDiscoveryConfig(timeoutMs: $timeoutMs, maxConcurrency: $maxConcurrency, enableMdns: $enableMdns, hostEnumerationLimit: $hostEnumerationLimit)';
}
}
/// @nodoc
abstract mixin class $SshDiscoveryConfigCopyWith<$Res> {
factory $SshDiscoveryConfigCopyWith(SshDiscoveryConfig value, $Res Function(SshDiscoveryConfig) _then) = _$SshDiscoveryConfigCopyWithImpl;
@useResult
$Res call({
int timeoutMs, int maxConcurrency, bool enableMdns, int hostEnumerationLimit
});
}
/// @nodoc
class _$SshDiscoveryConfigCopyWithImpl<$Res>
implements $SshDiscoveryConfigCopyWith<$Res> {
_$SshDiscoveryConfigCopyWithImpl(this._self, this._then);
final SshDiscoveryConfig _self;
final $Res Function(SshDiscoveryConfig) _then;
/// Create a copy of SshDiscoveryConfig
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? timeoutMs = null,Object? maxConcurrency = null,Object? enableMdns = null,Object? hostEnumerationLimit = null,}) {
return _then(_self.copyWith(
timeoutMs: null == timeoutMs ? _self.timeoutMs : timeoutMs // ignore: cast_nullable_to_non_nullable
as int,maxConcurrency: null == maxConcurrency ? _self.maxConcurrency : maxConcurrency // ignore: cast_nullable_to_non_nullable
as int,enableMdns: null == enableMdns ? _self.enableMdns : enableMdns // ignore: cast_nullable_to_non_nullable
as bool,hostEnumerationLimit: null == hostEnumerationLimit ? _self.hostEnumerationLimit : hostEnumerationLimit // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// Adds pattern-matching-related methods to [SshDiscoveryConfig].
extension SshDiscoveryConfigPatterns on SshDiscoveryConfig {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SshDiscoveryConfig value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _SshDiscoveryConfig() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SshDiscoveryConfig value) $default,){
final _that = this;
switch (_that) {
case _SshDiscoveryConfig():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SshDiscoveryConfig value)? $default,){
final _that = this;
switch (_that) {
case _SshDiscoveryConfig() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int timeoutMs, int maxConcurrency, bool enableMdns, int hostEnumerationLimit)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _SshDiscoveryConfig() when $default != null:
return $default(_that.timeoutMs,_that.maxConcurrency,_that.enableMdns,_that.hostEnumerationLimit);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int timeoutMs, int maxConcurrency, bool enableMdns, int hostEnumerationLimit) $default,) {final _that = this;
switch (_that) {
case _SshDiscoveryConfig():
return $default(_that.timeoutMs,_that.maxConcurrency,_that.enableMdns,_that.hostEnumerationLimit);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int timeoutMs, int maxConcurrency, bool enableMdns, int hostEnumerationLimit)? $default,) {final _that = this;
switch (_that) {
case _SshDiscoveryConfig() when $default != null:
return $default(_that.timeoutMs,_that.maxConcurrency,_that.enableMdns,_that.hostEnumerationLimit);case _:
return null;
}
}
}
/// @nodoc
class _SshDiscoveryConfig implements SshDiscoveryConfig {
const _SshDiscoveryConfig({this.timeoutMs = 700, this.maxConcurrency = 128, this.enableMdns = false, this.hostEnumerationLimit = 4096});
@override@JsonKey() final int timeoutMs;
@override@JsonKey() final int maxConcurrency;
@override@JsonKey() final bool enableMdns;
@override@JsonKey() final int hostEnumerationLimit;
/// Create a copy of SshDiscoveryConfig
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$SshDiscoveryConfigCopyWith<_SshDiscoveryConfig> get copyWith => __$SshDiscoveryConfigCopyWithImpl<_SshDiscoveryConfig>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SshDiscoveryConfig&&(identical(other.timeoutMs, timeoutMs) || other.timeoutMs == timeoutMs)&&(identical(other.maxConcurrency, maxConcurrency) || other.maxConcurrency == maxConcurrency)&&(identical(other.enableMdns, enableMdns) || other.enableMdns == enableMdns)&&(identical(other.hostEnumerationLimit, hostEnumerationLimit) || other.hostEnumerationLimit == hostEnumerationLimit));
}
@override
int get hashCode => Object.hash(runtimeType,timeoutMs,maxConcurrency,enableMdns,hostEnumerationLimit);
@override
String toString() {
return 'SshDiscoveryConfig(timeoutMs: $timeoutMs, maxConcurrency: $maxConcurrency, enableMdns: $enableMdns, hostEnumerationLimit: $hostEnumerationLimit)';
}
}
/// @nodoc
abstract mixin class _$SshDiscoveryConfigCopyWith<$Res> implements $SshDiscoveryConfigCopyWith<$Res> {
factory _$SshDiscoveryConfigCopyWith(_SshDiscoveryConfig value, $Res Function(_SshDiscoveryConfig) _then) = __$SshDiscoveryConfigCopyWithImpl;
@override @useResult
$Res call({
int timeoutMs, int maxConcurrency, bool enableMdns, int hostEnumerationLimit
});
}
/// @nodoc
class __$SshDiscoveryConfigCopyWithImpl<$Res>
implements _$SshDiscoveryConfigCopyWith<$Res> {
__$SshDiscoveryConfigCopyWithImpl(this._self, this._then);
final _SshDiscoveryConfig _self;
final $Res Function(_SshDiscoveryConfig) _then;
/// Create a copy of SshDiscoveryConfig
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? timeoutMs = null,Object? maxConcurrency = null,Object? enableMdns = null,Object? hostEnumerationLimit = null,}) {
return _then(_SshDiscoveryConfig(
timeoutMs: null == timeoutMs ? _self.timeoutMs : timeoutMs // ignore: cast_nullable_to_non_nullable
as int,maxConcurrency: null == maxConcurrency ? _self.maxConcurrency : maxConcurrency // ignore: cast_nullable_to_non_nullable
as int,enableMdns: null == enableMdns ? _self.enableMdns : enableMdns // ignore: cast_nullable_to_non_nullable
as bool,hostEnumerationLimit: null == hostEnumerationLimit ? _self.hostEnumerationLimit : hostEnumerationLimit // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
// dart format on

View File

@@ -0,0 +1,41 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'discovery_result.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_SshDiscoveryResult _$SshDiscoveryResultFromJson(Map<String, dynamic> json) =>
_SshDiscoveryResult(
ip: json['ip'] as String,
port: (json['port'] as num).toInt(),
banner: json['banner'] as String?,
isSelected: json['isSelected'] as bool? ?? false,
);
Map<String, dynamic> _$SshDiscoveryResultToJson(_SshDiscoveryResult instance) =>
<String, dynamic>{
'ip': instance.ip,
'port': instance.port,
'banner': instance.banner,
'isSelected': instance.isSelected,
};
_SshDiscoveryReport _$SshDiscoveryReportFromJson(Map<String, dynamic> json) =>
_SshDiscoveryReport(
generatedAt: json['generatedAt'] as String,
durationMs: (json['durationMs'] as num).toInt(),
count: (json['count'] as num).toInt(),
items: (json['items'] as List<dynamic>)
.map((e) => SshDiscoveryResult.fromJson(e as Map<String, dynamic>))
.toList(),
);
Map<String, dynamic> _$SshDiscoveryReportToJson(_SshDiscoveryReport instance) =>
<String, dynamic>{
'generatedAt': instance.generatedAt,
'durationMs': instance.durationMs,
'count': instance.count,
'items': instance.items,
};

View File

@@ -280,7 +280,7 @@ class Disk with EquatableMixin {
];
}
class DiskIO extends TimeSeq<List<DiskIOPiece>> {
class DiskIO extends TimeSeq<DiskIOPiece> {
DiskIO(super.init1, super.init2);
@override

View File

@@ -18,7 +18,7 @@ class NetSpeedPart extends TimeSeqIface<NetSpeedPart> {
typedef CachedNetVals = ({String sizeIn, String sizeOut, String speedIn, String speedOut});
class NetSpeed extends TimeSeq<List<NetSpeedPart>> {
class NetSpeed extends TimeSeq<NetSpeedPart> {
NetSpeed(super.init1, super.init2);
@override
@@ -164,7 +164,8 @@ class NetSpeed extends TimeSeq<List<NetSpeedPart>> {
final bytesIn = BigInt.parse(bytes.first);
final bytesOut = BigInt.parse(bytes[8]);
results.add(NetSpeedPart(device, bytesIn, bytesOut, time));
} catch (_) {
} catch (e, s) {
Loggers.app.warning('Failed to parse net speed data: $item', e, s);
continue;
}
}

View File

@@ -97,8 +97,8 @@ class Proc {
}
String get binary {
final parts = command.split(' ');
return parts[0];
final parts = command.trim().split(' ').where((e) => e.isNotEmpty).toList();
return parts.isNotEmpty ? parts[0] : '';
}
}

View File

@@ -1,6 +1,7 @@
import 'dart:convert';
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:server_box/data/model/app/error.dart';
import 'package:server_box/data/model/server/custom.dart';
@@ -35,8 +36,15 @@ abstract class Spi with _$Spi {
String? alterUrl,
@Default(true) bool autoConnect,
/// [id] of the jump server
/// [id] of the jump server (legacy, single hop)
///
/// Migrated to [jumpChainIds].
String? jumpId,
/// Jump chain hop ids (nearest -> farthest)
///
/// Preferred over [jumpId].
@JsonKey(includeIfNull: false) List<String>? jumpChainIds,
ServerCustom? custom,
WakeOnLanCfg? wolCfg,
@@ -79,7 +87,10 @@ extension Spix on Spi {
String? migrateId() {
if (id.isNotEmpty) return null;
ServerStore.instance.delete(oldId);
final newSpi = copyWith(id: ShortId.generate());
final newSpi = copyWith(
id: ShortId.generate(),
jumpChainIds: jumpChainIds ?? (jumpId == null ? null : [jumpId!]),
);
newSpi.save();
return newSpi.id;
}
@@ -94,7 +105,8 @@ extension Spix on Spi {
port == other.port &&
pwd == other.pwd &&
keyId == other.keyId &&
jumpId == other.jumpId;
jumpId == other.jumpId &&
listEquals(jumpChainIds, other.jumpChainIds);
}
/// Returns true if the connection should be re-established.
@@ -137,7 +149,7 @@ extension Spix on Spi {
tags: ['tag1', 'tag2'],
alterUrl: 'user@ip:port',
autoConnect: true,
jumpId: 'jump_server_id',
jumpChainIds: ['jump_server_id'],
custom: ServerCustom(
pveAddr: 'http://localhost:8006',
pveIgnoreCert: false,

View File

@@ -16,8 +16,13 @@ T _$identity<T>(T value) => value;
mixin _$Spi {
String get name; String get ip; int get port; String get user; String? get pwd;/// [id] of private key
@JsonKey(name: 'pubKeyId') String? get keyId; List<String>? get tags; String? get alterUrl; bool get autoConnect;/// [id] of the jump server
String? get jumpId; ServerCustom? get custom; WakeOnLanCfg? get wolCfg;/// It only applies to SSH terminal.
@JsonKey(name: 'pubKeyId') String? get keyId; List<String>? get tags; String? get alterUrl; bool get autoConnect;/// [id] of the jump server (legacy, single hop)
///
/// Migrated to [jumpChainIds].
String? get jumpId;/// Jump chain hop ids (nearest -> farthest)
///
/// Preferred over [jumpId].
@JsonKey(includeIfNull: false) List<String>? get jumpChainIds; ServerCustom? get custom; WakeOnLanCfg? get wolCfg;/// It only applies to SSH terminal.
Map<String, String>? get envs;@JsonKey(fromJson: Spi.parseId) String get id;/// Custom system type (unix or windows). If set, skip auto-detection.
@JsonKey(includeIfNull: false) SystemType? get customSystemType;/// Disabled command types for this server
@JsonKey(includeIfNull: false) List<String>? get disabledCmdTypes;
@@ -33,12 +38,12 @@ $SpiCopyWith<Spi> get copyWith => _$SpiCopyWithImpl<Spi>(this as Spi, _$identity
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is Spi&&(identical(other.name, name) || other.name == name)&&(identical(other.ip, ip) || other.ip == ip)&&(identical(other.port, port) || other.port == port)&&(identical(other.user, user) || other.user == user)&&(identical(other.pwd, pwd) || other.pwd == pwd)&&(identical(other.keyId, keyId) || other.keyId == keyId)&&const DeepCollectionEquality().equals(other.tags, tags)&&(identical(other.alterUrl, alterUrl) || other.alterUrl == alterUrl)&&(identical(other.autoConnect, autoConnect) || other.autoConnect == autoConnect)&&(identical(other.jumpId, jumpId) || other.jumpId == jumpId)&&(identical(other.custom, custom) || other.custom == custom)&&(identical(other.wolCfg, wolCfg) || other.wolCfg == wolCfg)&&const DeepCollectionEquality().equals(other.envs, envs)&&(identical(other.id, id) || other.id == id)&&(identical(other.customSystemType, customSystemType) || other.customSystemType == customSystemType)&&const DeepCollectionEquality().equals(other.disabledCmdTypes, disabledCmdTypes));
return identical(this, other) || (other.runtimeType == runtimeType&&other is Spi&&(identical(other.name, name) || other.name == name)&&(identical(other.ip, ip) || other.ip == ip)&&(identical(other.port, port) || other.port == port)&&(identical(other.user, user) || other.user == user)&&(identical(other.pwd, pwd) || other.pwd == pwd)&&(identical(other.keyId, keyId) || other.keyId == keyId)&&const DeepCollectionEquality().equals(other.tags, tags)&&(identical(other.alterUrl, alterUrl) || other.alterUrl == alterUrl)&&(identical(other.autoConnect, autoConnect) || other.autoConnect == autoConnect)&&(identical(other.jumpId, jumpId) || other.jumpId == jumpId)&&const DeepCollectionEquality().equals(other.jumpChainIds, jumpChainIds)&&(identical(other.custom, custom) || other.custom == custom)&&(identical(other.wolCfg, wolCfg) || other.wolCfg == wolCfg)&&const DeepCollectionEquality().equals(other.envs, envs)&&(identical(other.id, id) || other.id == id)&&(identical(other.customSystemType, customSystemType) || other.customSystemType == customSystemType)&&const DeepCollectionEquality().equals(other.disabledCmdTypes, disabledCmdTypes));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,name,ip,port,user,pwd,keyId,const DeepCollectionEquality().hash(tags),alterUrl,autoConnect,jumpId,custom,wolCfg,const DeepCollectionEquality().hash(envs),id,customSystemType,const DeepCollectionEquality().hash(disabledCmdTypes));
int get hashCode => Object.hash(runtimeType,name,ip,port,user,pwd,keyId,const DeepCollectionEquality().hash(tags),alterUrl,autoConnect,jumpId,const DeepCollectionEquality().hash(jumpChainIds),custom,wolCfg,const DeepCollectionEquality().hash(envs),id,customSystemType,const DeepCollectionEquality().hash(disabledCmdTypes));
@@ -49,7 +54,7 @@ abstract mixin class $SpiCopyWith<$Res> {
factory $SpiCopyWith(Spi value, $Res Function(Spi) _then) = _$SpiCopyWithImpl;
@useResult
$Res call({
String name, String ip, int port, String user, String? pwd,@JsonKey(name: 'pubKeyId') String? keyId, List<String>? tags, String? alterUrl, bool autoConnect, String? jumpId, ServerCustom? custom, WakeOnLanCfg? wolCfg, Map<String, String>? envs,@JsonKey(fromJson: Spi.parseId) String id,@JsonKey(includeIfNull: false) SystemType? customSystemType,@JsonKey(includeIfNull: false) List<String>? disabledCmdTypes
String name, String ip, int port, String user, String? pwd,@JsonKey(name: 'pubKeyId') String? keyId, List<String>? tags, String? alterUrl, bool autoConnect, String? jumpId,@JsonKey(includeIfNull: false) List<String>? jumpChainIds, ServerCustom? custom, WakeOnLanCfg? wolCfg, Map<String, String>? envs,@JsonKey(fromJson: Spi.parseId) String id,@JsonKey(includeIfNull: false) SystemType? customSystemType,@JsonKey(includeIfNull: false) List<String>? disabledCmdTypes
});
@@ -66,7 +71,7 @@ class _$SpiCopyWithImpl<$Res>
/// Create a copy of Spi
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? ip = null,Object? port = null,Object? user = null,Object? pwd = freezed,Object? keyId = freezed,Object? tags = freezed,Object? alterUrl = freezed,Object? autoConnect = null,Object? jumpId = freezed,Object? custom = freezed,Object? wolCfg = freezed,Object? envs = freezed,Object? id = null,Object? customSystemType = freezed,Object? disabledCmdTypes = freezed,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? ip = null,Object? port = null,Object? user = null,Object? pwd = freezed,Object? keyId = freezed,Object? tags = freezed,Object? alterUrl = freezed,Object? autoConnect = null,Object? jumpId = freezed,Object? jumpChainIds = freezed,Object? custom = freezed,Object? wolCfg = freezed,Object? envs = freezed,Object? id = null,Object? customSystemType = freezed,Object? disabledCmdTypes = freezed,}) {
return _then(_self.copyWith(
name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,ip: null == ip ? _self.ip : ip // ignore: cast_nullable_to_non_nullable
@@ -78,7 +83,8 @@ as String?,tags: freezed == tags ? _self.tags : tags // ignore: cast_nullable_to
as List<String>?,alterUrl: freezed == alterUrl ? _self.alterUrl : alterUrl // ignore: cast_nullable_to_non_nullable
as String?,autoConnect: null == autoConnect ? _self.autoConnect : autoConnect // ignore: cast_nullable_to_non_nullable
as bool,jumpId: freezed == jumpId ? _self.jumpId : jumpId // ignore: cast_nullable_to_non_nullable
as String?,custom: freezed == custom ? _self.custom : custom // ignore: cast_nullable_to_non_nullable
as String?,jumpChainIds: freezed == jumpChainIds ? _self.jumpChainIds : jumpChainIds // ignore: cast_nullable_to_non_nullable
as List<String>?,custom: freezed == custom ? _self.custom : custom // ignore: cast_nullable_to_non_nullable
as ServerCustom?,wolCfg: freezed == wolCfg ? _self.wolCfg : wolCfg // ignore: cast_nullable_to_non_nullable
as WakeOnLanCfg?,envs: freezed == envs ? _self.envs : envs // ignore: cast_nullable_to_non_nullable
as Map<String, String>?,id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
@@ -169,10 +175,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String name, String ip, int port, String user, String? pwd, @JsonKey(name: 'pubKeyId') String? keyId, List<String>? tags, String? alterUrl, bool autoConnect, String? jumpId, ServerCustom? custom, WakeOnLanCfg? wolCfg, Map<String, String>? envs, @JsonKey(fromJson: Spi.parseId) String id, @JsonKey(includeIfNull: false) SystemType? customSystemType, @JsonKey(includeIfNull: false) List<String>? disabledCmdTypes)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String name, String ip, int port, String user, String? pwd, @JsonKey(name: 'pubKeyId') String? keyId, List<String>? tags, String? alterUrl, bool autoConnect, String? jumpId, @JsonKey(includeIfNull: false) List<String>? jumpChainIds, ServerCustom? custom, WakeOnLanCfg? wolCfg, Map<String, String>? envs, @JsonKey(fromJson: Spi.parseId) String id, @JsonKey(includeIfNull: false) SystemType? customSystemType, @JsonKey(includeIfNull: false) List<String>? disabledCmdTypes)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Spi() when $default != null:
return $default(_that.name,_that.ip,_that.port,_that.user,_that.pwd,_that.keyId,_that.tags,_that.alterUrl,_that.autoConnect,_that.jumpId,_that.custom,_that.wolCfg,_that.envs,_that.id,_that.customSystemType,_that.disabledCmdTypes);case _:
return $default(_that.name,_that.ip,_that.port,_that.user,_that.pwd,_that.keyId,_that.tags,_that.alterUrl,_that.autoConnect,_that.jumpId,_that.jumpChainIds,_that.custom,_that.wolCfg,_that.envs,_that.id,_that.customSystemType,_that.disabledCmdTypes);case _:
return orElse();
}
@@ -190,10 +196,10 @@ return $default(_that.name,_that.ip,_that.port,_that.user,_that.pwd,_that.keyId,
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String name, String ip, int port, String user, String? pwd, @JsonKey(name: 'pubKeyId') String? keyId, List<String>? tags, String? alterUrl, bool autoConnect, String? jumpId, ServerCustom? custom, WakeOnLanCfg? wolCfg, Map<String, String>? envs, @JsonKey(fromJson: Spi.parseId) String id, @JsonKey(includeIfNull: false) SystemType? customSystemType, @JsonKey(includeIfNull: false) List<String>? disabledCmdTypes) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String name, String ip, int port, String user, String? pwd, @JsonKey(name: 'pubKeyId') String? keyId, List<String>? tags, String? alterUrl, bool autoConnect, String? jumpId, @JsonKey(includeIfNull: false) List<String>? jumpChainIds, ServerCustom? custom, WakeOnLanCfg? wolCfg, Map<String, String>? envs, @JsonKey(fromJson: Spi.parseId) String id, @JsonKey(includeIfNull: false) SystemType? customSystemType, @JsonKey(includeIfNull: false) List<String>? disabledCmdTypes) $default,) {final _that = this;
switch (_that) {
case _Spi():
return $default(_that.name,_that.ip,_that.port,_that.user,_that.pwd,_that.keyId,_that.tags,_that.alterUrl,_that.autoConnect,_that.jumpId,_that.custom,_that.wolCfg,_that.envs,_that.id,_that.customSystemType,_that.disabledCmdTypes);case _:
return $default(_that.name,_that.ip,_that.port,_that.user,_that.pwd,_that.keyId,_that.tags,_that.alterUrl,_that.autoConnect,_that.jumpId,_that.jumpChainIds,_that.custom,_that.wolCfg,_that.envs,_that.id,_that.customSystemType,_that.disabledCmdTypes);case _:
throw StateError('Unexpected subclass');
}
@@ -210,10 +216,10 @@ return $default(_that.name,_that.ip,_that.port,_that.user,_that.pwd,_that.keyId,
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String name, String ip, int port, String user, String? pwd, @JsonKey(name: 'pubKeyId') String? keyId, List<String>? tags, String? alterUrl, bool autoConnect, String? jumpId, ServerCustom? custom, WakeOnLanCfg? wolCfg, Map<String, String>? envs, @JsonKey(fromJson: Spi.parseId) String id, @JsonKey(includeIfNull: false) SystemType? customSystemType, @JsonKey(includeIfNull: false) List<String>? disabledCmdTypes)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String name, String ip, int port, String user, String? pwd, @JsonKey(name: 'pubKeyId') String? keyId, List<String>? tags, String? alterUrl, bool autoConnect, String? jumpId, @JsonKey(includeIfNull: false) List<String>? jumpChainIds, ServerCustom? custom, WakeOnLanCfg? wolCfg, Map<String, String>? envs, @JsonKey(fromJson: Spi.parseId) String id, @JsonKey(includeIfNull: false) SystemType? customSystemType, @JsonKey(includeIfNull: false) List<String>? disabledCmdTypes)? $default,) {final _that = this;
switch (_that) {
case _Spi() when $default != null:
return $default(_that.name,_that.ip,_that.port,_that.user,_that.pwd,_that.keyId,_that.tags,_that.alterUrl,_that.autoConnect,_that.jumpId,_that.custom,_that.wolCfg,_that.envs,_that.id,_that.customSystemType,_that.disabledCmdTypes);case _:
return $default(_that.name,_that.ip,_that.port,_that.user,_that.pwd,_that.keyId,_that.tags,_that.alterUrl,_that.autoConnect,_that.jumpId,_that.jumpChainIds,_that.custom,_that.wolCfg,_that.envs,_that.id,_that.customSystemType,_that.disabledCmdTypes);case _:
return null;
}
@@ -225,7 +231,7 @@ return $default(_that.name,_that.ip,_that.port,_that.user,_that.pwd,_that.keyId,
@JsonSerializable(includeIfNull: false)
class _Spi extends Spi {
const _Spi({required this.name, required this.ip, required this.port, required this.user, this.pwd, @JsonKey(name: 'pubKeyId') this.keyId, final List<String>? tags, this.alterUrl, this.autoConnect = true, this.jumpId, this.custom, this.wolCfg, final Map<String, String>? envs, @JsonKey(fromJson: Spi.parseId) this.id = '', @JsonKey(includeIfNull: false) this.customSystemType, @JsonKey(includeIfNull: false) final List<String>? disabledCmdTypes}): _tags = tags,_envs = envs,_disabledCmdTypes = disabledCmdTypes,super._();
const _Spi({required this.name, required this.ip, required this.port, required this.user, this.pwd, @JsonKey(name: 'pubKeyId') this.keyId, final List<String>? tags, this.alterUrl, this.autoConnect = true, this.jumpId, @JsonKey(includeIfNull: false) final List<String>? jumpChainIds, this.custom, this.wolCfg, final Map<String, String>? envs, @JsonKey(fromJson: Spi.parseId) this.id = '', @JsonKey(includeIfNull: false) this.customSystemType, @JsonKey(includeIfNull: false) final List<String>? disabledCmdTypes}): _tags = tags,_jumpChainIds = jumpChainIds,_envs = envs,_disabledCmdTypes = disabledCmdTypes,super._();
factory _Spi.fromJson(Map<String, dynamic> json) => _$SpiFromJson(json);
@override final String name;
@@ -246,8 +252,25 @@ class _Spi extends Spi {
@override final String? alterUrl;
@override@JsonKey() final bool autoConnect;
/// [id] of the jump server
/// [id] of the jump server (legacy, single hop)
///
/// Migrated to [jumpChainIds].
@override final String? jumpId;
/// Jump chain hop ids (nearest -> farthest)
///
/// Preferred over [jumpId].
final List<String>? _jumpChainIds;
/// Jump chain hop ids (nearest -> farthest)
///
/// Preferred over [jumpId].
@override@JsonKey(includeIfNull: false) List<String>? get jumpChainIds {
final value = _jumpChainIds;
if (value == null) return null;
if (_jumpChainIds is EqualUnmodifiableListView) return _jumpChainIds;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override final ServerCustom? custom;
@override final WakeOnLanCfg? wolCfg;
/// It only applies to SSH terminal.
@@ -289,12 +312,12 @@ Map<String, dynamic> toJson() {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Spi&&(identical(other.name, name) || other.name == name)&&(identical(other.ip, ip) || other.ip == ip)&&(identical(other.port, port) || other.port == port)&&(identical(other.user, user) || other.user == user)&&(identical(other.pwd, pwd) || other.pwd == pwd)&&(identical(other.keyId, keyId) || other.keyId == keyId)&&const DeepCollectionEquality().equals(other._tags, _tags)&&(identical(other.alterUrl, alterUrl) || other.alterUrl == alterUrl)&&(identical(other.autoConnect, autoConnect) || other.autoConnect == autoConnect)&&(identical(other.jumpId, jumpId) || other.jumpId == jumpId)&&(identical(other.custom, custom) || other.custom == custom)&&(identical(other.wolCfg, wolCfg) || other.wolCfg == wolCfg)&&const DeepCollectionEquality().equals(other._envs, _envs)&&(identical(other.id, id) || other.id == id)&&(identical(other.customSystemType, customSystemType) || other.customSystemType == customSystemType)&&const DeepCollectionEquality().equals(other._disabledCmdTypes, _disabledCmdTypes));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Spi&&(identical(other.name, name) || other.name == name)&&(identical(other.ip, ip) || other.ip == ip)&&(identical(other.port, port) || other.port == port)&&(identical(other.user, user) || other.user == user)&&(identical(other.pwd, pwd) || other.pwd == pwd)&&(identical(other.keyId, keyId) || other.keyId == keyId)&&const DeepCollectionEquality().equals(other._tags, _tags)&&(identical(other.alterUrl, alterUrl) || other.alterUrl == alterUrl)&&(identical(other.autoConnect, autoConnect) || other.autoConnect == autoConnect)&&(identical(other.jumpId, jumpId) || other.jumpId == jumpId)&&const DeepCollectionEquality().equals(other._jumpChainIds, _jumpChainIds)&&(identical(other.custom, custom) || other.custom == custom)&&(identical(other.wolCfg, wolCfg) || other.wolCfg == wolCfg)&&const DeepCollectionEquality().equals(other._envs, _envs)&&(identical(other.id, id) || other.id == id)&&(identical(other.customSystemType, customSystemType) || other.customSystemType == customSystemType)&&const DeepCollectionEquality().equals(other._disabledCmdTypes, _disabledCmdTypes));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,name,ip,port,user,pwd,keyId,const DeepCollectionEquality().hash(_tags),alterUrl,autoConnect,jumpId,custom,wolCfg,const DeepCollectionEquality().hash(_envs),id,customSystemType,const DeepCollectionEquality().hash(_disabledCmdTypes));
int get hashCode => Object.hash(runtimeType,name,ip,port,user,pwd,keyId,const DeepCollectionEquality().hash(_tags),alterUrl,autoConnect,jumpId,const DeepCollectionEquality().hash(_jumpChainIds),custom,wolCfg,const DeepCollectionEquality().hash(_envs),id,customSystemType,const DeepCollectionEquality().hash(_disabledCmdTypes));
@@ -305,7 +328,7 @@ abstract mixin class _$SpiCopyWith<$Res> implements $SpiCopyWith<$Res> {
factory _$SpiCopyWith(_Spi value, $Res Function(_Spi) _then) = __$SpiCopyWithImpl;
@override @useResult
$Res call({
String name, String ip, int port, String user, String? pwd,@JsonKey(name: 'pubKeyId') String? keyId, List<String>? tags, String? alterUrl, bool autoConnect, String? jumpId, ServerCustom? custom, WakeOnLanCfg? wolCfg, Map<String, String>? envs,@JsonKey(fromJson: Spi.parseId) String id,@JsonKey(includeIfNull: false) SystemType? customSystemType,@JsonKey(includeIfNull: false) List<String>? disabledCmdTypes
String name, String ip, int port, String user, String? pwd,@JsonKey(name: 'pubKeyId') String? keyId, List<String>? tags, String? alterUrl, bool autoConnect, String? jumpId,@JsonKey(includeIfNull: false) List<String>? jumpChainIds, ServerCustom? custom, WakeOnLanCfg? wolCfg, Map<String, String>? envs,@JsonKey(fromJson: Spi.parseId) String id,@JsonKey(includeIfNull: false) SystemType? customSystemType,@JsonKey(includeIfNull: false) List<String>? disabledCmdTypes
});
@@ -322,7 +345,7 @@ class __$SpiCopyWithImpl<$Res>
/// Create a copy of Spi
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? ip = null,Object? port = null,Object? user = null,Object? pwd = freezed,Object? keyId = freezed,Object? tags = freezed,Object? alterUrl = freezed,Object? autoConnect = null,Object? jumpId = freezed,Object? custom = freezed,Object? wolCfg = freezed,Object? envs = freezed,Object? id = null,Object? customSystemType = freezed,Object? disabledCmdTypes = freezed,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? ip = null,Object? port = null,Object? user = null,Object? pwd = freezed,Object? keyId = freezed,Object? tags = freezed,Object? alterUrl = freezed,Object? autoConnect = null,Object? jumpId = freezed,Object? jumpChainIds = freezed,Object? custom = freezed,Object? wolCfg = freezed,Object? envs = freezed,Object? id = null,Object? customSystemType = freezed,Object? disabledCmdTypes = freezed,}) {
return _then(_Spi(
name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,ip: null == ip ? _self.ip : ip // ignore: cast_nullable_to_non_nullable
@@ -334,7 +357,8 @@ as String?,tags: freezed == tags ? _self._tags : tags // ignore: cast_nullable_t
as List<String>?,alterUrl: freezed == alterUrl ? _self.alterUrl : alterUrl // ignore: cast_nullable_to_non_nullable
as String?,autoConnect: null == autoConnect ? _self.autoConnect : autoConnect // ignore: cast_nullable_to_non_nullable
as bool,jumpId: freezed == jumpId ? _self.jumpId : jumpId // ignore: cast_nullable_to_non_nullable
as String?,custom: freezed == custom ? _self.custom : custom // ignore: cast_nullable_to_non_nullable
as String?,jumpChainIds: freezed == jumpChainIds ? _self._jumpChainIds : jumpChainIds // ignore: cast_nullable_to_non_nullable
as List<String>?,custom: freezed == custom ? _self.custom : custom // ignore: cast_nullable_to_non_nullable
as ServerCustom?,wolCfg: freezed == wolCfg ? _self.wolCfg : wolCfg // ignore: cast_nullable_to_non_nullable
as WakeOnLanCfg?,envs: freezed == envs ? _self._envs : envs // ignore: cast_nullable_to_non_nullable
as Map<String, String>?,id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable

View File

@@ -17,6 +17,9 @@ _Spi _$SpiFromJson(Map<String, dynamic> json) => _Spi(
alterUrl: json['alterUrl'] as String?,
autoConnect: json['autoConnect'] as bool? ?? true,
jumpId: json['jumpId'] as String?,
jumpChainIds: (json['jumpChainIds'] as List<dynamic>?)
?.map((e) => e as String)
.toList(),
custom: json['custom'] == null
? null
: ServerCustom.fromJson(json['custom'] as Map<String, dynamic>),
@@ -41,19 +44,19 @@ Map<String, dynamic> _$SpiToJson(_Spi instance) => <String, dynamic>{
'ip': instance.ip,
'port': instance.port,
'user': instance.user,
if (instance.pwd case final value?) 'pwd': value,
if (instance.keyId case final value?) 'pubKeyId': value,
if (instance.tags case final value?) 'tags': value,
if (instance.alterUrl case final value?) 'alterUrl': value,
'pwd': ?instance.pwd,
'pubKeyId': ?instance.keyId,
'tags': ?instance.tags,
'alterUrl': ?instance.alterUrl,
'autoConnect': instance.autoConnect,
if (instance.jumpId case final value?) 'jumpId': value,
if (instance.custom case final value?) 'custom': value,
if (instance.wolCfg case final value?) 'wolCfg': value,
if (instance.envs case final value?) 'envs': value,
'jumpId': ?instance.jumpId,
'jumpChainIds': ?instance.jumpChainIds,
'custom': ?instance.custom,
'wolCfg': ?instance.wolCfg,
'envs': ?instance.envs,
'id': instance.id,
if (_$SystemTypeEnumMap[instance.customSystemType] case final value?)
'customSystemType': value,
if (instance.disabledCmdTypes case final value?) 'disabledCmdTypes': value,
'customSystemType': ?_$SystemTypeEnumMap[instance.customSystemType],
'disabledCmdTypes': ?instance.disabledCmdTypes,
};
const _$SystemTypeEnumMap = {

View File

@@ -378,18 +378,27 @@ void _parseWindowsCpuData(ServerStatusUpdateReq req, Map<String, String> parsedO
// Windows CPU parsing - JSON format from PowerShell
final cpuRaw = WindowsStatusCmdType.cpu.findInMap(parsedOutput);
if (cpuRaw.isNotEmpty && cpuRaw != 'null' && !cpuRaw.contains('error') && !cpuRaw.contains('Exception')) {
final cpus = WindowsParser.parseCpu(cpuRaw, req.ss);
if (cpus.isNotEmpty) {
req.ss.cpu.update(cpus);
final cpuResult = WindowsParser.parseCpu(cpuRaw, req.ss);
if (cpuResult.cores.isNotEmpty) {
req.ss.cpu.update(cpuResult.cores);
final brandRaw = WindowsStatusCmdType.cpuBrand.findInMap(parsedOutput);
if (brandRaw.isNotEmpty && brandRaw != 'null') {
req.ss.cpu.brand.clear();
final brandLines = brandRaw.trim().split('\n');
final uniqueBrands = <String>{};
for (final line in brandLines) {
final trimmedLine = line.trim();
if (trimmedLine.isNotEmpty) {
uniqueBrands.add(trimmedLine);
}
}
if (uniqueBrands.isNotEmpty) {
final brandName = uniqueBrands.first;
req.ss.cpu.brand[brandName] = cpuResult.coreCount;
}
}
}
}
// Windows CPU brand parsing
final brandRaw = WindowsStatusCmdType.cpuBrand.findInMap(parsedOutput);
if (brandRaw.isNotEmpty && brandRaw != 'null') {
req.ss.cpu.brand.clear();
req.ss.cpu.brand[brandRaw.trim()] = 1;
}
} catch (e, s) {
Loggers.app.warning('Windows CPU parsing failed: $e', s);
}
@@ -427,8 +436,11 @@ void _parseWindowsDiskData(ServerStatusUpdateReq req, Map<String, String> parsed
/// Parse Windows uptime data
void _parseWindowsUptimeData(ServerStatusUpdateReq req, Map<String, String> parsedOutput) {
try {
final uptime = WindowsParser.parseUpTime(WindowsStatusCmdType.uptime.findInMap(parsedOutput));
if (uptime != null) {
final uptimeRaw = WindowsStatusCmdType.uptime.findInMap(parsedOutput);
if (uptimeRaw.isNotEmpty && uptimeRaw != 'null') {
// PowerShell now returns pre-formatted uptime string (e.g., "28 days, 5:00" or "5:00")
// No parsing needed - use it directly
final uptime = uptimeRaw.trim();
req.ss.more[StatusCmdType.uptime] = uptime;
}
} catch (e, s) {
@@ -541,38 +553,36 @@ List<NetSpeedPart> _parseWindowsNetwork(String raw, int currentTime) {
final dynamic jsonData = json.decode(raw);
final List<NetSpeedPart> netParts = [];
// PowerShell Get-Counter returns a structure with CounterSamples
if (jsonData is Map && jsonData.containsKey('CounterSamples')) {
final samples = jsonData['CounterSamples'] as List?;
if (samples != null && samples.length >= 2) {
// We need 2 samples to calculate speed (interval between them)
final Map<String, double> interfaceRx = {};
final Map<String, double> interfaceTx = {};
for (final sample in samples) {
final path = sample['Path']?.toString() ?? '';
final cookedValue = sample['CookedValue'] as num? ?? 0;
if (path.contains('Bytes Received/sec')) {
final interfaceName = _extractInterfaceName(path);
if (interfaceName.isNotEmpty) {
interfaceRx[interfaceName] = cookedValue.toDouble();
}
} else if (path.contains('Bytes Sent/sec')) {
final interfaceName = _extractInterfaceName(path);
if (interfaceName.isNotEmpty) {
interfaceTx[interfaceName] = cookedValue.toDouble();
}
}
}
// Create NetSpeedPart for each interface
for (final interfaceName in interfaceRx.keys) {
final rx = interfaceRx[interfaceName] ?? 0;
final tx = interfaceTx[interfaceName] ?? 0;
if (jsonData is List && jsonData.length >= 2) {
var sample1 = jsonData[jsonData.length - 2];
var sample2 = jsonData[jsonData.length - 1];
if (sample1 is Map && sample1.containsKey('value')) {
sample1 = sample1['value'];
}
if (sample2 is Map && sample2.containsKey('value')) {
sample2 = sample2['value'];
}
if (sample1 is List && sample2 is List && sample1.length == sample2.length) {
for (int i = 0; i < sample1.length; i++) {
final s1 = sample1[i];
final s2 = sample2[i];
final name = s1['Name']?.toString() ?? '';
if (name.isEmpty || name == '_Total') continue;
final rx1 = (s1['BytesReceivedPersec'] as num?)?.toDouble() ?? 0;
final rx2 = (s2['BytesReceivedPersec'] as num?)?.toDouble() ?? 0;
final tx1 = (s1['BytesSentPersec'] as num?)?.toDouble() ?? 0;
final tx2 = (s2['BytesSentPersec'] as num?)?.toDouble() ?? 0;
final time1 = (s1['Timestamp_Sys100NS'] as num?)?.toDouble() ?? 0;
final time2 = (s2['Timestamp_Sys100NS'] as num?)?.toDouble() ?? 0;
final timeDelta = (time2 - time1) / 10000000;
if (timeDelta <= 0) continue;
final rxDelta = rx2 - rx1;
final txDelta = tx2 - tx1;
if (rxDelta < 0 || txDelta < 0) continue;
final rxSpeed = rxDelta / timeDelta;
final txSpeed = txDelta / timeDelta;
netParts.add(
NetSpeedPart(interfaceName, BigInt.from(rx.toInt()), BigInt.from(tx.toInt()), currentTime),
NetSpeedPart(name, BigInt.from(rxSpeed.toInt()), BigInt.from(txSpeed.toInt()), currentTime),
);
}
}
@@ -584,53 +594,45 @@ List<NetSpeedPart> _parseWindowsNetwork(String raw, int currentTime) {
}
}
String _extractInterfaceName(String path) {
// Extract interface name from path like
// "\\Computer\\NetworkInterface(Interface Name)\\..."
final match = RegExp(r'\\NetworkInterface\(([^)]+)\)\\').firstMatch(path);
return match?.group(1) ?? '';
}
List<DiskIOPiece> _parseWindowsDiskIO(String raw, int currentTime) {
try {
final dynamic jsonData = json.decode(raw);
final List<DiskIOPiece> diskParts = [];
// PowerShell Get-Counter returns a structure with CounterSamples
if (jsonData is Map && jsonData.containsKey('CounterSamples')) {
final samples = jsonData['CounterSamples'] as List?;
if (samples != null) {
final Map<String, double> diskReads = {};
final Map<String, double> diskWrites = {};
for (final sample in samples) {
final path = sample['Path']?.toString() ?? '';
final cookedValue = sample['CookedValue'] as num? ?? 0;
if (path.contains('Disk Read Bytes/sec')) {
final diskName = _extractDiskName(path);
if (diskName.isNotEmpty) {
diskReads[diskName] = cookedValue.toDouble();
}
} else if (path.contains('Disk Write Bytes/sec')) {
final diskName = _extractDiskName(path);
if (diskName.isNotEmpty) {
diskWrites[diskName] = cookedValue.toDouble();
}
}
}
// Create DiskIOPiece for each disk - convert bytes to sectors
// (assuming 512 bytes per sector)
for (final diskName in diskReads.keys) {
final readBytes = diskReads[diskName] ?? 0;
final writeBytes = diskWrites[diskName] ?? 0;
final sectorsRead = (readBytes / 512).round();
final sectorsWrite = (writeBytes / 512).round();
if (jsonData is List && jsonData.length >= 2) {
var sample1 = jsonData[jsonData.length - 2];
var sample2 = jsonData[jsonData.length - 1];
if (sample1 is Map && sample1.containsKey('value')) {
sample1 = sample1['value'];
}
if (sample2 is Map && sample2.containsKey('value')) {
sample2 = sample2['value'];
}
if (sample1 is List && sample2 is List && sample1.length == sample2.length) {
for (int i = 0; i < sample1.length; i++) {
final s1 = sample1[i];
final s2 = sample2[i];
final name = s1['Name']?.toString() ?? '';
if (name.isEmpty || name == '_Total') continue;
final read1 = (s1['DiskReadBytesPersec'] as num?)?.toDouble() ?? 0;
final read2 = (s2['DiskReadBytesPersec'] as num?)?.toDouble() ?? 0;
final write1 = (s1['DiskWriteBytesPersec'] as num?)?.toDouble() ?? 0;
final write2 = (s2['DiskWriteBytesPersec'] as num?)?.toDouble() ?? 0;
final time1 = (s1['Timestamp_Sys100NS'] as num?)?.toDouble() ?? 0;
final time2 = (s2['Timestamp_Sys100NS'] as num?)?.toDouble() ?? 0;
final timeDelta = (time2 - time1) / 10000000;
if (timeDelta <= 0) continue;
final readDelta = read2 - read1;
final writeDelta = write2 - write1;
if (readDelta < 0 || writeDelta < 0) continue;
final readSpeed = readDelta / timeDelta;
final writeSpeed = writeDelta / timeDelta;
final sectorsRead = (readSpeed / 512).round();
final sectorsWrite = (writeSpeed / 512).round();
diskParts.add(
DiskIOPiece(
dev: diskName,
dev: name,
sectorsRead: sectorsRead,
sectorsWrite: sectorsWrite,
time: currentTime,
@@ -646,13 +648,6 @@ List<DiskIOPiece> _parseWindowsDiskIO(String raw, int currentTime) {
}
}
String _extractDiskName(String path) {
// Extract disk name from path like
// "\\Computer\\PhysicalDisk(Disk Name)\\..."
final match = RegExp(r'\\PhysicalDisk\(([^)]+)\)\\').firstMatch(path);
return match?.group(1) ?? '';
}
void _parseWindowsTemperatures(Temperatures temps, String raw) {
try {
// Handle error output
@@ -684,7 +679,7 @@ void _parseWindowsTemperatures(Temperatures temps, String raw) {
if (typeLines.isNotEmpty && valueLines.isNotEmpty) {
temps.parse(typeLines.join('\n'), valueLines.join('\n'));
}
} catch (e) {
// If JSON parsing fails, ignore temperature data
} catch (e, s) {
Loggers.app.warning('Failed to parse Windows temperature data', e, s);
}
}

View File

@@ -37,27 +37,39 @@ class Fifo<T> extends ListBase<T> {
}
}
abstract class TimeSeq<T extends List<TimeSeqIface>> extends Fifo<T> {
abstract class TimeSeq<T extends TimeSeqIface<T>> extends Fifo<List<T>> {
/// Due to the design, at least two elements are required, otherwise [pre] /
/// [now] will throw.
TimeSeq(T init1, T init2, {super.capacity}) : super(list: [init1, init2]);
TimeSeq(List<T> init1, List<T> init2, {super.capacity}) : super(list: [init1, init2]);
T get pre {
List<T> get pre {
return _list[length - 2];
}
T get now {
List<T> get now {
return _list[length - 1];
}
void onUpdate();
void update(T new_) {
void update(List<T> new_) {
add(new_);
if (pre.length != now.length) {
pre.removeWhere((e) => now.any((el) => e.same(el)));
pre.addAll(now.where((e) => pre.every((el) => !e.same(el))));
final previous = pre.toList(growable: false);
final remaining = previous.toList(growable: true);
final aligned = <T>[];
for (final current in now) {
final matchIndex = remaining.indexWhere((item) => item.same(current));
if (matchIndex >= 0) {
aligned.add(remaining.removeAt(matchIndex));
} else {
aligned.add(current);
}
}
_list[length - 2] = aligned;
}
onUpdate();

View File

@@ -7,6 +7,13 @@ import 'package:server_box/data/model/server/disk.dart';
import 'package:server_box/data/model/server/memory.dart';
import 'package:server_box/data/model/server/server.dart';
/// Windows CPU parse result
class WindowsCpuResult {
final List<SingleCpuCore> cores;
final int coreCount;
const WindowsCpuResult(this.cores, this.coreCount);
}
/// Windows-specific status parsing utilities
///
/// This module handles parsing of Windows PowerShell command outputs
@@ -94,30 +101,75 @@ class WindowsParser {
}
/// Parse Windows CPU information from PowerShell output
static List<SingleCpuCore> parseCpu(String raw, ServerStatus serverStatus) {
/// Returns WindowsCpuResult containing CPU cores and total core count
static WindowsCpuResult parseCpu(String raw, ServerStatus serverStatus) {
try {
final dynamic jsonData = json.decode(raw);
final List<SingleCpuCore> cpus = [];
int totalCoreCount = 1;
if (jsonData is List) {
for (int i = 0; i < jsonData.length; i++) {
final cpu = jsonData[i];
final loadPercentage = cpu['LoadPercentage'] ?? 0;
final usage = loadPercentage as int;
// Multiple physical processors
totalCoreCount = 0; // Reset to sum up
var logicalProcessorOffset = 0;
final prevCpus = serverStatus.cpu.now;
for (int procIdx = 0; procIdx < jsonData.length; procIdx++) {
final processor = jsonData[procIdx];
final loadPercentage = (processor['LoadPercentage'] as num?) ?? 0;
final numberOfCores = (processor['NumberOfCores'] as int?) ?? 1;
final numberOfLogicalProcessors = (processor['NumberOfLogicalProcessors'] as int?) ?? numberOfCores;
totalCoreCount += numberOfCores;
final usage = loadPercentage.toInt();
final idle = 100 - usage;
// Get previous CPU data to calculate cumulative values
final prevCpus = serverStatus.cpu.now;
final prevCpu = i < prevCpus.length ? prevCpus[i] : null;
// Create a SingleCpuCore entry for each logical processor
// Windows only reports overall CPU load, so we distribute it evenly
for (int i = 0; i < numberOfLogicalProcessors; i++) {
final coreId = logicalProcessorOffset + i;
// Skip summary entry at index 0 when looking up previous samples
final prevIndex = coreId + 1;
final prevCpu = prevIndex < prevCpus.length ? prevCpus[prevIndex] : null;
// LIMITATION: Windows CPU counters approach
// PowerShell provides LoadPercentage as instantaneous percentage, not cumulative time.
// We simulate cumulative counters by adding current percentages to previous totals.
// This approach has limitations:
// 1. Not as accurate as true cumulative time counters (Linux /proc/stat)
// 2. May drift over time with variable polling intervals
// 3. Results depend on consistent polling frequency
// However, this allows compatibility with existing delta-based CPU calculation logic.
// LIMITATION: Windows CPU counters approach
// PowerShell provides LoadPercentage as instantaneous percentage, not cumulative time.
// We simulate cumulative counters by adding current percentages to previous totals.
// Additionally, Windows only provides overall CPU load, not per-core load.
// We distribute the load evenly across all logical processors.
final newUser = (prevCpu?.user ?? 0) + usage;
final newIdle = (prevCpu?.idle ?? 0) + idle;
cpus.add(
SingleCpuCore(
'cpu$coreId',
newUser, // cumulative user time
0, // sys (not available)
0, // nice (not available)
newIdle, // cumulative idle time
0, // iowait (not available)
0, // irq (not available)
0, // softirq (not available)
),
);
}
logicalProcessorOffset += numberOfLogicalProcessors;
}
} else if (jsonData is Map) {
// Single physical processor
final loadPercentage = (jsonData['LoadPercentage'] as num?) ?? 0;
final numberOfCores = (jsonData['NumberOfCores'] as int?) ?? 1;
final numberOfLogicalProcessors = (jsonData['NumberOfLogicalProcessors'] as int?) ?? numberOfCores;
totalCoreCount = numberOfCores;
final usage = loadPercentage.toInt();
final idle = 100 - usage;
// Create a SingleCpuCore entry for each logical processor
final prevCpus = serverStatus.cpu.now;
for (int i = 0; i < numberOfLogicalProcessors; i++) {
// Skip summary entry at index 0 when looking up previous samples
final prevIndex = i + 1;
final prevCpu = prevIndex < prevCpus.length ? prevCpus[prevIndex] : null;
// LIMITATION: See comment above for Windows CPU counter limitations
final newUser = (prevCpu?.user ?? 0) + usage;
final newIdle = (prevCpu?.idle ?? 0) + idle;
@@ -125,46 +177,43 @@ class WindowsParser {
SingleCpuCore(
'cpu$i',
newUser, // cumulative user time
0, // sys (not available)
0, // nice (not available)
0, // sys
0, // nice
newIdle, // cumulative idle time
0, // iowait (not available)
0, // irq (not available)
0, // softirq (not available)
0, // iowait
0, // irq
0, // softirq
),
);
}
} else if (jsonData is Map) {
// Single CPU core
final loadPercentage = jsonData['LoadPercentage'] ?? 0;
final usage = loadPercentage as int;
final idle = 100 - usage;
// Get previous CPU data to calculate cumulative values
final prevCpus = serverStatus.cpu.now;
final prevCpu = prevCpus.isNotEmpty ? prevCpus[0] : null;
// LIMITATION: See comment above for Windows CPU counter limitations
final newUser = (prevCpu?.user ?? 0) + usage;
final newIdle = (prevCpu?.idle ?? 0) + idle;
cpus.add(
SingleCpuCore(
'cpu0',
newUser, // cumulative user time
0, // sys
0, // nice
newIdle, // cumulative idle time
0, // iowait
0, // irq
0, // softirq
),
);
}
return cpus;
} catch (e) {
return [];
// Add a summary entry at the beginning (like Linux 'cpu' line)
// This is the aggregate of all logical processors
if (cpus.isNotEmpty) {
int totalUser = 0;
int totalIdle = 0;
for (final core in cpus) {
totalUser += core.user;
totalIdle += core.idle;
}
// Insert at the beginning with ID 'cpu' (matching Linux format)
cpus.insert(0, SingleCpuCore(
'cpu', // Summary entry, like Linux
totalUser,
0,
0,
totalIdle,
0,
0,
0,
));
}
return WindowsCpuResult(cpus, totalCoreCount);
} catch (e, s) {
Loggers.app.warning('Windows CPU parsing failed: $e', s);
return WindowsCpuResult([], 1);
}
}

View File

@@ -16,5 +16,5 @@ Map<String, dynamic> _$WakeOnLanCfgToJson(WakeOnLanCfg instance) =>
<String, dynamic>{
'mac': instance.mac,
'ip': instance.ip,
if (instance.pwd case final value?) 'pwd': value,
'pwd': ?instance.pwd,
};

View File

@@ -6,17 +6,32 @@ class SftpReq {
final String localPath;
final SftpReqType type;
String? privateKey;
Spi? jumpSpi;
String? jumpPrivateKey;
List<Spi>? jumpChain;
List<String?>? jumpPrivateKeys;
Map<String, String>? knownHostFingerprints;
SftpReq(this.spi, this.remotePath, this.localPath, this.type) {
final keyId = spi.keyId;
if (keyId != null) {
privateKey = getPrivateKey(keyId);
}
if (spi.jumpId != null) {
jumpSpi = Stores.server.box.get(spi.jumpId);
jumpPrivateKey = Stores.key.fetchOne(jumpSpi?.keyId)?.key;
if (spi.jumpChainIds != null || spi.jumpId != null) {
// Use resolveMergedJumpChain to recursively expand nested hop chains
final chain = resolveMergedJumpChain(spi);
final keys = <String?>[];
for (final hop in chain) {
keys.add(hop.keyId != null ? getPrivateKey(hop.keyId!) : null);
}
// Always set when a jump is configured so the isolate won't fallback to Stores.
jumpChain = chain;
jumpPrivateKeys = keys;
}
try {
knownHostFingerprints = Map<String, String>.from(Stores.setting.sshKnownHostFingerprints.get());
} catch (e, s) {
Loggers.app.warning('Failed to load SSH known host fingerprints', e, s);
knownHostFingerprints = null;
}
}
}
@@ -30,7 +45,7 @@ class SftpReqStatus {
late SftpWorker worker;
final Completer? completer;
String get fileName => req.localPath.split('/').last;
String get fileName => req.localPath.split(Pfs.seperator).last;
// status of the download
double? progress;
@@ -83,4 +98,4 @@ class SftpReqStatus {
}
}
enum SftpWorkerStatus { preparing, sshConnectted, loading, finished }
enum SftpWorkerStatus { preparing, sshConnected, loading, finished }

View File

@@ -63,13 +63,14 @@ Future<void> _download(SftpReq req, SendPort mainSendPort, SendErrorFunction sen
final client = await genClient(
req.spi,
privateKey: req.privateKey,
jumpSpi: req.jumpSpi,
jumpPrivateKey: req.jumpPrivateKey,
jumpChain: req.jumpChain,
jumpPrivateKeys: req.jumpPrivateKeys,
knownHostFingerprints: req.knownHostFingerprints,
);
mainSendPort.send(SftpWorkerStatus.sshConnectted);
mainSendPort.send(SftpWorkerStatus.sshConnected);
/// Create the directory if not exists
final dirPath = req.localPath.substring(0, req.localPath.lastIndexOf('/'));
final dirPath = req.localPath.substring(0, req.localPath.lastIndexOf(Pfs.seperator));
await Directory(dirPath).create(recursive: true);
/// Use [FileMode.write] to overwrite the file
@@ -119,10 +120,11 @@ Future<void> _upload(SftpReq req, SendPort mainSendPort, SendErrorFunction sendE
final client = await genClient(
req.spi,
privateKey: req.privateKey,
jumpSpi: req.jumpSpi,
jumpPrivateKey: req.jumpPrivateKey,
jumpChain: req.jumpChain,
jumpPrivateKeys: req.jumpPrivateKeys,
knownHostFingerprints: req.knownHostFingerprints,
);
mainSendPort.send(SftpWorkerStatus.sshConnectted);
mainSendPort.send(SftpWorkerStatus.sshConnected);
final local = File(req.localPath);
if (!await local.exists()) {

View File

@@ -0,0 +1,343 @@
import 'dart:async';
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:meta/meta.dart';
import 'package:riverpod/riverpod.dart';
import 'package:server_box/data/model/ai/ask_ai_models.dart';
import 'package:server_box/data/res/store.dart';
import 'package:server_box/data/store/setting.dart';
final askAiRepositoryProvider = Provider<AskAiRepository>((ref) {
return AskAiRepository();
});
class AskAiRepository {
AskAiRepository({Dio? dio}) : _dio = dio ?? Dio();
final Dio _dio;
SettingStore get _settings => Stores.setting;
/// Streams the AI response using the configured endpoint.
Stream<AskAiEvent> ask({
required String selection,
String? localeHint,
List<AskAiMessage> conversation = const [],
}) async* {
final baseUrl = _settings.askAiBaseUrl.fetch().trim();
final apiKey = _settings.askAiApiKey.fetch().trim();
final model = _settings.askAiModel.fetch().trim();
final missing = <AskAiConfigField>[];
if (baseUrl.isEmpty) missing.add(AskAiConfigField.baseUrl);
if (apiKey.isEmpty) missing.add(AskAiConfigField.apiKey);
if (model.isEmpty) missing.add(AskAiConfigField.model);
if (missing.isNotEmpty) {
throw AskAiConfigException(missingFields: missing);
}
final parsedBaseUri = Uri.tryParse(baseUrl);
final hasScheme = parsedBaseUri?.hasScheme ?? false;
final hasHost = (parsedBaseUri?.host ?? '').isNotEmpty;
if (!hasScheme || !hasHost) {
throw AskAiConfigException(invalidBaseUrl: baseUrl);
}
final uri = _composeUri(baseUrl, '/v1/chat/completions');
final authHeader = apiKey.startsWith('Bearer ') ? apiKey : 'Bearer $apiKey';
final headers = <String, String>{
Headers.acceptHeader: 'text/event-stream',
Headers.contentTypeHeader: Headers.jsonContentType,
'Authorization': authHeader,
};
final requestBody = _buildRequestBody(
model: model,
selection: selection,
localeHint: localeHint,
conversation: conversation,
);
Response<ResponseBody> response;
try {
response = await _dio.postUri<ResponseBody>(
uri,
data: jsonEncode(requestBody),
options: Options(
responseType: ResponseType.stream,
headers: headers,
sendTimeout: const Duration(seconds: 20),
receiveTimeout: const Duration(minutes: 2),
),
);
} on DioException catch (e) {
throw AskAiNetworkException(message: e.message ?? 'Request failed', cause: e);
}
final body = response.data;
if (body == null) {
throw AskAiNetworkException(message: 'Empty response body');
}
final contentBuffer = StringBuffer();
final commands = <AskAiCommand>[];
final toolBuilders = <int, _ToolCallBuilder>{};
final utf8Stream = body.stream.cast<List<int>>().transform(utf8.decoder);
final carry = StringBuffer();
try {
await for (final chunk in utf8Stream) {
carry.write(chunk);
final segments = carry.toString().split('\n\n');
carry
..clear()
..write(segments.removeLast());
for (final segment in segments) {
final lines = segment.split('\n');
for (final rawLine in lines) {
final line = rawLine.trim();
if (line.isEmpty || !line.startsWith('data:')) {
continue;
}
final payload = line.substring(5).trim();
if (payload.isEmpty) {
continue;
}
if (payload == '[DONE]') {
yield AskAiCompleted(
fullText: contentBuffer.toString(),
commands: List.unmodifiable(commands),
);
return;
}
Map<String, dynamic> json;
try {
json = jsonDecode(payload) as Map<String, dynamic>;
} catch (e, s) {
yield AskAiStreamError(e, s);
continue;
}
final choices = json['choices'];
if (choices is! List || choices.isEmpty) {
continue;
}
for (final choice in choices) {
if (choice is! Map<String, dynamic>) {
continue;
}
final delta = choice['delta'];
if (delta is Map<String, dynamic>) {
final content = delta['content'];
if (content is String && content.isNotEmpty) {
contentBuffer.write(content);
yield AskAiContentDelta(content);
} else if (content is List) {
for (final item in content) {
if (item is Map<String, dynamic>) {
final text = item['text'] as String?;
if (text != null && text.isNotEmpty) {
contentBuffer.write(text);
yield AskAiContentDelta(text);
}
}
}
}
final toolCalls = delta['tool_calls'];
if (toolCalls is List) {
for (final toolCall in toolCalls) {
if (toolCall is! Map<String, dynamic>) continue;
final index = toolCall['index'] as int? ?? 0;
final builder = toolBuilders.putIfAbsent(index, _ToolCallBuilder.new);
final function = toolCall['function'];
if (function is Map<String, dynamic>) {
builder.name ??= function['name'] as String?;
final args = function['arguments'] as String?;
if (args != null && args.isNotEmpty) {
builder.arguments.write(args);
final command = builder.tryBuild();
if (command != null) {
commands.add(command);
yield AskAiToolSuggestion(command);
}
}
}
}
}
}
final finishReason = choice['finish_reason'];
if (finishReason == 'tool_calls') {
for (final builder in toolBuilders.values) {
final command = builder.tryBuild(force: true);
if (command != null) {
commands.add(command);
yield AskAiToolSuggestion(command);
}
}
toolBuilders.clear();
}
}
}
}
}
// Flush remaining buffer if [DONE] not received.
if (contentBuffer.isNotEmpty || commands.isNotEmpty) {
yield AskAiCompleted(
fullText: contentBuffer.toString(),
commands: List.unmodifiable(commands),
);
}
} catch (e, s) {
yield AskAiStreamError(e, s);
return;
}
}
Map<String, dynamic> _buildRequestBody({
required String model,
required String selection,
required List<AskAiMessage> conversation,
String? localeHint,
}) {
final promptBuffer = StringBuffer()
..writeln('你是一个 SSH 终端助手。')
..writeln('用户会提供一段终端输出或命令,请结合上下文给出解释。')
..writeln('当需要给出可执行命令时,调用 `recommend_shell` 工具,并提供简短描述。')
..writeln('仅在非常确定命令安全时才给出建议。');
if (localeHint != null && localeHint.isNotEmpty) {
promptBuffer
.writeln('请优先使用用户的语言输出:$localeHint');
}
final messages = <Map<String, String>>[
{
'role': 'system',
'content': promptBuffer.toString(),
},
...conversation.map((message) => {
'role': message.apiRole,
'content': message.content,
}),
{
'role': 'user',
'content': '以下是终端选中的内容:\n$selection',
},
];
return {
'model': model,
'stream': true,
'messages': messages,
'tools': [
{
'type': 'function',
'function': {
'name': 'recommend_shell',
'description': '返回一个用户可以直接复制执行的终端命令。',
'parameters': {
'type': 'object',
'required': ['command'],
'properties': {
'command': {
'type': 'string',
'description': '完整的终端命令,确保可以被粘贴后直接执行。',
},
'description': {
'type': 'string',
'description': '简述该命令的作用或注意事项。',
},
},
},
},
},
],
};
}
Uri _composeUri(String base, String path) {
final sanitizedBase = base.replaceAll(RegExp(r'/+$'), '');
final sanitizedPath = path.replaceFirst(RegExp(r'^/+'), '');
return Uri.parse('$sanitizedBase/$sanitizedPath');
}
}
class _ToolCallBuilder {
_ToolCallBuilder();
final StringBuffer arguments = StringBuffer();
String? name;
bool _emitted = false;
AskAiCommand? tryBuild({bool force = false}) {
if (_emitted && !force) return null;
final raw = arguments.toString();
try {
final decoded = jsonDecode(raw) as Map<String, dynamic>;
final command = decoded['command'] as String?;
if (command == null || command.trim().isEmpty) {
if (force) {
_emitted = true;
}
return null;
}
final description = decoded['description'] as String? ?? decoded['explanation'] as String? ?? '';
_emitted = true;
return AskAiCommand(
command: command.trim(),
description: description.trim(),
toolName: name,
);
} on FormatException {
if (force) {
_emitted = true;
}
return null;
}
}
}
@immutable
enum AskAiConfigField { baseUrl, apiKey, model }
class AskAiConfigException implements Exception {
const AskAiConfigException({this.missingFields = const [], this.invalidBaseUrl});
final List<AskAiConfigField> missingFields;
final String? invalidBaseUrl;
bool get hasInvalidBaseUrl => (invalidBaseUrl ?? '').isNotEmpty;
@override
String toString() {
final parts = <String>[];
if (missingFields.isNotEmpty) {
parts.add('missing: ${missingFields.map((e) => e.name).join(', ')}');
}
if (hasInvalidBaseUrl) {
parts.add('invalidBaseUrl: $invalidBaseUrl');
}
if (parts.isEmpty) {
return 'AskAiConfigException()';
}
return 'AskAiConfigException(${parts.join('; ')})';
}
}
@immutable
class AskAiNetworkException implements Exception {
const AskAiNetworkException({required this.message, this.cause});
final String message;
final Object? cause;
@override
String toString() => 'AskAiNetworkException(message: $message)';
}

View File

@@ -1,21 +0,0 @@
import 'package:flutter/material.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'app.g.dart';
part 'app.freezed.dart';
@freezed
abstract class AppState with _$AppState {
const factory AppState() = _AppState;
}
@Riverpod(keepAlive: true)
class AppStates extends _$AppStates {
static BuildContext? ctx;
@override
AppState build() {
return const AppState();
}
}

View File

@@ -1,206 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'app.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$AppState {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is AppState);
}
@override
int get hashCode => runtimeType.hashCode;
@override
String toString() {
return 'AppState()';
}
}
/// @nodoc
class $AppStateCopyWith<$Res> {
$AppStateCopyWith(AppState _, $Res Function(AppState) __);
}
/// Adds pattern-matching-related methods to [AppState].
extension AppStatePatterns on AppState {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AppState value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _AppState() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AppState value) $default,){
final _that = this;
switch (_that) {
case _AppState():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AppState value)? $default,){
final _that = this;
switch (_that) {
case _AppState() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function()? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _AppState() when $default != null:
return $default();case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function() $default,) {final _that = this;
switch (_that) {
case _AppState():
return $default();case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function()? $default,) {final _that = this;
switch (_that) {
case _AppState() when $default != null:
return $default();case _:
return null;
}
}
}
/// @nodoc
class _AppState implements AppState {
const _AppState();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppState);
}
@override
int get hashCode => runtimeType.hashCode;
@override
String toString() {
return 'AppState()';
}
}
// dart format on

View File

@@ -1,25 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'app.dart';
// **************************************************************************
// RiverpodGenerator
// **************************************************************************
String _$appStatesHash() => r'ef96f10f6fff0f3dd6d3128ebf070ad79cbc8bc9';
/// See also [AppStates].
@ProviderFor(AppStates)
final appStatesProvider = NotifierProvider<AppStates, AppState>.internal(
AppStates.new,
name: r'appStatesProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$appStatesHash,
dependencies: null,
allTransitiveDependencies: null,
);
typedef _$AppStates = Notifier<AppState>;
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

View File

@@ -40,22 +40,15 @@ class ContainerNotifier extends _$ContainerNotifier {
ContainerState build(SSHClient? client, String userName, String hostId, BuildContext context) {
final type = Stores.container.getType(hostId);
final initialState = ContainerState(type: type);
// Async initialization
Future.microtask(() => refresh());
return initialState;
}
Future<void> setType(ContainerType type) async {
state = state.copyWith(
type: type,
error: null,
runLog: null,
items: null,
images: null,
version: null,
);
state = state.copyWith(type: type, error: null, runLog: null, items: null, images: null, version: null);
Stores.container.setType(type, hostId);
sudoCompleter = Completer<bool>();
await refresh();
@@ -180,16 +173,20 @@ class ContainerNotifier extends _$ContainerNotifier {
try {
final statsLines = statsRaw.split('\n');
statsLines.removeWhere((element) => element.isEmpty);
for (var item in state.items!) {
final items = state.items;
if (items == null) return;
for (var item in items) {
final id = item.id;
if (id == null) continue;
if (id.length < 5) continue;
final statsLine = statsLines.firstWhereOrNull(
/// Use 5 characters to match the container id, possibility of mismatch
/// is very low.
(element) => element.contains(id.substring(0, 5)),
);
if (statsLine == null) continue;
item.parseStats(statsLine);
item.parseStats(statsLine, state.version);
}
} catch (e, trace) {
state = state.copyWith(
@@ -267,7 +264,6 @@ class ContainerNotifier extends _$ContainerNotifier {
}
}
const _jsonFmt = '--format "{{json .}}"';
enum ContainerCmdType {
@@ -284,7 +280,7 @@ enum ContainerCmdType {
return switch (this) {
ContainerCmdType.version => '$prefix version $_jsonFmt',
ContainerCmdType.ps => switch (type) {
/// TODO: Rollback to json format when permformance recovers.
/// TODO: Rollback to json format when performance recovers.
/// Use [_jsonFmt] in Docker will cause the operation to slow down.
ContainerType.docker =>
'$prefix ps -a --format "table {{printf \\"'

View File

@@ -6,35 +6,98 @@ part of 'container.dart';
// RiverpodGenerator
// **************************************************************************
String _$containerNotifierHash() => r'fea65e66499234b0a59bffff8d69c4ab8c93b2fd';
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
/// Copied from Dart SDK
class _SystemHash {
_SystemHash._();
@ProviderFor(ContainerNotifier)
const containerProvider = ContainerNotifierFamily._();
static int combine(int hash, int value) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + value);
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
return hash ^ (hash >> 6);
final class ContainerNotifierProvider
extends $NotifierProvider<ContainerNotifier, ContainerState> {
const ContainerNotifierProvider._({
required ContainerNotifierFamily super.from,
required (SSHClient?, String, String, BuildContext) super.argument,
}) : super(
retry: null,
name: r'containerProvider',
isAutoDispose: true,
dependencies: null,
$allTransitiveDependencies: null,
);
@override
String debugGetCreateSourceHash() => _$containerNotifierHash();
@override
String toString() {
return r'containerProvider'
''
'$argument';
}
static int finish(int hash) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
// ignore: parameter_assignments
hash = hash ^ (hash >> 11);
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
@$internal
@override
ContainerNotifier create() => ContainerNotifier();
/// {@macro riverpod.override_with_value}
Override overrideWithValue(ContainerState value) {
return $ProviderOverride(
origin: this,
providerOverride: $SyncValueProvider<ContainerState>(value),
);
}
@override
bool operator ==(Object other) {
return other is ContainerNotifierProvider && other.argument == argument;
}
@override
int get hashCode {
return argument.hashCode;
}
}
abstract class _$ContainerNotifier
extends BuildlessAutoDisposeNotifier<ContainerState> {
late final SSHClient? client;
late final String userName;
late final String hostId;
late final BuildContext context;
String _$containerNotifierHash() => r'85457ec75264199c284572ee45beeaccba2044a1';
final class ContainerNotifierFamily extends $Family
with
$ClassFamilyOverride<
ContainerNotifier,
ContainerState,
ContainerState,
ContainerState,
(SSHClient?, String, String, BuildContext)
> {
const ContainerNotifierFamily._()
: super(
retry: null,
name: r'containerProvider',
dependencies: null,
$allTransitiveDependencies: null,
isAutoDispose: true,
);
ContainerNotifierProvider call(
SSHClient? client,
String userName,
String hostId,
BuildContext context,
) => ContainerNotifierProvider._(
argument: (client, userName, hostId, context),
from: this,
);
@override
String toString() => r'containerProvider';
}
abstract class _$ContainerNotifier extends $Notifier<ContainerState> {
late final _$args = ref.$arg as (SSHClient?, String, String, BuildContext);
SSHClient? get client => _$args.$1;
String get userName => _$args.$2;
String get hostId => _$args.$3;
BuildContext get context => _$args.$4;
ContainerState build(
SSHClient? client,
@@ -42,187 +105,19 @@ abstract class _$ContainerNotifier
String hostId,
BuildContext context,
);
}
/// See also [ContainerNotifier].
@ProviderFor(ContainerNotifier)
const containerNotifierProvider = ContainerNotifierFamily();
/// See also [ContainerNotifier].
class ContainerNotifierFamily extends Family<ContainerState> {
/// See also [ContainerNotifier].
const ContainerNotifierFamily();
/// See also [ContainerNotifier].
ContainerNotifierProvider call(
SSHClient? client,
String userName,
String hostId,
BuildContext context,
) {
return ContainerNotifierProvider(client, userName, hostId, context);
}
@$mustCallSuper
@override
ContainerNotifierProvider getProviderOverride(
covariant ContainerNotifierProvider provider,
) {
return call(
provider.client,
provider.userName,
provider.hostId,
provider.context,
);
}
static const Iterable<ProviderOrFamily>? _dependencies = null;
@override
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
@override
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
_allTransitiveDependencies;
@override
String? get name => r'containerNotifierProvider';
}
/// See also [ContainerNotifier].
class ContainerNotifierProvider
extends AutoDisposeNotifierProviderImpl<ContainerNotifier, ContainerState> {
/// See also [ContainerNotifier].
ContainerNotifierProvider(
SSHClient? client,
String userName,
String hostId,
BuildContext context,
) : this._internal(
() => ContainerNotifier()
..client = client
..userName = userName
..hostId = hostId
..context = context,
from: containerNotifierProvider,
name: r'containerNotifierProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$containerNotifierHash,
dependencies: ContainerNotifierFamily._dependencies,
allTransitiveDependencies:
ContainerNotifierFamily._allTransitiveDependencies,
client: client,
userName: userName,
hostId: hostId,
context: context,
);
ContainerNotifierProvider._internal(
super._createNotifier, {
required super.name,
required super.dependencies,
required super.allTransitiveDependencies,
required super.debugGetCreateSourceHash,
required super.from,
required this.client,
required this.userName,
required this.hostId,
required this.context,
}) : super.internal();
final SSHClient? client;
final String userName;
final String hostId;
final BuildContext context;
@override
ContainerState runNotifierBuild(covariant ContainerNotifier notifier) {
return notifier.build(client, userName, hostId, context);
}
@override
Override overrideWith(ContainerNotifier Function() create) {
return ProviderOverride(
origin: this,
override: ContainerNotifierProvider._internal(
() => create()
..client = client
..userName = userName
..hostId = hostId
..context = context,
from: from,
name: null,
dependencies: null,
allTransitiveDependencies: null,
debugGetCreateSourceHash: null,
client: client,
userName: userName,
hostId: hostId,
context: context,
),
);
}
@override
AutoDisposeNotifierProviderElement<ContainerNotifier, ContainerState>
createElement() {
return _ContainerNotifierProviderElement(this);
}
@override
bool operator ==(Object other) {
return other is ContainerNotifierProvider &&
other.client == client &&
other.userName == userName &&
other.hostId == hostId &&
other.context == context;
}
@override
int get hashCode {
var hash = _SystemHash.combine(0, runtimeType.hashCode);
hash = _SystemHash.combine(hash, client.hashCode);
hash = _SystemHash.combine(hash, userName.hashCode);
hash = _SystemHash.combine(hash, hostId.hashCode);
hash = _SystemHash.combine(hash, context.hashCode);
return _SystemHash.finish(hash);
void runBuild() {
final created = build(_$args.$1, _$args.$2, _$args.$3, _$args.$4);
final ref = this.ref as $Ref<ContainerState, ContainerState>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<ContainerState, ContainerState>,
ContainerState,
Object?,
Object?
>;
element.handleValue(ref, created);
}
}
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
mixin ContainerNotifierRef on AutoDisposeNotifierProviderRef<ContainerState> {
/// The parameter `client` of this provider.
SSHClient? get client;
/// The parameter `userName` of this provider.
String get userName;
/// The parameter `hostId` of this provider.
String get hostId;
/// The parameter `context` of this provider.
BuildContext get context;
}
class _ContainerNotifierProviderElement
extends
AutoDisposeNotifierProviderElement<ContainerNotifier, ContainerState>
with ContainerNotifierRef {
_ContainerNotifierProviderElement(super.provider);
@override
SSHClient? get client => (origin as ContainerNotifierProvider).client;
@override
String get userName => (origin as ContainerNotifierProvider).userName;
@override
String get hostId => (origin as ContainerNotifierProvider).hostId;
@override
BuildContext get context => (origin as ContainerNotifierProvider).context;
}
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

View File

@@ -6,22 +6,59 @@ part of 'private_key.dart';
// RiverpodGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
@ProviderFor(PrivateKeyNotifier)
const privateKeyProvider = PrivateKeyNotifierProvider._();
final class PrivateKeyNotifierProvider
extends $NotifierProvider<PrivateKeyNotifier, PrivateKeyState> {
const PrivateKeyNotifierProvider._()
: super(
from: null,
argument: null,
retry: null,
name: r'privateKeyProvider',
isAutoDispose: false,
dependencies: null,
$allTransitiveDependencies: null,
);
@override
String debugGetCreateSourceHash() => _$privateKeyNotifierHash();
@$internal
@override
PrivateKeyNotifier create() => PrivateKeyNotifier();
/// {@macro riverpod.override_with_value}
Override overrideWithValue(PrivateKeyState value) {
return $ProviderOverride(
origin: this,
providerOverride: $SyncValueProvider<PrivateKeyState>(value),
);
}
}
String _$privateKeyNotifierHash() =>
r'12edd05dca29d1cbc9e2a3e047c3d417d22f7bb7';
/// See also [PrivateKeyNotifier].
@ProviderFor(PrivateKeyNotifier)
final privateKeyNotifierProvider =
NotifierProvider<PrivateKeyNotifier, PrivateKeyState>.internal(
PrivateKeyNotifier.new,
name: r'privateKeyNotifierProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$privateKeyNotifierHash,
dependencies: null,
allTransitiveDependencies: null,
);
typedef _$PrivateKeyNotifier = Notifier<PrivateKeyState>;
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
abstract class _$PrivateKeyNotifier extends $Notifier<PrivateKeyState> {
PrivateKeyState build();
@$mustCallSuper
@override
void runBuild() {
final created = build();
final ref = this.ref as $Ref<PrivateKeyState, PrivateKeyState>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<PrivateKeyState, PrivateKeyState>,
PrivateKeyState,
Object?,
Object?
>;
element.handleValue(ref, created);
}
}

View File

@@ -1,6 +1,7 @@
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_riverpod/misc.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/all.dart';
import 'package:server_box/data/provider/sftp.dart';
@@ -10,7 +11,7 @@ import 'package:server_box/data/provider/snippet.dart';
/// ref.useNotifier, ref.readProvider, ref.watchProvider
///
/// Usage:
/// - `providers.read.server` -> `ref.read(serversNotifierProvider)`
/// - `providers.read.server` -> `ref.read(serversProvider)`
/// - `providers.use.snippet` -> `ref.read(snippetsNotifierProvider.notifier)`
extension RiverpodNotifiers on ConsumerState {
@@ -45,11 +46,11 @@ final class ReadMyProvider {
T call<T>(ProviderBase<T> provider) => ref.read(provider);
// Specific provider getters
ServersState get server => ref.read(serversNotifierProvider);
SnippetState get snippet => ref.read(snippetNotifierProvider);
ServersState get server => ref.read(serversProvider);
SnippetState get snippet => ref.read(snippetProvider);
AppState get app => ref.read(appStatesProvider);
PrivateKeyState get privateKey => ref.read(privateKeyNotifierProvider);
SftpState get sftp => ref.read(sftpNotifierProvider);
PrivateKeyState get privateKey => ref.read(privateKeyProvider);
SftpState get sftp => ref.read(sftpProvider);
}
final class WatchMyProvider {
@@ -59,11 +60,11 @@ final class WatchMyProvider {
T call<T>(ProviderBase<T> provider) => ref.watch(provider);
// Specific provider getters
ServersState get server => ref.watch(serversNotifierProvider);
SnippetState get snippet => ref.watch(snippetNotifierProvider);
ServersState get server => ref.watch(serversProvider);
SnippetState get snippet => ref.watch(snippetProvider);
AppState get app => ref.watch(appStatesProvider);
PrivateKeyState get privateKey => ref.watch(privateKeyNotifierProvider);
SftpState get sftp => ref.watch(sftpNotifierProvider);
PrivateKeyState get privateKey => ref.watch(privateKeyProvider);
SftpState get sftp => ref.watch(sftpProvider);
}
final class UseNotifierMyProvider {
@@ -74,9 +75,9 @@ final class UseNotifierMyProvider {
ref.read(provider.notifier);
// Specific provider notifier getters
ServersNotifier get server => ref.read(serversNotifierProvider.notifier);
SnippetNotifier get snippet => ref.read(snippetNotifierProvider.notifier);
ServersNotifier get server => ref.read(serversProvider.notifier);
SnippetNotifier get snippet => ref.read(snippetProvider.notifier);
AppStates get app => ref.read(appStatesProvider.notifier);
PrivateKeyNotifier get privateKey => ref.read(privateKeyNotifierProvider.notifier);
SftpNotifier get sftp => ref.read(sftpNotifierProvider.notifier);
PrivateKeyNotifier get privateKey => ref.read(privateKeyProvider.notifier);
SftpNotifier get sftp => ref.read(sftpProvider.notifier);
}

View File

@@ -6,7 +6,6 @@ import 'package:dartssh2/dartssh2.dart';
import 'package:dio/dio.dart';
import 'package:dio/io.dart';
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:server_box/core/extension/context/locale.dart';
@@ -45,7 +44,7 @@ class PveNotifier extends _$PveNotifier {
@override
PveState build(Spi spiParam) {
spi = spiParam;
final serverState = ref.watch(serverNotifierProvider(spi.id));
final serverState = ref.watch(serverProvider(spi.id));
final client = serverState.client;
if (client == null) {
return const PveState(error: PveErr(type: PveErrType.net, message: 'Server client is null'));
@@ -108,7 +107,7 @@ class PveNotifier extends _$PveNotifier {
final newUrl = Uri.parse(
addr,
).replace(host: 'localhost', port: _localPort).toString();
debugPrint('Forwarding $newUrl to $addr');
dprint('Forwarding $newUrl to $addr');
}
}
@@ -235,11 +234,15 @@ class PveNotifier extends _$PveNotifier {
Future<void> dispose() async {
try {
await _serverSocket.close();
} catch (_) {}
} catch (e, s) {
Loggers.app.warning('Failed to close server socket', e, s);
}
for (final forward in _forwards) {
try {
forward.close();
} catch (_) {}
} catch (e, s) {
Loggers.app.warning('Failed to close forward', e, s);
}
}
}
}

View File

@@ -6,155 +6,96 @@ part of 'pve.dart';
// RiverpodGenerator
// **************************************************************************
String _$pveNotifierHash() => r'b5da7240db1b9ee7d61f238cebca45821b7a3445';
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
/// Copied from Dart SDK
class _SystemHash {
_SystemHash._();
static int combine(int hash, int value) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + value);
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
return hash ^ (hash >> 6);
}
static int finish(int hash) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
// ignore: parameter_assignments
hash = hash ^ (hash >> 11);
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
}
}
abstract class _$PveNotifier extends BuildlessAutoDisposeNotifier<PveState> {
late final Spi spiParam;
PveState build(Spi spiParam);
}
/// See also [PveNotifier].
@ProviderFor(PveNotifier)
const pveNotifierProvider = PveNotifierFamily();
const pveProvider = PveNotifierFamily._();
/// See also [PveNotifier].
class PveNotifierFamily extends Family<PveState> {
/// See also [PveNotifier].
const PveNotifierFamily();
final class PveNotifierProvider
extends $NotifierProvider<PveNotifier, PveState> {
const PveNotifierProvider._({
required PveNotifierFamily super.from,
required Spi super.argument,
}) : super(
retry: null,
name: r'pveProvider',
isAutoDispose: true,
dependencies: null,
$allTransitiveDependencies: null,
);
/// See also [PveNotifier].
PveNotifierProvider call(Spi spiParam) {
return PveNotifierProvider(spiParam);
@override
String debugGetCreateSourceHash() => _$pveNotifierHash();
@override
String toString() {
return r'pveProvider'
''
'($argument)';
}
@$internal
@override
PveNotifierProvider getProviderOverride(
covariant PveNotifierProvider provider,
) {
return call(provider.spiParam);
}
PveNotifier create() => PveNotifier();
static const Iterable<ProviderOrFamily>? _dependencies = null;
@override
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
@override
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
_allTransitiveDependencies;
@override
String? get name => r'pveNotifierProvider';
}
/// See also [PveNotifier].
class PveNotifierProvider
extends AutoDisposeNotifierProviderImpl<PveNotifier, PveState> {
/// See also [PveNotifier].
PveNotifierProvider(Spi spiParam)
: this._internal(
() => PveNotifier()..spiParam = spiParam,
from: pveNotifierProvider,
name: r'pveNotifierProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$pveNotifierHash,
dependencies: PveNotifierFamily._dependencies,
allTransitiveDependencies: PveNotifierFamily._allTransitiveDependencies,
spiParam: spiParam,
);
PveNotifierProvider._internal(
super._createNotifier, {
required super.name,
required super.dependencies,
required super.allTransitiveDependencies,
required super.debugGetCreateSourceHash,
required super.from,
required this.spiParam,
}) : super.internal();
final Spi spiParam;
@override
PveState runNotifierBuild(covariant PveNotifier notifier) {
return notifier.build(spiParam);
}
@override
Override overrideWith(PveNotifier Function() create) {
return ProviderOverride(
/// {@macro riverpod.override_with_value}
Override overrideWithValue(PveState value) {
return $ProviderOverride(
origin: this,
override: PveNotifierProvider._internal(
() => create()..spiParam = spiParam,
from: from,
name: null,
dependencies: null,
allTransitiveDependencies: null,
debugGetCreateSourceHash: null,
spiParam: spiParam,
),
providerOverride: $SyncValueProvider<PveState>(value),
);
}
@override
AutoDisposeNotifierProviderElement<PveNotifier, PveState> createElement() {
return _PveNotifierProviderElement(this);
}
@override
bool operator ==(Object other) {
return other is PveNotifierProvider && other.spiParam == spiParam;
return other is PveNotifierProvider && other.argument == argument;
}
@override
int get hashCode {
var hash = _SystemHash.combine(0, runtimeType.hashCode);
hash = _SystemHash.combine(hash, spiParam.hashCode);
return _SystemHash.finish(hash);
return argument.hashCode;
}
}
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
mixin PveNotifierRef on AutoDisposeNotifierProviderRef<PveState> {
/// The parameter `spiParam` of this provider.
Spi get spiParam;
}
String _$pveNotifierHash() => r'1e71faadee074b9c07bee731ef4ae6505e791967';
class _PveNotifierProviderElement
extends AutoDisposeNotifierProviderElement<PveNotifier, PveState>
with PveNotifierRef {
_PveNotifierProviderElement(super.provider);
final class PveNotifierFamily extends $Family
with $ClassFamilyOverride<PveNotifier, PveState, PveState, PveState, Spi> {
const PveNotifierFamily._()
: super(
retry: null,
name: r'pveProvider',
dependencies: null,
$allTransitiveDependencies: null,
isAutoDispose: true,
);
PveNotifierProvider call(Spi spiParam) =>
PveNotifierProvider._(argument: spiParam, from: this);
@override
Spi get spiParam => (origin as PveNotifierProvider).spiParam;
String toString() => r'pveProvider';
}
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
abstract class _$PveNotifier extends $Notifier<PveState> {
late final _$args = ref.$arg as Spi;
Spi get spiParam => _$args;
PveState build(Spi spiParam);
@$mustCallSuper
@override
void runBuild() {
final created = build(_$args);
final ref = this.ref as $Ref<PveState, PveState>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<PveState, PveState>,
PveState,
Object?,
Object?
>;
element.handleValue(ref, created);
}
}

View File

@@ -98,42 +98,49 @@ class ServersNotifier extends _$ServersNotifier {
if (spi != null) {
final newManualDisconnected = Set<String>.from(state.manualDisconnectedIds)..remove(spi.id);
state = state.copyWith(manualDisconnectedIds: newManualDisconnected);
final serverNotifier = ref.read(serverNotifierProvider(spi.id).notifier);
final serverNotifier = ref.read(serverProvider(spi.id).notifier);
await serverNotifier.refresh();
return;
}
await Future.wait(
state.servers.entries.map((entry) async {
final serverId = entry.key;
final spi = entry.value;
final serversToRefresh = <MapEntry<String, Spi>>[];
final idsToResetLimiter = <String>[];
if (onlyFailed) {
final serverState = ref.read(serverNotifierProvider(serverId));
if (serverState.conn != ServerConn.failed) return;
TryLimiter.reset(serverId);
}
for (final entry in state.servers.entries) {
final serverId = entry.key;
final spi = entry.value;
if (state.manualDisconnectedIds.contains(serverId)) return;
if (state.manualDisconnectedIds.contains(serverId)) continue;
final serverState = ref.read(serverNotifierProvider(serverId));
if (serverState.conn == ServerConn.disconnected && !spi.autoConnect) {
return;
}
final serverState = ref.read(serverProvider(serverId));
final serverNotifier = ref.read(serverNotifierProvider(serverId).notifier);
await serverNotifier.refresh();
}),
);
if (onlyFailed) {
if (serverState.conn != ServerConn.failed) continue;
idsToResetLimiter.add(serverId);
}
if (serverState.conn == ServerConn.disconnected && !spi.autoConnect) continue;
serversToRefresh.add(entry);
}
for (final id in idsToResetLimiter) {
TryLimiter.reset(id);
}
for (final entry in serversToRefresh) {
final serverNotifier = ref.read(serverProvider(entry.key).notifier);
serverNotifier.refresh().ignore();
}
}
Future<void> startAutoRefresh() async {
var duration = Stores.setting.serverStatusUpdateInterval.fetch();
stopAutoRefresh();
if (duration == 0) return;
if (duration < 0 || duration > 10 || duration == 1) {
duration = 3;
if (duration <= 1 || duration > 10) {
Loggers.app.warning('Invalid duration: $duration, use default 3');
duration = 3;
}
final timer = Timer.periodic(Duration(seconds: duration), (_) async {
await refresh();
@@ -145,15 +152,15 @@ class ServersNotifier extends _$ServersNotifier {
final timer = state.autoRefreshTimer;
if (timer != null) {
timer.cancel();
state = state.copyWith(autoRefreshTimer: null);
}
state = state.copyWith(autoRefreshTimer: null);
}
bool get isAutoRefreshOn => state.autoRefreshTimer != null;
void setDisconnected() {
for (final serverId in state.servers.keys) {
final serverNotifier = ref.read(serverNotifierProvider(serverId).notifier);
final serverNotifier = ref.read(serverProvider(serverId).notifier);
serverNotifier.updateConnection(ServerConn.disconnected);
// Update SSH session status to disconnected
@@ -180,7 +187,7 @@ class ServersNotifier extends _$ServersNotifier {
return;
}
final serverNotifier = ref.read(serverNotifierProvider(id).notifier);
final serverNotifier = ref.read(serverProvider(id).notifier);
serverNotifier.closeConnection();
final newManualDisconnected = Set<String>.from(state.manualDisconnectedIds)..add(id);
@@ -239,6 +246,50 @@ class ServersNotifier extends _$ServersNotifier {
bakSync.sync(milliDelay: 1000);
}
void updateServerOrder(List<String> order) {
final seen = <String>{};
final newOrder = <String>[];
for (final id in order) {
if (!state.servers.containsKey(id)) {
continue;
}
if (!seen.add(id)) {
continue;
}
newOrder.add(id);
}
for (final id in state.servers.keys) {
if (seen.add(id)) {
newOrder.add(id);
}
}
if (_isSameOrder(newOrder, state.serverOrder)) {
return;
}
state = state.copyWith(serverOrder: newOrder);
Stores.setting.serverOrder.put(newOrder);
bakSync.sync(milliDelay: 1000);
}
bool _isSameOrder(List<String> a, List<String> b) {
if (identical(a, b)) {
return true;
}
if (a.length != b.length) {
return false;
}
for (var i = 0; i < a.length; i++) {
if (a[i] != b[i]) {
return false;
}
}
return true;
}
Future<void> updateServer(Spi old, Spi newSpi) async {
if (old != newSpi) {
Stores.server.update(old, newSpi);
@@ -259,7 +310,7 @@ class ServersNotifier extends _$ServersNotifier {
} else {
newServers[old.id] = newSpi;
// Update SPI in the corresponding IndividualServerNotifier
final serverNotifier = ref.read(serverNotifierProvider(old.id).notifier);
final serverNotifier = ref.read(serverProvider(old.id).notifier);
serverNotifier.updateSpi(newSpi);
}

View File

@@ -6,21 +6,58 @@ part of 'all.dart';
// RiverpodGenerator
// **************************************************************************
String _$serversNotifierHash() => r'2b29ad3027a203c7a20bfd0142d384a503cbbcaa';
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
/// See also [ServersNotifier].
@ProviderFor(ServersNotifier)
final serversNotifierProvider =
NotifierProvider<ServersNotifier, ServersState>.internal(
ServersNotifier.new,
name: r'serversNotifierProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$serversNotifierHash,
dependencies: null,
allTransitiveDependencies: null,
);
const serversProvider = ServersNotifierProvider._();
typedef _$ServersNotifier = Notifier<ServersState>;
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
final class ServersNotifierProvider
extends $NotifierProvider<ServersNotifier, ServersState> {
const ServersNotifierProvider._()
: super(
from: null,
argument: null,
retry: null,
name: r'serversProvider',
isAutoDispose: false,
dependencies: null,
$allTransitiveDependencies: null,
);
@override
String debugGetCreateSourceHash() => _$serversNotifierHash();
@$internal
@override
ServersNotifier create() => ServersNotifier();
/// {@macro riverpod.override_with_value}
Override overrideWithValue(ServersState value) {
return $ProviderOverride(
origin: this,
providerOverride: $SyncValueProvider<ServersState>(value),
);
}
}
String _$serversNotifierHash() => r'277d1b219235f14bcc1b82a1e16260c2f28decdb';
abstract class _$ServersNotifier extends $Notifier<ServersState> {
ServersState build();
@$mustCallSuper
@override
void runBuild() {
final created = build();
final ref = this.ref as $Ref<ServersState, ServersState>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<ServersState, ServersState>,
ServersState,
Object?,
Object?
>;
element.handleValue(ref, created);
}
}

View File

@@ -1,15 +1,14 @@
import 'dart:async';
import 'dart:convert';
import 'package:computer/computer.dart';
import 'package:dartssh2/dartssh2.dart';
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter_gbk2utf8/flutter_gbk2utf8.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:server_box/core/extension/ssh_client.dart';
import 'package:server_box/core/utils/server.dart';
import 'package:server_box/core/utils/ssh_auth.dart';
import 'package:server_box/data/helper/ssh_decoder.dart';
import 'package:server_box/data/helper/system_detector.dart';
import 'package:server_box/data/model/app/error.dart';
import 'package:server_box/data/model/app/scripts/script_consts.dart';
@@ -36,7 +35,6 @@ abstract class ServerState with _$ServerState {
required ServerStatus status,
@Default(ServerConn.disconnected) ServerConn conn,
SSHClient? client,
Future<void>? updateFuture,
}) = _ServerState;
}
@@ -45,7 +43,7 @@ abstract class ServerState with _$ServerState {
class ServerNotifier extends _$ServerNotifier {
@override
ServerState build(String serverId) {
final serverNotifier = ref.read(serversNotifierProvider);
final serverNotifier = ref.read(serversProvider);
final spi = serverNotifier.servers[serverId];
if (spi == null) {
throw StateError('Server $serverId not found');
@@ -82,19 +80,16 @@ class ServerNotifier extends _$ServerNotifier {
}
// Refresh server status
bool _isRefreshing = false;
Future<void> refresh() async {
if (state.updateFuture != null) {
await state.updateFuture;
return;
}
final updateFuture = _updateServer();
state = state.copyWith(updateFuture: updateFuture);
if (_isRefreshing) return;
_isRefreshing = true;
try {
await updateFuture;
await _updateServer();
} finally {
state = state.copyWith(updateFuture: null);
_isRefreshing = false;
}
}
@@ -140,7 +135,7 @@ class ServerNotifier extends _$ServerNotifier {
final time2 = DateTime.now();
final spentTime = time2.difference(time1).inMilliseconds;
if (spi.jumpId == null) {
if ((spi.jumpChainIds?.isNotEmpty != true) && spi.jumpId == null) {
Loggers.app.info('Connected to ${spi.name} in $spentTime ms.');
} else {
Loggers.app.info('Jump to ${spi.name} in $spentTime ms.');
@@ -160,7 +155,7 @@ class ServerNotifier extends _$ServerNotifier {
id: sessionId,
spi: spi,
startTimeMs: time1.millisecondsSinceEpoch,
disconnect: () => ref.read(serversNotifierProvider.notifier).closeOneServer(spi.id),
disconnect: () => ref.read(serversProvider.notifier).closeOneServer(spi.id),
status: TermSessionStatus.connecting,
);
TermSessionManager.setActive(sessionId, hasTerminal: false);
@@ -213,7 +208,9 @@ class ServerNotifier extends _$ServerNotifier {
final newStatus = state.status..system = detectedSystemType;
updateStatus(newStatus);
final (_, writeScriptResult) = await state.client!.exec(
Loggers.app.info('Writing script for ${spi.name} (${detectedSystemType.name})');
final (stdoutResult, writeScriptResult) = await state.client!.execSafe(
(session) async {
final scriptRaw = ShellFuncManager.allScript(
spi.custom?.cmds,
@@ -228,10 +225,22 @@ class ServerNotifier extends _$ServerNotifier {
systemType: detectedSystemType,
customDir: spi.custom?.scriptDir,
),
systemType: detectedSystemType,
context: 'WriteScript<${spi.name}>',
);
if (writeScriptResult.isNotEmpty && detectedSystemType != SystemType.windows) {
ShellFuncManager.switchScriptDir(spi.id, systemType: detectedSystemType);
throw writeScriptResult;
if (stdoutResult.isNotEmpty) {
Loggers.app.info('Script write stdout for ${spi.name}: $stdoutResult');
}
if (writeScriptResult.isNotEmpty) {
Loggers.app.warning('Script write stderr for ${spi.name}: $writeScriptResult');
if (detectedSystemType != SystemType.windows) {
ShellFuncManager.switchScriptDir(spi.id, systemType: detectedSystemType);
throw writeScriptResult;
}
} else {
Loggers.app.info('Script written successfully for ${spi.name}');
}
} on SSHAuthAbortError catch (e) {
TryLimiter.inc(sid);
@@ -278,43 +287,25 @@ class ServerNotifier extends _$ServerNotifier {
String? raw;
try {
final execResult = await state.client?.run(
ShellFunc.status.exec(spi.id, systemType: state.status.system, customDir: spi.custom?.scriptDir),
);
final statusCmd = ShellFunc.status.exec(spi.id, systemType: state.status.system, customDir: spi.custom?.scriptDir);
// Loggers.app.info('Running status command for ${spi.name} (${state.status.system.name}): $statusCmd');
final execResult = await state.client?.run(statusCmd);
if (execResult != null) {
String? rawStr;
bool needGbk = false;
try {
rawStr = utf8.decode(execResult, allowMalformed: true);
// If there are unparseable characters, try fallback to GBK decoding
if (rawStr.contains('<EFBFBD>')) {
Loggers.app.warning('UTF8 decoding failed, use GBK decoding');
needGbk = true;
}
} catch (e) {
Loggers.app.warning('UTF8 decoding failed, use GBK decoding', e);
needGbk = true;
}
if (needGbk) {
try {
rawStr = gbk.decode(execResult);
} catch (e2) {
Loggers.app.warning('GBK decoding failed', e2);
rawStr = null;
}
}
if (rawStr == null) {
Loggers.app.warning('Decoding failed, execResult: $execResult');
}
raw = rawStr;
raw = SSHDecoder.decode(
execResult,
isWindows: state.status.system == SystemType.windows,
context: 'GetStatus<${spi.name}>',
);
// Loggers.app.info('Status response length for ${spi.name}: ${raw.length} bytes');
} else {
raw = execResult.toString();
raw = '';
Loggers.app.warning('No status result from ${spi.name}');
}
if (raw == null || raw.isEmpty) {
if (raw.isEmpty) {
TryLimiter.inc(sid);
final newStatus = state.status
..err = SSHErr(type: SSHErrType.segements, message: 'decode or split failed, raw:\n$raw');
..err = SSHErr(type: SSHErrType.segements, message: 'Empty response from server');
updateStatus(newStatus);
updateConnection(ServerConn.failed);
@@ -324,7 +315,7 @@ class ServerNotifier extends _$ServerNotifier {
}
segments = raw.split(ScriptConstants.separator).map((e) => e.trim()).toList();
if (raw.isEmpty || segments.isEmpty) {
if (segments.isEmpty) {
if (Stores.setting.keepStatusWhenErr.fetch()) {
// Keep previous server status when error occurs
if (state.conn != ServerConn.failed && state.status.more.isNotEmpty) {
@@ -333,7 +324,7 @@ class ServerNotifier extends _$ServerNotifier {
}
TryLimiter.inc(sid);
final newStatus = state.status
..err = SSHErr(type: SSHErrType.segements, message: 'Seperate segments failed, raw:\n$raw');
..err = SSHErr(type: SSHErrType.segements, message: 'Separate segments failed, raw:\n$raw');
updateStatus(newStatus);
updateConnection(ServerConn.failed);

View File

@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ServerState {
Spi get spi; ServerStatus get status; ServerConn get conn; SSHClient? get client; Future<void>? get updateFuture;
Spi get spi; ServerStatus get status; ServerConn get conn; SSHClient? get client;
/// Create a copy of ServerState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -25,16 +25,16 @@ $ServerStateCopyWith<ServerState> get copyWith => _$ServerStateCopyWithImpl<Serv
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ServerState&&(identical(other.spi, spi) || other.spi == spi)&&(identical(other.status, status) || other.status == status)&&(identical(other.conn, conn) || other.conn == conn)&&(identical(other.client, client) || other.client == client)&&(identical(other.updateFuture, updateFuture) || other.updateFuture == updateFuture));
return identical(this, other) || (other.runtimeType == runtimeType&&other is ServerState&&(identical(other.spi, spi) || other.spi == spi)&&(identical(other.status, status) || other.status == status)&&(identical(other.conn, conn) || other.conn == conn)&&(identical(other.client, client) || other.client == client));
}
@override
int get hashCode => Object.hash(runtimeType,spi,status,conn,client,updateFuture);
int get hashCode => Object.hash(runtimeType,spi,status,conn,client);
@override
String toString() {
return 'ServerState(spi: $spi, status: $status, conn: $conn, client: $client, updateFuture: $updateFuture)';
return 'ServerState(spi: $spi, status: $status, conn: $conn, client: $client)';
}
@@ -45,7 +45,7 @@ abstract mixin class $ServerStateCopyWith<$Res> {
factory $ServerStateCopyWith(ServerState value, $Res Function(ServerState) _then) = _$ServerStateCopyWithImpl;
@useResult
$Res call({
Spi spi, ServerStatus status, ServerConn conn, SSHClient? client, Future<void>? updateFuture
Spi spi, ServerStatus status, ServerConn conn, SSHClient? client
});
@@ -62,14 +62,13 @@ class _$ServerStateCopyWithImpl<$Res>
/// Create a copy of ServerState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? spi = null,Object? status = null,Object? conn = null,Object? client = freezed,Object? updateFuture = freezed,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? spi = null,Object? status = null,Object? conn = null,Object? client = freezed,}) {
return _then(_self.copyWith(
spi: null == spi ? _self.spi : spi // ignore: cast_nullable_to_non_nullable
as Spi,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as ServerStatus,conn: null == conn ? _self.conn : conn // ignore: cast_nullable_to_non_nullable
as ServerConn,client: freezed == client ? _self.client : client // ignore: cast_nullable_to_non_nullable
as SSHClient?,updateFuture: freezed == updateFuture ? _self.updateFuture : updateFuture // ignore: cast_nullable_to_non_nullable
as Future<void>?,
as SSHClient?,
));
}
/// Create a copy of ServerState
@@ -163,10 +162,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Spi spi, ServerStatus status, ServerConn conn, SSHClient? client, Future<void>? updateFuture)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Spi spi, ServerStatus status, ServerConn conn, SSHClient? client)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ServerState() when $default != null:
return $default(_that.spi,_that.status,_that.conn,_that.client,_that.updateFuture);case _:
return $default(_that.spi,_that.status,_that.conn,_that.client);case _:
return orElse();
}
@@ -184,10 +183,10 @@ return $default(_that.spi,_that.status,_that.conn,_that.client,_that.updateFutur
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Spi spi, ServerStatus status, ServerConn conn, SSHClient? client, Future<void>? updateFuture) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Spi spi, ServerStatus status, ServerConn conn, SSHClient? client) $default,) {final _that = this;
switch (_that) {
case _ServerState():
return $default(_that.spi,_that.status,_that.conn,_that.client,_that.updateFuture);case _:
return $default(_that.spi,_that.status,_that.conn,_that.client);case _:
throw StateError('Unexpected subclass');
}
@@ -204,10 +203,10 @@ return $default(_that.spi,_that.status,_that.conn,_that.client,_that.updateFutur
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Spi spi, ServerStatus status, ServerConn conn, SSHClient? client, Future<void>? updateFuture)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Spi spi, ServerStatus status, ServerConn conn, SSHClient? client)? $default,) {final _that = this;
switch (_that) {
case _ServerState() when $default != null:
return $default(_that.spi,_that.status,_that.conn,_that.client,_that.updateFuture);case _:
return $default(_that.spi,_that.status,_that.conn,_that.client);case _:
return null;
}
@@ -219,14 +218,13 @@ return $default(_that.spi,_that.status,_that.conn,_that.client,_that.updateFutur
class _ServerState implements ServerState {
const _ServerState({required this.spi, required this.status, this.conn = ServerConn.disconnected, this.client, this.updateFuture});
const _ServerState({required this.spi, required this.status, this.conn = ServerConn.disconnected, this.client});
@override final Spi spi;
@override final ServerStatus status;
@override@JsonKey() final ServerConn conn;
@override final SSHClient? client;
@override final Future<void>? updateFuture;
/// Create a copy of ServerState
/// with the given fields replaced by the non-null parameter values.
@@ -238,16 +236,16 @@ _$ServerStateCopyWith<_ServerState> get copyWith => __$ServerStateCopyWithImpl<_
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ServerState&&(identical(other.spi, spi) || other.spi == spi)&&(identical(other.status, status) || other.status == status)&&(identical(other.conn, conn) || other.conn == conn)&&(identical(other.client, client) || other.client == client)&&(identical(other.updateFuture, updateFuture) || other.updateFuture == updateFuture));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ServerState&&(identical(other.spi, spi) || other.spi == spi)&&(identical(other.status, status) || other.status == status)&&(identical(other.conn, conn) || other.conn == conn)&&(identical(other.client, client) || other.client == client));
}
@override
int get hashCode => Object.hash(runtimeType,spi,status,conn,client,updateFuture);
int get hashCode => Object.hash(runtimeType,spi,status,conn,client);
@override
String toString() {
return 'ServerState(spi: $spi, status: $status, conn: $conn, client: $client, updateFuture: $updateFuture)';
return 'ServerState(spi: $spi, status: $status, conn: $conn, client: $client)';
}
@@ -258,7 +256,7 @@ abstract mixin class _$ServerStateCopyWith<$Res> implements $ServerStateCopyWith
factory _$ServerStateCopyWith(_ServerState value, $Res Function(_ServerState) _then) = __$ServerStateCopyWithImpl;
@override @useResult
$Res call({
Spi spi, ServerStatus status, ServerConn conn, SSHClient? client, Future<void>? updateFuture
Spi spi, ServerStatus status, ServerConn conn, SSHClient? client
});
@@ -275,14 +273,13 @@ class __$ServerStateCopyWithImpl<$Res>
/// Create a copy of ServerState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? spi = null,Object? status = null,Object? conn = null,Object? client = freezed,Object? updateFuture = freezed,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? spi = null,Object? status = null,Object? conn = null,Object? client = freezed,}) {
return _then(_ServerState(
spi: null == spi ? _self.spi : spi // ignore: cast_nullable_to_non_nullable
as Spi,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as ServerStatus,conn: null == conn ? _self.conn : conn // ignore: cast_nullable_to_non_nullable
as ServerConn,client: freezed == client ? _self.client : client // ignore: cast_nullable_to_non_nullable
as SSHClient?,updateFuture: freezed == updateFuture ? _self.updateFuture : updateFuture // ignore: cast_nullable_to_non_nullable
as Future<void>?,
as SSHClient?,
));
}

View File

@@ -6,158 +6,103 @@ part of 'single.dart';
// RiverpodGenerator
// **************************************************************************
String _$serverNotifierHash() => r'524647748cc3810c17e5c1cd29e360f3936f5014';
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
/// Copied from Dart SDK
class _SystemHash {
_SystemHash._();
static int combine(int hash, int value) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + value);
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
return hash ^ (hash >> 6);
}
static int finish(int hash) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
// ignore: parameter_assignments
hash = hash ^ (hash >> 11);
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
}
}
abstract class _$ServerNotifier
extends BuildlessAutoDisposeNotifier<ServerState> {
late final String serverId;
ServerState build(String serverId);
}
/// See also [ServerNotifier].
@ProviderFor(ServerNotifier)
const serverNotifierProvider = ServerNotifierFamily();
const serverProvider = ServerNotifierFamily._();
/// See also [ServerNotifier].
class ServerNotifierFamily extends Family<ServerState> {
/// See also [ServerNotifier].
const ServerNotifierFamily();
final class ServerNotifierProvider
extends $NotifierProvider<ServerNotifier, ServerState> {
const ServerNotifierProvider._({
required ServerNotifierFamily super.from,
required String super.argument,
}) : super(
retry: null,
name: r'serverProvider',
isAutoDispose: false,
dependencies: null,
$allTransitiveDependencies: null,
);
/// See also [ServerNotifier].
ServerNotifierProvider call(String serverId) {
return ServerNotifierProvider(serverId);
@override
String debugGetCreateSourceHash() => _$serverNotifierHash();
@override
String toString() {
return r'serverProvider'
''
'($argument)';
}
@$internal
@override
ServerNotifierProvider getProviderOverride(
covariant ServerNotifierProvider provider,
) {
return call(provider.serverId);
}
ServerNotifier create() => ServerNotifier();
static const Iterable<ProviderOrFamily>? _dependencies = null;
@override
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
@override
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
_allTransitiveDependencies;
@override
String? get name => r'serverNotifierProvider';
}
/// See also [ServerNotifier].
class ServerNotifierProvider
extends AutoDisposeNotifierProviderImpl<ServerNotifier, ServerState> {
/// See also [ServerNotifier].
ServerNotifierProvider(String serverId)
: this._internal(
() => ServerNotifier()..serverId = serverId,
from: serverNotifierProvider,
name: r'serverNotifierProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$serverNotifierHash,
dependencies: ServerNotifierFamily._dependencies,
allTransitiveDependencies:
ServerNotifierFamily._allTransitiveDependencies,
serverId: serverId,
);
ServerNotifierProvider._internal(
super._createNotifier, {
required super.name,
required super.dependencies,
required super.allTransitiveDependencies,
required super.debugGetCreateSourceHash,
required super.from,
required this.serverId,
}) : super.internal();
final String serverId;
@override
ServerState runNotifierBuild(covariant ServerNotifier notifier) {
return notifier.build(serverId);
}
@override
Override overrideWith(ServerNotifier Function() create) {
return ProviderOverride(
/// {@macro riverpod.override_with_value}
Override overrideWithValue(ServerState value) {
return $ProviderOverride(
origin: this,
override: ServerNotifierProvider._internal(
() => create()..serverId = serverId,
from: from,
name: null,
dependencies: null,
allTransitiveDependencies: null,
debugGetCreateSourceHash: null,
serverId: serverId,
),
providerOverride: $SyncValueProvider<ServerState>(value),
);
}
@override
AutoDisposeNotifierProviderElement<ServerNotifier, ServerState>
createElement() {
return _ServerNotifierProviderElement(this);
}
@override
bool operator ==(Object other) {
return other is ServerNotifierProvider && other.serverId == serverId;
return other is ServerNotifierProvider && other.argument == argument;
}
@override
int get hashCode {
var hash = _SystemHash.combine(0, runtimeType.hashCode);
hash = _SystemHash.combine(hash, serverId.hashCode);
return _SystemHash.finish(hash);
return argument.hashCode;
}
}
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
mixin ServerNotifierRef on AutoDisposeNotifierProviderRef<ServerState> {
/// The parameter `serverId` of this provider.
String get serverId;
}
String _$serverNotifierHash() => r'52e806bcc32a7818d1ec2b07a3c683b06885c9f8';
class _ServerNotifierProviderElement
extends AutoDisposeNotifierProviderElement<ServerNotifier, ServerState>
with ServerNotifierRef {
_ServerNotifierProviderElement(super.provider);
final class ServerNotifierFamily extends $Family
with
$ClassFamilyOverride<
ServerNotifier,
ServerState,
ServerState,
ServerState,
String
> {
const ServerNotifierFamily._()
: super(
retry: null,
name: r'serverProvider',
dependencies: null,
$allTransitiveDependencies: null,
isAutoDispose: false,
);
ServerNotifierProvider call(String serverId) =>
ServerNotifierProvider._(argument: serverId, from: this);
@override
String get serverId => (origin as ServerNotifierProvider).serverId;
String toString() => r'serverProvider';
}
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
abstract class _$ServerNotifier extends $Notifier<ServerState> {
late final _$args = ref.$arg as String;
String get serverId => _$args;
ServerState build(String serverId);
@$mustCallSuper
@override
void runBuild() {
final created = build(_$args);
final ref = this.ref as $Ref<ServerState, ServerState>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<ServerState, ServerState>,
ServerState,
Object?,
Object?
>;
element.handleValue(ref, created);
}
}

View File

@@ -6,20 +6,58 @@ part of 'sftp.dart';
// RiverpodGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
@ProviderFor(SftpNotifier)
const sftpProvider = SftpNotifierProvider._();
final class SftpNotifierProvider
extends $NotifierProvider<SftpNotifier, SftpState> {
const SftpNotifierProvider._()
: super(
from: null,
argument: null,
retry: null,
name: r'sftpProvider',
isAutoDispose: false,
dependencies: null,
$allTransitiveDependencies: null,
);
@override
String debugGetCreateSourceHash() => _$sftpNotifierHash();
@$internal
@override
SftpNotifier create() => SftpNotifier();
/// {@macro riverpod.override_with_value}
Override overrideWithValue(SftpState value) {
return $ProviderOverride(
origin: this,
providerOverride: $SyncValueProvider<SftpState>(value),
);
}
}
String _$sftpNotifierHash() => r'f8412a4bd1f2bc5919ec31a3eba1c27e9a578f41';
/// See also [SftpNotifier].
@ProviderFor(SftpNotifier)
final sftpNotifierProvider = NotifierProvider<SftpNotifier, SftpState>.internal(
SftpNotifier.new,
name: r'sftpNotifierProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$sftpNotifierHash,
dependencies: null,
allTransitiveDependencies: null,
);
typedef _$SftpNotifier = Notifier<SftpState>;
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
abstract class _$SftpNotifier extends $Notifier<SftpState> {
SftpState build();
@$mustCallSuper
@override
void runBuild() {
final created = build();
final ref = this.ref as $Ref<SftpState, SftpState>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<SftpState, SftpState>,
SftpState,
Object?,
Object?
>;
element.handleValue(ref, created);
}
}

View File

@@ -6,21 +6,58 @@ part of 'snippet.dart';
// RiverpodGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
@ProviderFor(SnippetNotifier)
const snippetProvider = SnippetNotifierProvider._();
final class SnippetNotifierProvider
extends $NotifierProvider<SnippetNotifier, SnippetState> {
const SnippetNotifierProvider._()
: super(
from: null,
argument: null,
retry: null,
name: r'snippetProvider',
isAutoDispose: false,
dependencies: null,
$allTransitiveDependencies: null,
);
@override
String debugGetCreateSourceHash() => _$snippetNotifierHash();
@$internal
@override
SnippetNotifier create() => SnippetNotifier();
/// {@macro riverpod.override_with_value}
Override overrideWithValue(SnippetState value) {
return $ProviderOverride(
origin: this,
providerOverride: $SyncValueProvider<SnippetState>(value),
);
}
}
String _$snippetNotifierHash() => r'8285c7edf905a4aaa41cd8b65b0a6755c8b97fc9';
/// See also [SnippetNotifier].
@ProviderFor(SnippetNotifier)
final snippetNotifierProvider =
NotifierProvider<SnippetNotifier, SnippetState>.internal(
SnippetNotifier.new,
name: r'snippetNotifierProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$snippetNotifierHash,
dependencies: null,
allTransitiveDependencies: null,
);
typedef _$SnippetNotifier = Notifier<SnippetState>;
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
abstract class _$SnippetNotifier extends $Notifier<SnippetState> {
SnippetState build();
@$mustCallSuper
@override
void runBuild() {
final created = build();
final ref = this.ref as $Ref<SnippetState, SnippetState>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<SnippetState, SnippetState>,
SnippetState,
Object?,
Object?
>;
element.handleValue(ref, created);
}
}

View File

@@ -25,7 +25,7 @@ class SystemdNotifier extends _$SystemdNotifier {
@override
SystemdState build(Spi spi) {
final si = ref.read(serverNotifierProvider(spi.id));
final si = ref.read(serverProvider(spi.id));
_si = si;
// Async initialization
Future.microtask(() => getUnits());

View File

@@ -6,158 +6,103 @@ part of 'systemd.dart';
// RiverpodGenerator
// **************************************************************************
String _$systemdNotifierHash() => r'98466bd176518545be49cae52f8dbe12af3a88a6';
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
/// Copied from Dart SDK
class _SystemHash {
_SystemHash._();
static int combine(int hash, int value) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + value);
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
return hash ^ (hash >> 6);
}
static int finish(int hash) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
// ignore: parameter_assignments
hash = hash ^ (hash >> 11);
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
}
}
abstract class _$SystemdNotifier
extends BuildlessAutoDisposeNotifier<SystemdState> {
late final Spi spi;
SystemdState build(Spi spi);
}
/// See also [SystemdNotifier].
@ProviderFor(SystemdNotifier)
const systemdNotifierProvider = SystemdNotifierFamily();
const systemdProvider = SystemdNotifierFamily._();
/// See also [SystemdNotifier].
class SystemdNotifierFamily extends Family<SystemdState> {
/// See also [SystemdNotifier].
const SystemdNotifierFamily();
final class SystemdNotifierProvider
extends $NotifierProvider<SystemdNotifier, SystemdState> {
const SystemdNotifierProvider._({
required SystemdNotifierFamily super.from,
required Spi super.argument,
}) : super(
retry: null,
name: r'systemdProvider',
isAutoDispose: true,
dependencies: null,
$allTransitiveDependencies: null,
);
/// See also [SystemdNotifier].
SystemdNotifierProvider call(Spi spi) {
return SystemdNotifierProvider(spi);
@override
String debugGetCreateSourceHash() => _$systemdNotifierHash();
@override
String toString() {
return r'systemdProvider'
''
'($argument)';
}
@$internal
@override
SystemdNotifierProvider getProviderOverride(
covariant SystemdNotifierProvider provider,
) {
return call(provider.spi);
}
SystemdNotifier create() => SystemdNotifier();
static const Iterable<ProviderOrFamily>? _dependencies = null;
@override
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
@override
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
_allTransitiveDependencies;
@override
String? get name => r'systemdNotifierProvider';
}
/// See also [SystemdNotifier].
class SystemdNotifierProvider
extends AutoDisposeNotifierProviderImpl<SystemdNotifier, SystemdState> {
/// See also [SystemdNotifier].
SystemdNotifierProvider(Spi spi)
: this._internal(
() => SystemdNotifier()..spi = spi,
from: systemdNotifierProvider,
name: r'systemdNotifierProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$systemdNotifierHash,
dependencies: SystemdNotifierFamily._dependencies,
allTransitiveDependencies:
SystemdNotifierFamily._allTransitiveDependencies,
spi: spi,
);
SystemdNotifierProvider._internal(
super._createNotifier, {
required super.name,
required super.dependencies,
required super.allTransitiveDependencies,
required super.debugGetCreateSourceHash,
required super.from,
required this.spi,
}) : super.internal();
final Spi spi;
@override
SystemdState runNotifierBuild(covariant SystemdNotifier notifier) {
return notifier.build(spi);
}
@override
Override overrideWith(SystemdNotifier Function() create) {
return ProviderOverride(
/// {@macro riverpod.override_with_value}
Override overrideWithValue(SystemdState value) {
return $ProviderOverride(
origin: this,
override: SystemdNotifierProvider._internal(
() => create()..spi = spi,
from: from,
name: null,
dependencies: null,
allTransitiveDependencies: null,
debugGetCreateSourceHash: null,
spi: spi,
),
providerOverride: $SyncValueProvider<SystemdState>(value),
);
}
@override
AutoDisposeNotifierProviderElement<SystemdNotifier, SystemdState>
createElement() {
return _SystemdNotifierProviderElement(this);
}
@override
bool operator ==(Object other) {
return other is SystemdNotifierProvider && other.spi == spi;
return other is SystemdNotifierProvider && other.argument == argument;
}
@override
int get hashCode {
var hash = _SystemHash.combine(0, runtimeType.hashCode);
hash = _SystemHash.combine(hash, spi.hashCode);
return _SystemHash.finish(hash);
return argument.hashCode;
}
}
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
mixin SystemdNotifierRef on AutoDisposeNotifierProviderRef<SystemdState> {
/// The parameter `spi` of this provider.
Spi get spi;
}
String _$systemdNotifierHash() => r'030d556efc3d897419cd3462d37cb705813e24c7';
class _SystemdNotifierProviderElement
extends AutoDisposeNotifierProviderElement<SystemdNotifier, SystemdState>
with SystemdNotifierRef {
_SystemdNotifierProviderElement(super.provider);
final class SystemdNotifierFamily extends $Family
with
$ClassFamilyOverride<
SystemdNotifier,
SystemdState,
SystemdState,
SystemdState,
Spi
> {
const SystemdNotifierFamily._()
: super(
retry: null,
name: r'systemdProvider',
dependencies: null,
$allTransitiveDependencies: null,
isAutoDispose: true,
);
SystemdNotifierProvider call(Spi spi) =>
SystemdNotifierProvider._(argument: spi, from: this);
@override
Spi get spi => (origin as SystemdNotifierProvider).spi;
String toString() => r'systemdProvider';
}
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
abstract class _$SystemdNotifier extends $Notifier<SystemdState> {
late final _$args = ref.$arg as Spi;
Spi get spi => _$args;
SystemdState build(Spi spi);
@$mustCallSuper
@override
void runBuild() {
final created = build(_$args);
final ref = this.ref as $Ref<SystemdState, SystemdState>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<SystemdState, SystemdState>,
SystemdState,
Object?,
Object?
>;
element.handleValue(ref, created);
}
}

View File

@@ -6,21 +6,58 @@ part of 'virtual_keyboard.dart';
// RiverpodGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
@ProviderFor(VirtKeyboard)
const virtKeyboardProvider = VirtKeyboardProvider._();
final class VirtKeyboardProvider
extends $NotifierProvider<VirtKeyboard, VirtKeyState> {
const VirtKeyboardProvider._()
: super(
from: null,
argument: null,
retry: null,
name: r'virtKeyboardProvider',
isAutoDispose: true,
dependencies: null,
$allTransitiveDependencies: null,
);
@override
String debugGetCreateSourceHash() => _$virtKeyboardHash();
@$internal
@override
VirtKeyboard create() => VirtKeyboard();
/// {@macro riverpod.override_with_value}
Override overrideWithValue(VirtKeyState value) {
return $ProviderOverride(
origin: this,
providerOverride: $SyncValueProvider<VirtKeyState>(value),
);
}
}
String _$virtKeyboardHash() => r'1327d412bfb0dd261f3b555f353a8852b4f753e5';
/// See also [VirtKeyboard].
@ProviderFor(VirtKeyboard)
final virtKeyboardProvider =
AutoDisposeNotifierProvider<VirtKeyboard, VirtKeyState>.internal(
VirtKeyboard.new,
name: r'virtKeyboardProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$virtKeyboardHash,
dependencies: null,
allTransitiveDependencies: null,
);
typedef _$VirtKeyboard = AutoDisposeNotifier<VirtKeyState>;
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
abstract class _$VirtKeyboard extends $Notifier<VirtKeyState> {
VirtKeyState build();
@$mustCallSuper
@override
void runBuild() {
final created = build();
final ref = this.ref as $Ref<VirtKeyState, VirtKeyState>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<VirtKeyState, VirtKeyState>,
VirtKeyState,
Object?,
Object?
>;
element.handleValue(ref, created);
}
}

View File

@@ -3,6 +3,6 @@
abstract class BuildData {
static const String name = "ServerBox";
static const int build = 1246;
static const int script = 69;
static const int build = 1291;
static const int script = 70;
}

View File

@@ -22,6 +22,7 @@ abstract final class GithubIds {
'MasedMSD',
'GitGitro',
'Shin-suechtig',
'GT-610'
};
static const participants = <GhId>{
@@ -126,6 +127,10 @@ abstract final class GithubIds {
'cnen2018',
'xiaomeng9597',
'mingzhao2019',
'HHXXYY123',
'Lancerys',
'yaziku',
'yeluosln',
};
}

View File

@@ -51,12 +51,31 @@ abstract final class TermSessionManager {
static void init() {
if (isAndroid) {
MethodChans.registerHandler((id) async {
_entries[id]?.disconnect?.call();
});
MethodChans.registerHandler(
(id) async {
_entries[id]?.disconnect?.call();
},
() {
// Stop all connections when notification "Stop All" is pressed
stopAllConnections();
},
);
}
}
/// Called when Android notification "Stop All" button is pressed
static void stopAllConnections() {
// Disconnect all sessions
final disconnectCallbacks = _entries.values.map((e) => e.disconnect).where((cb) => cb != null).toList();
for (final disconnect in disconnectCallbacks) {
disconnect!();
}
// Clear all entries
_entries.clear();
_activeId = null;
_sync();
}
/// Add a session record and push update to Android.
static void add({
required String id,

View File

@@ -89,15 +89,12 @@ class ServerStore extends HiveStore {
// Replace ids in jump server settings.
final spi = get<Spi>(newId);
if (spi != null) {
final jumpId = spi.jumpId; // This could be an oldId.
// Check if this jumpId corresponds to a server that was also migrated.
if (jumpId != null && idMap.containsKey(jumpId)) {
final newJumpId = idMap[jumpId];
if (spi.jumpId != newJumpId) {
final newSpi = spi.copyWith(jumpId: newJumpId);
update(spi, newSpi);
}
}
final jumpChainIds = spi.jumpChainIds ?? (spi.jumpId == null ? null : [spi.jumpId!]);
if (jumpChainIds == null || jumpChainIds.isEmpty) continue;
final newChain = jumpChainIds.map((e) => idMap[e] ?? e).toList();
final newSpi = spi.copyWith(jumpId: null, jumpChainIds: newChain);
update(spi, newSpi);
}
// Replace ids in [Snippet]

View File

@@ -72,6 +72,18 @@ class SettingStore extends HiveStore {
late final editorFontSize = propertyDefault('editorFontSize', 12.5);
/// Trusted SSH host key fingerprints keyed by `serverId::keyType`.
late final sshKnownHostFingerprints = propertyDefault<Map<String, String>>(
'sshKnownHostFingerprints',
const {},
fromObj: (raw) {
if (raw is Map) {
return raw.map((key, value) => MapEntry(key.toString(), value.toString()));
}
return <String, String>{};
},
);
// Editor theme
late final editorTheme = propertyDefault('editorTheme', Defaults.editorTheme);
@@ -142,6 +154,11 @@ class SettingStore extends HiveStore {
/// Whether collapse UI items by default
late final collapseUIDefault = propertyDefault('collapseUIDefault', true);
/// Terminal AI helper configuration
late final askAiBaseUrl = propertyDefault('askAiBaseUrl', 'https://api.openai.com');
late final askAiApiKey = propertyDefault('askAiApiKey', '');
late final askAiModel = propertyDefault('askAiModel', 'gpt-4o-mini');
late final serverFuncBtns = listProperty('serverBtns', defaultValue: ServerFuncBtn.defaultIdxs);
/// Docker is more popular than podman, set to `false` to use docker

View File

@@ -155,6 +155,108 @@ abstract class AppLocalizations {
/// **'Already in last directory.'**
String get alreadyLastDir;
/// No description provided for @askAi.
///
/// In en, this message translates to:
/// **'Ask AI'**
String get askAi;
/// No description provided for @askAiApiKey.
///
/// In en, this message translates to:
/// **'API Key'**
String get askAiApiKey;
/// No description provided for @askAiAwaitingResponse.
///
/// In en, this message translates to:
/// **'Waiting for AI response...'**
String get askAiAwaitingResponse;
/// No description provided for @askAiBaseUrl.
///
/// In en, this message translates to:
/// **'Base URL'**
String get askAiBaseUrl;
/// No description provided for @askAiCommandInserted.
///
/// In en, this message translates to:
/// **'Command inserted into terminal'**
String get askAiCommandInserted;
/// No description provided for @askAiConfigMissing.
///
/// In en, this message translates to:
/// **'Please configure {fields} in Settings.'**
String askAiConfigMissing(Object fields);
/// No description provided for @askAiConfirmExecute.
///
/// In en, this message translates to:
/// **'Confirm before executing'**
String get askAiConfirmExecute;
/// No description provided for @askAiConversation.
///
/// In en, this message translates to:
/// **'AI conversation'**
String get askAiConversation;
/// No description provided for @askAiDisclaimer.
///
/// In en, this message translates to:
/// **'AI may be incorrect. Review carefully before applying.'**
String get askAiDisclaimer;
/// No description provided for @askAiFollowUpHint.
///
/// In en, this message translates to:
/// **'Ask a follow-up...'**
String get askAiFollowUpHint;
/// No description provided for @askAiInsertTerminal.
///
/// In en, this message translates to:
/// **'Insert into terminal'**
String get askAiInsertTerminal;
/// No description provided for @askAiModel.
///
/// In en, this message translates to:
/// **'Model'**
String get askAiModel;
/// No description provided for @askAiNoResponse.
///
/// In en, this message translates to:
/// **'No response'**
String get askAiNoResponse;
/// No description provided for @askAiRecommendedCommand.
///
/// In en, this message translates to:
/// **'AI suggested command'**
String get askAiRecommendedCommand;
/// No description provided for @askAiSelectedContent.
///
/// In en, this message translates to:
/// **'Selected content'**
String get askAiSelectedContent;
/// No description provided for @askAiUsageHint.
///
/// In en, this message translates to:
/// **'Used in SSH Terminal'**
String get askAiUsageHint;
/// No description provided for @atLeastOneTab.
///
/// In en, this message translates to:
/// **'At least one tab must be selected'**
String get atLeastOneTab;
/// No description provided for @authFailTip.
///
/// In en, this message translates to:
@@ -185,6 +287,12 @@ abstract class AppLocalizations {
/// **'Automatic home widget update'**
String get autoUpdateHomeWidget;
/// No description provided for @availableTabs.
///
/// In en, this message translates to:
/// **'Available Tabs'**
String get availableTabs;
/// No description provided for @backupEncrypted.
///
/// In en, this message translates to:
@@ -257,6 +365,36 @@ abstract class AppLocalizations {
/// **'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\".'**
String get bgRunTip;
/// No description provided for @clearAllStatsContent.
///
/// In en, this message translates to:
/// **'Are you sure you want to clear all server connection statistics? This action cannot be undone.'**
String get clearAllStatsContent;
/// No description provided for @clearAllStatsTitle.
///
/// In en, this message translates to:
/// **'Clear All Statistics'**
String get clearAllStatsTitle;
/// No description provided for @clearServerStatsContent.
///
/// In en, this message translates to:
/// **'Are you sure you want to clear connection statistics for server \"{serverName}\"? This action cannot be undone.'**
String clearServerStatsContent(Object serverName);
/// No description provided for @clearServerStatsTitle.
///
/// In en, this message translates to:
/// **'Clear {serverName} Statistics'**
String clearServerStatsTitle(Object serverName);
/// No description provided for @clearThisServerStats.
///
/// In en, this message translates to:
/// **'Clear This Server Statistics'**
String get clearThisServerStats;
/// No description provided for @closeAfterSave.
///
/// In en, this message translates to:
@@ -281,6 +419,24 @@ abstract class AppLocalizations {
/// **'Connection'**
String get conn;
/// No description provided for @connectionDetails.
///
/// In en, this message translates to:
/// **'Connection Details'**
String get connectionDetails;
/// No description provided for @connectionStats.
///
/// In en, this message translates to:
/// **'Connection Statistics'**
String get connectionStats;
/// No description provided for @connectionStatsDesc.
///
/// In en, this message translates to:
/// **'View server connection success rate and history'**
String get connectionStatsDesc;
/// No description provided for @container.
///
/// In en, this message translates to:
@@ -371,6 +527,30 @@ abstract class AppLocalizations {
/// **'Disconnected'**
String get disconnected;
/// No description provided for @discoverSshServers.
///
/// In en, this message translates to:
/// **'Discover SSH Servers'**
String get discoverSshServers;
/// No description provided for @discoveryFailed.
///
/// In en, this message translates to:
/// **'Discovery failed'**
String get discoveryFailed;
/// No description provided for @discoverySettings.
///
/// In en, this message translates to:
/// **'Discovery Settings'**
String get discoverySettings;
/// No description provided for @discoverySummary.
///
/// In en, this message translates to:
/// **'Discovery Summary'**
String get discoverySummary;
/// No description provided for @disk.
///
/// In en, this message translates to:
@@ -452,12 +632,6 @@ abstract class AppLocalizations {
/// **'Edit virtual keys'**
String get editVirtKeys;
/// No description provided for @editor.
///
/// In en, this message translates to:
/// **'Editor'**
String get editor;
/// No description provided for @editorHighlightTip.
///
/// In en, this message translates to:
@@ -470,6 +644,18 @@ abstract class AppLocalizations {
/// **'Emulator'**
String get emulator;
/// No description provided for @enableMdns.
///
/// In en, this message translates to:
/// **'Enable mDNS'**
String get enableMdns;
/// No description provided for @enableMdnsDesc.
///
/// In en, this message translates to:
/// **'Use mDNS/Bonjour to discover SSH services'**
String get enableMdnsDesc;
/// No description provided for @encode.
///
/// In en, this message translates to:
@@ -524,18 +710,18 @@ abstract class AppLocalizations {
/// **'File \'{file}\' too large {size}, max {sizeMax}'**
String fileTooLarge(Object file, Object size, Object sizeMax);
/// No description provided for @finishedAt.
///
/// In en, this message translates to:
/// **'Finished at'**
String get finishedAt;
/// No description provided for @followSystem.
///
/// In en, this message translates to:
/// **'Follow system'**
String get followSystem;
/// No description provided for @font.
///
/// In en, this message translates to:
/// **'Font'**
String get font;
/// No description provided for @fontSize.
///
/// In en, this message translates to:
@@ -596,6 +782,18 @@ abstract class AppLocalizations {
/// **'Code highlighting'**
String get highlight;
/// No description provided for @homeTabs.
///
/// In en, this message translates to:
/// **'Home Tabs'**
String get homeTabs;
/// No description provided for @homeTabsCustomizeDesc.
///
/// In en, this message translates to:
/// **'Customize which tabs appear on the home page and their order'**
String get homeTabsCustomizeDesc;
/// No description provided for @homeWidgetUrlConfig.
///
/// In en, this message translates to:
@@ -632,12 +830,6 @@ abstract class AppLocalizations {
/// **'Images list'**
String get imagesList;
/// No description provided for @init.
///
/// In en, this message translates to:
/// **'Initialize'**
String get init;
/// No description provided for @inner.
///
/// In en, this message translates to:
@@ -692,6 +884,18 @@ abstract class AppLocalizations {
/// **'Key Auth'**
String get keyAuth;
/// No description provided for @lastFailure.
///
/// In en, this message translates to:
/// **'Last Failure'**
String get lastFailure;
/// No description provided for @lastSuccess.
///
/// In en, this message translates to:
/// **'Last Success'**
String get lastSuccess;
/// No description provided for @letterCache.
///
/// In en, this message translates to:
@@ -704,12 +908,6 @@ abstract class AppLocalizations {
/// **'Recommended to disable, but after disabling, it will be impossible to input CJK characters.'**
String get letterCacheTip;
/// No description provided for @license.
///
/// In en, this message translates to:
/// **'License'**
String get license;
/// No description provided for @location.
///
/// In en, this message translates to:
@@ -728,18 +926,18 @@ abstract class AppLocalizations {
/// **'Made with ❤️ by {myGithub}'**
String madeWithLove(Object myGithub);
/// No description provided for @manual.
///
/// In en, this message translates to:
/// **'Manual'**
String get manual;
/// No description provided for @max.
///
/// In en, this message translates to:
/// **'max'**
String get max;
/// No description provided for @maxConcurrency.
///
/// In en, this message translates to:
/// **'Max Concurrency'**
String get maxConcurrency;
/// No description provided for @maxRetryCount.
///
/// In en, this message translates to:
@@ -812,6 +1010,12 @@ abstract class AppLocalizations {
/// **'New container'**
String get newContainer;
/// No description provided for @noConnectionStatsData.
///
/// In en, this message translates to:
/// **'No connection statistics data'**
String get noConnectionStatsData;
/// No description provided for @noLineChart.
///
/// In en, this message translates to:
@@ -938,18 +1142,18 @@ abstract class AppLocalizations {
/// **'Prioritize displaying disk capacity'**
String get preferDiskAmount;
/// No description provided for @preview.
///
/// In en, this message translates to:
/// **'Preview'**
String get preview;
/// No description provided for @privateKey.
///
/// In en, this message translates to:
/// **'Private Key'**
String get privateKey;
/// No description provided for @privateKeyNotFoundFmt.
///
/// In en, this message translates to:
/// **'Private key [{keyId}] not found.'**
String privateKeyNotFoundFmt(Object keyId);
/// No description provided for @process.
///
/// In en, this message translates to:
@@ -998,6 +1202,12 @@ abstract class AppLocalizations {
/// **'Reboot'**
String get reboot;
/// No description provided for @recentConnections.
///
/// In en, this message translates to:
/// **'Recent Connections'**
String get recentConnections;
/// No description provided for @rememberPwdInMem.
///
/// In en, this message translates to:
@@ -1118,6 +1328,18 @@ abstract class AppLocalizations {
/// **'Server order'**
String get serverOrder;
/// No description provided for @serverTabRequired.
///
/// In en, this message translates to:
/// **'Server tab cannot be removed'**
String get serverTabRequired;
/// No description provided for @servers.
///
/// In en, this message translates to:
/// **'servers'**
String get servers;
/// No description provided for @sftpDlPrepare.
///
/// In en, this message translates to:
@@ -1256,6 +1478,42 @@ abstract class AppLocalizations {
/// **'Imported {count} servers from SSH config'**
String sshConfigImported(Object count);
/// No description provided for @sshHostKeyChangedDesc.
///
/// In en, this message translates to:
/// **'The SSH host key changed for {serverName}. Only continue if you trust this server.'**
String sshHostKeyChangedDesc(Object serverName);
/// No description provided for @sshHostKeyFingerprintMd5Base64.
///
/// In en, this message translates to:
/// **'Fingerprint (MD5 base64): {fingerprint}'**
String sshHostKeyFingerprintMd5Base64(Object fingerprint);
/// No description provided for @sshHostKeyFingerprintMd5Hex.
///
/// In en, this message translates to:
/// **'Fingerprint (MD5 hex): {fingerprint}'**
String sshHostKeyFingerprintMd5Hex(Object fingerprint);
/// Label for the SSH host key type displayed in the host key verification dialog.
///
/// In en, this message translates to:
/// **'SSH host key type'**
String get sshHostKeyType;
/// No description provided for @sshHostKeyNewDesc.
///
/// In en, this message translates to:
/// **'A new SSH host key was received from {serverName}. Review the fingerprint before trusting.'**
String sshHostKeyNewDesc(Object serverName);
/// No description provided for @sshHostKeyStoredFingerprint.
///
/// In en, this message translates to:
/// **'Stored fingerprint: {fingerprint}'**
String sshHostKeyStoredFingerprint(Object fingerprint);
/// No description provided for @sshConfigManualSelect.
///
/// In en, this message translates to:
@@ -1358,12 +1616,6 @@ abstract class AppLocalizations {
/// **'Switch to {val}'**
String switchTo(Object val);
/// No description provided for @sync.
///
/// In en, this message translates to:
/// **'Sync'**
String get sync;
/// No description provided for @syncTip.
///
/// In en, this message translates to:
@@ -1382,6 +1634,12 @@ abstract class AppLocalizations {
/// **'Tags'**
String get tag;
/// No description provided for @tapToStartDiscovery.
///
/// In en, this message translates to:
/// **'Tap the search button to discover SSH servers on your network'**
String get tapToStartDiscovery;
/// No description provided for @temperature.
///
/// In en, this message translates to:
@@ -1442,6 +1700,12 @@ abstract class AppLocalizations {
/// **'Total'**
String get total;
/// No description provided for @totalAttempts.
///
/// In en, this message translates to:
/// **'Total'**
String get totalAttempts;
/// No description provided for @traffic.
///
/// In en, this message translates to:
@@ -1490,12 +1754,6 @@ abstract class AppLocalizations {
/// **'Server status update interval'**
String get updateServerStatusInterval;
/// No description provided for @upload.
///
/// In en, this message translates to:
/// **'Upload'**
String get upload;
/// No description provided for @upsideDown.
///
/// In en, this message translates to:
@@ -1544,6 +1802,12 @@ abstract class AppLocalizations {
/// **'View'**
String get view;
/// No description provided for @viewDetails.
///
/// In en, this message translates to:
/// **'View Details'**
String get viewDetails;
/// No description provided for @viewErr.
///
/// In en, this message translates to:
@@ -1622,125 +1886,53 @@ abstract class AppLocalizations {
/// **'After connecting to the server, a script will be written to `~/.config/server_box` \n | `/tmp/server_box` to monitor the system status. You can review the script content.'**
String get writeScriptTip;
/// No description provided for @connectionStats.
/// No description provided for @menuSettings.
///
/// In en, this message translates to:
/// **'Connection Statistics'**
String get connectionStats;
/// **'Setting'**
String get menuSettings;
/// No description provided for @connectionStatsDesc.
/// No description provided for @menuQuit.
///
/// In en, this message translates to:
/// **'View server connection success rate and history'**
String get connectionStatsDesc;
/// **'Quit'**
String get menuQuit;
/// No description provided for @noConnectionStatsData.
/// No description provided for @menuNavigate.
///
/// In en, this message translates to:
/// **'No connection statistics data'**
String get noConnectionStatsData;
/// **'Navigate'**
String get menuNavigate;
/// No description provided for @totalAttempts.
/// No description provided for @menuInfo.
///
/// In en, this message translates to:
/// **'Total'**
String get totalAttempts;
/// **'Info'**
String get menuInfo;
/// No description provided for @lastSuccess.
/// No description provided for @menuGitHubRepository.
///
/// In en, this message translates to:
/// **'Last Success'**
String get lastSuccess;
/// **'GitHub Repository'**
String get menuGitHubRepository;
/// No description provided for @lastFailure.
/// No description provided for @menuWiki.
///
/// In en, this message translates to:
/// **'Last Failure'**
String get lastFailure;
/// **'Wiki'**
String get menuWiki;
/// No description provided for @recentConnections.
/// No description provided for @menuHelp.
///
/// In en, this message translates to:
/// **'Recent Connections'**
String get recentConnections;
/// **'Help'**
String get menuHelp;
/// No description provided for @viewDetails.
/// No description provided for @logs.
///
/// In en, this message translates to:
/// **'View Details'**
String get viewDetails;
/// No description provided for @connectionDetails.
///
/// In en, this message translates to:
/// **'Connection Details'**
String get connectionDetails;
/// No description provided for @clearThisServerStats.
///
/// In en, this message translates to:
/// **'Clear This Server Statistics'**
String get clearThisServerStats;
/// No description provided for @clearAllStatsTitle.
///
/// In en, this message translates to:
/// **'Clear All Statistics'**
String get clearAllStatsTitle;
/// No description provided for @clearAllStatsContent.
///
/// In en, this message translates to:
/// **'Are you sure you want to clear all server connection statistics? This action cannot be undone.'**
String get clearAllStatsContent;
/// No description provided for @clearServerStatsTitle.
///
/// In en, this message translates to:
/// **'Clear {serverName} Statistics'**
String clearServerStatsTitle(String serverName);
/// No description provided for @clearServerStatsContent.
///
/// In en, this message translates to:
/// **'Are you sure you want to clear connection statistics for server \"{serverName}\"? This action cannot be undone.'**
String clearServerStatsContent(String serverName);
/// No description provided for @homeTabs.
///
/// In en, this message translates to:
/// **'Home Tabs'**
String get homeTabs;
/// No description provided for @homeTabsCustomizeDesc.
///
/// In en, this message translates to:
/// **'Customize which tabs appear on the home page and their order'**
String get homeTabsCustomizeDesc;
/// No description provided for @reset.
///
/// In en, this message translates to:
/// **'Reset'**
String get reset;
/// No description provided for @availableTabs.
///
/// In en, this message translates to:
/// **'Available Tabs'**
String get availableTabs;
/// No description provided for @atLeastOneTab.
///
/// In en, this message translates to:
/// **'At least one tab must be selected'**
String get atLeastOneTab;
/// No description provided for @serverTabRequired.
///
/// In en, this message translates to:
/// **'Server tab cannot be removed'**
String get serverTabRequired;
/// **'Logs'**
String get logs;
}
class _AppLocalizationsDelegate

View File

@@ -28,6 +28,60 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get alreadyLastDir => 'Bereits im letzten Verzeichnis.';
@override
String get askAi => 'KI fragen';
@override
String get askAiApiKey => 'API-Schlüssel';
@override
String get askAiAwaitingResponse => 'Warte auf KI-Antwort...';
@override
String get askAiBaseUrl => 'Basis-URL';
@override
String get askAiCommandInserted => 'Befehl ins Terminal eingefügt';
@override
String askAiConfigMissing(Object fields) {
return 'Bitte konfigurieren Sie $fields in den Einstellungen.';
}
@override
String get askAiConfirmExecute => 'Vor Ausführung bestätigen';
@override
String get askAiConversation => 'KI-Unterhaltung';
@override
String get askAiDisclaimer =>
'KI kann Fehler machen. Bitte vorsichtig verwenden.';
@override
String get askAiFollowUpHint => 'Weitere Frage stellen...';
@override
String get askAiInsertTerminal => 'In Terminal einfügen';
@override
String get askAiModel => 'Modell';
@override
String get askAiNoResponse => 'Keine Antwort';
@override
String get askAiRecommendedCommand => 'KI-empfohlener Befehl';
@override
String get askAiSelectedContent => 'Ausgewählter Inhalt';
@override
String get askAiUsageHint => 'Verwendet im SSH-Terminal';
@override
String get atLeastOneTab => 'Mindestens ein Tab muss ausgewählt sein';
@override
String get authFailTip =>
'Authentifizierung fehlgeschlagen, bitte überprüfen Sie, ob das Passwort/Schlüssel/Host/Benutzer usw. falsch sind.';
@@ -45,6 +99,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get autoUpdateHomeWidget => 'Home-Widget automatisch aktualisieren';
@override
String get availableTabs => 'Verfügbare Tabs';
@override
String get backupEncrypted => 'Backup ist verschlüsselt';
@@ -85,6 +142,26 @@ class AppLocalizationsDe extends AppLocalizations {
String get 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\".';
@override
String get clearAllStatsContent =>
'Sind Sie sicher, dass Sie alle Server-Verbindungsstatistiken löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.';
@override
String get clearAllStatsTitle => 'Alle Statistiken löschen';
@override
String clearServerStatsContent(Object serverName) {
return 'Sind Sie sicher, dass Sie die Verbindungsstatistiken für Server \"$serverName\" löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.';
}
@override
String clearServerStatsTitle(Object serverName) {
return '$serverName Statistiken löschen';
}
@override
String get clearThisServerStats => 'Statistiken dieses Servers löschen';
@override
String get closeAfterSave => 'Speichern und schließen';
@@ -98,6 +175,16 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get conn => 'Verbindung';
@override
String get connectionDetails => 'Verbindungsdetails';
@override
String get connectionStats => 'Verbindungsstatistiken';
@override
String get connectionStatsDesc =>
'Server-Verbindungserfolgsrate und Verlauf anzeigen';
@override
String get container => 'Container';
@@ -147,6 +234,18 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get disconnected => 'Disconnected';
@override
String get discoverSshServers => 'SSH-Server entdecken';
@override
String get discoveryFailed => 'Entdeckung fehlgeschlagen';
@override
String get discoverySettings => 'Entdeckungseinstellungen';
@override
String get discoverySummary => 'Entdeckungs-Zusammenfassung';
@override
String get disk => 'Festplatte';
@@ -199,9 +298,6 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get editVirtKeys => 'Virtuelle Tasten bearbeiten';
@override
String get editor => 'Editor';
@override
String get editorHighlightTip =>
'Die Leistung der aktuellen Codehervorhebung ist schlechter und kann zur Verbesserung optional ausgeschaltet werden.';
@@ -209,6 +305,13 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get emulator => 'Emulator';
@override
String get enableMdns => 'mDNS aktivieren';
@override
String get enableMdnsDesc =>
'mDNS/Bonjour verwenden, um SSH-Dienste zu entdecken';
@override
String get encode => 'Encode';
@@ -241,10 +344,10 @@ class AppLocalizationsDe extends AppLocalizations {
}
@override
String get followSystem => 'System verfolgen';
String get finishedAt => 'Beendet um';
@override
String get font => 'Schriftarten';
String get followSystem => 'System verfolgen';
@override
String get fontSize => 'Schriftgröße';
@@ -277,6 +380,13 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get highlight => 'Code highlight';
@override
String get homeTabs => 'Home-Tabs';
@override
String get homeTabsCustomizeDesc =>
'Passen Sie an, welche Tabs auf der Startseite angezeigt werden und ihre Reihenfolge';
@override
String get homeWidgetUrlConfig => 'Home-Widget-Link konfigurieren';
@@ -297,9 +407,6 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get imagesList => 'Images';
@override
String get init => 'Initialisieren';
@override
String get inner => 'Eingebaut';
@@ -329,6 +436,12 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get keyAuth => 'Schlüsselauthentifzierung';
@override
String get lastFailure => 'Letzter Fehler';
@override
String get lastSuccess => 'Letzter Erfolg';
@override
String get letterCache => 'Buchstaben-Caching';
@@ -336,9 +449,6 @@ class AppLocalizationsDe extends AppLocalizations {
String get letterCacheTip =>
'Empfohlen, zu deaktivieren, aber nach dem Deaktivieren können keine CJK-Zeichen eingegeben werden.';
@override
String get license => 'Lizenzen';
@override
String get location => 'Standort';
@@ -351,10 +461,10 @@ class AppLocalizationsDe extends AppLocalizations {
}
@override
String get manual => 'Handbuch';
String get max => 'max';
@override
String get max => 'max';
String get maxConcurrency => 'Maximale Gleichzeitigkeit';
@override
String get maxRetryCount => 'Anzahl an Verbindungsversuchen';
@@ -395,6 +505,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get newContainer => 'Neuer Container';
@override
String get noConnectionStatsData => 'Keine Verbindungsstatistikdaten';
@override
String get noLineChart => 'Verwenden Sie keine Liniendiagramme';
@@ -466,10 +579,12 @@ class AppLocalizationsDe extends AppLocalizations {
String get preferDiskAmount => 'Festplattenkapazität vorrangig anzeigen';
@override
String get preview => 'Vorschau';
String get privateKey => 'Private Key';
@override
String get privateKey => 'Private Key';
String privateKeyNotFoundFmt(Object keyId) {
return 'Privater Schlüssel [$keyId] wurde nicht gefunden.';
}
@override
String get process => 'Prozess';
@@ -498,6 +613,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get reboot => 'Neustart';
@override
String get recentConnections => 'Kürzliche Verbindungen';
@override
String get rememberPwdInMem => 'Passwort im Speicher behalten';
@@ -559,6 +677,12 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get serverOrder => 'Server-Bestellung';
@override
String get serverTabRequired => 'Server-Tab kann nicht entfernt werden';
@override
String get servers => 'Server';
@override
String get sftpDlPrepare => 'Verbindung vorbereiten...';
@@ -645,6 +769,34 @@ class AppLocalizationsDe extends AppLocalizations {
return '$count Server aus SSH-Konfiguration importiert';
}
@override
String sshHostKeyChangedDesc(Object serverName) {
return 'Der SSH-Hostschlüssel für $serverName hat sich geändert. Fahren Sie nur fort, wenn Sie diesem Server vertrauen.';
}
@override
String sshHostKeyFingerprintMd5Base64(Object fingerprint) {
return 'Fingerabdruck (MD5 Base64): $fingerprint';
}
@override
String sshHostKeyFingerprintMd5Hex(Object fingerprint) {
return 'Fingerabdruck (MD5 Hex): $fingerprint';
}
@override
String get sshHostKeyType => 'SSH-Hostschlüsseltyp';
@override
String sshHostKeyNewDesc(Object serverName) {
return 'Ein neuer SSH-Hostschlüssel wurde von $serverName empfangen. Prüfen Sie den Fingerabdruck, bevor Sie vertrauen.';
}
@override
String sshHostKeyStoredFingerprint(Object fingerprint) {
return 'Gespeicherter Fingerabdruck: $fingerprint';
}
@override
String get sshConfigManualSelect =>
'Möchten Sie die SSH-Konfigurationsdatei manuell auswählen?';
@@ -709,9 +861,6 @@ class AppLocalizationsDe extends AppLocalizations {
return 'Wechseln zu $val';
}
@override
String get sync => 'Sync';
@override
String get syncTip =>
'Damit einige Änderungen wirksam werden, kann ein Neustart erforderlich sein.';
@@ -722,6 +871,10 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get tag => 'Tags';
@override
String get tapToStartDiscovery =>
'Tippen Sie auf die Suche-Schaltfläche, um SSH-Server in Ihrem Netzwerk zu entdecken';
@override
String get temperature => 'Temperatur';
@@ -754,6 +907,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get total => 'Total';
@override
String get totalAttempts => 'Gesamt';
@override
String get traffic => 'Durchflussmenge';
@@ -780,9 +936,6 @@ class AppLocalizationsDe extends AppLocalizations {
String get updateServerStatusInterval =>
'Aktualisierungsintervall des Serverstatus';
@override
String get upload => 'Hochladen';
@override
String get upsideDown => 'Upside Down';
@@ -808,6 +961,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get view => 'Ansicht';
@override
String get viewDetails => 'Details anzeigen';
@override
String get viewErr => 'Fehler anzeigen';
@@ -853,69 +1009,26 @@ class AppLocalizationsDe extends AppLocalizations {
'Nach der Verbindung mit dem Server wird ein Skript in `~/.config/server_box` \n | `/tmp/server_box` geschrieben, um den Systemstatus zu überwachen. Sie können den Skriptinhalt überprüfen.';
@override
String get connectionStats => 'Verbindungsstatistiken';
String get menuSettings => 'Setting';
@override
String get connectionStatsDesc =>
'Server-Verbindungserfolgsrate und Verlauf anzeigen';
String get menuQuit => 'Quit';
@override
String get noConnectionStatsData => 'Keine Verbindungsstatistikdaten';
String get menuNavigate => 'Navigate';
@override
String get totalAttempts => 'Gesamt';
String get menuInfo => 'Info';
@override
String get lastSuccess => 'Letzter Erfolg';
String get menuGitHubRepository => 'GitHub Repository';
@override
String get lastFailure => 'Letzter Fehler';
String get menuWiki => 'Wiki';
@override
String get recentConnections => 'Kürzliche Verbindungen';
String get menuHelp => 'Help';
@override
String get viewDetails => 'Details anzeigen';
@override
String get connectionDetails => 'Verbindungsdetails';
@override
String get clearThisServerStats => 'Statistiken dieses Servers löschen';
@override
String get clearAllStatsTitle => 'Alle Statistiken löschen';
@override
String get clearAllStatsContent =>
'Sind Sie sicher, dass Sie alle Server-Verbindungsstatistiken löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.';
@override
String clearServerStatsTitle(String serverName) {
return '$serverName Statistiken löschen';
}
@override
String clearServerStatsContent(String serverName) {
return 'Sind Sie sicher, dass Sie die Verbindungsstatistiken für Server \"$serverName\" löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.';
}
@override
String get homeTabs => 'Home-Tabs';
@override
String get homeTabsCustomizeDesc =>
'Passen Sie an, welche Tabs auf der Startseite angezeigt werden und ihre Reihenfolge';
@override
String get reset => 'Zurücksetzen';
@override
String get availableTabs => 'Verfügbare Tabs';
@override
String get atLeastOneTab => 'Mindestens ein Tab muss ausgewählt sein';
@override
String get serverTabRequired => 'Server-Tab kann nicht entfernt werden';
String get logs => 'Protokolle';
}

View File

@@ -28,6 +28,60 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get alreadyLastDir => 'Already in last directory.';
@override
String get askAi => 'Ask AI';
@override
String get askAiApiKey => 'API Key';
@override
String get askAiAwaitingResponse => 'Waiting for AI response...';
@override
String get askAiBaseUrl => 'Base URL';
@override
String get askAiCommandInserted => 'Command inserted into terminal';
@override
String askAiConfigMissing(Object fields) {
return 'Please configure $fields in Settings.';
}
@override
String get askAiConfirmExecute => 'Confirm before executing';
@override
String get askAiConversation => 'AI conversation';
@override
String get askAiDisclaimer =>
'AI may be incorrect. Review carefully before applying.';
@override
String get askAiFollowUpHint => 'Ask a follow-up...';
@override
String get askAiInsertTerminal => 'Insert into terminal';
@override
String get askAiModel => 'Model';
@override
String get askAiNoResponse => 'No response';
@override
String get askAiRecommendedCommand => 'AI suggested command';
@override
String get askAiSelectedContent => 'Selected content';
@override
String get askAiUsageHint => 'Used in SSH Terminal';
@override
String get atLeastOneTab => 'At least one tab must be selected';
@override
String get authFailTip =>
'Authentication failed, please check whether credentials are correct';
@@ -45,6 +99,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get autoUpdateHomeWidget => 'Automatic home widget update';
@override
String get availableTabs => 'Available Tabs';
@override
String get backupEncrypted => 'Backup is encrypted';
@@ -84,6 +141,26 @@ class AppLocalizationsEn extends AppLocalizations {
String get 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\".';
@override
String get clearAllStatsContent =>
'Are you sure you want to clear all server connection statistics? This action cannot be undone.';
@override
String get clearAllStatsTitle => 'Clear All Statistics';
@override
String clearServerStatsContent(Object serverName) {
return 'Are you sure you want to clear connection statistics for server \"$serverName\"? This action cannot be undone.';
}
@override
String clearServerStatsTitle(Object serverName) {
return 'Clear $serverName Statistics';
}
@override
String get clearThisServerStats => 'Clear This Server Statistics';
@override
String get closeAfterSave => 'Save and close';
@@ -97,6 +174,16 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get conn => 'Connection';
@override
String get connectionDetails => 'Connection Details';
@override
String get connectionStats => 'Connection Statistics';
@override
String get connectionStatsDesc =>
'View server connection success rate and history';
@override
String get container => 'Container';
@@ -146,6 +233,18 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get disconnected => 'Disconnected';
@override
String get discoverSshServers => 'Discover SSH Servers';
@override
String get discoveryFailed => 'Discovery failed';
@override
String get discoverySettings => 'Discovery Settings';
@override
String get discoverySummary => 'Discovery Summary';
@override
String get disk => 'Disk';
@@ -198,9 +297,6 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get editVirtKeys => 'Edit virtual keys';
@override
String get editor => 'Editor';
@override
String get editorHighlightTip =>
'The current code highlighting performance is not ideal and can be optionally turned off to improve.';
@@ -208,6 +304,12 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get emulator => 'Emulator';
@override
String get enableMdns => 'Enable mDNS';
@override
String get enableMdnsDesc => 'Use mDNS/Bonjour to discover SSH services';
@override
String get encode => 'Encode';
@@ -240,10 +342,10 @@ class AppLocalizationsEn extends AppLocalizations {
}
@override
String get followSystem => 'Follow system';
String get finishedAt => 'Finished at';
@override
String get font => 'Font';
String get followSystem => 'Follow system';
@override
String get fontSize => 'Font size';
@@ -276,6 +378,13 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get highlight => 'Code highlighting';
@override
String get homeTabs => 'Home Tabs';
@override
String get homeTabsCustomizeDesc =>
'Customize which tabs appear on the home page and their order';
@override
String get homeWidgetUrlConfig => 'Config home widget url';
@@ -296,9 +405,6 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get imagesList => 'Images list';
@override
String get init => 'Initialize';
@override
String get inner => 'Inner';
@@ -328,6 +434,12 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get keyAuth => 'Key Auth';
@override
String get lastFailure => 'Last Failure';
@override
String get lastSuccess => 'Last Success';
@override
String get letterCache => 'Letter caching';
@@ -335,9 +447,6 @@ class AppLocalizationsEn extends AppLocalizations {
String get letterCacheTip =>
'Recommended to disable, but after disabling, it will be impossible to input CJK characters.';
@override
String get license => 'License';
@override
String get location => 'Location';
@@ -350,10 +459,10 @@ class AppLocalizationsEn extends AppLocalizations {
}
@override
String get manual => 'Manual';
String get max => 'max';
@override
String get max => 'max';
String get maxConcurrency => 'Max Concurrency';
@override
String get maxRetryCount => 'Number of server reconnections';
@@ -393,6 +502,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get newContainer => 'New container';
@override
String get noConnectionStatsData => 'No connection statistics data';
@override
String get noLineChart => 'Do not use line charts';
@@ -464,10 +576,12 @@ class AppLocalizationsEn extends AppLocalizations {
String get preferDiskAmount => 'Prioritize displaying disk capacity';
@override
String get preview => 'Preview';
String get privateKey => 'Private Key';
@override
String get privateKey => 'Private Key';
String privateKeyNotFoundFmt(Object keyId) {
return 'Private key [$keyId] not found.';
}
@override
String get process => 'Process';
@@ -496,6 +610,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get reboot => 'Reboot';
@override
String get recentConnections => 'Recent Connections';
@override
String get rememberPwdInMem => 'Remember password in memory';
@@ -556,6 +673,12 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get serverOrder => 'Server order';
@override
String get serverTabRequired => 'Server tab cannot be removed';
@override
String get servers => 'servers';
@override
String get sftpDlPrepare => 'Preparing to connect...';
@@ -640,6 +763,34 @@ class AppLocalizationsEn extends AppLocalizations {
return 'Imported $count servers from SSH config';
}
@override
String sshHostKeyChangedDesc(Object serverName) {
return 'The SSH host key changed for $serverName. Only continue if you trust this server.';
}
@override
String sshHostKeyFingerprintMd5Base64(Object fingerprint) {
return 'Fingerprint (MD5 base64): $fingerprint';
}
@override
String sshHostKeyFingerprintMd5Hex(Object fingerprint) {
return 'Fingerprint (MD5 hex): $fingerprint';
}
@override
String get sshHostKeyType => 'SSH host key type';
@override
String sshHostKeyNewDesc(Object serverName) {
return 'A new SSH host key was received from $serverName. Review the fingerprint before trusting.';
}
@override
String sshHostKeyStoredFingerprint(Object fingerprint) {
return 'Stored fingerprint: $fingerprint';
}
@override
String get sshConfigManualSelect =>
'Would you like to select the SSH config file manually?';
@@ -702,9 +853,6 @@ class AppLocalizationsEn extends AppLocalizations {
return 'Switch to $val';
}
@override
String get sync => 'Sync';
@override
String get syncTip =>
'A restart may be required for some changes to take effect.';
@@ -715,6 +863,10 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get tag => 'Tags';
@override
String get tapToStartDiscovery =>
'Tap the search button to discover SSH servers on your network';
@override
String get temperature => 'Temperature';
@@ -747,6 +899,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get total => 'Total';
@override
String get totalAttempts => 'Total';
@override
String get traffic => 'Traffic';
@@ -772,9 +927,6 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get updateServerStatusInterval => 'Server status update interval';
@override
String get upload => 'Upload';
@override
String get upsideDown => 'Upside Down';
@@ -800,6 +952,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get view => 'View';
@override
String get viewDetails => 'View Details';
@override
String get viewErr => 'See error';
@@ -845,69 +1000,26 @@ class AppLocalizationsEn extends AppLocalizations {
'After connecting to the server, a script will be written to `~/.config/server_box` \n | `/tmp/server_box` to monitor the system status. You can review the script content.';
@override
String get connectionStats => 'Connection Statistics';
String get menuSettings => 'Setting';
@override
String get connectionStatsDesc =>
'View server connection success rate and history';
String get menuQuit => 'Quit';
@override
String get noConnectionStatsData => 'No connection statistics data';
String get menuNavigate => 'Navigate';
@override
String get totalAttempts => 'Total';
String get menuInfo => 'Info';
@override
String get lastSuccess => 'Last Success';
String get menuGitHubRepository => 'GitHub Repository';
@override
String get lastFailure => 'Last Failure';
String get menuWiki => 'Wiki';
@override
String get recentConnections => 'Recent Connections';
String get menuHelp => 'Help';
@override
String get viewDetails => 'View Details';
@override
String get connectionDetails => 'Connection Details';
@override
String get clearThisServerStats => 'Clear This Server Statistics';
@override
String get clearAllStatsTitle => 'Clear All Statistics';
@override
String get clearAllStatsContent =>
'Are you sure you want to clear all server connection statistics? This action cannot be undone.';
@override
String clearServerStatsTitle(String serverName) {
return 'Clear $serverName Statistics';
}
@override
String clearServerStatsContent(String serverName) {
return 'Are you sure you want to clear connection statistics for server \"$serverName\"? This action cannot be undone.';
}
@override
String get homeTabs => 'Home Tabs';
@override
String get homeTabsCustomizeDesc =>
'Customize which tabs appear on the home page and their order';
@override
String get reset => 'Reset';
@override
String get availableTabs => 'Available Tabs';
@override
String get atLeastOneTab => 'At least one tab must be selected';
@override
String get serverTabRequired => 'Server tab cannot be removed';
String get logs => 'Logs';
}

View File

@@ -27,6 +27,60 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get alreadyLastDir => 'Ya estás en el directorio superior';
@override
String get askAi => 'Preguntar a la IA';
@override
String get askAiApiKey => 'Clave API';
@override
String get askAiAwaitingResponse => 'Esperando la respuesta de la IA...';
@override
String get askAiBaseUrl => 'URL base';
@override
String get askAiCommandInserted => 'Comando insertado en el terminal';
@override
String askAiConfigMissing(Object fields) {
return 'Configura $fields en Ajustes.';
}
@override
String get askAiConfirmExecute => 'Confirmar antes de ejecutar';
@override
String get askAiConversation => 'Conversación con la IA';
@override
String get askAiDisclaimer =>
'La IA puede equivocarse. Úsala con precaución.';
@override
String get askAiFollowUpHint => 'Haz una pregunta adicional...';
@override
String get askAiInsertTerminal => 'Insertar en el terminal';
@override
String get askAiModel => 'Modelo';
@override
String get askAiNoResponse => 'Sin respuesta';
@override
String get askAiRecommendedCommand => 'Comando sugerido por la IA';
@override
String get askAiSelectedContent => 'Contenido seleccionado';
@override
String get askAiUsageHint => 'Usado en el terminal SSH';
@override
String get atLeastOneTab => 'Al menos una pestaña debe estar seleccionada';
@override
String get authFailTip =>
'La autenticación ha fallado, por favor verifica si la contraseña/llave/host/usuario, etc., son incorrectos.';
@@ -45,6 +99,9 @@ class AppLocalizationsEs extends AppLocalizations {
String get autoUpdateHomeWidget =>
'Actualizar automáticamente el widget del escritorio';
@override
String get availableTabs => 'Pestañas disponibles';
@override
String get backupEncrypted => 'El respaldo está encriptado';
@@ -85,6 +142,26 @@ class AppLocalizationsEs extends AppLocalizations {
String get 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”.';
@override
String get clearAllStatsContent =>
'¿Estás seguro de que quieres limpiar todas las estadísticas de conexión del servidor? Esta acción no se puede deshacer.';
@override
String get clearAllStatsTitle => 'Limpiar todas las estadísticas';
@override
String clearServerStatsContent(Object serverName) {
return '¿Estás seguro de que quieres limpiar las estadísticas de conexión del servidor \"$serverName\"? Esta acción no se puede deshacer.';
}
@override
String clearServerStatsTitle(Object serverName) {
return 'Limpiar estadísticas de $serverName';
}
@override
String get clearThisServerStats => 'Limpiar estadísticas de este servidor';
@override
String get closeAfterSave => 'Guardar y cerrar';
@@ -98,6 +175,16 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get conn => 'Conectar';
@override
String get connectionDetails => 'Detalles de conexión';
@override
String get connectionStats => 'Estadísticas de conexión';
@override
String get connectionStatsDesc =>
'Ver la tasa de éxito de conexión del servidor e historial';
@override
String get container => 'Contenedor';
@@ -147,6 +234,18 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get disconnected => 'Desconectado';
@override
String get discoverSshServers => 'Descubrir servidores SSH';
@override
String get discoveryFailed => 'Falló el descubrimiento';
@override
String get discoverySettings => 'Configuración de descubrimiento';
@override
String get discoverySummary => 'Resumen del descubrimiento';
@override
String get disk => 'Disco';
@@ -199,9 +298,6 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get editVirtKeys => 'Editar teclas virtuales';
@override
String get editor => 'Editor';
@override
String get editorHighlightTip =>
'El rendimiento del resaltado de código es bastante pobre actualmente, puedes elegir desactivarlo para mejorar.';
@@ -209,6 +305,12 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get emulator => 'Emulador';
@override
String get enableMdns => 'Habilitar mDNS';
@override
String get enableMdnsDesc => 'Usar mDNS/Bonjour para descubrir servicios SSH';
@override
String get encode => 'Codificar';
@@ -241,10 +343,10 @@ class AppLocalizationsEs extends AppLocalizations {
}
@override
String get followSystem => 'Seguir al sistema';
String get finishedAt => 'Terminado en';
@override
String get font => 'Fuente';
String get followSystem => 'Seguir al sistema';
@override
String get fontSize => 'Tamaño de fuente';
@@ -277,6 +379,13 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get highlight => 'Resaltar código';
@override
String get homeTabs => 'Pestañas de inicio';
@override
String get homeTabsCustomizeDesc =>
'Personaliza qué pestañas aparecen en la página de inicio y su orden';
@override
String get homeWidgetUrlConfig => 'Configuración de URL del widget de inicio';
@@ -297,9 +406,6 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get imagesList => 'Lista de imágenes';
@override
String get init => 'Inicializar';
@override
String get inner => 'Interno';
@@ -329,6 +435,12 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get keyAuth => 'Autenticación con llave';
@override
String get lastFailure => 'Último fallo';
@override
String get lastSuccess => 'Último éxito';
@override
String get letterCache => 'Caché de letras';
@@ -336,9 +448,6 @@ class AppLocalizationsEs extends AppLocalizations {
String get letterCacheTip =>
'Recomendado desactivar, pero después de desactivarlo, no se podrán ingresar caracteres CJK.';
@override
String get license => 'Licencia de código abierto';
@override
String get location => 'Ubicación';
@@ -351,10 +460,10 @@ class AppLocalizationsEs extends AppLocalizations {
}
@override
String get manual => 'Manual';
String get max => 'Máximo';
@override
String get max => 'Máximo';
String get maxConcurrency => 'Concurrencia máxima';
@override
String get maxRetryCount =>
@@ -395,6 +504,10 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get newContainer => 'Crear contenedor nuevo';
@override
String get noConnectionStatsData =>
'No hay datos de estadísticas de conexión';
@override
String get noLineChart => 'No utilice gráficos de líneas';
@@ -468,10 +581,12 @@ class AppLocalizationsEs extends AppLocalizations {
'Priorizar la visualización de la capacidad del disco';
@override
String get preview => 'Vista previa';
String get privateKey => 'Llave privada';
@override
String get privateKey => 'Llave privada';
String privateKeyNotFoundFmt(Object keyId) {
return 'No se encontró la clave privada [$keyId].';
}
@override
String get process => 'Proceso';
@@ -500,6 +615,9 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get reboot => 'Reiniciar';
@override
String get recentConnections => 'Conexiones recientes';
@override
String get rememberPwdInMem => 'Recordar contraseña en la memoria';
@@ -562,6 +680,13 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get serverOrder => 'Orden del servidor';
@override
String get serverTabRequired =>
'La pestaña del servidor no se puede eliminar';
@override
String get servers => 'servidores';
@override
String get sftpDlPrepare => 'Preparando para conectar al servidor...';
@@ -647,6 +772,34 @@ class AppLocalizationsEs extends AppLocalizations {
return 'Se importaron $count servidores desde la configuración SSH';
}
@override
String sshHostKeyChangedDesc(Object serverName) {
return 'La clave de host SSH de $serverName ha cambiado. Continúa solo si confías en este servidor.';
}
@override
String sshHostKeyFingerprintMd5Base64(Object fingerprint) {
return 'Huella (MD5 Base64): $fingerprint';
}
@override
String sshHostKeyFingerprintMd5Hex(Object fingerprint) {
return 'Huella (MD5 hex): $fingerprint';
}
@override
String get sshHostKeyType => 'Tipo de clave de host SSH';
@override
String sshHostKeyNewDesc(Object serverName) {
return 'Se recibió una nueva clave de host SSH de $serverName. Revisa la huella antes de confiar.';
}
@override
String sshHostKeyStoredFingerprint(Object fingerprint) {
return 'Huella almacenada: $fingerprint';
}
@override
String get sshConfigManualSelect =>
'¿Te gustaría seleccionar manualmente el archivo de configuración SSH?';
@@ -710,9 +863,6 @@ class AppLocalizationsEs extends AppLocalizations {
return 'Cambiar a $val';
}
@override
String get sync => 'Sincronizar';
@override
String get syncTip =>
'Puede que necesites reiniciar para que algunos cambios tengan efecto.';
@@ -723,6 +873,10 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get tag => 'Etiqueta';
@override
String get tapToStartDiscovery =>
'Toca el botón de búsqueda para descubrir servidores SSH en tu red';
@override
String get temperature => 'Temperatura';
@@ -755,6 +909,9 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get total => 'Total';
@override
String get totalAttempts => 'Total';
@override
String get traffic => 'Tráfico';
@@ -781,9 +938,6 @@ class AppLocalizationsEs extends AppLocalizations {
String get updateServerStatusInterval =>
'Intervalo de actualización del estado del servidor';
@override
String get upload => 'Subir';
@override
String get upsideDown => 'Invertir arriba por abajo';
@@ -809,6 +963,9 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get view => 'Vista';
@override
String get viewDetails => 'Ver detalles';
@override
String get viewErr => 'Ver error';
@@ -854,70 +1011,26 @@ class AppLocalizationsEs extends AppLocalizations {
'Después de conectarse al servidor, se escribirá un script en `~/.config/server_box` \n | `/tmp/server_box` para monitorear el estado del sistema. Puedes revisar el contenido del script.';
@override
String get connectionStats => 'Estadísticas de conexión';
String get menuSettings => 'Setting';
@override
String get connectionStatsDesc =>
'Ver la tasa de éxito de conexión del servidor e historial';
String get menuQuit => 'Quit';
@override
String get noConnectionStatsData =>
'No hay datos de estadísticas de conexión';
String get menuNavigate => 'Navigate';
@override
String get totalAttempts => 'Total';
String get menuInfo => 'Info';
@override
String get lastSuccess => 'Último éxito';
String get menuGitHubRepository => 'GitHub Repository';
@override
String get lastFailure => 'Último fallo';
String get menuWiki => 'Wiki';
@override
String get recentConnections => 'Conexiones recientes';
String get menuHelp => 'Help';
@override
String get viewDetails => 'Ver detalles';
@override
String get connectionDetails => 'Detalles de conexión';
@override
String get clearThisServerStats => 'Limpiar estadísticas de este servidor';
@override
String get clearAllStatsTitle => 'Limpiar todas las estadísticas';
@override
String get clearAllStatsContent =>
'¿Estás seguro de que quieres limpiar todas las estadísticas de conexión del servidor? Esta acción no se puede deshacer.';
@override
String clearServerStatsTitle(String serverName) {
return 'Limpiar estadísticas de $serverName';
}
@override
String clearServerStatsContent(String serverName) {
return '¿Estás seguro de que quieres limpiar las estadísticas de conexión del servidor \"$serverName\"? Esta acción no se puede deshacer.';
}
@override
String get homeTabs => 'Pestañas de inicio';
@override
String get homeTabsCustomizeDesc =>
'Personaliza qué pestañas aparecen en la página de inicio y su orden';
@override
String get reset => 'Restablecer';
@override
String get availableTabs => 'Pestañas disponibles';
@override
String get atLeastOneTab => 'Al menos una pestaña debe estar seleccionada';
@override
String get serverTabRequired => 'Server tab cannot be removed';
String get logs => 'Registros';
}

View File

@@ -27,6 +27,60 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get alreadyLastDir => 'Déjà dans le dernier répertoire.';
@override
String get askAi => 'Demander à l\'IA';
@override
String get askAiApiKey => 'Clé API';
@override
String get askAiAwaitingResponse => 'En attente de la réponse de l\'IA...';
@override
String get askAiBaseUrl => 'URL de base';
@override
String get askAiCommandInserted => 'Commande insérée dans le terminal';
@override
String askAiConfigMissing(Object fields) {
return 'Veuillez configurer $fields dans les paramètres.';
}
@override
String get askAiConfirmExecute => 'Confirmer avant d\'exécuter';
@override
String get askAiConversation => 'Conversation avec l\'IA';
@override
String get askAiDisclaimer =>
'L\'IA peut se tromper. Utilisez-la avec prudence.';
@override
String get askAiFollowUpHint => 'Poser une question supplémentaire...';
@override
String get askAiInsertTerminal => 'Insérer dans le terminal';
@override
String get askAiModel => 'Modèle';
@override
String get askAiNoResponse => 'Aucune réponse';
@override
String get askAiRecommendedCommand => 'Commande suggérée par l\'IA';
@override
String get askAiSelectedContent => 'Contenu sélectionné';
@override
String get askAiUsageHint => 'Utilisé dans le terminal SSH';
@override
String get atLeastOneTab => 'Au moins un onglet doit être sélectionné';
@override
String get authFailTip =>
'Échec de l\'authentification. Veuillez vérifier si le mot de passe/clé/hôte/utilisateur, etc., est incorrect.';
@@ -45,6 +99,9 @@ class AppLocalizationsFr extends AppLocalizations {
String get autoUpdateHomeWidget =>
'Mise à jour automatique du widget d\'accueil';
@override
String get availableTabs => 'Onglets disponibles';
@override
String get backupEncrypted => 'La sauvegarde est chiffrée';
@@ -85,6 +142,26 @@ class AppLocalizationsFr extends AppLocalizations {
String get 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é ».';
@override
String get clearAllStatsContent =>
'Êtes-vous sûr de vouloir effacer toutes les statistiques de connexion des serveurs ? Cette action ne peut pas être annulée.';
@override
String get clearAllStatsTitle => 'Effacer toutes les statistiques';
@override
String clearServerStatsContent(Object serverName) {
return 'Êtes-vous sûr de vouloir effacer les statistiques de connexion du serveur \"$serverName\" ? Cette action ne peut pas être annulée.';
}
@override
String clearServerStatsTitle(Object serverName) {
return 'Effacer les statistiques de $serverName';
}
@override
String get clearThisServerStats => 'Effacer les statistiques de ce serveur';
@override
String get closeAfterSave => 'Enregistrer et fermer';
@@ -98,6 +175,16 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get conn => 'Connexion';
@override
String get connectionDetails => 'Détails de connexion';
@override
String get connectionStats => 'Statistiques de connexion';
@override
String get connectionStatsDesc =>
'Voir le taux de réussite de connexion du serveur et l\'historique';
@override
String get container => 'Conteneur';
@@ -147,6 +234,18 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get disconnected => 'Déconnecté';
@override
String get discoverSshServers => 'Découvrir les serveurs SSH';
@override
String get discoveryFailed => 'Échec de la découverte';
@override
String get discoverySettings => 'Paramètres de découverte';
@override
String get discoverySummary => 'Résumé de la découverte';
@override
String get disk => 'Disque';
@@ -199,9 +298,6 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get editVirtKeys => 'Modifier les touches virtuelles';
@override
String get editor => 'Éditeur';
@override
String get editorHighlightTip =>
'La performance actuelle de mise en surbrillance du code est pire et peut être désactivée en option pour s\'améliorer.';
@@ -209,6 +305,13 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get emulator => 'Émulateur';
@override
String get enableMdns => 'Activer mDNS';
@override
String get enableMdnsDesc =>
'Utiliser mDNS/Bonjour pour découvrir les services SSH';
@override
String get encode => 'Encoder';
@@ -241,10 +344,10 @@ class AppLocalizationsFr extends AppLocalizations {
}
@override
String get followSystem => 'Suivre le système';
String get finishedAt => 'Terminé à';
@override
String get font => 'Police';
String get followSystem => 'Suivre le système';
@override
String get fontSize => 'Taille de la police';
@@ -277,6 +380,13 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get highlight => 'Mise en surbrillance du code';
@override
String get homeTabs => 'Onglets d\'accueil';
@override
String get homeTabsCustomizeDesc =>
'Personnalisez les onglets qui apparaissent sur la page d\'accueil et leur ordre';
@override
String get homeWidgetUrlConfig => 'Configurer l\'URL du widget d\'accueil';
@@ -297,9 +407,6 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get imagesList => 'Liste des images';
@override
String get init => 'Initialiser';
@override
String get inner => 'Interne';
@@ -329,6 +436,12 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get keyAuth => 'Authentification par clé';
@override
String get lastFailure => 'Dernier échec';
@override
String get lastSuccess => 'Dernier succès';
@override
String get letterCache => 'Mise en cache des lettres';
@@ -336,9 +449,6 @@ class AppLocalizationsFr extends AppLocalizations {
String get letterCacheTip =>
'Recommandé de désactiver, mais après désactivation, il sera impossible de saisir des caractères CJK.';
@override
String get license => 'Licence';
@override
String get location => 'Emplacement';
@@ -351,10 +461,10 @@ class AppLocalizationsFr extends AppLocalizations {
}
@override
String get manual => 'Manuel';
String get max => 'max';
@override
String get max => 'max';
String get maxConcurrency => 'Concurrence maximale';
@override
String get maxRetryCount => 'Nombre de reconnexions au serveur';
@@ -394,6 +504,10 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get newContainer => 'Nouveau conteneur';
@override
String get noConnectionStatsData =>
'Aucune donnée de statistiques de connexion';
@override
String get noLineChart => 'Ne pas utiliser de graphiques linéaires';
@@ -469,10 +583,12 @@ class AppLocalizationsFr extends AppLocalizations {
'Prioriser laffichage de la capacité du disque';
@override
String get preview => 'Aperçu';
String get privateKey => 'Clé privée';
@override
String get privateKey => 'Clé privée';
String privateKeyNotFoundFmt(Object keyId) {
return 'Clé privée [$keyId] introuvable.';
}
@override
String get process => 'Processus';
@@ -501,6 +617,9 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get reboot => 'Redémarrer';
@override
String get recentConnections => 'Connexions récentes';
@override
String get rememberPwdInMem => 'Mémoriser le mot de passe en mémoire';
@@ -563,6 +682,12 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get serverOrder => 'Ordre du serveur';
@override
String get serverTabRequired => 'L\'onglet serveur ne peut pas être supprimé';
@override
String get servers => 'serveurs';
@override
String get sftpDlPrepare => 'Préparation de la connexion...';
@@ -649,6 +774,34 @@ class AppLocalizationsFr extends AppLocalizations {
return '$count serveurs importés depuis la configuration SSH';
}
@override
String sshHostKeyChangedDesc(Object serverName) {
return 'La clé d\'hôte SSH de $serverName a changé. Ne continuez que si vous faites confiance à ce serveur.';
}
@override
String sshHostKeyFingerprintMd5Base64(Object fingerprint) {
return 'Empreinte (MD5 Base64) : $fingerprint';
}
@override
String sshHostKeyFingerprintMd5Hex(Object fingerprint) {
return 'Empreinte (MD5 hex) : $fingerprint';
}
@override
String get sshHostKeyType => 'Type de clé d\'hôte SSH';
@override
String sshHostKeyNewDesc(Object serverName) {
return 'Une nouvelle clé d\'hôte SSH a été reçue de $serverName. Vérifiez l\'empreinte avant de faire confiance.';
}
@override
String sshHostKeyStoredFingerprint(Object fingerprint) {
return 'Empreinte enregistrée : $fingerprint';
}
@override
String get sshConfigManualSelect =>
'Souhaitez-vous sélectionner manuellement le fichier de configuration SSH ?';
@@ -713,9 +866,6 @@ class AppLocalizationsFr extends AppLocalizations {
return 'Passer à $val';
}
@override
String get sync => 'Sync';
@override
String get syncTip =>
'Un redémarrage peut être nécessaire pour que certains changements prennent effet.';
@@ -726,6 +876,10 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get tag => 'Étiquettes';
@override
String get tapToStartDiscovery =>
'Appuyez sur le bouton de recherche pour découvrir les serveurs SSH sur votre réseau';
@override
String get temperature => 'Température';
@@ -758,6 +912,9 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get total => 'Total';
@override
String get totalAttempts => 'Total';
@override
String get traffic => 'Trafic';
@@ -784,9 +941,6 @@ class AppLocalizationsFr extends AppLocalizations {
String get updateServerStatusInterval =>
'Intervalle de mise à jour de l\'état du serveur';
@override
String get upload => 'Télécharger';
@override
String get upsideDown => 'À l\'envers';
@@ -812,6 +966,9 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get view => 'Vue';
@override
String get viewDetails => 'Voir les détails';
@override
String get viewErr => 'Voir erreur';
@@ -857,70 +1014,26 @@ class AppLocalizationsFr extends AppLocalizations {
'Après la connexion au serveur, un script sera écrit dans `~/.config/server_box` \n | `/tmp/server_box` pour surveiller l\'état du système. Vous pouvez examiner le contenu du script.';
@override
String get connectionStats => 'Statistiques de connexion';
String get menuSettings => 'Setting';
@override
String get connectionStatsDesc =>
'Voir le taux de réussite de connexion du serveur et l\'historique';
String get menuQuit => 'Quit';
@override
String get noConnectionStatsData =>
'Aucune donnée de statistiques de connexion';
String get menuNavigate => 'Navigate';
@override
String get totalAttempts => 'Total';
String get menuInfo => 'Info';
@override
String get lastSuccess => 'Dernier succès';
String get menuGitHubRepository => 'GitHub Repository';
@override
String get lastFailure => 'Dernier échec';
String get menuWiki => 'Wiki';
@override
String get recentConnections => 'Connexions récentes';
String get menuHelp => 'Help';
@override
String get viewDetails => 'Voir les détails';
@override
String get connectionDetails => 'Détails de connexion';
@override
String get clearThisServerStats => 'Effacer les statistiques de ce serveur';
@override
String get clearAllStatsTitle => 'Effacer toutes les statistiques';
@override
String get clearAllStatsContent =>
'Êtes-vous sûr de vouloir effacer toutes les statistiques de connexion des serveurs ? Cette action ne peut pas être annulée.';
@override
String clearServerStatsTitle(String serverName) {
return 'Effacer les statistiques de $serverName';
}
@override
String clearServerStatsContent(String serverName) {
return 'Êtes-vous sûr de vouloir effacer les statistiques de connexion du serveur \"$serverName\" ? Cette action ne peut pas être annulée.';
}
@override
String get homeTabs => 'Onglets d\'accueil';
@override
String get homeTabsCustomizeDesc =>
'Personnalisez les onglets qui apparaissent sur la page d\'accueil et leur ordre';
@override
String get reset => 'Réinitialiser';
@override
String get availableTabs => 'Onglets disponibles';
@override
String get atLeastOneTab => 'Au moins un onglet doit être sélectionné';
@override
String get serverTabRequired => 'Server tab cannot be removed';
String get logs => 'Journaux';
}

View File

@@ -28,6 +28,59 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get alreadyLastDir => 'Sudah di direktori terakhir.';
@override
String get askAi => 'Tanya AI';
@override
String get askAiApiKey => 'Kunci API';
@override
String get askAiAwaitingResponse => 'Menunggu respons AI...';
@override
String get askAiBaseUrl => 'URL dasar';
@override
String get askAiCommandInserted => 'Perintah dimasukkan ke terminal';
@override
String askAiConfigMissing(Object fields) {
return 'Harap konfigurasikan $fields di Pengaturan.';
}
@override
String get askAiConfirmExecute => 'Konfirmasi sebelum menjalankan';
@override
String get askAiConversation => 'Percakapan AI';
@override
String get askAiDisclaimer => 'AI bisa saja salah. Gunakan dengan hati-hati.';
@override
String get askAiFollowUpHint => 'Ajukan pertanyaan lanjutan...';
@override
String get askAiInsertTerminal => 'Masukkan ke terminal';
@override
String get askAiModel => 'Model';
@override
String get askAiNoResponse => 'Tidak ada respons';
@override
String get askAiRecommendedCommand => 'Perintah yang disarankan AI';
@override
String get askAiSelectedContent => 'Konten yang dipilih';
@override
String get askAiUsageHint => 'Digunakan di Terminal SSH';
@override
String get atLeastOneTab => 'Setidaknya satu tab harus dipilih';
@override
String get authFailTip =>
'Otentikasi gagal, silakan periksa apakah kata sandi/kunci/host/pengguna, dll, salah.';
@@ -45,6 +98,9 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get autoUpdateHomeWidget => 'Widget Rumah Pembaruan Otomatis';
@override
String get availableTabs => 'Tab Tersedia';
@override
String get backupEncrypted => 'Cadangan telah dienkripsi';
@@ -84,6 +140,26 @@ class AppLocalizationsId extends AppLocalizations {
String get 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\".';
@override
String get clearAllStatsContent =>
'Apakah Anda yakin ingin menghapus semua statistik koneksi server? Tindakan ini tidak dapat dibatalkan.';
@override
String get clearAllStatsTitle => 'Hapus Semua Statistik';
@override
String clearServerStatsContent(Object serverName) {
return 'Apakah Anda yakin ingin menghapus statistik koneksi untuk server \"$serverName\"? Tindakan ini tidak dapat dibatalkan.';
}
@override
String clearServerStatsTitle(Object serverName) {
return 'Hapus Statistik $serverName';
}
@override
String get clearThisServerStats => 'Hapus Statistik Server Ini';
@override
String get closeAfterSave => 'Simpan dan tutup';
@@ -97,6 +173,16 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get conn => 'Koneksi';
@override
String get connectionDetails => 'Detail Koneksi';
@override
String get connectionStats => 'Statistik Koneksi';
@override
String get connectionStatsDesc =>
'Lihat tingkat keberhasilan koneksi server dan riwayat';
@override
String get container => 'Wadah';
@@ -146,6 +232,18 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get disconnected => 'Terputus';
@override
String get discoverSshServers => 'Temukan Server SSH';
@override
String get discoveryFailed => 'Penemuan gagal';
@override
String get discoverySettings => 'Pengaturan Penemuan';
@override
String get discoverySummary => 'Ringkasan Penemuan';
@override
String get disk => 'Disk';
@@ -198,9 +296,6 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get editVirtKeys => 'Edit kunci virtual';
@override
String get editor => 'Editor';
@override
String get editorHighlightTip =>
'Performa penyorotan kode saat ini lebih buruk, dan dapat dimatikan secara opsional untuk perbaikan.';
@@ -208,6 +303,13 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get emulator => 'Emulator';
@override
String get enableMdns => 'Aktifkan mDNS';
@override
String get enableMdnsDesc =>
'Gunakan mDNS/Bonjour untuk menemukan layanan SSH';
@override
String get encode => 'Menyandi';
@@ -240,10 +342,10 @@ class AppLocalizationsId extends AppLocalizations {
}
@override
String get followSystem => 'Ikuti sistem';
String get finishedAt => 'Selesai pada';
@override
String get font => 'Font';
String get followSystem => 'Ikuti sistem';
@override
String get fontSize => 'Ukuran huruf';
@@ -276,6 +378,13 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get highlight => 'Sorotan kode';
@override
String get homeTabs => 'Tab Beranda';
@override
String get homeTabsCustomizeDesc =>
'Sesuaikan tab mana yang muncul di halaman beranda dan urutannya';
@override
String get homeWidgetUrlConfig => 'Konfigurasi URL Widget Rumah';
@@ -296,9 +405,6 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get imagesList => 'Daftar gambar';
@override
String get init => 'Menginisialisasi';
@override
String get inner => 'Batin';
@@ -328,6 +434,12 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get keyAuth => 'Auth kunci';
@override
String get lastFailure => 'Gagal Terakhir';
@override
String get lastSuccess => 'Sukses Terakhir';
@override
String get letterCache => 'Caching huruf';
@@ -335,9 +447,6 @@ class AppLocalizationsId extends AppLocalizations {
String get letterCacheTip =>
'Direkomendasikan untuk menonaktifkan, tetapi setelah dinonaktifkan, tidak mungkin untuk memasukkan karakter CJK.';
@override
String get license => 'Lisensi';
@override
String get location => 'Lokasi';
@@ -350,10 +459,10 @@ class AppLocalizationsId extends AppLocalizations {
}
@override
String get manual => 'Manual';
String get max => 'Max';
@override
String get max => 'Max';
String get maxConcurrency => 'Konkurensi Maksimum';
@override
String get maxRetryCount => 'Jumlah penyambungan kembali server';
@@ -393,6 +502,9 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get newContainer => 'Wadah baru';
@override
String get noConnectionStatsData => 'Tidak ada data statistik koneksi';
@override
String get noLineChart => 'Jangan gunakan grafik garis';
@@ -464,10 +576,12 @@ class AppLocalizationsId extends AppLocalizations {
String get preferDiskAmount => 'Prioritaskan tampilan kapasitas disk';
@override
String get preview => 'Pratinjau';
String get privateKey => 'Kunci Pribadi';
@override
String get privateKey => 'Kunci Pribadi';
String privateKeyNotFoundFmt(Object keyId) {
return 'Kunci privat [$keyId] tidak ditemukan.';
}
@override
String get process => 'Proses';
@@ -496,6 +610,9 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get reboot => 'Reboot';
@override
String get recentConnections => 'Koneksi Terkini';
@override
String get rememberPwdInMem => 'Ingat kata sandi di dalam memori';
@@ -557,6 +674,12 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get serverOrder => 'Pesanan server';
@override
String get serverTabRequired => 'Tab server tidak dapat dihapus';
@override
String get servers => 'server';
@override
String get sftpDlPrepare => 'Bersiap untuk terhubung ...';
@@ -641,6 +764,34 @@ class AppLocalizationsId extends AppLocalizations {
return 'Berhasil mengimpor $count server dari konfigurasi SSH';
}
@override
String sshHostKeyChangedDesc(Object serverName) {
return 'Kunci host SSH untuk $serverName telah berubah. Lanjutkan hanya jika Anda mempercayai server ini.';
}
@override
String sshHostKeyFingerprintMd5Base64(Object fingerprint) {
return 'Sidik jari (MD5 Base64): $fingerprint';
}
@override
String sshHostKeyFingerprintMd5Hex(Object fingerprint) {
return 'Sidik jari (MD5 hex): $fingerprint';
}
@override
String get sshHostKeyType => 'Jenis kunci host SSH';
@override
String sshHostKeyNewDesc(Object serverName) {
return 'Kunci host SSH baru diterima dari $serverName. Periksa sidik jarinya sebelum mempercayai.';
}
@override
String sshHostKeyStoredFingerprint(Object fingerprint) {
return 'Sidik jari tersimpan: $fingerprint';
}
@override
String get sshConfigManualSelect =>
'Apakah Anda ingin memilih file konfigurasi SSH secara manual?';
@@ -703,9 +854,6 @@ class AppLocalizationsId extends AppLocalizations {
return 'Beralih ke $val';
}
@override
String get sync => 'Sinkronisasi';
@override
String get syncTip =>
'Pengaktifan ulang mungkin diperlukan agar beberapa perubahan dapat diterapkan.';
@@ -716,6 +864,10 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get tag => 'Tag';
@override
String get tapToStartDiscovery =>
'Tekan tombol pencarian untuk menemukan server SSH di jaringan Anda';
@override
String get temperature => 'Suhu';
@@ -748,6 +900,9 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get total => 'Total';
@override
String get totalAttempts => 'Total';
@override
String get traffic => 'Lalu lintas';
@@ -773,9 +928,6 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get updateServerStatusInterval => 'Interval Pembaruan Status Server';
@override
String get upload => 'Mengunggah';
@override
String get upsideDown => 'Terbalik';
@@ -801,6 +953,9 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get view => 'Tampilan';
@override
String get viewDetails => 'Lihat Detail';
@override
String get viewErr => 'Lihat kesalahan';
@@ -845,69 +1000,26 @@ class AppLocalizationsId extends AppLocalizations {
'Setelah terhubung ke server, sebuah skrip akan ditulis ke `~/.config/server_box` \n | `/tmp/server_box` untuk memantau status sistem. Anda dapat meninjau konten skrip tersebut.';
@override
String get connectionStats => 'Statistik Koneksi';
String get menuSettings => 'Setting';
@override
String get connectionStatsDesc =>
'Lihat tingkat keberhasilan koneksi server dan riwayat';
String get menuQuit => 'Quit';
@override
String get noConnectionStatsData => 'Tidak ada data statistik koneksi';
String get menuNavigate => 'Navigate';
@override
String get totalAttempts => 'Total';
String get menuInfo => 'Info';
@override
String get lastSuccess => 'Sukses Terakhir';
String get menuGitHubRepository => 'GitHub Repository';
@override
String get lastFailure => 'Gagal Terakhir';
String get menuWiki => 'Wiki';
@override
String get recentConnections => 'Koneksi Terkini';
String get menuHelp => 'Help';
@override
String get viewDetails => 'Lihat Detail';
@override
String get connectionDetails => 'Detail Koneksi';
@override
String get clearThisServerStats => 'Hapus Statistik Server Ini';
@override
String get clearAllStatsTitle => 'Hapus Semua Statistik';
@override
String get clearAllStatsContent =>
'Apakah Anda yakin ingin menghapus semua statistik koneksi server? Tindakan ini tidak dapat dibatalkan.';
@override
String clearServerStatsTitle(String serverName) {
return 'Hapus Statistik $serverName';
}
@override
String clearServerStatsContent(String serverName) {
return 'Apakah Anda yakin ingin menghapus statistik koneksi untuk server \"$serverName\"? Tindakan ini tidak dapat dibatalkan.';
}
@override
String get homeTabs => 'Tab Beranda';
@override
String get homeTabsCustomizeDesc =>
'Sesuaikan tab mana yang muncul di halaman beranda dan urutannya';
@override
String get reset => 'Reset';
@override
String get availableTabs => 'Tab Tersedia';
@override
String get atLeastOneTab => 'Setidaknya satu tab harus dipilih';
@override
String get serverTabRequired => 'Server tab cannot be removed';
String get logs => 'Log';
}

View File

@@ -27,6 +27,59 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get alreadyLastDir => 'すでに最上位のディレクトリです';
@override
String get askAi => 'AI に質問';
@override
String get askAiApiKey => 'API キー';
@override
String get askAiAwaitingResponse => 'AI の応答を待機中...';
@override
String get askAiBaseUrl => 'ベース URL';
@override
String get askAiCommandInserted => 'コマンドをターミナルに挿入しました';
@override
String askAiConfigMissing(Object fields) {
return '設定で $fields を構成してください。';
}
@override
String get askAiConfirmExecute => '実行前に確認';
@override
String get askAiConversation => 'AI 会話';
@override
String get askAiDisclaimer => 'AI が誤る可能性があります。注意してご利用ください。';
@override
String get askAiFollowUpHint => '追質問をする...';
@override
String get askAiInsertTerminal => 'ターミナルに挿入';
@override
String get askAiModel => 'モデル';
@override
String get askAiNoResponse => '応答なし';
@override
String get askAiRecommendedCommand => 'AI 推奨コマンド';
@override
String get askAiSelectedContent => '選択した内容';
@override
String get askAiUsageHint => 'SSH ターミナルで使用';
@override
String get atLeastOneTab => '少なくとも1つのタブを選択する必要があります';
@override
String get authFailTip => '認証に失敗しました。パスワード/鍵/ホスト/ユーザーなどが間違っていないか確認してください。';
@@ -42,6 +95,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get autoUpdateHomeWidget => 'ホームウィジェットを自動更新';
@override
String get availableTabs => '利用可能なタブ';
@override
String get backupEncrypted => 'バックアップは暗号化されています';
@@ -80,6 +136,25 @@ class AppLocalizationsJa extends AppLocalizations {
String get bgRunTip =>
'このスイッチはプログラムがバックグラウンドで実行を試みることを意味しますが、実際にバックグラウンドで実行できるかどうかは、権限が有効になっているかに依存します。AOSPベースのAndroid ROMでは、このアプリの「バッテリー最適化」をオフにしてください。MIUIでは、省エネモードを「無制限」に変更してください。';
@override
String get clearAllStatsContent => 'すべてのサーバー接続統計を削除してもよろしいですか?この操作は元に戻せません。';
@override
String get clearAllStatsTitle => 'すべての統計をクリア';
@override
String clearServerStatsContent(Object serverName) {
return 'サーバー\"$serverName\"の接続統計を削除してもよろしいですか?この操作は元に戻せません。';
}
@override
String clearServerStatsTitle(Object serverName) {
return '$serverNameの統計をクリア';
}
@override
String get clearThisServerStats => 'このサーバーの統計をクリア';
@override
String get closeAfterSave => '保存して閉じる';
@@ -92,6 +167,15 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get conn => '接続';
@override
String get connectionDetails => '接続の詳細';
@override
String get connectionStats => '接続統計';
@override
String get connectionStatsDesc => 'サーバー接続成功率と履歴を表示';
@override
String get container => 'コンテナ';
@@ -139,6 +223,18 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get disconnected => '接続が切断されました';
@override
String get discoverSshServers => 'SSHサーバーの発見';
@override
String get discoveryFailed => '発見に失敗';
@override
String get discoverySettings => '発見設定';
@override
String get discoverySummary => '発見の概要';
@override
String get disk => 'ディスク';
@@ -191,9 +287,6 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get editVirtKeys => '仮想キーを編集';
@override
String get editor => 'エディター';
@override
String get editorHighlightTip =>
'現在のコードハイライトのパフォーマンスはかなり悪いため、改善するために無効にすることを選択できます。';
@@ -201,6 +294,12 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get emulator => 'エミュレーター';
@override
String get enableMdns => 'mDNSを有効化';
@override
String get enableMdnsDesc => 'mDNS/BonjourでSSHサービスを発見';
@override
String get encode => 'エンコード';
@@ -233,10 +332,10 @@ class AppLocalizationsJa extends AppLocalizations {
}
@override
String get followSystem => 'システムに従う';
String get finishedAt => '完了時刻';
@override
String get font => 'フォント';
String get followSystem => 'システムに従う';
@override
String get fontSize => 'フォントサイズ';
@@ -269,6 +368,12 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get highlight => 'コードハイライト';
@override
String get homeTabs => 'ホームタブ';
@override
String get homeTabsCustomizeDesc => 'ホームページに表示するタブとその順序をカスタマイズします';
@override
String get homeWidgetUrlConfig => 'ホームウィジェットURL設定';
@@ -289,9 +394,6 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get imagesList => 'イメージリスト';
@override
String get init => '初期化する';
@override
String get inner => '内蔵';
@@ -320,15 +422,18 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get keyAuth => 'キー認証';
@override
String get lastFailure => '最後の失敗';
@override
String get lastSuccess => '最後の成功';
@override
String get letterCache => '文字キャッシング';
@override
String get letterCacheTip => '無効にすることを推奨しますが、無効にした後はCJK文字を入力することができなくなります。';
@override
String get license => 'オープンソースライセンス';
@override
String get location => '場所';
@@ -341,10 +446,10 @@ class AppLocalizationsJa extends AppLocalizations {
}
@override
String get manual => 'マニュアル';
String get max => '最大';
@override
String get max => '最大';
String get maxConcurrency => '最大同時実行数';
@override
String get maxRetryCount => 'サーバーの再接続試行回数';
@@ -384,6 +489,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get newContainer => '新しいコンテナを作成';
@override
String get noConnectionStatsData => '接続統計データがありません';
@override
String get noLineChart => '折れ線グラフを使用しない';
@@ -450,10 +558,12 @@ class AppLocalizationsJa extends AppLocalizations {
String get preferDiskAmount => 'ディスク容量を優先的に表示';
@override
String get preview => 'プレビュー';
String get privateKey => '秘密鍵';
@override
String get privateKey => '秘密鍵';
String privateKeyNotFoundFmt(Object keyId) {
return '秘密鍵 [$keyId] が見つかりません。';
}
@override
String get process => 'プロセス';
@@ -481,6 +591,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get reboot => '再起動';
@override
String get recentConnections => '最近の接続';
@override
String get rememberPwdInMem => 'メモリにパスワードを記憶する';
@@ -541,6 +654,12 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get serverOrder => 'サーバー順序';
@override
String get serverTabRequired => 'サーバータブは削除できません';
@override
String get servers => 'サーバー';
@override
String get sftpDlPrepare => 'サーバーへの接続を準備中...';
@@ -623,6 +742,34 @@ class AppLocalizationsJa extends AppLocalizations {
return 'SSH設定から$count個のサーバーをインポートしました';
}
@override
String sshHostKeyChangedDesc(Object serverName) {
return '$serverName の SSH ホスト鍵が変更されました。このサーバーを信頼できる場合のみ続行してください。';
}
@override
String sshHostKeyFingerprintMd5Base64(Object fingerprint) {
return 'フィンガープリント (MD5 Base64): $fingerprint';
}
@override
String sshHostKeyFingerprintMd5Hex(Object fingerprint) {
return 'フィンガープリント (MD5 16進): $fingerprint';
}
@override
String get sshHostKeyType => 'SSH ホストキーの種類';
@override
String sshHostKeyNewDesc(Object serverName) {
return '$serverName から新しい SSH ホスト鍵を受信しました。信頼する前にフィンガープリントを確認してください。';
}
@override
String sshHostKeyStoredFingerprint(Object fingerprint) {
return '保存済みフィンガープリント: $fingerprint';
}
@override
String get sshConfigManualSelect => 'SSH設定ファイルを手動で選択しますか';
@@ -681,9 +828,6 @@ class AppLocalizationsJa extends AppLocalizations {
return '$valに切り替える';
}
@override
String get sync => '同期する';
@override
String get syncTip => '再起動が必要な場合があります。一部の変更はその後に有効になります。';
@@ -693,6 +837,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get tag => 'タグ';
@override
String get tapToStartDiscovery => '検索ボタンをタップしてネットワーク上のSSHサーバーを発見';
@override
String get temperature => '温度';
@@ -725,6 +872,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get total => '合計';
@override
String get totalAttempts => '総計';
@override
String get traffic => 'トラフィック';
@@ -750,9 +900,6 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get updateServerStatusInterval => 'サーバー状態の更新間隔';
@override
String get upload => 'アップロード';
@override
String get upsideDown => '上下逆転';
@@ -777,6 +924,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get view => 'ビュー';
@override
String get viewDetails => '詳細を表示';
@override
String get viewErr => 'エラーを表示';
@@ -817,69 +967,29 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get writeScriptTip =>
'サーバーに接続すると、システムの状態を監視するためのスクリプトが `~/.config/server_box` \n | `/tmp/server_box` に書き込まれます。スクリプトの内容を確認できます。';
'サーバーへの接続後、システムステータスを監視するスクリプトが `~/.config/server_box` \n | `/tmp/server_box` に書き込まれます。スクリプトの内容を確認できます。';
@override
String get connectionStats => '接続統計';
String get menuSettings => 'Setting';
@override
String get connectionStatsDesc => 'サーバー接続成功率と履歴を表示';
String get menuQuit => 'Quit';
@override
String get noConnectionStatsData => '接続統計データがありません';
String get menuNavigate => 'Navigate';
@override
String get totalAttempts => '総計';
String get menuInfo => 'Info';
@override
String get lastSuccess => '最後の成功';
String get menuGitHubRepository => 'GitHub Repository';
@override
String get lastFailure => '最後の失敗';
String get menuWiki => 'Wiki';
@override
String get recentConnections => '最近の接続';
String get menuHelp => 'Help';
@override
String get viewDetails => '詳細を表示';
@override
String get connectionDetails => '接続の詳細';
@override
String get clearThisServerStats => 'このサーバーの統計をクリア';
@override
String get clearAllStatsTitle => 'すべての統計をクリア';
@override
String get clearAllStatsContent => 'すべてのサーバー接続統計を削除してもよろしいですか?この操作は元に戻せません。';
@override
String clearServerStatsTitle(String serverName) {
return '$serverNameの統計をクリア';
}
@override
String clearServerStatsContent(String serverName) {
return 'サーバー\"$serverName\"の接続統計を削除してもよろしいですか?この操作は元に戻せません。';
}
@override
String get homeTabs => 'ホームタブ';
@override
String get homeTabsCustomizeDesc => 'ホームページに表示するタブとその順序をカスタマイズします';
@override
String get reset => 'リセット';
@override
String get availableTabs => '利用可能なタブ';
@override
String get atLeastOneTab => '少なくとも1つのタブを選択する必要があります';
@override
String get serverTabRequired => 'サーバータブは削除できません';
String get logs => 'ログ';
}

View File

@@ -28,6 +28,60 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get alreadyLastDir => 'Al in de laatst gebruikte map.';
@override
String get askAi => 'AI vragen';
@override
String get askAiApiKey => 'API-sleutel';
@override
String get askAiAwaitingResponse => 'Wachten op AI-reactie...';
@override
String get askAiBaseUrl => 'Basis-URL';
@override
String get askAiCommandInserted => 'Commando in terminal ingevoegd';
@override
String askAiConfigMissing(Object fields) {
return 'Configureer $fields in de instellingen.';
}
@override
String get askAiConfirmExecute => 'Bevestigen voor uitvoeren';
@override
String get askAiConversation => 'AI-gesprek';
@override
String get askAiDisclaimer => 'AI kan fouten maken. Gebruik het zorgvuldig.';
@override
String get askAiFollowUpHint => 'Stel een vervolgvraag...';
@override
String get askAiInsertTerminal => 'In terminal invoegen';
@override
String get askAiModel => 'Model';
@override
String get askAiNoResponse => 'Geen reactie';
@override
String get askAiRecommendedCommand => 'Door AI voorgestelde opdracht';
@override
String get askAiSelectedContent => 'Geselecteerde inhoud';
@override
String get askAiUsageHint => 'Gebruikt in de SSH-terminal';
@override
String get atLeastOneTab =>
'Er moet minimaal één tabblad worden geselecteerd';
@override
String get authFailTip =>
'Authenticatie mislukt, controleer of het wachtwoord/sleutel/host/gebruiker, enz., incorrect zijn.';
@@ -45,6 +99,9 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get autoUpdateHomeWidget => 'Automatische update van home-widget';
@override
String get availableTabs => 'Beschikbare tabbladen';
@override
String get backupEncrypted => 'Back-up is versleuteld';
@@ -84,6 +141,26 @@ class AppLocalizationsNl extends AppLocalizations {
String get 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\".';
@override
String get clearAllStatsContent =>
'Weet u zeker dat u alle serververbindingsstatistieken wilt wissen? Deze actie kan niet ongedaan worden gemaakt.';
@override
String get clearAllStatsTitle => 'Alle statistieken wissen';
@override
String clearServerStatsContent(Object serverName) {
return 'Weet u zeker dat u de verbindingsstatistieken voor server \"$serverName\" wilt wissen? Deze actie kan niet ongedaan worden gemaakt.';
}
@override
String clearServerStatsTitle(Object serverName) {
return 'Statistieken van $serverName wissen';
}
@override
String get clearThisServerStats => 'Statistieken van deze server wissen';
@override
String get closeAfterSave => 'Opslaan en sluiten';
@@ -97,6 +174,16 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get conn => 'Verbinding';
@override
String get connectionDetails => 'Verbindingsdetails';
@override
String get connectionStats => 'Verbindingsstatistieken';
@override
String get connectionStatsDesc =>
'Bekijk server verbindingssucces ratio en geschiedenis';
@override
String get container => 'Container';
@@ -146,6 +233,18 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get disconnected => 'Verbroken';
@override
String get discoverSshServers => 'SSH-servers ontdekken';
@override
String get discoveryFailed => 'Ontdekking mislukt';
@override
String get discoverySettings => 'Ontdekkingsinstellingen';
@override
String get discoverySummary => 'Ontdekkingssamenvatting';
@override
String get disk => 'Schijf';
@@ -198,9 +297,6 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get editVirtKeys => 'Virtuele toetsen bewerken';
@override
String get editor => 'Editor';
@override
String get editorHighlightTip =>
'De huidige codehighlighting-prestaties zijn slechter en kunnen optioneel worden uitgeschakeld om te verbeteren.';
@@ -208,6 +304,13 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get emulator => 'Emulator';
@override
String get enableMdns => 'mDNS inschakelen';
@override
String get enableMdnsDesc =>
'Gebruik mDNS/Bonjour om SSH-services te ontdekken';
@override
String get encode => 'Coderen';
@@ -240,10 +343,10 @@ class AppLocalizationsNl extends AppLocalizations {
}
@override
String get followSystem => 'Volg systeem';
String get finishedAt => 'Voltooid om';
@override
String get font => 'Lettertype';
String get followSystem => 'Volg systeem';
@override
String get fontSize => 'Lettergrootte';
@@ -276,6 +379,13 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get highlight => 'Code-highlight';
@override
String get homeTabs => 'Home-tabbladen';
@override
String get homeTabsCustomizeDesc =>
'Pas aan welke tabbladen op de startpagina worden weergegeven en hun volgorde';
@override
String get homeWidgetUrlConfig => 'Home-widget-url configureren';
@@ -296,9 +406,6 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get imagesList => 'Lijst met afbeeldingen';
@override
String get init => 'Initialiseren';
@override
String get inner => 'Intern';
@@ -328,6 +435,12 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get keyAuth => 'Sleutelauthenticatie';
@override
String get lastFailure => 'Laatst gefaald';
@override
String get lastSuccess => 'Laatst succesvol';
@override
String get letterCache => 'Lettercaching';
@@ -335,9 +448,6 @@ class AppLocalizationsNl extends AppLocalizations {
String get letterCacheTip =>
'Aanbevolen om uit te schakelen, maar na het uitschakelen is het niet mogelijk om CJK-tekens in te voeren.';
@override
String get license => 'Licentie';
@override
String get location => 'Locatie';
@@ -350,10 +460,10 @@ class AppLocalizationsNl extends AppLocalizations {
}
@override
String get manual => 'Handleiding';
String get max => 'max';
@override
String get max => 'max';
String get maxConcurrency => 'Maximale gelijktijdigheid';
@override
String get maxRetryCount => 'Aantal serverherverbindingen';
@@ -393,6 +503,9 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get newContainer => 'Nieuwe container';
@override
String get noConnectionStatsData => 'Geen verbindingsstatistiekgegevens';
@override
String get noLineChart => 'lijndiagrammen gebruiken';
@@ -465,10 +578,12 @@ class AppLocalizationsNl extends AppLocalizations {
'Geef de schijfcapaciteit prioriteit bij weergave';
@override
String get preview => 'Voorbeeld';
String get privateKey => 'Privésleutel';
@override
String get privateKey => 'Privésleutel';
String privateKeyNotFoundFmt(Object keyId) {
return 'Privésleutel [$keyId] niet gevonden.';
}
@override
String get process => 'Proces';
@@ -497,6 +612,9 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get reboot => 'Herstart';
@override
String get recentConnections => 'Recente verbindingen';
@override
String get rememberPwdInMem => 'Wachtwoord onthouden in geheugen';
@@ -558,6 +676,12 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get serverOrder => 'Servervolgorde';
@override
String get serverTabRequired => 'Servertabblad kan niet worden verwijderd';
@override
String get servers => 'servers';
@override
String get sftpDlPrepare => 'Voorbereiden om verbinding te maken...';
@@ -644,6 +768,34 @@ class AppLocalizationsNl extends AppLocalizations {
return '$count servers geïmporteerd uit SSH-configuratie';
}
@override
String sshHostKeyChangedDesc(Object serverName) {
return 'De SSH-hostsleutel voor $serverName is gewijzigd. Ga alleen verder als u deze server vertrouwt.';
}
@override
String sshHostKeyFingerprintMd5Base64(Object fingerprint) {
return 'Vingerafdruk (MD5 Base64): $fingerprint';
}
@override
String sshHostKeyFingerprintMd5Hex(Object fingerprint) {
return 'Vingerafdruk (MD5 hex): $fingerprint';
}
@override
String get sshHostKeyType => 'Type SSH-hostsleutel';
@override
String sshHostKeyNewDesc(Object serverName) {
return 'Er is een nieuwe SSH-hostsleutel ontvangen van $serverName. Controleer de vingerafdruk voordat u vertrouwt.';
}
@override
String sshHostKeyStoredFingerprint(Object fingerprint) {
return 'Opgeslagen vingerafdruk: $fingerprint';
}
@override
String get sshConfigManualSelect =>
'Wilt u het SSH-configuratiebestand handmatig selecteren?';
@@ -707,9 +859,6 @@ class AppLocalizationsNl extends AppLocalizations {
return 'Overschakelen naar $val';
}
@override
String get sync => 'Sync';
@override
String get syncTip =>
'Een herstart kan nodig zijn voor sommige wijzigingen om van kracht te worden.';
@@ -720,6 +869,10 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get tag => 'Labels';
@override
String get tapToStartDiscovery =>
'Tik op de zoekknop om SSH-servers op uw netwerk te ontdekken';
@override
String get temperature => 'Temperatuur';
@@ -752,6 +905,9 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get total => 'Totaal';
@override
String get totalAttempts => 'Totaal';
@override
String get traffic => 'Verkeer';
@@ -778,9 +934,6 @@ class AppLocalizationsNl extends AppLocalizations {
String get updateServerStatusInterval =>
'Interne server status bijwerking interval';
@override
String get upload => 'Upload';
@override
String get upsideDown => 'Ondersteboven';
@@ -806,6 +959,9 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get view => 'Weergave';
@override
String get viewDetails => 'Details bekijken';
@override
String get viewErr => 'Zie foutmelding';
@@ -851,70 +1007,26 @@ class AppLocalizationsNl extends AppLocalizations {
'Na het verbinden met de server wordt een script geschreven naar `~/.config/server_box` \n | `/tmp/server_box` om de systeemstatus te monitoren. U kunt de inhoud van het script controleren.';
@override
String get connectionStats => 'Verbindingsstatistieken';
String get menuSettings => 'Setting';
@override
String get connectionStatsDesc =>
'Bekijk server verbindingssucces ratio en geschiedenis';
String get menuQuit => 'Quit';
@override
String get noConnectionStatsData => 'Geen verbindingsstatistiekgegevens';
String get menuNavigate => 'Navigate';
@override
String get totalAttempts => 'Totaal';
String get menuInfo => 'Info';
@override
String get lastSuccess => 'Laatst succesvol';
String get menuGitHubRepository => 'GitHub Repository';
@override
String get lastFailure => 'Laatst gefaald';
String get menuWiki => 'Wiki';
@override
String get recentConnections => 'Recente verbindingen';
String get menuHelp => 'Help';
@override
String get viewDetails => 'Details bekijken';
@override
String get connectionDetails => 'Verbindingsdetails';
@override
String get clearThisServerStats => 'Statistieken van deze server wissen';
@override
String get clearAllStatsTitle => 'Alle statistieken wissen';
@override
String get clearAllStatsContent =>
'Weet u zeker dat u alle serververbindingsstatistieken wilt wissen? Deze actie kan niet ongedaan worden gemaakt.';
@override
String clearServerStatsTitle(String serverName) {
return 'Statistieken van $serverName wissen';
}
@override
String clearServerStatsContent(String serverName) {
return 'Weet u zeker dat u de verbindingsstatistieken voor server \"$serverName\" wilt wissen? Deze actie kan niet ongedaan worden gemaakt.';
}
@override
String get homeTabs => 'Home-tabbladen';
@override
String get homeTabsCustomizeDesc =>
'Pas aan welke tabbladen op de startpagina worden weergegeven en hun volgorde';
@override
String get reset => 'Resetten';
@override
String get availableTabs => 'Beschikbare tabbladen';
@override
String get atLeastOneTab =>
'Er moet minimaal één tabblad worden geselecteerd';
@override
String get serverTabRequired => 'Server tab cannot be removed';
String get logs => 'Logboeken';
}

View File

@@ -27,6 +27,59 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get alreadyLastDir => 'Já é o diretório mais alto';
@override
String get askAi => 'Perguntar à IA';
@override
String get askAiApiKey => 'Chave de API';
@override
String get askAiAwaitingResponse => 'Aguardando resposta da IA...';
@override
String get askAiBaseUrl => 'URL base';
@override
String get askAiCommandInserted => 'Comando inserido no terminal';
@override
String askAiConfigMissing(Object fields) {
return 'Configure $fields nas configurações.';
}
@override
String get askAiConfirmExecute => 'Confirmar antes de executar';
@override
String get askAiConversation => 'Conversa com a IA';
@override
String get askAiDisclaimer => 'A IA pode errar. Use com cautela.';
@override
String get askAiFollowUpHint => 'Faça uma pergunta adicional...';
@override
String get askAiInsertTerminal => 'Inserir no terminal';
@override
String get askAiModel => 'Modelo';
@override
String get askAiNoResponse => 'Sem resposta';
@override
String get askAiRecommendedCommand => 'Comando sugerido pela IA';
@override
String get askAiSelectedContent => 'Conteúdo selecionado';
@override
String get askAiUsageHint => 'Usado no terminal SSH';
@override
String get atLeastOneTab => 'Pelo menos uma aba deve ser selecionada';
@override
String get authFailTip =>
'Autenticação falhou, por favor verifique se a senha/chave/host/usuário, etc., estão incorretos.';
@@ -45,6 +98,9 @@ class AppLocalizationsPt extends AppLocalizations {
String get autoUpdateHomeWidget =>
'Atualização automática do widget da tela inicial';
@override
String get availableTabs => 'Abas disponíveis';
@override
String get backupEncrypted => 'Backup está criptografado';
@@ -85,6 +141,26 @@ class AppLocalizationsPt extends AppLocalizations {
String get 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\'.';
@override
String get clearAllStatsContent =>
'Tem certeza de que deseja limpar todas as estatísticas de conexão do servidor? Esta ação não pode ser desfeita.';
@override
String get clearAllStatsTitle => 'Limpar todas as estatísticas';
@override
String clearServerStatsContent(Object serverName) {
return 'Tem certeza de que deseja limpar as estatísticas de conexão para o servidor \"$serverName\"? Esta ação não pode ser desfeita.';
}
@override
String clearServerStatsTitle(Object serverName) {
return 'Limpar estatísticas de $serverName';
}
@override
String get clearThisServerStats => 'Limpar estatísticas deste servidor';
@override
String get closeAfterSave => 'Salvar e fechar';
@@ -97,6 +173,16 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get conn => 'Conectar';
@override
String get connectionDetails => 'Detalhes da conexão';
@override
String get connectionStats => 'Estatísticas de conexão';
@override
String get connectionStatsDesc =>
'Ver taxa de sucesso de conexão do servidor e histórico';
@override
String get container => 'Contêiner';
@@ -146,6 +232,18 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get disconnected => 'Desconectado';
@override
String get discoverSshServers => 'Descobrir servidores SSH';
@override
String get discoveryFailed => 'Descoberta falhou';
@override
String get discoverySettings => 'Configurações de descoberta';
@override
String get discoverySummary => 'Resumo da descoberta';
@override
String get disk => 'Disco';
@@ -198,9 +296,6 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get editVirtKeys => 'Editar teclas virtuais';
@override
String get editor => 'Editor';
@override
String get editorHighlightTip =>
'O desempenho do destaque de código atualmente é ruim, pode optar por desativá-lo para melhorar.';
@@ -208,6 +303,12 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get emulator => 'Emulador';
@override
String get enableMdns => 'Ativar mDNS';
@override
String get enableMdnsDesc => 'Usar mDNS/Bonjour para descobrir serviços SSH';
@override
String get encode => 'Codificar';
@@ -240,10 +341,10 @@ class AppLocalizationsPt extends AppLocalizations {
}
@override
String get followSystem => 'Seguir sistema';
String get finishedAt => 'Terminado em';
@override
String get font => 'Fonte';
String get followSystem => 'Seguir sistema';
@override
String get fontSize => 'Tamanho da fonte';
@@ -276,6 +377,13 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get highlight => 'Destaque de código';
@override
String get homeTabs => 'Abas iniciais';
@override
String get homeTabsCustomizeDesc =>
'Personalize quais abas aparecem na página inicial e sua ordem';
@override
String get homeWidgetUrlConfig =>
'Configuração de URL do widget da tela inicial';
@@ -297,9 +405,6 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get imagesList => 'Lista de imagens';
@override
String get init => 'Inicializar';
@override
String get inner => 'Interno';
@@ -328,6 +433,12 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get keyAuth => 'Autenticação por chave';
@override
String get lastFailure => 'Última falha';
@override
String get lastSuccess => 'Último sucesso';
@override
String get letterCache => 'Cache de letras';
@@ -335,9 +446,6 @@ class AppLocalizationsPt extends AppLocalizations {
String get letterCacheTip =>
'Recomendado desativar, mas após desativar, será impossível inserir caracteres CJK.';
@override
String get license => 'Licença de código aberto';
@override
String get location => 'Localização';
@@ -350,10 +458,10 @@ class AppLocalizationsPt extends AppLocalizations {
}
@override
String get manual => 'Manual';
String get max => 'Máximo';
@override
String get max => 'Máximo';
String get maxConcurrency => 'Concorrência máxima';
@override
String get maxRetryCount =>
@@ -394,6 +502,9 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get newContainer => 'Novo contêiner';
@override
String get noConnectionStatsData => 'Não há dados de estatísticas de conexão';
@override
String get noLineChart => 'Não usar gráficos de linha';
@@ -465,10 +576,12 @@ class AppLocalizationsPt extends AppLocalizations {
String get preferDiskAmount => 'Priorizar a exibição da capacidade do disco';
@override
String get preview => 'Pré-visualização';
String get privateKey => 'Chave privada';
@override
String get privateKey => 'Chave privada';
String privateKeyNotFoundFmt(Object keyId) {
return 'Chave privada [$keyId] não encontrada.';
}
@override
String get process => 'Processo';
@@ -497,6 +610,9 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get reboot => 'Reiniciar';
@override
String get recentConnections => 'Conexões recentes';
@override
String get rememberPwdInMem => 'Lembrar senha na memória';
@@ -558,6 +674,12 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get serverOrder => 'Ordem do servidor';
@override
String get serverTabRequired => 'A aba do servidor não pode ser removida';
@override
String get servers => 'servidores';
@override
String get sftpDlPrepare => 'Preparando para conectar ao servidor...';
@@ -642,6 +764,34 @@ class AppLocalizationsPt extends AppLocalizations {
return 'Importados $count servidores da configuração SSH';
}
@override
String sshHostKeyChangedDesc(Object serverName) {
return 'A chave de host SSH de $serverName foi alterada. Continue apenas se confiar neste servidor.';
}
@override
String sshHostKeyFingerprintMd5Base64(Object fingerprint) {
return 'Impressão digital (MD5 Base64): $fingerprint';
}
@override
String sshHostKeyFingerprintMd5Hex(Object fingerprint) {
return 'Impressão digital (MD5 hex): $fingerprint';
}
@override
String get sshHostKeyType => 'Tipo de chave de host SSH';
@override
String sshHostKeyNewDesc(Object serverName) {
return 'Uma nova chave de host SSH foi recebida de $serverName. Verifique a impressão digital antes de confiar.';
}
@override
String sshHostKeyStoredFingerprint(Object fingerprint) {
return 'Impressão digital armazenada: $fingerprint';
}
@override
String get sshConfigManualSelect =>
'Gostaria de selecionar manualmente o arquivo de configuração SSH?';
@@ -705,9 +855,6 @@ class AppLocalizationsPt extends AppLocalizations {
return 'Mudar para $val';
}
@override
String get sync => 'Sincronizar';
@override
String get syncTip =>
'Pode ser necessário reiniciar para algumas mudanças surtirem efeito.';
@@ -718,6 +865,10 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get tag => 'Tag';
@override
String get tapToStartDiscovery =>
'Toque no botão de pesquisa para descobrir servidores SSH na sua rede';
@override
String get temperature => 'Temperatura';
@@ -750,6 +901,9 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get total => 'Total';
@override
String get totalAttempts => 'Total';
@override
String get traffic => 'Tráfego';
@@ -776,9 +930,6 @@ class AppLocalizationsPt extends AppLocalizations {
String get updateServerStatusInterval =>
'Intervalo de atualização do estado do servidor';
@override
String get upload => 'Upload';
@override
String get upsideDown => 'Inverter verticalmente';
@@ -804,6 +955,9 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get view => 'Visualização';
@override
String get viewDetails => 'Ver detalhes';
@override
String get viewErr => 'Ver erro';
@@ -848,69 +1002,26 @@ class AppLocalizationsPt extends AppLocalizations {
'Após conectar ao servidor, um script será escrito em `~/.config/server_box` \n | `/tmp/server_box` para monitorar o status do sistema. Você pode revisar o conteúdo do script.';
@override
String get connectionStats => 'Estatísticas de conexão';
String get menuSettings => 'Setting';
@override
String get connectionStatsDesc =>
'Ver taxa de sucesso de conexão do servidor e histórico';
String get menuQuit => 'Quit';
@override
String get noConnectionStatsData => 'Não há dados de estatísticas de conexão';
String get menuNavigate => 'Navigate';
@override
String get totalAttempts => 'Total';
String get menuInfo => 'Info';
@override
String get lastSuccess => 'Último sucesso';
String get menuGitHubRepository => 'GitHub Repository';
@override
String get lastFailure => 'Última falha';
String get menuWiki => 'Wiki';
@override
String get recentConnections => 'Conexões recentes';
String get menuHelp => 'Help';
@override
String get viewDetails => 'Ver detalhes';
@override
String get connectionDetails => 'Detalhes da conexão';
@override
String get clearThisServerStats => 'Limpar estatísticas deste servidor';
@override
String get clearAllStatsTitle => 'Limpar todas as estatísticas';
@override
String get clearAllStatsContent =>
'Tem certeza de que deseja limpar todas as estatísticas de conexão do servidor? Esta ação não pode ser desfeita.';
@override
String clearServerStatsTitle(String serverName) {
return 'Limpar estatísticas de $serverName';
}
@override
String clearServerStatsContent(String serverName) {
return 'Tem certeza de que deseja limpar as estatísticas de conexão para o servidor \"$serverName\"? Esta ação não pode ser desfeita.';
}
@override
String get homeTabs => 'Abas iniciais';
@override
String get homeTabsCustomizeDesc =>
'Personalize quais abas aparecem na página inicial e sua ordem';
@override
String get reset => 'Redefinir';
@override
String get availableTabs => 'Abas disponíveis';
@override
String get atLeastOneTab => 'Pelo menos uma aba deve ser selecionada';
@override
String get serverTabRequired => 'Server tab cannot be removed';
String get logs => 'Logs';
}

View File

@@ -27,6 +27,60 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get alreadyLastDir => 'Уже в корневом каталоге';
@override
String get askAi => 'Спросить ИИ';
@override
String get askAiApiKey => 'Ключ API';
@override
String get askAiAwaitingResponse => 'Ожидание ответа ИИ...';
@override
String get askAiBaseUrl => 'Базовый URL';
@override
String get askAiCommandInserted => 'Команда вставлена в терминал';
@override
String askAiConfigMissing(Object fields) {
return 'Настройте $fields в настройках.';
}
@override
String get askAiConfirmExecute => 'Подтвердите перед выполнением';
@override
String get askAiConversation => 'Разговор с ИИ';
@override
String get askAiDisclaimer =>
'ИИ может ошибаться. Используйте с осторожностью.';
@override
String get askAiFollowUpHint => 'Задайте дополнительный вопрос...';
@override
String get askAiInsertTerminal => 'Вставить в терминал';
@override
String get askAiModel => 'Модель';
@override
String get askAiNoResponse => 'Нет ответа';
@override
String get askAiRecommendedCommand => 'Команда, предложенная ИИ';
@override
String get askAiSelectedContent => 'Выбранное содержимое';
@override
String get askAiUsageHint => 'Используется в SSH-терминале';
@override
String get atLeastOneTab => 'Должна быть выбрана хотя бы одна вкладка';
@override
String get authFailTip =>
'Аутентификация не удалась, пожалуйста, проверьте, правильны ли пароль/ключ/хост/пользователь и т.д.';
@@ -45,6 +99,9 @@ class AppLocalizationsRu extends AppLocalizations {
String get autoUpdateHomeWidget =>
'Автоматическое обновление виджета на главном экране';
@override
String get availableTabs => 'Доступные вкладки';
@override
String get backupEncrypted => 'Резервная копия зашифрована';
@@ -85,6 +142,26 @@ class AppLocalizationsRu extends AppLocalizations {
String get bgRunTip =>
'Этот переключатель означает, что программа будет пытаться работать в фоновом режиме, но фактическое выполнение зависит от того, включено ли разрешение. Для нативного Android отключите «Оптимизацию батареи» для этого приложения, для MIUI измените контроль активности на «Нет ограничений».';
@override
String get clearAllStatsContent =>
'Вы уверены, что хотите очистить всю статистику соединений сервера? Это действие не может быть отменено.';
@override
String get clearAllStatsTitle => 'Очистить всю статистику';
@override
String clearServerStatsContent(Object serverName) {
return 'Вы уверены, что хотите очистить статистику соединений для сервера \"$serverName\"? Это действие не может быть отменено.';
}
@override
String clearServerStatsTitle(Object serverName) {
return 'Очистить статистику $serverName';
}
@override
String get clearThisServerStats => 'Очистить статистику этого сервера';
@override
String get closeAfterSave => 'Сохранить и закрыть';
@@ -97,6 +174,16 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get conn => 'Подключение';
@override
String get connectionDetails => 'Детали соединения';
@override
String get connectionStats => 'Статистика соединений';
@override
String get connectionStatsDesc =>
'Просмотр коэффициента успешности подключения к серверу и истории';
@override
String get container => 'Контейнер';
@@ -146,6 +233,18 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get disconnected => 'Отключено';
@override
String get discoverSshServers => 'Обнаружить SSH серверы';
@override
String get discoveryFailed => 'Обнаружение не удалось';
@override
String get discoverySettings => 'Настройки обнаружения';
@override
String get discoverySummary => 'Сводка обнаружения';
@override
String get disk => 'Диск';
@@ -198,9 +297,6 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get editVirtKeys => 'Редактировать виртуальные клавиши';
@override
String get editor => 'Редактор';
@override
String get editorHighlightTip =>
'Текущая производительность подсветки кода неудовлетворительна, можно отключить для улучшения.';
@@ -208,6 +304,13 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get emulator => 'Эмулятор';
@override
String get enableMdns => 'Включить mDNS';
@override
String get enableMdnsDesc =>
'Использовать mDNS/Bonjour для обнаружения SSH служб';
@override
String get encode => 'Кодировать';
@@ -240,10 +343,10 @@ class AppLocalizationsRu extends AppLocalizations {
}
@override
String get followSystem => 'Следовать за системой';
String get finishedAt => 'Завершено в';
@override
String get font => 'Шрифт';
String get followSystem => 'Следовать за системой';
@override
String get fontSize => 'Размер шрифта';
@@ -276,6 +379,13 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get highlight => 'Подсветка кода';
@override
String get homeTabs => 'Вкладки дома';
@override
String get homeTabsCustomizeDesc =>
'Настройте, какие вкладки появляются на главной странице и их порядок';
@override
String get homeWidgetUrlConfig => 'Конфигурация URL виджета домашнего экрана';
@@ -296,9 +406,6 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get imagesList => 'Список образов';
@override
String get init => 'Инициализировать';
@override
String get inner => 'Встроенный';
@@ -328,6 +435,12 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get keyAuth => 'Аутентификация по ключу';
@override
String get lastFailure => 'Последний сбой';
@override
String get lastSuccess => 'Последний успех';
@override
String get letterCache => 'Кэширование букв';
@@ -335,9 +448,6 @@ class AppLocalizationsRu extends AppLocalizations {
String get letterCacheTip =>
'Рекомендуется отключить, но после отключения будет невозможно вводить символы CJK.';
@override
String get license => 'Лицензия';
@override
String get location => 'Местоположение';
@@ -350,10 +460,10 @@ class AppLocalizationsRu extends AppLocalizations {
}
@override
String get manual => 'Вручную';
String get max => 'максимум';
@override
String get max => 'максимум';
String get maxConcurrency => 'Максимальная параллельность';
@override
String get maxRetryCount =>
@@ -395,6 +505,9 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get newContainer => 'Создать контейнер';
@override
String get noConnectionStatsData => 'Нет данных статистики соединений';
@override
String get noLineChart => 'Не использовать линейные графики';
@@ -466,10 +579,12 @@ class AppLocalizationsRu extends AppLocalizations {
String get preferDiskAmount => 'Приоритетное отображение объёма диска';
@override
String get preview => 'Предпросмотр';
String get privateKey => 'Приватный ключ';
@override
String get privateKey => 'Приватный ключ';
String privateKeyNotFoundFmt(Object keyId) {
return 'Закрытый ключ [$keyId] не найден.';
}
@override
String get process => 'Процесс';
@@ -498,6 +613,9 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get reboot => 'Перезагрузка';
@override
String get recentConnections => 'Недавние соединения';
@override
String get rememberPwdInMem => 'Запомнить пароль в памяти';
@@ -560,6 +678,12 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get serverOrder => 'Порядок серверов';
@override
String get serverTabRequired => 'Вкладку сервера нельзя удалить';
@override
String get servers => 'серверов';
@override
String get sftpDlPrepare => 'Подготовка подключения...';
@@ -645,6 +769,34 @@ class AppLocalizationsRu extends AppLocalizations {
return 'Импортировано $count серверов из SSH-конфигурации';
}
@override
String sshHostKeyChangedDesc(Object serverName) {
return 'SSH-ключ хоста для $serverName изменился. Продолжайте только если доверяете этому серверу.';
}
@override
String sshHostKeyFingerprintMd5Base64(Object fingerprint) {
return 'Отпечаток (MD5 Base64): $fingerprint';
}
@override
String sshHostKeyFingerprintMd5Hex(Object fingerprint) {
return 'Отпечаток (MD5 hex): $fingerprint';
}
@override
String get sshHostKeyType => 'Тип ключа хоста SSH';
@override
String sshHostKeyNewDesc(Object serverName) {
return 'Получен новый SSH-ключ хоста от $serverName. Проверьте отпечаток перед продолжением.';
}
@override
String sshHostKeyStoredFingerprint(Object fingerprint) {
return 'Сохранённый отпечаток: $fingerprint';
}
@override
String get sshConfigManualSelect =>
'Хотели бы вы вручную выбрать файл конфигурации SSH?';
@@ -707,9 +859,6 @@ class AppLocalizationsRu extends AppLocalizations {
return 'Переключиться на $val';
}
@override
String get sync => 'Синхронизировать';
@override
String get syncTip =>
'Возможно, потребуется перезагрузка, чтобы некоторые изменения вступили в силу.';
@@ -720,6 +869,10 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get tag => 'Теги';
@override
String get tapToStartDiscovery =>
'Нажмите кнопку поиска, чтобы обнаружить SSH серверы в вашей сети';
@override
String get temperature => 'Температура';
@@ -752,6 +905,9 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get total => 'Всего';
@override
String get totalAttempts => 'Общее';
@override
String get traffic => 'Трафик';
@@ -778,9 +934,6 @@ class AppLocalizationsRu extends AppLocalizations {
String get updateServerStatusInterval =>
'Интервал обновления статуса сервера';
@override
String get upload => 'Загрузить';
@override
String get upsideDown => 'Перевернуть';
@@ -806,6 +959,9 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get view => 'Вид';
@override
String get viewDetails => 'Просмотр деталей';
@override
String get viewErr => 'Просмотр ошибок';
@@ -850,69 +1006,26 @@ class AppLocalizationsRu extends AppLocalizations {
'После подключения к серверу скрипт будет записан в `~/.config/server_box` \n | `/tmp/server_box` для мониторинга состояния системы. Вы можете проверить содержимое скрипта.';
@override
String get connectionStats => 'Статистика соединений';
String get menuSettings => 'Setting';
@override
String get connectionStatsDesc =>
'Просмотр коэффициента успешности подключения к серверу и истории';
String get menuQuit => 'Quit';
@override
String get noConnectionStatsData => 'Нет данных статистики соединений';
String get menuNavigate => 'Navigate';
@override
String get totalAttempts => 'Общее';
String get menuInfo => 'Info';
@override
String get lastSuccess => 'Последний успех';
String get menuGitHubRepository => 'GitHub Repository';
@override
String get lastFailure => 'Последний сбой';
String get menuWiki => 'Wiki';
@override
String get recentConnections => 'Недавние соединения';
String get menuHelp => 'Help';
@override
String get viewDetails => 'Просмотр деталей';
@override
String get connectionDetails => 'Детали соединения';
@override
String get clearThisServerStats => 'Очистить статистику этого сервера';
@override
String get clearAllStatsTitle => 'Очистить всю статистику';
@override
String get clearAllStatsContent =>
'Вы уверены, что хотите очистить всю статистику соединений сервера? Это действие не может быть отменено.';
@override
String clearServerStatsTitle(String serverName) {
return 'Очистить статистику $serverName';
}
@override
String clearServerStatsContent(String serverName) {
return 'Вы уверены, что хотите очистить статистику соединений для сервера \"$serverName\"? Это действие не может быть отменено.';
}
@override
String get homeTabs => 'Вкладки дома';
@override
String get homeTabsCustomizeDesc =>
'Настройте, какие вкладки появляются на главной странице и их порядок';
@override
String get reset => 'Сброс';
@override
String get availableTabs => 'Доступные вкладки';
@override
String get atLeastOneTab => 'Должна быть выбрана хотя бы одна вкладка';
@override
String get serverTabRequired => 'Server tab cannot be removed';
String get logs => 'Журналы';
}

View File

@@ -27,6 +27,60 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get alreadyLastDir => 'Zaten son dizindesiniz.';
@override
String get askAi => 'Yapay zekaya sor';
@override
String get askAiApiKey => 'API anahtarı';
@override
String get askAiAwaitingResponse => 'Yapay zekâ yanıtı bekleniyor...';
@override
String get askAiBaseUrl => 'Temel URL';
@override
String get askAiCommandInserted => 'Komut terminale eklendi';
@override
String askAiConfigMissing(Object fields) {
return 'Lütfen Ayarlar\'da $fields öğesini yapılandırın.';
}
@override
String get askAiConfirmExecute => 'Çalıştırmadan önce onayla';
@override
String get askAiConversation => 'YZ sohbeti';
@override
String get askAiDisclaimer =>
'Yapay zeka hata yapabilir. Lütfen dikkatli kullanın.';
@override
String get askAiFollowUpHint => 'Yeni bir soru sor...';
@override
String get askAiInsertTerminal => 'Terminale ekle';
@override
String get askAiModel => 'Model';
@override
String get askAiNoResponse => 'Yanıt yok';
@override
String get askAiRecommendedCommand => 'YZ önerilen komut';
@override
String get askAiSelectedContent => 'Seçilen içerik';
@override
String get askAiUsageHint => 'SSH Terminalinde kullanılır';
@override
String get atLeastOneTab => 'En az bir sekme seçilmelidir';
@override
String get authFailTip =>
'Kimlik doğrulama başarısız oldu, lütfen kimlik bilgilerinin doğru olup olmadığını kontrol edin';
@@ -44,6 +98,9 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get autoUpdateHomeWidget => 'Ana ekran bileşenini otomatik güncelle';
@override
String get availableTabs => 'Mevcut Sekmeler';
@override
String get backupEncrypted => 'Yedekleme şifrelenmiş';
@@ -83,6 +140,26 @@ class AppLocalizationsTr extends AppLocalizations {
String get bgRunTip =>
'Bu anahtar yalnızca programın arka planda çalışmayı deneyeceği anlamına gelir. Arka planda çalışıp çalışamayacağı, iznin etkinleştirilip etkinleştirilmediğine bağlıdır. AOSP tabanlı Android ROM\'lar için lütfen bu uygulamada \"Pil Optimizasyonu\"nu devre dışı bırakın. MIUI / HyperOS için lütfen güç tasarrufu politikasını \"Sınırsız\" olarak değiştirin.';
@override
String get clearAllStatsContent =>
'Tüm sunucu bağlantı istatistiklerini temizlemek istediğinizden emin misiniz? Bu işlem geri alınamaz.';
@override
String get clearAllStatsTitle => 'Tüm İstatistikleri Temizle';
@override
String clearServerStatsContent(Object serverName) {
return '\"$serverName\" sunucusu için bağlantı istatistiklerini temizlemek istediğinizden emin misiniz? Bu işlem geri alınamaz.';
}
@override
String clearServerStatsTitle(Object serverName) {
return '$serverName İstatistiklerini Temizle';
}
@override
String get clearThisServerStats => 'Bu Sunucu İstatistiklerini Temizle';
@override
String get closeAfterSave => 'Kaydet ve kapat';
@@ -96,6 +173,16 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get conn => 'Bağlantı';
@override
String get connectionDetails => 'Bağlantı Detayları';
@override
String get connectionStats => 'Bağlantı İstatistikleri';
@override
String get connectionStatsDesc =>
'Sunucu bağlantı başarı oranını ve geçmişi görüntüle';
@override
String get container => 'Konteyner';
@@ -145,6 +232,18 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get disconnected => 'Bağlantı kesildi';
@override
String get discoverSshServers => 'SSH Sunucularını Keşfet';
@override
String get discoveryFailed => 'Keşif başarısız';
@override
String get discoverySettings => 'Keşif Ayarları';
@override
String get discoverySummary => 'Keşif Özeti';
@override
String get disk => 'Disk';
@@ -197,9 +296,6 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get editVirtKeys => 'Sanal tuşları düzenle';
@override
String get editor => 'Düzenleyici';
@override
String get editorHighlightTip =>
'Mevcut kod vurgulama performansı ideal değil ve isteğe bağlı olarak kapatılabilir.';
@@ -207,6 +303,13 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get emulator => 'Emülatör';
@override
String get enableMdns => 'mDNS\'yi Etkinleştir';
@override
String get enableMdnsDesc =>
'SSH hizmetlerini keşfetmek için mDNS/Bonjour kullan';
@override
String get encode => 'Kodla';
@@ -239,10 +342,10 @@ class AppLocalizationsTr extends AppLocalizations {
}
@override
String get followSystem => 'Sistemi takip et';
String get finishedAt => 'Tamamlandı:';
@override
String get font => 'Yazı tipi';
String get followSystem => 'Sistemi takip et';
@override
String get fontSize => 'Yazı tipi boyutu';
@@ -275,6 +378,13 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get highlight => 'Kod vurgulama';
@override
String get homeTabs => 'Ana Sayfa Sekmeleri';
@override
String get homeTabsCustomizeDesc =>
'Ana sayfada görünecek sekmeleri ve sıralarını özelleştirin';
@override
String get homeWidgetUrlConfig => 'Ana ekran bileşeni URL\'sini yapılandır';
@@ -295,9 +405,6 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get imagesList => 'Görüntü listesi';
@override
String get init => 'Başlat';
@override
String get inner => 'İç';
@@ -327,6 +434,12 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get keyAuth => 'Anahtar Kimlik Doğrulama';
@override
String get lastFailure => 'Son Başarısızlık';
@override
String get lastSuccess => 'Son Başarı';
@override
String get letterCache => 'Harf önbelleği';
@@ -334,9 +447,6 @@ class AppLocalizationsTr extends AppLocalizations {
String get letterCacheTip =>
'Devre dışı bırakılması önerilir, ancak devre dışı bırakıldığında CJK karakterlerini girmek mümkün olmayacaktır.';
@override
String get license => 'Lisans';
@override
String get location => 'Konum';
@@ -349,10 +459,10 @@ class AppLocalizationsTr extends AppLocalizations {
}
@override
String get manual => 'Manuel';
String get max => 'maks';
@override
String get max => 'maks';
String get maxConcurrency => 'Maksimum Eşzamanlılık';
@override
String get maxRetryCount => 'Sunucu yeniden bağlantı sayısı';
@@ -392,6 +502,9 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get newContainer => 'Yeni konteyner';
@override
String get noConnectionStatsData => 'Bağlantı istatistik verisi yok';
@override
String get noLineChart => 'Çizgi grafikleri kullanma';
@@ -463,10 +576,12 @@ class AppLocalizationsTr extends AppLocalizations {
String get preferDiskAmount => 'Disk kapasitesini öncelikli olarak göster';
@override
String get preview => 'Önizleme';
String get privateKey => 'Özel Anahtar';
@override
String get privateKey => 'Özel Anahtar';
String privateKeyNotFoundFmt(Object keyId) {
return 'Özel anahtar [$keyId] bulunamadı.';
}
@override
String get process => 'İşlem';
@@ -495,6 +610,9 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get reboot => 'Yeniden başlat';
@override
String get recentConnections => 'Son Bağlantılar';
@override
String get rememberPwdInMem => 'Şifreyi bellekte hatırla';
@@ -556,6 +674,12 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get serverOrder => 'Sunucu sırası';
@override
String get serverTabRequired => 'Sunucu sekmesi kaldırılamaz';
@override
String get servers => 'sunucu';
@override
String get sftpDlPrepare => 'Bağlantı hazırlanıyor...';
@@ -641,6 +765,34 @@ class AppLocalizationsTr extends AppLocalizations {
return 'SSH yapılandırmasından $count sunucu içe aktarıldı';
}
@override
String sshHostKeyChangedDesc(Object serverName) {
return '$serverName için SSH ana bilgisayar anahtarı değişti. Yalnızca bu sunucuya güveniyorsanız devam edin.';
}
@override
String sshHostKeyFingerprintMd5Base64(Object fingerprint) {
return 'Parmak izi (MD5 Base64): $fingerprint';
}
@override
String sshHostKeyFingerprintMd5Hex(Object fingerprint) {
return 'Parmak izi (MD5 hex): $fingerprint';
}
@override
String get sshHostKeyType => 'SSH ana bilgisayar anahtarı türü';
@override
String sshHostKeyNewDesc(Object serverName) {
return '$serverName üzerinden yeni bir SSH ana bilgisayar anahtarı alındı. Güvenmeden önce parmak izini kontrol edin.';
}
@override
String sshHostKeyStoredFingerprint(Object fingerprint) {
return 'Kaydedilen parmak izi: $fingerprint';
}
@override
String get sshConfigManualSelect =>
'SSH yapılandırma dosyasını manuel olarak seçmek ister misiniz?';
@@ -703,9 +855,6 @@ class AppLocalizationsTr extends AppLocalizations {
return '$val\'a geç';
}
@override
String get sync => 'Senkronize et';
@override
String get syncTip =>
'Bazı değişikliklerin etkili olması için yeniden başlatma gerekebilir.';
@@ -716,6 +865,10 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get tag => 'Etiketler';
@override
String get tapToStartDiscovery =>
'ınızdaki SSH sunucularını keşfetmek için arama düğmesine dokunun';
@override
String get temperature => 'Sıcaklık';
@@ -748,6 +901,9 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get total => 'Toplam';
@override
String get totalAttempts => 'Toplam';
@override
String get traffic => 'Trafik';
@@ -773,9 +929,6 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get updateServerStatusInterval => 'Sunucu durumu güncelleme aralığı';
@override
String get upload => 'Yükle';
@override
String get upsideDown => 'Başaşağı';
@@ -801,6 +954,9 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get view => 'Görünüm';
@override
String get viewDetails => 'Detayları Görüntüle';
@override
String get viewErr => 'Hatayı gör';
@@ -845,69 +1001,26 @@ class AppLocalizationsTr extends AppLocalizations {
'Sunucuya bağlandıktan sonra, sistem durumunu izlemek için `~/.config/server_box` \n | `/tmp/server_box` dizinine bir betik yazılacak. Betik içeriğini inceleyebilirsiniz.';
@override
String get connectionStats => 'Bağlantı İstatistikleri';
String get menuSettings => 'Setting';
@override
String get connectionStatsDesc =>
'Sunucu bağlantı başarı oranını ve geçmişi görüntüle';
String get menuQuit => 'Quit';
@override
String get noConnectionStatsData => 'Bağlantı istatistik verisi yok';
String get menuNavigate => 'Navigate';
@override
String get totalAttempts => 'Toplam';
String get menuInfo => 'Info';
@override
String get lastSuccess => 'Son Başarı';
String get menuGitHubRepository => 'GitHub Repository';
@override
String get lastFailure => 'Son Başarısızlık';
String get menuWiki => 'Wiki';
@override
String get recentConnections => 'Son Bağlantılar';
String get menuHelp => 'Help';
@override
String get viewDetails => 'Detayları Görüntüle';
@override
String get connectionDetails => 'Bağlantı Detayları';
@override
String get clearThisServerStats => 'Bu Sunucu İstatistiklerini Temizle';
@override
String get clearAllStatsTitle => 'Tüm İstatistikleri Temizle';
@override
String get clearAllStatsContent =>
'Tüm sunucu bağlantı istatistiklerini temizlemek istediğinizden emin misiniz? Bu işlem geri alınamaz.';
@override
String clearServerStatsTitle(String serverName) {
return '$serverName İstatistiklerini Temizle';
}
@override
String clearServerStatsContent(String serverName) {
return '\"$serverName\" sunucusu için bağlantı istatistiklerini temizlemek istediğinizden emin misiniz? Bu işlem geri alınamaz.';
}
@override
String get homeTabs => 'Ana Sayfa Sekmeleri';
@override
String get homeTabsCustomizeDesc =>
'Ana sayfada görünecek sekmeleri ve sıralarını özelleştirin';
@override
String get reset => 'Sıfırla';
@override
String get availableTabs => 'Mevcut Sekmeler';
@override
String get atLeastOneTab => 'En az bir sekme seçilmelidir';
@override
String get serverTabRequired => 'Server tab cannot be removed';
String get logs => 'Günlükler';
}

View File

@@ -27,6 +27,59 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get alreadyLastDir => 'Вже в останньому каталозі.';
@override
String get askAi => 'Запитати ШІ';
@override
String get askAiApiKey => 'Ключ API';
@override
String get askAiAwaitingResponse => 'Очікування відповіді ШІ...';
@override
String get askAiBaseUrl => 'Базова URL';
@override
String get askAiCommandInserted => 'Команду вставлено в термінал';
@override
String askAiConfigMissing(Object fields) {
return 'Налаштуйте $fields у налаштуваннях.';
}
@override
String get askAiConfirmExecute => 'Підтвердити перед виконанням';
@override
String get askAiConversation => 'Розмова з ШІ';
@override
String get askAiDisclaimer => 'ШІ може помилятися. Користуйтеся обережно.';
@override
String get askAiFollowUpHint => 'Поставте додаткове запитання...';
@override
String get askAiInsertTerminal => 'Вставити в термінал';
@override
String get askAiModel => 'Модель';
@override
String get askAiNoResponse => 'Відповідь відсутня';
@override
String get askAiRecommendedCommand => 'Команда, запропонована ШІ';
@override
String get askAiSelectedContent => 'Вибраний вміст';
@override
String get askAiUsageHint => 'Використовується в SSH-терміналі';
@override
String get atLeastOneTab => 'Потрібно вибрати принаймні одну вкладку';
@override
String get authFailTip =>
'Авторизація не вдалася, будь ласка, перевірте правильність облікових даних';
@@ -45,6 +98,9 @@ class AppLocalizationsUk extends AppLocalizations {
String get autoUpdateHomeWidget =>
'Автоматичне оновлення віджетів на головному екрані';
@override
String get availableTabs => 'Доступні вкладки';
@override
String get backupEncrypted => 'Резервна копія зашифрована';
@@ -85,6 +141,26 @@ class AppLocalizationsUk extends AppLocalizations {
String get bgRunTip =>
'Цей перемикач лише вказує на те, що програма намагатиметься працювати у фоновому режимі. Чи може вона працювати у фоновому режимі, залежить від прав доступу. Для AOSP-орієнтованих Android ROM, будь ласка, вимкніть \"Оптимізацію акумулятора\" в цьому додатку. Для MIUI / HyperOS, будь ласка, змініть політику економії енергії на \"Нескінченна\".';
@override
String get clearAllStatsContent =>
'Ви впевнені, що хочете очистити всю статистику з\'єднань сервера? Цю дію не можна скасувати.';
@override
String get clearAllStatsTitle => 'Очистити всю статистику';
@override
String clearServerStatsContent(Object serverName) {
return 'Ви впевнені, що хочете очистити статистику з\'єднань для сервера \"$serverName\"? Цю дію не можна скасувати.';
}
@override
String clearServerStatsTitle(Object serverName) {
return 'Очистити статистику $serverName';
}
@override
String get clearThisServerStats => 'Очистити статистику цього сервера';
@override
String get closeAfterSave => 'Зберегти та закрити';
@@ -98,6 +174,16 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get conn => 'З\'єднання';
@override
String get connectionDetails => 'Деталі з\'єднання';
@override
String get connectionStats => 'Статистика з\'єднань';
@override
String get connectionStatsDesc =>
'Переглянути коефіцієнт успішності підключення до сервера та історію';
@override
String get container => 'Контейнер';
@@ -147,6 +233,18 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get disconnected => 'Відключено';
@override
String get discoverSshServers => 'Виявити SSH сервери';
@override
String get discoveryFailed => 'Виявлення не вдалось';
@override
String get discoverySettings => 'Налаштування виявлення';
@override
String get discoverySummary => 'Підсумок виявлення';
@override
String get disk => 'Диск';
@@ -199,9 +297,6 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get editVirtKeys => 'Редагувати віртуальні клавіші';
@override
String get editor => 'Редактор';
@override
String get editorHighlightTip =>
'Поточна підсвітка коду не ідеальна і може бути вимкнена для покращення.';
@@ -209,6 +304,13 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get emulator => 'Емулятор';
@override
String get enableMdns => 'Увімкнути mDNS';
@override
String get enableMdnsDesc =>
'Використовувати mDNS/Bonjour для виявлення SSH сервісів';
@override
String get encode => 'Кодувати';
@@ -241,10 +343,10 @@ class AppLocalizationsUk extends AppLocalizations {
}
@override
String get followSystem => 'Слідувати системі';
String get finishedAt => 'Завершено о';
@override
String get font => 'Шрифт';
String get followSystem => 'Слідувати системі';
@override
String get fontSize => 'Розмір шрифту';
@@ -277,6 +379,13 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get highlight => 'Підсвітка коду';
@override
String get homeTabs => 'Домашні вкладки';
@override
String get homeTabsCustomizeDesc =>
'Налаштуйте, які вкладки відображаються на головній сторінці та їх порядок';
@override
String get homeWidgetUrlConfig =>
'Налаштувати URL віджета на головному екрані';
@@ -298,9 +407,6 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get imagesList => 'Список зображень';
@override
String get init => 'Ініціалізувати';
@override
String get inner => 'Внутрішній';
@@ -330,6 +436,12 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get keyAuth => 'Аутентифікація ключем';
@override
String get lastFailure => 'Остання помилка';
@override
String get lastSuccess => 'Останній успіх';
@override
String get letterCache => 'Кешування букв';
@@ -337,9 +449,6 @@ class AppLocalizationsUk extends AppLocalizations {
String get letterCacheTip =>
'Рекомендується відключити, але після вимкнення стане неможливим введення CJK (китайських, японських, корейських) символів.';
@override
String get license => 'Ліцензія';
@override
String get location => 'Місцезнаходження';
@@ -352,10 +461,10 @@ class AppLocalizationsUk extends AppLocalizations {
}
@override
String get manual => 'Посібник';
String get max => 'макс.';
@override
String get max => 'макс.';
String get maxConcurrency => 'Максимальна паралельність';
@override
String get maxRetryCount =>
@@ -397,6 +506,9 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get newContainer => 'Новий контейнер';
@override
String get noConnectionStatsData => 'Немає даних статистики з\'єднань';
@override
String get noLineChart => 'Не використовувати лінійні діаграми';
@@ -468,10 +580,12 @@ class AppLocalizationsUk extends AppLocalizations {
String get preferDiskAmount => 'Пріоритетно показувати ємність диска';
@override
String get preview => 'Попередній перегляд';
String get privateKey => 'Приватний ключ';
@override
String get privateKey => 'Приватний ключ';
String privateKeyNotFoundFmt(Object keyId) {
return 'Приватний ключ [$keyId] не знайдено.';
}
@override
String get process => 'Процес';
@@ -500,6 +614,9 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get reboot => 'Перезавантажити';
@override
String get recentConnections => 'Останні з\'єднання';
@override
String get rememberPwdInMem => 'Запам\'ятати пароль у пам\'яті';
@@ -561,6 +678,12 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get serverOrder => 'Порядок сервера';
@override
String get serverTabRequired => 'Вкладку сервера не можна видалити';
@override
String get servers => 'серверів';
@override
String get sftpDlPrepare => 'Підготовка до підключення...';
@@ -646,6 +769,34 @@ class AppLocalizationsUk extends AppLocalizations {
return 'Імпортовано $count серверів з SSH-конфігурації';
}
@override
String sshHostKeyChangedDesc(Object serverName) {
return 'SSH-ключ хоста для $serverName змінено. Продовжуйте лише якщо довіряєте цьому серверу.';
}
@override
String sshHostKeyFingerprintMd5Base64(Object fingerprint) {
return 'Відбиток (MD5 Base64): $fingerprint';
}
@override
String sshHostKeyFingerprintMd5Hex(Object fingerprint) {
return 'Відбиток (MD5 hex): $fingerprint';
}
@override
String get sshHostKeyType => 'Тип ключа хоста SSH';
@override
String sshHostKeyNewDesc(Object serverName) {
return 'Отримано новий SSH-ключ хоста від $serverName. Перевірте відбиток перед тим, як довіряти.';
}
@override
String sshHostKeyStoredFingerprint(Object fingerprint) {
return 'Збережений відбиток: $fingerprint';
}
@override
String get sshConfigManualSelect =>
'Чи хочете ви вручну вибрати файл конфігурації SSH?';
@@ -708,9 +859,6 @@ class AppLocalizationsUk extends AppLocalizations {
return 'Переключитися на $val';
}
@override
String get sync => 'Синхронізація';
@override
String get syncTip =>
'Може знадобитися перезапуск, щоб деякі зміни набрали чинності.';
@@ -721,6 +869,10 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get tag => 'Теги';
@override
String get tapToStartDiscovery =>
'Натисніть кнопку пошуку, щоб виявити SSH сервери у вашій мережі';
@override
String get temperature => 'Температура';
@@ -753,6 +905,9 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get total => 'Всього';
@override
String get totalAttempts => 'Загальна кількість';
@override
String get traffic => 'Трафік';
@@ -778,9 +933,6 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get updateServerStatusInterval => 'Інтервал оновлення статусу сервера';
@override
String get upload => 'Завантаження';
@override
String get upsideDown => 'Доверху дном';
@@ -806,6 +958,9 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get view => 'Переглянути';
@override
String get viewDetails => 'Переглянути деталі';
@override
String get viewErr => 'Переглянути помилку';
@@ -851,69 +1006,26 @@ class AppLocalizationsUk extends AppLocalizations {
'Після підключення до сервера скрипт буде записано у `~/.config/server_box` \n | `/tmp/server_box` для моніторингу стану системи. Ви можете переглянути вміст скрипта.';
@override
String get connectionStats => 'Статистика з\'єднань';
String get menuSettings => 'Setting';
@override
String get connectionStatsDesc =>
'Переглянути коефіцієнт успішності підключення до сервера та історію';
String get menuQuit => 'Quit';
@override
String get noConnectionStatsData => 'Немає даних статистики з\'єднань';
String get menuNavigate => 'Navigate';
@override
String get totalAttempts => 'Загальна кількість';
String get menuInfo => 'Info';
@override
String get lastSuccess => 'Останній успіх';
String get menuGitHubRepository => 'GitHub Repository';
@override
String get lastFailure => 'Остання помилка';
String get menuWiki => 'Wiki';
@override
String get recentConnections => 'Останні з\'єднання';
String get menuHelp => 'Help';
@override
String get viewDetails => 'Переглянути деталі';
@override
String get connectionDetails => 'Деталі з\'єднання';
@override
String get clearThisServerStats => 'Очистити статистику цього сервера';
@override
String get clearAllStatsTitle => 'Очистити всю статистику';
@override
String get clearAllStatsContent =>
'Ви впевнені, що хочете очистити всю статистику з\'єднань сервера? Цю дію не можна скасувати.';
@override
String clearServerStatsTitle(String serverName) {
return 'Очистити статистику $serverName';
}
@override
String clearServerStatsContent(String serverName) {
return 'Ви впевнені, що хочете очистити статистику з\'єднань для сервера \"$serverName\"? Цю дію не можна скасувати.';
}
@override
String get homeTabs => 'Домашні вкладки';
@override
String get homeTabsCustomizeDesc =>
'Налаштуйте, які вкладки відображаються на головній сторінці та їх порядок';
@override
String get reset => 'Скинути';
@override
String get availableTabs => 'Доступні вкладки';
@override
String get atLeastOneTab => 'Потрібно вибрати принаймні одну вкладку';
@override
String get serverTabRequired => 'Server tab cannot be removed';
String get logs => 'Журнали';
}

View File

@@ -26,6 +26,59 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get alreadyLastDir => '已是顶级目录';
@override
String get askAi => '问 AI';
@override
String get askAiApiKey => 'API 密钥';
@override
String get askAiAwaitingResponse => '等待 AI 响应...';
@override
String get askAiBaseUrl => '基础 URL';
@override
String get askAiCommandInserted => '命令已插入终端';
@override
String askAiConfigMissing(Object fields) {
return '请前往设置配置 $fields';
}
@override
String get askAiConfirmExecute => '执行前确认';
@override
String get askAiConversation => 'AI 对话';
@override
String get askAiDisclaimer => 'AI 可能会犯错,请谨慎使用。';
@override
String get askAiFollowUpHint => '继续提问...';
@override
String get askAiInsertTerminal => '插入终端';
@override
String get askAiModel => '模型';
@override
String get askAiNoResponse => '无回复内容';
@override
String get askAiRecommendedCommand => 'AI 推荐命令';
@override
String get askAiSelectedContent => '选中的内容';
@override
String get askAiUsageHint => '用于 SSH 终端';
@override
String get atLeastOneTab => '至少需要选择一个标签';
@override
String get authFailTip => '认证失败,请检查连接信息是否正确';
@@ -41,6 +94,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get autoUpdateHomeWidget => '自动更新桌面小部件';
@override
String get availableTabs => '可用标签';
@override
String get backupEncrypted => '备份已加密';
@@ -78,6 +134,25 @@ class AppLocalizationsZh extends AppLocalizations {
String get bgRunTip =>
'此开关只代表程序会尝试在后台运行,具体能否后台运行取决于是否开启了权限。原生 Android 请关闭本 App 的“电池优化”MIUI / HyperOS 请将省电策略改为“无限制”。';
@override
String get clearAllStatsContent => '确定要清空所有服务器的连接统计数据吗?此操作无法撤销。';
@override
String get clearAllStatsTitle => '清空所有统计';
@override
String clearServerStatsContent(Object serverName) {
return '确定要清空服务器 \"$serverName\" 的连接统计数据吗?此操作无法撤销。';
}
@override
String clearServerStatsTitle(Object serverName) {
return '清空 $serverName 统计';
}
@override
String get clearThisServerStats => '清空此服务器统计';
@override
String get closeAfterSave => '保存后关闭';
@@ -90,6 +165,15 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get conn => '连接';
@override
String get connectionDetails => '连接详情';
@override
String get connectionStats => '连接统计';
@override
String get connectionStatsDesc => '查看服务器连接成功率和历史记录';
@override
String get container => '容器';
@@ -137,6 +221,18 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get disconnected => '已断开连接';
@override
String get discoverSshServers => '发现SSH服务器';
@override
String get discoveryFailed => '发现失败';
@override
String get discoverySettings => '发现设置';
@override
String get discoverySummary => '发现摘要';
@override
String get disk => '磁盘';
@@ -188,15 +284,18 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get editVirtKeys => '编辑虚拟按键';
@override
String get editor => '编辑器';
@override
String get editorHighlightTip => '代码高亮功能可能影响性能,可选择关闭。';
@override
String get emulator => '模拟器';
@override
String get enableMdns => '启用mDNS';
@override
String get enableMdnsDesc => '使用mDNS/Bonjour发现SSH服务';
@override
String get encode => '编码';
@@ -228,10 +327,10 @@ class AppLocalizationsZh extends AppLocalizations {
}
@override
String get followSystem => '跟随系统';
String get finishedAt => '完成于';
@override
String get font => '字体';
String get followSystem => '跟随系统';
@override
String get fontSize => '字体大小';
@@ -263,6 +362,12 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get highlight => '代码高亮';
@override
String get homeTabs => '主页标签';
@override
String get homeTabsCustomizeDesc => '自定义主页上显示的标签及其顺序';
@override
String get homeWidgetUrlConfig => '桌面部件链接配置';
@@ -283,9 +388,6 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get imagesList => '镜像列表';
@override
String get init => '初始化';
@override
String get inner => '内置';
@@ -314,15 +416,18 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get keyAuth => '密钥认证';
@override
String get lastFailure => '最后失败';
@override
String get lastSuccess => '最后成功';
@override
String get letterCache => '输入法字符缓存';
@override
String get letterCacheTip => '推荐关闭,但是关闭后无法输入 CJK 等文字';
@override
String get license => '证书';
@override
String get location => '位置';
@@ -335,10 +440,10 @@ class AppLocalizationsZh extends AppLocalizations {
}
@override
String get manual => '手动';
String get max => '最大';
@override
String get max => '最大';
String get maxConcurrency => '最大并发数';
@override
String get maxRetryCount => '服务器尝试重连次数';
@@ -378,6 +483,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get newContainer => '新建容器';
@override
String get noConnectionStatsData => '暂无连接统计数据';
@override
String get noLineChart => '不使用折线图';
@@ -444,10 +552,12 @@ class AppLocalizationsZh extends AppLocalizations {
String get preferDiskAmount => '优先显示硬盘容量';
@override
String get preview => '预览';
String get privateKey => '私钥';
@override
String get privateKey => '私钥';
String privateKeyNotFoundFmt(Object keyId) {
return '未找到私钥 [$keyId]。';
}
@override
String get process => '进程';
@@ -473,6 +583,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get reboot => '重启';
@override
String get recentConnections => '最近连接记录';
@override
String get rememberPwdInMem => '在内存中记住密码';
@@ -533,6 +646,12 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get serverOrder => '服务器顺序';
@override
String get serverTabRequired => '服务器标签不能被移除';
@override
String get servers => '服务器';
@override
String get sftpDlPrepare => '准备连接至服务器...';
@@ -613,6 +732,34 @@ class AppLocalizationsZh extends AppLocalizations {
return '从 SSH 配置导入了 $count 个服务器';
}
@override
String sshHostKeyChangedDesc(Object serverName) {
return '服务器 $serverName 的 SSH 主机密钥已更改,仅在信任该服务器时继续。';
}
@override
String sshHostKeyFingerprintMd5Base64(Object fingerprint) {
return '指纹MD5 Base64$fingerprint';
}
@override
String sshHostKeyFingerprintMd5Hex(Object fingerprint) {
return '指纹MD5 十六进制):$fingerprint';
}
@override
String get sshHostKeyType => 'SSH 主机密钥类型';
@override
String sshHostKeyNewDesc(Object serverName) {
return '收到来自 $serverName 的新 SSH 主机密钥,在信任前请检查指纹。';
}
@override
String sshHostKeyStoredFingerprint(Object fingerprint) {
return '已存储的指纹:$fingerprint';
}
@override
String get sshConfigManualSelect => '是否要手动选择 SSH 配置文件?';
@@ -671,9 +818,6 @@ class AppLocalizationsZh extends AppLocalizations {
return '切换到 $val';
}
@override
String get sync => '同步';
@override
String get syncTip => '可能需要重新启动,某些更改才能生效。';
@@ -683,6 +827,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get tag => '标签';
@override
String get tapToStartDiscovery => '点击搜索按钮发现网络中的SSH服务器';
@override
String get temperature => '温度';
@@ -713,6 +860,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get total => '总共';
@override
String get totalAttempts => '总次数';
@override
String get traffic => '流量';
@@ -737,9 +887,6 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get updateServerStatusInterval => '服务器状态刷新间隔';
@override
String get upload => '上传';
@override
String get upsideDown => '上下交换';
@@ -764,6 +911,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get view => '视图';
@override
String get viewDetails => '查看详情';
@override
String get viewErr => '查看错误';
@@ -805,68 +955,28 @@ class AppLocalizationsZh extends AppLocalizations {
'在连接服务器后,会向 `~/.config/server_box` \n | `/tmp/server_box` 写入脚本来监测系统状态,你可以审查脚本内容。';
@override
String get connectionStats => '连接统计';
String get menuSettings => '设置';
@override
String get connectionStatsDesc => '查看服务器连接成功率和历史记录';
String get menuQuit => '退出';
@override
String get noConnectionStatsData => '暂无连接统计数据';
String get menuNavigate => '导航';
@override
String get totalAttempts => '总次数';
String get menuInfo => '信息';
@override
String get lastSuccess => '最后成功';
String get menuGitHubRepository => 'GitHub 仓库';
@override
String get lastFailure => '最后失败';
String get menuWiki => 'Wiki';
@override
String get recentConnections => '最近连接记录';
String get menuHelp => '帮助';
@override
String get viewDetails => '查看详情';
@override
String get connectionDetails => '连接详情';
@override
String get clearThisServerStats => '清空此服务器统计';
@override
String get clearAllStatsTitle => '清空所有统计';
@override
String get clearAllStatsContent => '确定要清空所有服务器的连接统计数据吗?此操作无法撤销。';
@override
String clearServerStatsTitle(String serverName) {
return '清空 $serverName 统计';
}
@override
String clearServerStatsContent(String serverName) {
return '确定要清空服务器 \"$serverName\" 的连接统计数据吗?此操作无法撤销。';
}
@override
String get homeTabs => '主页标签';
@override
String get homeTabsCustomizeDesc => '自定义主页上显示的标签及其顺序';
@override
String get reset => '重置';
@override
String get availableTabs => '可用标签';
@override
String get atLeastOneTab => '至少需要选择一个标签';
@override
String get serverTabRequired => '服务器标签不能被移除';
String get logs => '日志';
}
/// The translations for Chinese, as used in Taiwan (`zh_TW`).
@@ -891,6 +1001,59 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get alreadyLastDir => '已是頂層目錄';
@override
String get askAi => '詢問 AI';
@override
String get askAiApiKey => 'API 金鑰';
@override
String get askAiAwaitingResponse => '等待 AI 回應...';
@override
String get askAiBaseUrl => '基礎 URL';
@override
String get askAiCommandInserted => '指令已插入終端機';
@override
String askAiConfigMissing(Object fields) {
return '請前往設定配置 $fields';
}
@override
String get askAiConfirmExecute => '執行前確認';
@override
String get askAiConversation => 'AI 對話';
@override
String get askAiDisclaimer => 'AI 可能會犯錯,請謹慎使用。';
@override
String get askAiFollowUpHint => '繼續提問...';
@override
String get askAiInsertTerminal => '插入終端機';
@override
String get askAiModel => '模型';
@override
String get askAiNoResponse => '無回覆內容';
@override
String get askAiRecommendedCommand => 'AI 推薦指令';
@override
String get askAiSelectedContent => '選取的內容';
@override
String get askAiUsageHint => '於 SSH 終端機中使用';
@override
String get atLeastOneTab => '至少需要選擇一個標籤';
@override
String get authFailTip => '認證失敗,請檢查連線資訊是否正確';
@@ -906,6 +1069,9 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get autoUpdateHomeWidget => '自動更新桌面小工具';
@override
String get availableTabs => '可用標籤';
@override
String get backupEncrypted => '備份已加密';
@@ -943,6 +1109,25 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
String get bgRunTip =>
'此開關僅代表程式會嘗試於背景執行,能否成功取決於系統權限。在原生 Android 上,請關閉本應用的「電池最佳化」;在 MIUI / HyperOS 上,請將省電策略調整為「無限制」。';
@override
String get clearAllStatsContent => '確定要清空所有伺服器的連線統計資料嗎?此操作無法撤銷。';
@override
String get clearAllStatsTitle => '清空所有統計';
@override
String clearServerStatsContent(Object serverName) {
return '確定要清空伺服器 \"$serverName\" 的連線統計資料嗎?此操作無法撤銷。';
}
@override
String clearServerStatsTitle(Object serverName) {
return '清空 $serverName 統計';
}
@override
String get clearThisServerStats => '清空此伺服器統計';
@override
String get closeAfterSave => '儲存後關閉';
@@ -955,6 +1140,15 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get conn => '連線';
@override
String get connectionDetails => '連線詳情';
@override
String get connectionStats => '連線統計';
@override
String get connectionStatsDesc => '檢視伺服器連線成功率和歷史記錄';
@override
String get container => '容器';
@@ -1002,6 +1196,18 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get disconnected => '已中斷連線';
@override
String get discoverSshServers => '發現SSH服務器';
@override
String get discoveryFailed => '發現失敗';
@override
String get discoverySettings => '發現設定';
@override
String get discoverySummary => '發現摘要';
@override
String get disk => '磁碟';
@@ -1053,15 +1259,18 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get editVirtKeys => '編輯虛擬按鍵';
@override
String get editor => '編輯器';
@override
String get editorHighlightTip => '程式碼高亮功能可能影響效能,可選擇性關閉。';
@override
String get emulator => '模擬器';
@override
String get enableMdns => '啟用mDNS';
@override
String get enableMdnsDesc => '使用mDNS/Bonjour發現SSH服務';
@override
String get encode => '編碼';
@@ -1093,10 +1302,10 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
}
@override
String get followSystem => '跟隨系統';
String get finishedAt => '完成於';
@override
String get font => '字型';
String get followSystem => '跟隨系統';
@override
String get fontSize => '字型大小';
@@ -1128,6 +1337,12 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get highlight => '程式碼標記';
@override
String get homeTabs => '主頁標籤';
@override
String get homeTabsCustomizeDesc => '自訂主頁上顯示的標籤及其順序';
@override
String get homeWidgetUrlConfig => '桌面小工具連結配置';
@@ -1148,9 +1363,6 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get imagesList => '映像檔列表';
@override
String get init => '初始化';
@override
String get inner => '內建';
@@ -1179,15 +1391,18 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get keyAuth => '金鑰認證';
@override
String get lastFailure => '最後失敗';
@override
String get lastSuccess => '最後成功';
@override
String get letterCache => '輸入法字符快取';
@override
String get letterCacheTip => '建議關閉,但關閉後將無法輸入 CJK 等文字。';
@override
String get license => '憑證';
@override
String get location => '位置';
@@ -1200,10 +1415,10 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
}
@override
String get manual => '手動';
String get max => '最大';
@override
String get max => '最大';
String get maxConcurrency => '最大並發數';
@override
String get maxRetryCount => '伺服器嘗試重連次數';
@@ -1243,6 +1458,9 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get newContainer => '新建容器';
@override
String get noConnectionStatsData => '暫無連線統計資料';
@override
String get noLineChart => '不使用折線圖';
@@ -1309,10 +1527,12 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
String get preferDiskAmount => '優先顯示硬碟容量';
@override
String get preview => '預覽';
String get privateKey => '私鑰';
@override
String get privateKey => '私鑰';
String privateKeyNotFoundFmt(Object keyId) {
return '未找到私鑰 [$keyId]。';
}
@override
String get process => '處理程序';
@@ -1338,6 +1558,9 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get reboot => '重開';
@override
String get recentConnections => '最近連線記錄';
@override
String get rememberPwdInMem => '在記憶體中記住密碼';
@@ -1398,6 +1621,12 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get serverOrder => '伺服器順序';
@override
String get serverTabRequired => '服務器標籤不能被移除';
@override
String get servers => '服務器';
@override
String get sftpDlPrepare => '準備連線至伺服器...';
@@ -1478,6 +1707,34 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
return '已從SSH設定匯入$count個伺服器';
}
@override
String sshHostKeyChangedDesc(Object serverName) {
return '伺服器 $serverName 的 SSH 主機金鑰已變更,僅在信任該伺服器時繼續。';
}
@override
String sshHostKeyFingerprintMd5Base64(Object fingerprint) {
return '指紋MD5 Base64$fingerprint';
}
@override
String sshHostKeyFingerprintMd5Hex(Object fingerprint) {
return '指紋MD5 十六進位):$fingerprint';
}
@override
String get sshHostKeyType => 'SSH 主機金鑰類型';
@override
String sshHostKeyNewDesc(Object serverName) {
return '收到來自 $serverName 的新 SSH 主機金鑰,信任前請先檢查指紋。';
}
@override
String sshHostKeyStoredFingerprint(Object fingerprint) {
return '已儲存的指紋:$fingerprint';
}
@override
String get sshConfigManualSelect => '是否要手動選擇 SSH 設定檔案?';
@@ -1536,9 +1793,6 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
return '切換到 $val';
}
@override
String get sync => '同步';
@override
String get syncTip => '可能需要重新啟動,某些更改才能生效。';
@@ -1548,6 +1802,9 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get tag => '標籤';
@override
String get tapToStartDiscovery => '點擊搜尋按鈕發現網路中的SSH服務器';
@override
String get temperature => '溫度';
@@ -1578,6 +1835,9 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get total => '總共';
@override
String get totalAttempts => '總次數';
@override
String get traffic => '流量';
@@ -1602,9 +1862,6 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get updateServerStatusInterval => '伺服器狀態更新間隔';
@override
String get upload => '上傳';
@override
String get upsideDown => '上下交換';
@@ -1629,6 +1886,9 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get view => '檢視';
@override
String get viewDetails => '檢視詳情';
@override
String get viewErr => '查看錯誤';
@@ -1670,66 +1930,5 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
'連線到伺服器後,將會在 `~/.config/server_box` \n | `/tmp/server_box` 中寫入一個腳本來監測系統狀態。你可以審查腳本內容。';
@override
String get connectionStats => '連線統計';
@override
String get connectionStatsDesc => '檢視伺服器連線成功率和歷史記錄';
@override
String get noConnectionStatsData => '暫無連線統計資料';
@override
String get totalAttempts => '總次數';
@override
String get lastSuccess => '最後成功';
@override
String get lastFailure => '最後失敗';
@override
String get recentConnections => '最近連線記錄';
@override
String get viewDetails => '檢視詳情';
@override
String get connectionDetails => '連線詳情';
@override
String get clearThisServerStats => '清空此伺服器統計';
@override
String get clearAllStatsTitle => '清空所有統計';
@override
String get clearAllStatsContent => '確定要清空所有伺服器的連線統計資料嗎?此操作無法撤銷。';
@override
String clearServerStatsTitle(String serverName) {
return '清空 $serverName 統計';
}
@override
String clearServerStatsContent(String serverName) {
return '確定要清空伺服器 \"$serverName\" 的連線統計資料嗎?此操作無法撤銷。';
}
@override
String get homeTabs => '主頁標籤';
@override
String get homeTabsCustomizeDesc => '自訂主頁上顯示的標籤及其順序';
@override
String get reset => '重置';
@override
String get availableTabs => '可用標籤';
@override
String get atLeastOneTab => '至少需要選擇一個標籤';
@override
String get serverTabRequired => '服務器標籤不能被移除';
String get logs => '日誌';
}

View File

@@ -107,6 +107,7 @@ class SpiAdapter extends TypeAdapter<Spi> {
alterUrl: fields[7] as String?,
autoConnect: fields[8] == null ? true : fields[8] as bool,
jumpId: fields[9] as String?,
jumpChainIds: (fields[16] as List?)?.cast<String>(),
custom: fields[10] as ServerCustom?,
wolCfg: fields[11] as WakeOnLanCfg?,
envs: (fields[12] as Map?)?.cast<String, String>(),
@@ -119,7 +120,7 @@ class SpiAdapter extends TypeAdapter<Spi> {
@override
void write(BinaryWriter writer, Spi obj) {
writer
..writeByte(16)
..writeByte(17)
..writeByte(0)
..write(obj.name)
..writeByte(1)
@@ -151,7 +152,9 @@ class SpiAdapter extends TypeAdapter<Spi> {
..writeByte(14)
..write(obj.customSystemType)
..writeByte(15)
..write(obj.disabledCmdTypes);
..write(obj.disabledCmdTypes)
..writeByte(16)
..write(obj.jumpChainIds);
}
@override

View File

@@ -27,7 +27,7 @@ types:
index: 4
Spi:
typeId: 3
nextIndex: 16
nextIndex: 17
fields:
name:
index: 0
@@ -61,6 +61,8 @@ types:
index: 14
disabledCmdTypes:
index: 15
jumpChainIds:
index: 16
VirtKey:
typeId: 4
nextIndex: 45

View File

@@ -31,45 +31,8 @@ final class _IntroPage extends StatelessWidget {
padding: _introListPad,
children: [
SizedBox(height: padTop),
IntroPage.title(text: l10n.init, big: true),
IntroPage.title(text: libL10n.init, big: true),
SizedBox(height: padTop),
// Prompt to set backup password after migration or on first launch
ListTile(
leading: const Icon(Icons.lock),
title: Text(l10n.backupPassword),
subtitle: Text(l10n.backupPasswordTip, style: UIs.textGrey),
trailing: const Icon(Icons.keyboard_arrow_right),
onTap: () async {
final currentPwd = await SecureStoreProps.bakPwd.read();
final controller = TextEditingController(text: currentPwd ?? '');
final result = await ctx.showRoundDialog<bool>(
title: l10n.backupPassword,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(l10n.backupPasswordTip, style: UIs.textGrey),
UIs.height13,
Input(
label: l10n.backupPassword,
controller: controller,
obscureText: true,
onSubmitted: (_) => ctx.pop(true),
),
],
),
actions: Btnx.oks,
);
if (result == true) {
final pwd = controller.text.trim();
if (pwd.isEmpty) {
ctx.showSnackBar(libL10n.empty);
return;
}
await SecureStoreProps.bakPwd.write(pwd);
ctx.showSnackBar(l10n.backupPasswordSet);
}
},
).cardx,
ListTile(
leading: const Icon(IonIcons.language),
title: Text(libL10n.language),

View File

@@ -6,11 +6,29 @@
"added2List": "Zur Aufgabenliste hinzugefügt",
"addr": "Adresse",
"alreadyLastDir": "Bereits im letzten Verzeichnis.",
"askAi": "KI fragen",
"askAiApiKey": "API-Schlüssel",
"askAiAwaitingResponse": "Warte auf KI-Antwort...",
"askAiBaseUrl": "Basis-URL",
"askAiCommandInserted": "Befehl ins Terminal eingefügt",
"askAiConfigMissing": "Bitte konfigurieren Sie {fields} in den Einstellungen.",
"askAiConfirmExecute": "Vor Ausführung bestätigen",
"askAiConversation": "KI-Unterhaltung",
"askAiDisclaimer": "KI kann Fehler machen. Bitte vorsichtig verwenden.",
"askAiFollowUpHint": "Weitere Frage stellen...",
"askAiInsertTerminal": "In Terminal einfügen",
"askAiModel": "Modell",
"askAiNoResponse": "Keine Antwort",
"askAiRecommendedCommand": "KI-empfohlener Befehl",
"askAiSelectedContent": "Ausgewählter Inhalt",
"askAiUsageHint": "Verwendet im SSH-Terminal",
"atLeastOneTab": "Mindestens ein Tab muss ausgewählt sein",
"authFailTip": "Authentifizierung fehlgeschlagen, bitte überprüfen Sie, ob das Passwort/Schlüssel/Host/Benutzer usw. falsch sind.",
"autoBackupConflict": "Es kann nur eine automatische Sicherung gleichzeitig aktiviert werden.",
"autoConnect": "Automatisch verbinden",
"autoRun": "Automatischer Start",
"autoUpdateHomeWidget": "Home-Widget automatisch aktualisieren",
"availableTabs": "Verfügbare Tabs",
"backupEncrypted": "Backup ist verschlüsselt",
"backupNotEncrypted": "Backup ist nicht verschlüsselt",
"backupPassword": "Backup-Passwort",
@@ -23,10 +41,18 @@
"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\".",
"clearAllStatsContent": "Sind Sie sicher, dass Sie alle Server-Verbindungsstatistiken löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",
"clearAllStatsTitle": "Alle Statistiken löschen",
"clearServerStatsContent": "Sind Sie sicher, dass Sie die Verbindungsstatistiken für Server \"{serverName}\" löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",
"clearServerStatsTitle": "{serverName} Statistiken löschen",
"clearThisServerStats": "Statistiken dieses Servers löschen",
"closeAfterSave": "Speichern und schließen",
"cmd": "Command",
"collapseUITip": "Ob lange Listen in der Benutzeroberfläche standardmäßig eingeklappt werden sollen oder nicht",
"conn": "Verbindung",
"connectionDetails": "Verbindungsdetails",
"connectionStats": "Verbindungsstatistiken",
"connectionStatsDesc": "Server-Verbindungserfolgsrate und Verlauf anzeigen",
"container": "Container",
"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",
"convert": "Konvertieren",
@@ -42,6 +68,10 @@
"desktopTerminalTip": "Befehl zum Öffnen des Terminal-Emulators beim Starten von SSH-Sitzungen.",
"dirEmpty": "Stelle sicher, dass der Ordner leer ist.",
"disconnected": "Disconnected",
"discoverSshServers": "SSH-Server entdecken",
"discoveryFailed": "Entdeckung fehlgeschlagen",
"discoverySettings": "Entdeckungseinstellungen",
"discoverySummary": "Entdeckungs-Zusammenfassung",
"disk": "Festplatte",
"diskHealth": "Festplattengesundheit",
"diskIgnorePath": "Pfad für Datenträger ignorieren",
@@ -55,9 +85,10 @@
"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",
"editVirtKeys": "Virtuelle Tasten bearbeiten",
"editor": "Editor",
"editorHighlightTip": "Die Leistung der aktuellen Codehervorhebung ist schlechter und kann zur Verbesserung optional ausgeschaltet werden.",
"emulator": "Emulator",
"enableMdns": "mDNS aktivieren",
"enableMdnsDesc": "mDNS/Bonjour verwenden, um SSH-Dienste zu entdecken",
"encode": "Encode",
"envVars": "Umgebungsvariable",
"experimentalFeature": "Experimentelles Feature",
@@ -67,8 +98,8 @@
"fgService": "Vordergrund-Dienst",
"fgServiceTip": "Nach dem Einschalten kann es bei einigen Gerätemodellen zu Abstürzen kommen. Das Ausschalten kann bei einigen Modellen dazu führen, dass SSH-Verbindungen im Hintergrund nicht aufrechterhalten werden können. Bitte erlauben Sie ServerBox in den Systemeinstellungen Benachrichtigungsrechte, Hintergrundausführung und Selbstaktivierung.",
"fileTooLarge": "Datei '{file}' ist zu groß {size}, max {sizeMax}",
"finishedAt": "Beendet um",
"followSystem": "System verfolgen",
"font": "Schriftarten",
"fontSize": "Schriftgröße",
"force": "freiwillig",
"fullScreen": "Vollbildmodus",
@@ -79,13 +110,14 @@
"goto": "Pfad öffnen",
"hideTitleBar": "Titelleiste ausblenden",
"highlight": "Code highlight",
"homeTabs": "Home-Tabs",
"homeTabsCustomizeDesc": "Passen Sie an, welche Tabs auf der Startseite angezeigt werden und ihre Reihenfolge",
"homeWidgetUrlConfig": "Home-Widget-Link konfigurieren",
"host": "Host",
"httpFailedWithCode": "Anfrage fehlgeschlagen, Statuscode: {code}",
"ignoreCert": "Zertifikat ignorieren",
"image": "Image",
"imagesList": "Images",
"init": "Initialisieren",
"inner": "Eingebaut",
"install": "install",
"installDockerWithUrl": "Bitte installiere docker zuerst. https://docs.docker.com/engine/install",
@@ -95,14 +127,15 @@
"keepStatusWhenErr": "Den letzten Serverstatus beibehalten",
"keepStatusWhenErrTip": "Nur im Fehlerfall während der Ausführung des Skripts",
"keyAuth": "Schlüsselauthentifzierung",
"lastFailure": "Letzter Fehler",
"lastSuccess": "Letzter Erfolg",
"letterCache": "Buchstaben-Caching",
"letterCacheTip": "Empfohlen, zu deaktivieren, aber nach dem Deaktivieren können keine CJK-Zeichen eingegeben werden.",
"license": "Lizenzen",
"location": "Standort",
"loss": "loss",
"madeWithLove": "Erstellt mit ❤️ von {myGithub}",
"manual": "Handbuch",
"max": "max",
"maxConcurrency": "Maximale Gleichzeitigkeit",
"maxRetryCount": "Anzahl an Verbindungsversuchen",
"maxRetryCountEqual0": "Unbegrenzte Verbindungsversuche zum Server",
"min": "min",
@@ -115,6 +148,7 @@
"net": "Netzwerk",
"netViewType": "Netzwerkansicht Typ",
"newContainer": "Neuer Container",
"noConnectionStatsData": "Keine Verbindungsstatistikdaten",
"noLineChart": "Verwenden Sie keine Liniendiagramme",
"noLineChartForCpu": "Verwenden Sie keine Liniendiagramme für CPU",
"noPrivateKeyTip": "Der private Schlüssel existiert nicht, möglicherweise wurde er gelöscht oder es liegt ein Konfigurationsfehler vor.",
@@ -136,8 +170,8 @@
"plugInType": "Einfügetyp",
"port": "Port",
"preferDiskAmount": "Festplattenkapazität vorrangig anzeigen",
"preview": "Vorschau",
"privateKey": "Private Key",
"privateKeyNotFoundFmt": "Privater Schlüssel [{keyId}] wurde nicht gefunden.",
"process": "Prozess",
"prune": "Beschneiden",
"pushToken": "Push Token",
@@ -146,6 +180,7 @@
"pveVersionLow": "Diese Funktion befindet sich derzeit in der Testphase und wurde nur auf PVE 8+ getestet. Bitte verwenden Sie sie mit Vorsicht.",
"read": "Lesen",
"reboot": "Neustart",
"recentConnections": "Kürzliche Verbindungen",
"rememberPwdInMem": "Passwort im Speicher behalten",
"rememberPwdInMemTip": "Für Container, Aufhängen usw.",
"rememberWindowSize": "Fenstergröße merken",
@@ -166,6 +201,8 @@
"serverDetailOrder": "Reihenfolge der Widgets auf der Detailseite",
"serverFuncBtns": "Server-Funktionsschaltflächen",
"serverOrder": "Server-Bestellung",
"serverTabRequired": "Server-Tab kann nicht entfernt werden",
"servers": "Server",
"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.",
@@ -189,6 +226,12 @@
"sshConfigImportPermission": "Möchten Sie die Berechtigung erteilen, ~/.ssh/config zu lesen und Server-Einstellungen automatisch zu importieren?",
"sshConfigImportTip": "Bei der ersten Server-Erstellung zum Lesen von ~/.ssh/config auffordern",
"sshConfigImported": "{count} Server aus SSH-Konfiguration importiert",
"sshHostKeyChangedDesc": "Der SSH-Hostschlüssel für {serverName} hat sich geändert. Fahren Sie nur fort, wenn Sie diesem Server vertrauen.",
"sshHostKeyFingerprintMd5Base64": "Fingerabdruck (MD5 Base64): {fingerprint}",
"sshHostKeyFingerprintMd5Hex": "Fingerabdruck (MD5 Hex): {fingerprint}",
"sshHostKeyType": "SSH-Hostschlüsseltyp",
"sshHostKeyNewDesc": "Ein neuer SSH-Hostschlüssel wurde von {serverName} empfangen. Prüfen Sie den Fingerabdruck, bevor Sie vertrauen.",
"sshHostKeyStoredFingerprint": "Gespeicherter Fingerabdruck: {fingerprint}",
"sshConfigManualSelect": "Möchten Sie die SSH-Konfigurationsdatei manuell auswählen?",
"sshConfigNoServers": "Keine Server in der SSH-Konfiguration gefunden",
"sshConfigPermissionDenied": "Aufgrund der macOS-Berechtigungen kann nicht auf die SSH-Konfigurationsdatei zugegriffen werden.",
@@ -206,10 +249,10 @@
"suspend": "Suspend",
"suspendTip": "Die Suspend-Funktion erfordert Root-Rechte und systemd-Unterstützung.",
"switchTo": "Wechseln zu {val}",
"sync": "Sync",
"syncTip": "Damit einige Änderungen wirksam werden, kann ein Neustart erforderlich sein.",
"system": "Systeme",
"tag": "Tags",
"tapToStartDiscovery": "Tippen Sie auf die Suche-Schaltfläche, um SSH-Server in Ihrem Netzwerk zu entdecken",
"temperature": "Temperatur",
"termFontSizeTip": "Diese Einstellung beeinflusst die Größe des Terminals (Breite und Höhe). Sie können die Terminalseite zoomen, um die Schriftgröße der aktuellen Sitzung anzupassen.",
"terminal": "Terminal",
@@ -220,6 +263,7 @@
"time": "Zeit",
"times": "x",
"total": "Total",
"totalAttempts": "Gesamt",
"traffic": "Durchflussmenge",
"trySudo": "Versuche es mit sudo",
"ttl": "TTL",
@@ -228,7 +272,6 @@
"update": "Update",
"updateIntervalEqual0": "Wenn du den Wert 0 einstellst, wird nicht automatisch aktualisiert.\nDer CPU-Status kann nicht berechnet werden.",
"updateServerStatusInterval": "Aktualisierungsintervall des Serverstatus",
"upload": "Hochladen",
"upsideDown": "Upside Down",
"uptime": "Betriebszeit",
"useCdn": "Verwenden von CDN",
@@ -237,6 +280,7 @@
"usePodmanByDefault": "Standardmäßige Verwendung von Podman",
"used": "Gebraucht",
"view": "Ansicht",
"viewDetails": "Details anzeigen",
"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.",
"virtKeyHelpIME": "Tastatur ein-/ausschalten",
@@ -250,38 +294,5 @@
"write": "Schreiben",
"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` \n | `/tmp/server_box` geschrieben, um den Systemstatus zu überwachen. Sie können den Skriptinhalt überprüfen.",
"connectionStats": "Verbindungsstatistiken",
"connectionStatsDesc": "Server-Verbindungserfolgsrate und Verlauf anzeigen",
"noConnectionStatsData": "Keine Verbindungsstatistikdaten",
"totalAttempts": "Gesamt",
"lastSuccess": "Letzter Erfolg",
"lastFailure": "Letzter Fehler",
"recentConnections": "Kürzliche Verbindungen",
"viewDetails": "Details anzeigen",
"connectionDetails": "Verbindungsdetails",
"clearThisServerStats": "Statistiken dieses Servers löschen",
"clearAllStatsTitle": "Alle Statistiken löschen",
"clearAllStatsContent": "Sind Sie sicher, dass Sie alle Server-Verbindungsstatistiken löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",
"clearServerStatsTitle": "{serverName} Statistiken löschen",
"@clearServerStatsTitle": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"clearServerStatsContent": "Sind Sie sicher, dass Sie die Verbindungsstatistiken für Server \"{serverName}\" löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",
"@clearServerStatsContent": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"homeTabs": "Home-Tabs",
"homeTabsCustomizeDesc": "Passen Sie an, welche Tabs auf der Startseite angezeigt werden und ihre Reihenfolge",
"reset": "Zurücksetzen",
"availableTabs": "Verfügbare Tabs",
"atLeastOneTab": "Mindestens ein Tab muss ausgewählt sein",
"serverTabRequired": "Server-Tab kann nicht entfernt werden"
"logs": "Protokolle"
}

View File

@@ -6,11 +6,29 @@
"added2List": "Added to task list",
"addr": "Address",
"alreadyLastDir": "Already in last directory.",
"askAi": "Ask AI",
"askAiApiKey": "API Key",
"askAiAwaitingResponse": "Waiting for AI response...",
"askAiBaseUrl": "Base URL",
"askAiCommandInserted": "Command inserted into terminal",
"askAiConfigMissing": "Please configure {fields} in Settings.",
"askAiConfirmExecute": "Confirm before executing",
"askAiConversation": "AI conversation",
"askAiDisclaimer": "AI may be incorrect. Review carefully before applying.",
"askAiFollowUpHint": "Ask a follow-up...",
"askAiInsertTerminal": "Insert into terminal",
"askAiModel": "Model",
"askAiNoResponse": "No response",
"askAiRecommendedCommand": "AI suggested command",
"askAiSelectedContent": "Selected content",
"askAiUsageHint": "Used in SSH Terminal",
"atLeastOneTab": "At least one tab must be selected",
"authFailTip": "Authentication failed, please check whether credentials are correct",
"autoBackupConflict": "Only one automatic backup can be turned on at the same time.",
"autoConnect": "Auto connect",
"autoRun": "Auto run",
"autoUpdateHomeWidget": "Automatic home widget update",
"availableTabs": "Available Tabs",
"backupEncrypted": "Backup is encrypted",
"backupNotEncrypted": "Backup is not encrypted",
"backupPassword": "Backup password",
@@ -23,10 +41,18 @@
"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\".",
"clearAllStatsContent": "Are you sure you want to clear all server connection statistics? This action cannot be undone.",
"clearAllStatsTitle": "Clear All Statistics",
"clearServerStatsContent": "Are you sure you want to clear connection statistics for server \"{serverName}\"? This action cannot be undone.",
"clearServerStatsTitle": "Clear {serverName} Statistics",
"clearThisServerStats": "Clear This Server Statistics",
"closeAfterSave": "Save and close",
"cmd": "Command",
"collapseUITip": "Whether to collapse long lists present in the UI by default",
"conn": "Connection",
"connectionDetails": "Connection Details",
"connectionStats": "Connection Statistics",
"connectionStatsDesc": "View server connection success rate and history",
"container": "Container",
"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.",
"convert": "Convert",
@@ -42,6 +68,10 @@
"desktopTerminalTip": "Command used to open the terminal emulator when launching SSH sessions.",
"dirEmpty": "Make sure the folder is empty.",
"disconnected": "Disconnected",
"discoverSshServers": "Discover SSH Servers",
"discoveryFailed": "Discovery failed",
"discoverySettings": "Discovery Settings",
"discoverySummary": "Discovery Summary",
"disk": "Disk",
"diskHealth": "Disk Health",
"diskIgnorePath": "Ignore path for disk",
@@ -55,9 +85,10 @@
"doubleColumnMode": "Double column mode",
"doubleColumnTip": "This option only enables the feature, whether it can actually be enabled depends on the width of the device",
"editVirtKeys": "Edit virtual keys",
"editor": "Editor",
"editorHighlightTip": "The current code highlighting performance is not ideal and can be optionally turned off to improve.",
"emulator": "Emulator",
"enableMdns": "Enable mDNS",
"enableMdnsDesc": "Use mDNS/Bonjour to discover SSH services",
"encode": "Encode",
"envVars": "Environment variable",
"experimentalFeature": "Experimental feature",
@@ -67,8 +98,8 @@
"fgService": "Foreground Service",
"fgServiceTip": "After enabling, some device models may crash. Disabling it may cause some models to be unable to maintain SSH connections in the background. Please allow ServerBox notification permissions, background running, and self-wake-up in system settings.",
"fileTooLarge": "File '{file}' too large {size}, max {sizeMax}",
"finishedAt": "Finished at",
"followSystem": "Follow system",
"font": "Font",
"fontSize": "Font size",
"force": "Force",
"fullScreen": "Full screen mode",
@@ -79,13 +110,14 @@
"goto": "Go to",
"hideTitleBar": "Hide title bar",
"highlight": "Code highlighting",
"homeTabs": "Home Tabs",
"homeTabsCustomizeDesc": "Customize which tabs appear on the home page and their order",
"homeWidgetUrlConfig": "Config home widget url",
"host": "Host",
"httpFailedWithCode": "request failed, status code: {code}",
"ignoreCert": "Ignore certificate",
"image": "Image",
"imagesList": "Images list",
"init": "Initialize",
"inner": "Inner",
"install": "install",
"installDockerWithUrl": "Please https://docs.docker.com/engine/install docker first.",
@@ -95,14 +127,15 @@
"keepStatusWhenErr": "Preserve the last server state",
"keepStatusWhenErrTip": "Only in the event of an error during script execution",
"keyAuth": "Key Auth",
"lastFailure": "Last Failure",
"lastSuccess": "Last Success",
"letterCache": "Letter caching",
"letterCacheTip": "Recommended to disable, but after disabling, it will be impossible to input CJK characters.",
"license": "License",
"location": "Location",
"loss": "loss",
"madeWithLove": "Made with ❤️ by {myGithub}",
"manual": "Manual",
"max": "max",
"maxConcurrency": "Max Concurrency",
"maxRetryCount": "Number of server reconnections",
"maxRetryCountEqual0": "Will retry again and again.",
"min": "min",
@@ -115,6 +148,7 @@
"net": "Network",
"netViewType": "Network view type",
"newContainer": "New container",
"noConnectionStatsData": "No connection statistics data",
"noLineChart": "Do not use line charts",
"noLineChartForCpu": "Do not use line charts for CPU",
"noPrivateKeyTip": "The private key does not exist, it may have been deleted or there is a configuration error.",
@@ -136,8 +170,8 @@
"plugInType": "Insertion Type",
"port": "Port",
"preferDiskAmount": "Prioritize displaying disk capacity",
"preview": "Preview",
"privateKey": "Private Key",
"privateKeyNotFoundFmt": "Private key [{keyId}] not found.",
"process": "Process",
"prune": "Prune",
"pushToken": "Push token",
@@ -146,6 +180,7 @@
"pveVersionLow": "This feature is currently in the testing phase and has only been tested on PVE 8+. Please use it with caution.",
"read": "Read",
"reboot": "Reboot",
"recentConnections": "Recent Connections",
"rememberPwdInMem": "Remember password in memory",
"rememberPwdInMemTip": "Used for containers, suspending, etc.",
"rememberWindowSize": "Remember window size",
@@ -166,6 +201,8 @@
"serverDetailOrder": "Detail page widget order",
"serverFuncBtns": "Server function buttons",
"serverOrder": "Server order",
"serverTabRequired": "Server tab cannot be removed",
"servers": "servers",
"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.",
@@ -189,6 +226,15 @@
"sshConfigImportPermission": "Would you like to give permission to read ~/.ssh/config and automatically import server settings?",
"sshConfigImportTip": "Prompt to read ~/.ssh/config on first server creation",
"sshConfigImported": "Imported {count} servers from SSH config",
"sshHostKeyChangedDesc": "The SSH host key changed for {serverName}. Only continue if you trust this server.",
"sshHostKeyFingerprintMd5Base64": "Fingerprint (MD5 base64): {fingerprint}",
"sshHostKeyFingerprintMd5Hex": "Fingerprint (MD5 hex): {fingerprint}",
"sshHostKeyType": "SSH host key type",
"@sshHostKeyType": {
"description": "Label for the SSH host key type displayed in the host key verification dialog."
},
"sshHostKeyNewDesc": "A new SSH host key was received from {serverName}. Review the fingerprint before trusting.",
"sshHostKeyStoredFingerprint": "Stored fingerprint: {fingerprint}",
"sshConfigManualSelect": "Would you like to select the SSH config file manually?",
"sshConfigNoServers": "No servers found in SSH config",
"sshConfigPermissionDenied": "Cannot access SSH config file due to macOS permissions.",
@@ -206,10 +252,10 @@
"suspend": "Suspend",
"suspendTip": "The suspend function requires root permission and systemd support.",
"switchTo": "Switch to {val}",
"sync": "Sync",
"syncTip": "A restart may be required for some changes to take effect.",
"system": "System",
"tag": "Tags",
"tapToStartDiscovery": "Tap the search button to discover SSH servers on your network",
"temperature": "Temperature",
"termFontSizeTip": "This setting will affect the terminal size (width and height). You can zoom in on the terminal page to adjust the font size of the current session.",
"terminal": "Terminal",
@@ -220,6 +266,7 @@
"time": "Time",
"times": "Times",
"total": "Total",
"totalAttempts": "Total",
"traffic": "Traffic",
"trySudo": "Try using sudo",
"ttl": "TTL",
@@ -228,7 +275,6 @@
"update": "Update",
"updateIntervalEqual0": "You set to 0, will not update automatically.\nCan't calculate CPU status.",
"updateServerStatusInterval": "Server status update interval",
"upload": "Upload",
"upsideDown": "Upside Down",
"uptime": "Uptime",
"useCdn": "Using CDN",
@@ -237,6 +283,7 @@
"usePodmanByDefault": "Use Podman by default",
"used": "Used",
"view": "View",
"viewDetails": "View Details",
"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.",
"virtKeyHelpIME": "Turn on/off the keyboard",
@@ -250,38 +297,12 @@
"write": "Write",
"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` \n | `/tmp/server_box` to monitor the system status. You can review the script content.",
"connectionStats": "Connection Statistics",
"connectionStatsDesc": "View server connection success rate and history",
"noConnectionStatsData": "No connection statistics data",
"totalAttempts": "Total",
"lastSuccess": "Last Success",
"lastFailure": "Last Failure",
"recentConnections": "Recent Connections",
"viewDetails": "View Details",
"connectionDetails": "Connection Details",
"clearThisServerStats": "Clear This Server Statistics",
"clearAllStatsTitle": "Clear All Statistics",
"clearAllStatsContent": "Are you sure you want to clear all server connection statistics? This action cannot be undone.",
"clearServerStatsTitle": "Clear {serverName} Statistics",
"@clearServerStatsTitle": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"clearServerStatsContent": "Are you sure you want to clear connection statistics for server \"{serverName}\"? This action cannot be undone.",
"@clearServerStatsContent": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"homeTabs": "Home Tabs",
"homeTabsCustomizeDesc": "Customize which tabs appear on the home page and their order",
"reset": "Reset",
"availableTabs": "Available Tabs",
"atLeastOneTab": "At least one tab must be selected",
"serverTabRequired": "Server tab cannot be removed"
}
"menuSettings": "Setting",
"menuQuit": "Quit",
"menuNavigate": "Navigate",
"menuInfo": "Info",
"menuGitHubRepository": "GitHub Repository",
"menuWiki": "Wiki",
"menuHelp": "Help",
"logs": "Logs"
}

View File

@@ -6,11 +6,29 @@
"added2List": "Añadido a la lista de tareas",
"addr": "Dirección",
"alreadyLastDir": "Ya estás en el directorio superior",
"askAi": "Preguntar a la IA",
"askAiApiKey": "Clave API",
"askAiAwaitingResponse": "Esperando la respuesta de la IA...",
"askAiBaseUrl": "URL base",
"askAiCommandInserted": "Comando insertado en el terminal",
"askAiConfigMissing": "Configura {fields} en Ajustes.",
"askAiConfirmExecute": "Confirmar antes de ejecutar",
"askAiConversation": "Conversación con la IA",
"askAiDisclaimer": "La IA puede equivocarse. Úsala con precaución.",
"askAiFollowUpHint": "Haz una pregunta adicional...",
"askAiInsertTerminal": "Insertar en el terminal",
"askAiModel": "Modelo",
"askAiNoResponse": "Sin respuesta",
"askAiRecommendedCommand": "Comando sugerido por la IA",
"askAiSelectedContent": "Contenido seleccionado",
"askAiUsageHint": "Usado en el terminal SSH",
"atLeastOneTab": "Al menos una pestaña debe estar seleccionada",
"authFailTip": "La autenticación ha fallado, por favor verifica si la contraseña/llave/host/usuario, etc., son incorrectos.",
"autoBackupConflict": "Solo se puede activar una copia de seguridad automática a la vez",
"autoConnect": "Conexión automática",
"autoRun": "Ejecución automática",
"autoUpdateHomeWidget": "Actualizar automáticamente el widget del escritorio",
"availableTabs": "Pestañas disponibles",
"backupEncrypted": "El respaldo está encriptado",
"backupNotEncrypted": "El respaldo no está encriptado",
"backupPassword": "Contraseña de respaldo",
@@ -23,10 +41,18 @@
"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”.",
"clearAllStatsContent": "¿Estás seguro de que quieres limpiar todas las estadísticas de conexión del servidor? Esta acción no se puede deshacer.",
"clearAllStatsTitle": "Limpiar todas las estadísticas",
"clearServerStatsContent": "¿Estás seguro de que quieres limpiar las estadísticas de conexión del servidor \"{serverName}\"? Esta acción no se puede deshacer.",
"clearServerStatsTitle": "Limpiar estadísticas de {serverName}",
"clearThisServerStats": "Limpiar estadísticas de este servidor",
"closeAfterSave": "Guardar y cerrar",
"cmd": "Comando",
"collapseUITip": "¿Colapsar por defecto las listas largas en la UI?",
"conn": "Conectar",
"connectionDetails": "Detalles de conexión",
"connectionStats": "Estadísticas de conexión",
"connectionStatsDesc": "Ver la tasa de éxito de conexión del servidor e historial",
"container": "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",
"convert": "Convertir",
@@ -42,6 +68,10 @@
"desktopTerminalTip": "Comando utilizado para abrir el emulador de terminal al iniciar sesiones SSH.",
"dirEmpty": "Asegúrate de que el directorio esté vacío",
"disconnected": "Desconectado",
"discoverSshServers": "Descubrir servidores SSH",
"discoveryFailed": "Falló el descubrimiento",
"discoverySettings": "Configuración de descubrimiento",
"discoverySummary": "Resumen del descubrimiento",
"disk": "Disco",
"diskHealth": "Salud del disco",
"diskIgnorePath": "Rutas de disco ignoradas",
@@ -55,9 +85,10 @@
"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",
"editVirtKeys": "Editar teclas virtuales",
"editor": "Editor",
"editorHighlightTip": "El rendimiento del resaltado de código es bastante pobre actualmente, puedes elegir desactivarlo para mejorar.",
"emulator": "Emulador",
"enableMdns": "Habilitar mDNS",
"enableMdnsDesc": "Usar mDNS/Bonjour para descubrir servicios SSH",
"encode": "Codificar",
"envVars": "Variable de entorno",
"experimentalFeature": "Función experimental",
@@ -67,8 +98,8 @@
"fgService": "Servicio en primer plano",
"fgServiceTip": "Después de activarlo, algunos modelos de dispositivos pueden bloquearse. Desactivarlo puede hacer que algunos modelos no puedan mantener las conexiones SSH en segundo plano. Por favor, permita los permisos de notificación de ServerBox, la ejecución en segundo plano y el auto-despertar en la configuración del sistema.",
"fileTooLarge": "El archivo '{file}' es demasiado grande '{size}', supera el {sizeMax}",
"finishedAt": "Terminado en",
"followSystem": "Seguir al sistema",
"font": "Fuente",
"fontSize": "Tamaño de fuente",
"force": "Forzar",
"fullScreen": "Modo pantalla completa",
@@ -79,13 +110,14 @@
"goto": "Ir a",
"hideTitleBar": "Ocultar barra de título",
"highlight": "Resaltar código",
"homeTabs": "Pestañas de inicio",
"homeTabsCustomizeDesc": "Personaliza qué pestañas aparecen en la página de inicio y su orden",
"homeWidgetUrlConfig": "Configuración de URL del widget de inicio",
"host": "Anfitrión",
"httpFailedWithCode": "Fallo en la solicitud, código de estado: {code}",
"ignoreCert": "Ignorar certificado",
"image": "Imagen",
"imagesList": "Lista de imágenes",
"init": "Inicializar",
"inner": "Interno",
"install": "Instalar",
"installDockerWithUrl": "Por favor instala Docker primero desde https://docs.docker.com/engine/install",
@@ -95,14 +127,15 @@
"keepStatusWhenErr": "Mantener el estado anterior del servidor",
"keepStatusWhenErrTip": "Solo aplica cuando hay errores al ejecutar scripts",
"keyAuth": "Autenticación con llave",
"lastFailure": "Último fallo",
"lastSuccess": "Último éxito",
"letterCache": "Caché de letras",
"letterCacheTip": "Recomendado desactivar, pero después de desactivarlo, no se podrán ingresar caracteres CJK.",
"license": "Licencia de código abierto",
"location": "Ubicación",
"loss": "Tasa de pérdida",
"madeWithLove": "Hecho con ❤️ por {myGithub}",
"manual": "Manual",
"max": "Máximo",
"maxConcurrency": "Concurrencia máxima",
"maxRetryCount": "Número máximo de reintentos de conexión al servidor",
"maxRetryCountEqual0": "Reintentará infinitamente",
"min": "Mínimo",
@@ -115,6 +148,7 @@
"net": "Red",
"netViewType": "Tipo de vista de red",
"newContainer": "Crear contenedor nuevo",
"noConnectionStatsData": "No hay datos de estadísticas de conexión",
"noLineChart": "No utilice gráficos de líneas",
"noLineChartForCpu": "No utilice gráficos lineales para la CPU",
"noPrivateKeyTip": "La clave privada no existe, puede haber sido eliminada o hay un error de configuración.",
@@ -136,8 +170,8 @@
"plugInType": "Tipo de inserción",
"port": "Puerto",
"preferDiskAmount": "Priorizar la visualización de la capacidad del disco",
"preview": "Vista previa",
"privateKey": "Llave privada",
"privateKeyNotFoundFmt": "No se encontró la clave privada [{keyId}].",
"process": "Proceso",
"prune": "Podar",
"pushToken": "Token de notificaciones",
@@ -146,6 +180,7 @@
"pveVersionLow": "Esta función está actualmente en fase de prueba y solo se ha probado en PVE 8+. Úsela con precaución.",
"read": "Leer",
"reboot": "Reiniciar",
"recentConnections": "Conexiones recientes",
"rememberPwdInMem": "Recordar contraseña en la memoria",
"rememberPwdInMemTip": "Utilizado para contenedores, suspensión, etc.",
"rememberWindowSize": "Recordar el tamaño de la ventana",
@@ -166,6 +201,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",
"serverTabRequired": "La pestaña del servidor no se puede eliminar",
"servers": "servidores",
"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",
@@ -189,6 +226,12 @@
"sshConfigImportPermission": "¿Te gustaría dar permiso para leer ~/.ssh/config e importar automáticamente la configuración de servidores?",
"sshConfigImportTip": "Sugerencia para leer ~/.ssh/config al crear el primer servidor",
"sshConfigImported": "Se importaron {count} servidores desde la configuración SSH",
"sshHostKeyChangedDesc": "La clave de host SSH de {serverName} ha cambiado. Continúa solo si confías en este servidor.",
"sshHostKeyFingerprintMd5Base64": "Huella (MD5 Base64): {fingerprint}",
"sshHostKeyFingerprintMd5Hex": "Huella (MD5 hex): {fingerprint}",
"sshHostKeyType": "Tipo de clave de host SSH",
"sshHostKeyNewDesc": "Se recibió una nueva clave de host SSH de {serverName}. Revisa la huella antes de confiar.",
"sshHostKeyStoredFingerprint": "Huella almacenada: {fingerprint}",
"sshConfigManualSelect": "¿Te gustaría seleccionar manualmente el archivo de configuración SSH?",
"sshConfigNoServers": "No se encontraron servidores en la configuración SSH",
"sshConfigPermissionDenied": "No se puede acceder al archivo de configuración SSH debido a los permisos de macOS.",
@@ -206,10 +249,10 @@
"suspend": "Suspender",
"suspendTip": "La función de suspender necesita permisos de root y soporte de systemd.",
"switchTo": "Cambiar a {val}",
"sync": "Sincronizar",
"syncTip": "Puede que necesites reiniciar para que algunos cambios tengan efecto.",
"system": "Sistema",
"tag": "Etiqueta",
"tapToStartDiscovery": "Toca el botón de búsqueda para descubrir servidores SSH en tu red",
"temperature": "Temperatura",
"termFontSizeTip": "Este ajuste afectará el tamaño del terminal (ancho y alto). Puedes hacer zoom en la página del terminal para ajustar el tamaño de fuente de la sesión actual.",
"terminal": "Terminal",
@@ -220,6 +263,7 @@
"time": "Tiempo",
"times": "Veces",
"total": "Total",
"totalAttempts": "Total",
"traffic": "Tráfico",
"trySudo": "Intentar con sudo",
"ttl": "TTL",
@@ -228,7 +272,6 @@
"update": "Actualizar",
"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",
"upload": "Subir",
"upsideDown": "Invertir arriba por abajo",
"uptime": "Tiempo de actividad",
"useCdn": "Usando CDN",
@@ -237,6 +280,7 @@
"usePodmanByDefault": "Usar Podman por defecto",
"used": "Usado",
"view": "Vista",
"viewDetails": "Ver detalles",
"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.",
"virtKeyHelpIME": "Encender/apagar el teclado",
@@ -250,38 +294,5 @@
"write": "Escribir",
"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` \n | `/tmp/server_box` para monitorear el estado del sistema. Puedes revisar el contenido del script.",
"connectionStats": "Estadísticas de conexión",
"connectionStatsDesc": "Ver la tasa de éxito de conexión del servidor e historial",
"noConnectionStatsData": "No hay datos de estadísticas de conexión",
"totalAttempts": "Total",
"lastSuccess": "Último éxito",
"lastFailure": "Último fallo",
"recentConnections": "Conexiones recientes",
"viewDetails": "Ver detalles",
"connectionDetails": "Detalles de conexión",
"clearThisServerStats": "Limpiar estadísticas de este servidor",
"clearAllStatsTitle": "Limpiar todas las estadísticas",
"clearAllStatsContent": "¿Estás seguro de que quieres limpiar todas las estadísticas de conexión del servidor? Esta acción no se puede deshacer.",
"clearServerStatsTitle": "Limpiar estadísticas de {serverName}",
"@clearServerStatsTitle": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"clearServerStatsContent": "¿Estás seguro de que quieres limpiar las estadísticas de conexión del servidor \"{serverName}\"? Esta acción no se puede deshacer.",
"@clearServerStatsContent": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"homeTabs": "Pestañas de inicio",
"homeTabsCustomizeDesc": "Personaliza qué pestañas aparecen en la página de inicio y su orden",
"reset": "Restablecer",
"availableTabs": "Pestañas disponibles",
"atLeastOneTab": "Al menos una pestaña debe estar seleccionada",
"serverTabRequired": "Server tab cannot be removed"
"logs": "Registros"
}

View File

@@ -6,11 +6,29 @@
"added2List": "Ajouté à la liste des tâches",
"addr": "Adresse",
"alreadyLastDir": "Déjà dans le dernier répertoire.",
"askAi": "Demander à l'IA",
"askAiApiKey": "Clé API",
"askAiAwaitingResponse": "En attente de la réponse de l'IA...",
"askAiBaseUrl": "URL de base",
"askAiCommandInserted": "Commande insérée dans le terminal",
"askAiConfigMissing": "Veuillez configurer {fields} dans les paramètres.",
"askAiConfirmExecute": "Confirmer avant d'exécuter",
"askAiConversation": "Conversation avec l'IA",
"askAiDisclaimer": "L'IA peut se tromper. Utilisez-la avec prudence.",
"askAiFollowUpHint": "Poser une question supplémentaire...",
"askAiInsertTerminal": "Insérer dans le terminal",
"askAiModel": "Modèle",
"askAiNoResponse": "Aucune réponse",
"askAiRecommendedCommand": "Commande suggérée par l'IA",
"askAiSelectedContent": "Contenu sélectionné",
"askAiUsageHint": "Utilisé dans le terminal SSH",
"atLeastOneTab": "Au moins un onglet doit être sélectionné",
"authFailTip": "Échec de l'authentification. Veuillez vérifier si le mot de passe/clé/hôte/utilisateur, etc., est incorrect.",
"autoBackupConflict": "Un seul sauvegarde automatique peut être activé en même temps.",
"autoConnect": "Connexion automatique",
"autoRun": "Exécution automatique",
"autoUpdateHomeWidget": "Mise à jour automatique du widget d'accueil",
"availableTabs": "Onglets disponibles",
"backupEncrypted": "La sauvegarde est chiffrée",
"backupNotEncrypted": "La sauvegarde n'est pas chiffrée",
"backupPassword": "Mot de passe de sauvegarde",
@@ -23,10 +41,18 @@
"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é ».",
"clearAllStatsContent": "Êtes-vous sûr de vouloir effacer toutes les statistiques de connexion des serveurs ? Cette action ne peut pas être annulée.",
"clearAllStatsTitle": "Effacer toutes les statistiques",
"clearServerStatsContent": "Êtes-vous sûr de vouloir effacer les statistiques de connexion du serveur \"{serverName}\" ? Cette action ne peut pas être annulée.",
"clearServerStatsTitle": "Effacer les statistiques de {serverName}",
"clearThisServerStats": "Effacer les statistiques de ce serveur",
"closeAfterSave": "Enregistrer et fermer",
"cmd": "Commande",
"collapseUITip": "Indique si les longues listes présentées dans l'interface utilisateur doivent être réduites par défaut.",
"conn": "Connexion",
"connectionDetails": "Détails de connexion",
"connectionStats": "Statistiques de connexion",
"connectionStatsDesc": "Voir le taux de réussite de connexion du serveur et l'historique",
"container": "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.",
"convert": "Convertir",
@@ -42,6 +68,10 @@
"desktopTerminalTip": "Commande utilisée pour ouvrir lémulateur de terminal lors du lancement de sessions SSH.",
"dirEmpty": "Assurez-vous que le répertoire est vide.",
"disconnected": "Déconnecté",
"discoverSshServers": "Découvrir les serveurs SSH",
"discoveryFailed": "Échec de la découverte",
"discoverySettings": "Paramètres de découverte",
"discoverySummary": "Résumé de la découverte",
"disk": "Disque",
"diskHealth": "Santé du disque",
"diskIgnorePath": "Chemin à ignorer pour le disque",
@@ -55,9 +85,10 @@
"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.",
"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.",
"emulator": "Émulateur",
"enableMdns": "Activer mDNS",
"enableMdnsDesc": "Utiliser mDNS/Bonjour pour découvrir les services SSH",
"encode": "Encoder",
"envVars": "Variable denvironnement",
"experimentalFeature": "Fonctionnalité expérimentale",
@@ -67,8 +98,8 @@
"fgService": "Service de premier plan",
"fgServiceTip": "Après l'activation, certains modèles d'appareils peuvent planter. La désactivation peut empêcher certains modèles de maintenir les connexions SSH en arrière-plan. Veuillez autoriser les permissions de notification ServerBox, l'exécution en arrière-plan et l'auto-réveil dans les paramètres système.",
"fileTooLarge": "Fichier '{file}' trop volumineux {size}, max {sizeMax}",
"finishedAt": "Terminé à",
"followSystem": "Suivre le système",
"font": "Police",
"fontSize": "Taille de la police",
"force": "Forcer",
"fullScreen": "Mode plein écran",
@@ -79,13 +110,14 @@
"goto": "Aller à",
"hideTitleBar": "Masquer la barre de titre",
"highlight": "Mise en surbrillance du code",
"homeTabs": "Onglets d'accueil",
"homeTabsCustomizeDesc": "Personnalisez les onglets qui apparaissent sur la page d'accueil et leur ordre",
"homeWidgetUrlConfig": "Configurer l'URL du widget d'accueil",
"host": "Hôte",
"httpFailedWithCode": "Échec de la requête, code d'état : {code}",
"ignoreCert": "Ignorer le certificat",
"image": "Image",
"imagesList": "Liste des images",
"init": "Initialiser",
"inner": "Interne",
"install": "Installer",
"installDockerWithUrl": "Veuillez d'abord installer docker depuis https://docs.docker.com/engine/install.",
@@ -95,14 +127,15 @@
"keepStatusWhenErr": "Conserver l'état du dernier serveur",
"keepStatusWhenErrTip": "Uniquement en cas d'erreur lors de l'exécution du script",
"keyAuth": "Authentification par clé",
"lastFailure": "Dernier échec",
"lastSuccess": "Dernier succès",
"letterCache": "Mise en cache des lettres",
"letterCacheTip": "Recommandé de désactiver, mais après désactivation, il sera impossible de saisir des caractères CJK.",
"license": "Licence",
"location": "Emplacement",
"loss": "Perte",
"madeWithLove": "Fabriqué avec ❤️ par {myGithub}",
"manual": "Manuel",
"max": "max",
"maxConcurrency": "Concurrence maximale",
"maxRetryCount": "Nombre de reconnexions au serveur",
"maxRetryCountEqual0": "Il va réessayer encore et encore.",
"min": "min",
@@ -115,6 +148,7 @@
"net": "Réseau",
"netViewType": "Type de vue réseau",
"newContainer": "Nouveau conteneur",
"noConnectionStatsData": "Aucune donnée de statistiques de connexion",
"noLineChart": "Ne pas utiliser de graphiques linéaires",
"noLineChartForCpu": "Ne pas utiliser de graphiques linéaires pour l'unité centrale",
"noPrivateKeyTip": "La clé privée n'existe pas, elle a peut-être été supprimée ou il y a une erreur de configuration.",
@@ -136,8 +170,8 @@
"plugInType": "Type d'insertion",
"port": "Port",
"preferDiskAmount": "Prioriser laffichage de la capacité du disque",
"preview": "Aperçu",
"privateKey": "Clé privée",
"privateKeyNotFoundFmt": "Clé privée [{keyId}] introuvable.",
"process": "Processus",
"prune": "Élaguer",
"pushToken": "Jeton d'identification",
@@ -146,6 +180,7 @@
"pveVersionLow": "Cette fonctionnalité est actuellement en phase de test et n'a été testée que sur PVE 8+. Veuillez l'utiliser avec prudence.",
"read": "Lire",
"reboot": "Redémarrer",
"recentConnections": "Connexions récentes",
"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",
@@ -166,6 +201,8 @@
"serverDetailOrder": "Ordre des widgets de la page de détails du serveur",
"serverFuncBtns": "Boutons de fonction du serveur",
"serverOrder": "Ordre du serveur",
"serverTabRequired": "L'onglet serveur ne peut pas être supprimé",
"servers": "serveurs",
"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.",
@@ -189,6 +226,12 @@
"sshConfigImportPermission": "Souhaitez-vous donner la permission de lire ~/.ssh/config et d'importer automatiquement les paramètres du serveur ?",
"sshConfigImportTip": "Proposer de lire ~/.ssh/config lors de la première création de serveur",
"sshConfigImported": "{count} serveurs importés depuis la configuration SSH",
"sshHostKeyChangedDesc": "La clé d'hôte SSH de {serverName} a changé. Ne continuez que si vous faites confiance à ce serveur.",
"sshHostKeyFingerprintMd5Base64": "Empreinte (MD5 Base64) : {fingerprint}",
"sshHostKeyFingerprintMd5Hex": "Empreinte (MD5 hex) : {fingerprint}",
"sshHostKeyType": "Type de clé d'hôte SSH",
"sshHostKeyNewDesc": "Une nouvelle clé d'hôte SSH a été reçue de {serverName}. Vérifiez l'empreinte avant de faire confiance.",
"sshHostKeyStoredFingerprint": "Empreinte enregistrée : {fingerprint}",
"sshConfigManualSelect": "Souhaitez-vous sélectionner manuellement le fichier de configuration SSH ?",
"sshConfigNoServers": "Aucun serveur trouvé dans la configuration SSH",
"sshConfigPermissionDenied": "Impossible d'accéder au fichier de configuration SSH en raison des permissions macOS.",
@@ -206,10 +249,10 @@
"suspend": "Suspendre",
"suspendTip": "La fonction de suspension nécessite des privilèges root et le support de systemd.",
"switchTo": "Passer à {val}",
"sync": "Sync",
"syncTip": "Un redémarrage peut être nécessaire pour que certains changements prennent effet.",
"system": "Système",
"tag": "Étiquettes",
"tapToStartDiscovery": "Appuyez sur le bouton de recherche pour découvrir les serveurs SSH sur votre réseau",
"temperature": "Température",
"termFontSizeTip": "Ce paramètre affectera la taille du terminal (largeur et hauteur). Vous pouvez zoomer sur la page du terminal pour ajuster la taille de la police de la session en cours.",
"terminal": "Terminal",
@@ -220,6 +263,7 @@
"time": "Temps",
"times": "Fois",
"total": "Total",
"totalAttempts": "Total",
"traffic": "Trafic",
"trySudo": "Essayer d'utiliser sudo",
"ttl": "TTL",
@@ -228,7 +272,6 @@
"update": "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",
"upload": "Télécharger",
"upsideDown": "À l'envers",
"uptime": "Temps d'activité",
"useCdn": "Utiliser CDN",
@@ -237,6 +280,7 @@
"usePodmanByDefault": "Par défaut avec Podman",
"used": "Utilisé",
"view": "Vue",
"viewDetails": "Voir les détails",
"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.",
"virtKeyHelpIME": "Activer/désactiver le clavier",
@@ -250,38 +294,5 @@
"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.",
"writeScriptTip": "Après la connexion au serveur, un script sera écrit dans `~/.config/server_box` \n | `/tmp/server_box` pour surveiller l'état du système. Vous pouvez examiner le contenu du script.",
"connectionStats": "Statistiques de connexion",
"connectionStatsDesc": "Voir le taux de réussite de connexion du serveur et l'historique",
"noConnectionStatsData": "Aucune donnée de statistiques de connexion",
"totalAttempts": "Total",
"lastSuccess": "Dernier succès",
"lastFailure": "Dernier échec",
"recentConnections": "Connexions récentes",
"viewDetails": "Voir les détails",
"connectionDetails": "Détails de connexion",
"clearThisServerStats": "Effacer les statistiques de ce serveur",
"clearAllStatsTitle": "Effacer toutes les statistiques",
"clearAllStatsContent": "Êtes-vous sûr de vouloir effacer toutes les statistiques de connexion des serveurs ? Cette action ne peut pas être annulée.",
"clearServerStatsTitle": "Effacer les statistiques de {serverName}",
"@clearServerStatsTitle": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"clearServerStatsContent": "Êtes-vous sûr de vouloir effacer les statistiques de connexion du serveur \"{serverName}\" ? Cette action ne peut pas être annulée.",
"@clearServerStatsContent": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"homeTabs": "Onglets d'accueil",
"homeTabsCustomizeDesc": "Personnalisez les onglets qui apparaissent sur la page d'accueil et leur ordre",
"reset": "Réinitialiser",
"availableTabs": "Onglets disponibles",
"atLeastOneTab": "Au moins un onglet doit être sélectionné",
"serverTabRequired": "Server tab cannot be removed"
"logs": "Journaux"
}

View File

@@ -6,11 +6,29 @@
"added2List": "Ditambahkan ke Daftar Tugas",
"addr": "Alamat",
"alreadyLastDir": "Sudah di direktori terakhir.",
"askAi": "Tanya AI",
"askAiApiKey": "Kunci API",
"askAiAwaitingResponse": "Menunggu respons AI...",
"askAiBaseUrl": "URL dasar",
"askAiCommandInserted": "Perintah dimasukkan ke terminal",
"askAiConfigMissing": "Harap konfigurasikan {fields} di Pengaturan.",
"askAiConfirmExecute": "Konfirmasi sebelum menjalankan",
"askAiConversation": "Percakapan AI",
"askAiDisclaimer": "AI bisa saja salah. Gunakan dengan hati-hati.",
"askAiFollowUpHint": "Ajukan pertanyaan lanjutan...",
"askAiInsertTerminal": "Masukkan ke terminal",
"askAiModel": "Model",
"askAiNoResponse": "Tidak ada respons",
"askAiRecommendedCommand": "Perintah yang disarankan AI",
"askAiSelectedContent": "Konten yang dipilih",
"askAiUsageHint": "Digunakan di Terminal SSH",
"atLeastOneTab": "Setidaknya satu tab harus dipilih",
"authFailTip": "Otentikasi gagal, silakan periksa apakah kata sandi/kunci/host/pengguna, dll, salah.",
"autoBackupConflict": "Hanya satu pencadangan otomatis yang dapat diaktifkan pada saat yang bersamaan.",
"autoConnect": "Hubungkan otomatis",
"autoRun": "Berjalan Otomatis",
"autoUpdateHomeWidget": "Widget Rumah Pembaruan Otomatis",
"availableTabs": "Tab Tersedia",
"backupEncrypted": "Cadangan telah dienkripsi",
"backupNotEncrypted": "Cadangan tidak dienkripsi",
"backupPassword": "Kata sandi cadangan",
@@ -23,10 +41,18 @@
"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\".",
"clearAllStatsContent": "Apakah Anda yakin ingin menghapus semua statistik koneksi server? Tindakan ini tidak dapat dibatalkan.",
"clearAllStatsTitle": "Hapus Semua Statistik",
"clearServerStatsContent": "Apakah Anda yakin ingin menghapus statistik koneksi untuk server \"{serverName}\"? Tindakan ini tidak dapat dibatalkan.",
"clearServerStatsTitle": "Hapus Statistik {serverName}",
"clearThisServerStats": "Hapus Statistik Server Ini",
"closeAfterSave": "Simpan dan tutup",
"cmd": "Memerintah",
"collapseUITip": "Apakah akan menciutkan daftar panjang yang ada di UI secara default atau tidak",
"conn": "Koneksi",
"connectionDetails": "Detail Koneksi",
"connectionStats": "Statistik Koneksi",
"connectionStatsDesc": "Lihat tingkat keberhasilan koneksi server dan riwayat",
"container": "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.",
"convert": "Mengubah",
@@ -42,6 +68,10 @@
"desktopTerminalTip": "Perintah yang digunakan untuk membuka emulator terminal saat memulai sesi SSH.",
"dirEmpty": "Pastikan dir kosong.",
"disconnected": "Terputus",
"discoverSshServers": "Temukan Server SSH",
"discoveryFailed": "Penemuan gagal",
"discoverySettings": "Pengaturan Penemuan",
"discoverySummary": "Ringkasan Penemuan",
"disk": "Disk",
"diskHealth": "Kesehatan disk",
"diskIgnorePath": "Abaikan jalan untuk disk",
@@ -55,9 +85,10 @@
"doubleColumnMode": "Mode kolom ganda",
"doubleColumnTip": "Opsi ini hanya mengaktifkan fitur, apakah itu benar-benar dapat diaktifkan tergantung pada lebar perangkat",
"editVirtKeys": "Edit kunci virtual",
"editor": "Editor",
"editorHighlightTip": "Performa penyorotan kode saat ini lebih buruk, dan dapat dimatikan secara opsional untuk perbaikan.",
"emulator": "Emulator",
"enableMdns": "Aktifkan mDNS",
"enableMdnsDesc": "Gunakan mDNS/Bonjour untuk menemukan layanan SSH",
"encode": "Menyandi",
"envVars": "Variabel lingkungan",
"experimentalFeature": "Fitur eksperimental",
@@ -67,8 +98,8 @@
"fgService": "Layanan Latar Depan",
"fgServiceTip": "Setelah diaktifkan, beberapa model perangkat mungkin crash. Menonaktifkannya dapat menyebabkan beberapa model tidak dapat mempertahankan koneksi SSH di latar belakang. Harap izinkan perizinan notifikasi ServerBox, menjalankan di latar belakang, dan bangun mandiri di pengaturan sistem.",
"fileTooLarge": "File '{file}' terlalu besar {size}, max {sizeMax}",
"finishedAt": "Selesai pada",
"followSystem": "Ikuti sistem",
"font": "Font",
"fontSize": "Ukuran huruf",
"force": "sukarela",
"fullScreen": "Mode Layar Penuh",
@@ -79,13 +110,14 @@
"goto": "Pergi ke",
"hideTitleBar": "Sembunyikan bilah judul",
"highlight": "Sorotan kode",
"homeTabs": "Tab Beranda",
"homeTabsCustomizeDesc": "Sesuaikan tab mana yang muncul di halaman beranda dan urutannya",
"homeWidgetUrlConfig": "Konfigurasi URL Widget Rumah",
"host": "Host",
"httpFailedWithCode": "Permintaan gagal, kode status: {code}",
"ignoreCert": "Abaikan sertifikat",
"image": "Gambar",
"imagesList": "Daftar gambar",
"init": "Menginisialisasi",
"inner": "Batin",
"install": "Install",
"installDockerWithUrl": "Silakan https://docs.docker.com/engine/install Docker pertama.",
@@ -95,14 +127,15 @@
"keepStatusWhenErr": "Menyimpan status server terakhir",
"keepStatusWhenErrTip": "Hanya ketika terjadi kesalahan saat menjalankan skrip",
"keyAuth": "Auth kunci",
"lastFailure": "Gagal Terakhir",
"lastSuccess": "Sukses Terakhir",
"letterCache": "Caching huruf",
"letterCacheTip": "Direkomendasikan untuk menonaktifkan, tetapi setelah dinonaktifkan, tidak mungkin untuk memasukkan karakter CJK.",
"license": "Lisensi",
"location": "Lokasi",
"loss": "kehilangan",
"madeWithLove": "Dibuat dengan ❤️ oleh {myGithub}",
"manual": "Manual",
"max": "Max",
"maxConcurrency": "Konkurensi Maksimum",
"maxRetryCount": "Jumlah penyambungan kembali server",
"maxRetryCountEqual0": "Akan mencoba lagi lagi dan lagi.",
"min": "Min",
@@ -115,6 +148,7 @@
"net": "Jaringan",
"netViewType": "Jenis tampilan bersih",
"newContainer": "Wadah baru",
"noConnectionStatsData": "Tidak ada data statistik koneksi",
"noLineChart": "Jangan gunakan grafik garis",
"noLineChartForCpu": "Jangan gunakan diagram garis untuk CPU",
"noPrivateKeyTip": "Kunci privat tidak ada, mungkin telah dihapus atau ada kesalahan konfigurasi.",
@@ -136,8 +170,8 @@
"plugInType": "Jenis Penyisipan",
"port": "Port",
"preferDiskAmount": "Prioritaskan tampilan kapasitas disk",
"preview": "Pratinjau",
"privateKey": "Kunci Pribadi",
"privateKeyNotFoundFmt": "Kunci privat [{keyId}] tidak ditemukan.",
"process": "Proses",
"prune": "Pangkas",
"pushToken": "Dorong token",
@@ -146,6 +180,7 @@
"pveVersionLow": "Fitur ini saat ini sedang dalam tahap pengujian dan hanya diuji pada PVE 8+. Gunakan dengan hati-hati.",
"read": "Baca",
"reboot": "Reboot",
"recentConnections": "Koneksi Terkini",
"rememberPwdInMem": "Ingat kata sandi di dalam memori",
"rememberPwdInMemTip": "Digunakan untuk kontainer, menangguhkan, dll.",
"rememberWindowSize": "Ingat ukuran jendela",
@@ -166,6 +201,8 @@
"serverDetailOrder": "Detail pesanan widget halaman",
"serverFuncBtns": "Tombol fungsi server",
"serverOrder": "Pesanan server",
"serverTabRequired": "Tab server tidak dapat dihapus",
"servers": "server",
"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",
@@ -189,6 +226,12 @@
"sshConfigImportPermission": "Apakah Anda ingin memberikan izin untuk membaca ~/.ssh/config dan secara otomatis mengimpor pengaturan server?",
"sshConfigImportTip": "Prompt untuk membaca ~/.ssh/config saat pembuatan server pertama",
"sshConfigImported": "Berhasil mengimpor {count} server dari konfigurasi SSH",
"sshHostKeyChangedDesc": "Kunci host SSH untuk {serverName} telah berubah. Lanjutkan hanya jika Anda mempercayai server ini.",
"sshHostKeyFingerprintMd5Base64": "Sidik jari (MD5 Base64): {fingerprint}",
"sshHostKeyFingerprintMd5Hex": "Sidik jari (MD5 hex): {fingerprint}",
"sshHostKeyType": "Jenis kunci host SSH",
"sshHostKeyNewDesc": "Kunci host SSH baru diterima dari {serverName}. Periksa sidik jarinya sebelum mempercayai.",
"sshHostKeyStoredFingerprint": "Sidik jari tersimpan: {fingerprint}",
"sshConfigManualSelect": "Apakah Anda ingin memilih file konfigurasi SSH secara manual?",
"sshConfigNoServers": "Tidak ada server yang ditemukan dalam konfigurasi SSH",
"sshConfigPermissionDenied": "Tidak dapat mengakses file konfigurasi SSH karena izin macOS.",
@@ -206,10 +249,10 @@
"suspend": "Suspend",
"suspendTip": "Fungsi penangguhan memerlukan hak akses root dan dukungan systemd.",
"switchTo": "Beralih ke {val}",
"sync": "Sinkronisasi",
"syncTip": "Pengaktifan ulang mungkin diperlukan agar beberapa perubahan dapat diterapkan.",
"system": "Sistem",
"tag": "Tag",
"tapToStartDiscovery": "Tekan tombol pencarian untuk menemukan server SSH di jaringan Anda",
"temperature": "Suhu",
"termFontSizeTip": "Pengaturan ini akan memengaruhi ukuran terminal (lebar dan tinggi). Anda dapat melakukan zoom pada halaman terminal untuk menyesuaikan ukuran font sesi saat ini.",
"terminal": "Terminal",
@@ -220,6 +263,7 @@
"time": "Waktu",
"times": "Waktu",
"total": "Total",
"totalAttempts": "Total",
"traffic": "Lalu lintas",
"trySudo": "Cobalah menggunakan sudo",
"ttl": "TTL",
@@ -228,7 +272,6 @@
"update": "Memperbarui",
"updateIntervalEqual0": "Anda mengatur ke 0, tidak akan memperbarui secara otomatis.\nTidak dapat menghitung status CPU.",
"updateServerStatusInterval": "Interval Pembaruan Status Server",
"upload": "Mengunggah",
"upsideDown": "Terbalik",
"uptime": "Uptime",
"useCdn": "Menggunakan CDN",
@@ -237,6 +280,7 @@
"usePodmanByDefault": "Menggunakan Podman sebagai bawaan",
"used": "Digunakan",
"view": "Tampilan",
"viewDetails": "Lihat Detail",
"viewErr": "Lihat kesalahan",
"virtKeyHelpClipboard": "Salin ke clipboard jika terminal yang dipilih tidak kosong, jika tidak, tempel isi clipboard ke terminal.",
"virtKeyHelpIME": "Menyalakan/mematikan keyboard",
@@ -250,38 +294,5 @@
"write": "Tulis",
"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` \n | `/tmp/server_box` untuk memantau status sistem. Anda dapat meninjau konten skrip tersebut.",
"connectionStats": "Statistik Koneksi",
"connectionStatsDesc": "Lihat tingkat keberhasilan koneksi server dan riwayat",
"noConnectionStatsData": "Tidak ada data statistik koneksi",
"totalAttempts": "Total",
"lastSuccess": "Sukses Terakhir",
"lastFailure": "Gagal Terakhir",
"recentConnections": "Koneksi Terkini",
"viewDetails": "Lihat Detail",
"connectionDetails": "Detail Koneksi",
"clearThisServerStats": "Hapus Statistik Server Ini",
"clearAllStatsTitle": "Hapus Semua Statistik",
"clearAllStatsContent": "Apakah Anda yakin ingin menghapus semua statistik koneksi server? Tindakan ini tidak dapat dibatalkan.",
"clearServerStatsTitle": "Hapus Statistik {serverName}",
"@clearServerStatsTitle": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"clearServerStatsContent": "Apakah Anda yakin ingin menghapus statistik koneksi untuk server \"{serverName}\"? Tindakan ini tidak dapat dibatalkan.",
"@clearServerStatsContent": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"homeTabs": "Tab Beranda",
"homeTabsCustomizeDesc": "Sesuaikan tab mana yang muncul di halaman beranda dan urutannya",
"reset": "Reset",
"availableTabs": "Tab Tersedia",
"atLeastOneTab": "Setidaknya satu tab harus dipilih",
"serverTabRequired": "Server tab cannot be removed"
"logs": "Log"
}

View File

@@ -6,11 +6,29 @@
"added2List": "タスクリストに追加されました",
"addr": "アドレス",
"alreadyLastDir": "すでに最上位のディレクトリです",
"askAi": "AI に質問",
"askAiApiKey": "API キー",
"askAiAwaitingResponse": "AI の応答を待機中...",
"askAiBaseUrl": "ベース URL",
"askAiCommandInserted": "コマンドをターミナルに挿入しました",
"askAiConfigMissing": "設定で {fields} を構成してください。",
"askAiConfirmExecute": "実行前に確認",
"askAiConversation": "AI 会話",
"askAiDisclaimer": "AI が誤る可能性があります。注意してご利用ください。",
"askAiFollowUpHint": "追質問をする...",
"askAiInsertTerminal": "ターミナルに挿入",
"askAiModel": "モデル",
"askAiNoResponse": "応答なし",
"askAiRecommendedCommand": "AI 推奨コマンド",
"askAiSelectedContent": "選択した内容",
"askAiUsageHint": "SSH ターミナルで使用",
"atLeastOneTab": "少なくとも1つのタブを選択する必要があります",
"authFailTip": "認証に失敗しました。パスワード/鍵/ホスト/ユーザーなどが間違っていないか確認してください。",
"autoBackupConflict": "自動バックアップは一度に一つしか開始できません",
"autoConnect": "自動接続",
"autoRun": "自動実行",
"autoUpdateHomeWidget": "ホームウィジェットを自動更新",
"availableTabs": "利用可能なタブ",
"backupEncrypted": "バックアップは暗号化されています",
"backupNotEncrypted": "バックアップは暗号化されていません",
"backupPassword": "バックアップパスワード",
@@ -23,10 +41,18 @@
"battery": "バッテリー",
"bgRun": "バックグラウンド実行",
"bgRunTip": "このスイッチはプログラムがバックグラウンドで実行を試みることを意味しますが、実際にバックグラウンドで実行できるかどうかは、権限が有効になっているかに依存します。AOSPベースのAndroid ROMでは、このアプリの「バッテリー最適化」をオフにしてください。MIUIでは、省エネモードを「無制限」に変更してください。",
"clearAllStatsContent": "すべてのサーバー接続統計を削除してもよろしいですか?この操作は元に戻せません。",
"clearAllStatsTitle": "すべての統計をクリア",
"clearServerStatsContent": "サーバー\"{serverName}\"の接続統計を削除してもよろしいですか?この操作は元に戻せません。",
"clearServerStatsTitle": "{serverName}の統計をクリア",
"clearThisServerStats": "このサーバーの統計をクリア",
"closeAfterSave": "保存して閉じる",
"cmd": "コマンド",
"collapseUITip": "UIの長いリストをデフォルトで折りたたむかどうか",
"conn": "接続",
"connectionDetails": "接続の詳細",
"connectionStats": "接続統計",
"connectionStatsDesc": "サーバー接続成功率と履歴を表示",
"container": "コンテナ",
"containerTrySudoTip": "例アプリ内でユーザーをaaaに設定しているが、Dockerがrootユーザーでインストールされている場合、このオプションを有効にする必要があります",
"convert": "変換",
@@ -42,6 +68,10 @@
"desktopTerminalTip": "SSHセッションを起動する際に使用されるターミナルエミュレーターを開くコマンド。",
"dirEmpty": "フォルダーが空であることを確認してください",
"disconnected": "接続が切断されました",
"discoverSshServers": "SSHサーバーの発見",
"discoveryFailed": "発見に失敗",
"discoverySettings": "発見設定",
"discoverySummary": "発見の概要",
"disk": "ディスク",
"diskHealth": "ディスクの健康状態",
"diskIgnorePath": "無視されたディスクパス",
@@ -55,9 +85,10 @@
"doubleColumnMode": "ダブルカラムモード",
"doubleColumnTip": "このオプションは機能を有効にするだけで、実際に有効にできるかどうかはデバイスの幅に依存します",
"editVirtKeys": "仮想キーを編集",
"editor": "エディター",
"editorHighlightTip": "現在のコードハイライトのパフォーマンスはかなり悪いため、改善するために無効にすることを選択できます。",
"emulator": "エミュレーター",
"enableMdns": "mDNSを有効化",
"enableMdnsDesc": "mDNS/BonjourでSSHサービスを発見",
"encode": "エンコード",
"envVars": "環境変数",
"experimentalFeature": "実験的な機能",
@@ -67,8 +98,8 @@
"fgService": "フォアグラウンドサービス",
"fgServiceTip": "有効にすると、一部の機種でクラッシュする可能性があります。無効にすると、一部の機種でバックグラウンドでのSSH接続を維持できなくなる可能性があります。システム設定でServerBoxの通知権限、バックグラウンド実行、自己起動を許可してください。",
"fileTooLarge": "ファイル '{file}' は大きすぎます '{size}'、{sizeMax} を超えています",
"finishedAt": "完了時刻",
"followSystem": "システムに従う",
"font": "フォント",
"fontSize": "フォントサイズ",
"force": "強制",
"fullScreen": "フルスクリーンモード",
@@ -79,13 +110,14 @@
"goto": "移動",
"hideTitleBar": "タイトルバーを非表示にする",
"highlight": "コードハイライト",
"homeTabs": "ホームタブ",
"homeTabsCustomizeDesc": "ホームページに表示するタブとその順序をカスタマイズします",
"homeWidgetUrlConfig": "ホームウィジェットURL設定",
"host": "ホスト",
"httpFailedWithCode": "リクエスト失敗、ステータスコード: {code}",
"ignoreCert": "証明書を無視する",
"image": "イメージ",
"imagesList": "イメージリスト",
"init": "初期化する",
"inner": "内蔵",
"install": "インストール",
"installDockerWithUrl": "最初に https://docs.docker.com/engine/install dockerをインストールしてください",
@@ -95,14 +127,15 @@
"keepStatusWhenErr": "エラー時に前回のサーバーステータスを保持",
"keepStatusWhenErrTip": "スクリプトの実行エラーに限ります",
"keyAuth": "キー認証",
"lastFailure": "最後の失敗",
"lastSuccess": "最後の成功",
"letterCache": "文字キャッシング",
"letterCacheTip": "無効にすることを推奨しますが、無効にした後はCJK文字を入力することができなくなります。",
"license": "オープンソースライセンス",
"location": "場所",
"loss": "パケットロス",
"madeWithLove": "{myGithub}によって❤️で作成済み",
"manual": "マニュアル",
"max": "最大",
"maxConcurrency": "最大同時実行数",
"maxRetryCount": "サーバーの再接続試行回数",
"maxRetryCountEqual0": "無限に再試行します",
"min": "最小",
@@ -115,6 +148,7 @@
"net": "ネットワーク",
"netViewType": "ネットワークビュータイプ",
"newContainer": "新しいコンテナを作成",
"noConnectionStatsData": "接続統計データがありません",
"noLineChart": "折れ線グラフを使用しない",
"noLineChartForCpu": "CPUに折れ線グラフを使わない",
"noPrivateKeyTip": "秘密鍵が存在しません。削除されたか、設定ミスがある可能性があります。",
@@ -136,8 +170,8 @@
"plugInType": "挿入タイプ",
"port": "ポート",
"preferDiskAmount": "ディスク容量を優先的に表示",
"preview": "プレビュー",
"privateKey": "秘密鍵",
"privateKeyNotFoundFmt": "秘密鍵 [{keyId}] が見つかりません。",
"process": "プロセス",
"prune": "剪定する",
"pushToken": "プッシュトークン",
@@ -146,6 +180,7 @@
"pveVersionLow": "この機能は現在テスト段階にあり、PVE 8+でのみテストされています。ご利用の際は慎重に。",
"read": "読み取り",
"reboot": "再起動",
"recentConnections": "最近の接続",
"rememberPwdInMem": "メモリにパスワードを記憶する",
"rememberPwdInMemTip": "コンテナ、一時停止などに使用されます。",
"rememberWindowSize": "ウィンドウサイズを記憶する",
@@ -166,6 +201,8 @@
"serverDetailOrder": "詳細ページのウィジェット順序",
"serverFuncBtns": "サーバー機能ボタン",
"serverOrder": "サーバー順序",
"serverTabRequired": "サーバータブは削除できません",
"servers": "サーバー",
"sftpDlPrepare": "サーバーへの接続を準備中...",
"sftpEditorTip": "空の場合は、アプリ内蔵のファイルエディタを使用します。値がある場合は、リモートサーバーのエディタ(例:`vim`)を使用します(`EDITOR` に従って自動検出することをお勧めします)。",
"sftpRmrDirSummary": "SFTPで`rm -r`を使用してフォルダーを削除",
@@ -189,6 +226,12 @@
"sshConfigImportPermission": "~/.ssh/configを読み取ってサーバー設定を自動的にインポートする権限を与えますか",
"sshConfigImportTip": "初回サーバー作成時に~/.ssh/configの読み取りを促す",
"sshConfigImported": "SSH設定から{count}個のサーバーをインポートしました",
"sshHostKeyChangedDesc": "{serverName} の SSH ホスト鍵が変更されました。このサーバーを信頼できる場合のみ続行してください。",
"sshHostKeyFingerprintMd5Base64": "フィンガープリント (MD5 Base64): {fingerprint}",
"sshHostKeyFingerprintMd5Hex": "フィンガープリント (MD5 16進): {fingerprint}",
"sshHostKeyType": "SSH ホストキーの種類",
"sshHostKeyNewDesc": "{serverName} から新しい SSH ホスト鍵を受信しました。信頼する前にフィンガープリントを確認してください。",
"sshHostKeyStoredFingerprint": "保存済みフィンガープリント: {fingerprint}",
"sshConfigManualSelect": "SSH設定ファイルを手動で選択しますか",
"sshConfigNoServers": "SSH設定でサーバーが見つかりませんでした",
"sshConfigPermissionDenied": "macOSの権限により、SSH設定ファイルにアクセスできません。",
@@ -206,10 +249,10 @@
"suspend": "中断",
"suspendTip": "suspend機能はroot権限とsystemdのサポートが必要です。",
"switchTo": "{val}に切り替える",
"sync": "同期する",
"syncTip": "再起動が必要な場合があります。一部の変更はその後に有効になります。",
"system": "システム",
"tag": "タグ",
"tapToStartDiscovery": "検索ボタンをタップしてネットワーク上のSSHサーバーを発見",
"temperature": "温度",
"termFontSizeTip": "この設定は端末のサイズ(幅と高さ)に影響します。現在のセッションのフォントサイズを調整するために、端末ページを拡大縮小できます。",
"terminal": "ターミナル",
@@ -220,6 +263,7 @@
"time": "時間",
"times": "回",
"total": "合計",
"totalAttempts": "総計",
"traffic": "トラフィック",
"trySudo": "sudoを試みる",
"ttl": "TTL",
@@ -228,7 +272,6 @@
"update": "更新",
"updateIntervalEqual0": "0に設定すると、サーバーの状態は自動的に更新されず、CPU使用率も計算できません。",
"updateServerStatusInterval": "サーバー状態の更新間隔",
"upload": "アップロード",
"upsideDown": "上下逆転",
"uptime": "稼働時間",
"useCdn": "CDNの使用",
@@ -237,6 +280,7 @@
"usePodmanByDefault": "デフォルトでPodmanを使用",
"used": "使用済み",
"view": "ビュー",
"viewDetails": "詳細を表示",
"viewErr": "エラーを表示",
"virtKeyHelpClipboard": "端末に選択された文字がある場合は、選択された文字をクリップボードにコピーします。そうでない場合は、クリップボードの内容を端末に貼り付けます。",
"virtKeyHelpIME": "キーボードのオン/オフ",
@@ -249,39 +293,6 @@
"wolTip": "WOLWake-on-LANを設定した後、サーバーに接続するたびにWOLリクエストが送信されます。",
"write": "書き込み",
"writeScriptFailTip": "スクリプトの書き込みに失敗しました。権限がないかディレクトリが存在しない可能性があります。",
"writeScriptTip": "サーバーに接続すると、システムの状態を監視するためのスクリプトが `~/.config/server_box` \n | `/tmp/server_box` に書き込まれます。スクリプトの内容を確認できます。",
"connectionStats": "接続統計",
"connectionStatsDesc": "サーバー接続成功率と履歴を表示",
"noConnectionStatsData": "接続統計データがありません",
"totalAttempts": "総計",
"lastSuccess": "最後の成功",
"lastFailure": "最後の失敗",
"recentConnections": "最近の接続",
"viewDetails": "詳細を表示",
"connectionDetails": "接続の詳細",
"clearThisServerStats": "このサーバーの統計をクリア",
"clearAllStatsTitle": "すべての統計をクリア",
"clearAllStatsContent": "すべてのサーバー接続統計を削除してもよろしいですか?この操作は元に戻せません。",
"clearServerStatsTitle": "{serverName}の統計をクリア",
"@clearServerStatsTitle": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"clearServerStatsContent": "サーバー\"{serverName}\"の接続統計を削除してもよろしいですか?この操作は元に戻せません。",
"@clearServerStatsContent": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"homeTabs": "ホームタブ",
"homeTabsCustomizeDesc": "ホームページに表示するタブとその順序をカスタマイズします",
"reset": "リセット",
"availableTabs": "利用可能なタブ",
"atLeastOneTab": "少なくとも1つのタブを選択する必要があります",
"serverTabRequired": "サーバータブは削除できません"
"writeScriptTip": "サーバーへの接続後、システムステータスを監視するスクリプトが `~/.config/server_box` \n | `/tmp/server_box` に書き込まれます。スクリプトの内容を確認できます。",
"logs": "ログ"
}

View File

@@ -6,11 +6,29 @@
"added2List": "Toegevoegd aan takenlijst",
"addr": "Adres",
"alreadyLastDir": "Al in de laatst gebruikte map.",
"askAi": "AI vragen",
"askAiApiKey": "API-sleutel",
"askAiAwaitingResponse": "Wachten op AI-reactie...",
"askAiBaseUrl": "Basis-URL",
"askAiCommandInserted": "Commando in terminal ingevoegd",
"askAiConfigMissing": "Configureer {fields} in de instellingen.",
"askAiConfirmExecute": "Bevestigen voor uitvoeren",
"askAiConversation": "AI-gesprek",
"askAiDisclaimer": "AI kan fouten maken. Gebruik het zorgvuldig.",
"askAiFollowUpHint": "Stel een vervolgvraag...",
"askAiInsertTerminal": "In terminal invoegen",
"askAiModel": "Model",
"askAiNoResponse": "Geen reactie",
"askAiRecommendedCommand": "Door AI voorgestelde opdracht",
"askAiSelectedContent": "Geselecteerde inhoud",
"askAiUsageHint": "Gebruikt in de SSH-terminal",
"atLeastOneTab": "Er moet minimaal één tabblad worden geselecteerd",
"authFailTip": "Authenticatie mislukt, controleer of het wachtwoord/sleutel/host/gebruiker, enz., incorrect zijn.",
"autoBackupConflict": "Er kan slechts één automatische back-up tegelijk worden ingeschakeld.",
"autoConnect": "Automatisch verbinden",
"autoRun": "Automatisch uitvoeren",
"autoUpdateHomeWidget": "Automatische update van home-widget",
"availableTabs": "Beschikbare tabbladen",
"backupEncrypted": "Back-up is versleuteld",
"backupNotEncrypted": "Back-up is niet versleuteld",
"backupPassword": "Back-up wachtwoord",
@@ -23,10 +41,18 @@
"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\".",
"clearAllStatsContent": "Weet u zeker dat u alle serververbindingsstatistieken wilt wissen? Deze actie kan niet ongedaan worden gemaakt.",
"clearAllStatsTitle": "Alle statistieken wissen",
"clearServerStatsContent": "Weet u zeker dat u de verbindingsstatistieken voor server \"{serverName}\" wilt wissen? Deze actie kan niet ongedaan worden gemaakt.",
"clearServerStatsTitle": "Statistieken van {serverName} wissen",
"clearThisServerStats": "Statistieken van deze server wissen",
"closeAfterSave": "Opslaan en sluiten",
"cmd": "Opdracht",
"collapseUITip": "Of lange lijsten in de UI standaard moeten worden ingeklapt",
"conn": "Verbinding",
"connectionDetails": "Verbindingsdetails",
"connectionStats": "Verbindingsstatistieken",
"connectionStatsDesc": "Bekijk server verbindingssucces ratio en geschiedenis",
"container": "Container",
"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.",
"convert": "Converteren",
@@ -42,6 +68,10 @@
"desktopTerminalTip": "Opdracht die wordt gebruikt om de terminalemulator te openen bij het starten van SSH-sessies.",
"dirEmpty": "Zorg ervoor dat de map leeg is.",
"disconnected": "Verbroken",
"discoverSshServers": "SSH-servers ontdekken",
"discoveryFailed": "Ontdekking mislukt",
"discoverySettings": "Ontdekkingsinstellingen",
"discoverySummary": "Ontdekkingssamenvatting",
"disk": "Schijf",
"diskHealth": "Schijfgezondheid",
"diskIgnorePath": "Pad negeren voor schijf",
@@ -55,9 +85,10 @@
"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",
"editVirtKeys": "Virtuele toetsen bewerken",
"editor": "Editor",
"editorHighlightTip": "De huidige codehighlighting-prestaties zijn slechter en kunnen optioneel worden uitgeschakeld om te verbeteren.",
"emulator": "Emulator",
"enableMdns": "mDNS inschakelen",
"enableMdnsDesc": "Gebruik mDNS/Bonjour om SSH-services te ontdekken",
"encode": "Coderen",
"envVars": "Omgevingsvariabele",
"experimentalFeature": "Experimentele functie",
@@ -67,8 +98,8 @@
"fgService": "Voorgrondservice",
"fgServiceTip": "Na het inschakelen kunnen sommige apparaatmodellen crashen. Uitschakelen kan ertoe leiden dat sommige modellen SSH-verbindingen niet op de achtergrond kunnen behouden. Sta ServerBox notificatierechten, achtergronduitvoering en zelf-ontwaken toe in systeeminstellingen.",
"fileTooLarge": "Bestand '{file}' te groot {size}, max {sizeMax}",
"finishedAt": "Voltooid om",
"followSystem": "Volg systeem",
"font": "Lettertype",
"fontSize": "Lettergrootte",
"force": "Forceer",
"fullScreen": "Volledig schermmodus",
@@ -79,13 +110,14 @@
"goto": "Ga naar",
"hideTitleBar": "Titelbalk verbergen",
"highlight": "Code-highlight",
"homeTabs": "Home-tabbladen",
"homeTabsCustomizeDesc": "Pas aan welke tabbladen op de startpagina worden weergegeven en hun volgorde",
"homeWidgetUrlConfig": "Home-widget-url configureren",
"host": "Host",
"httpFailedWithCode": "verzoek mislukt, statuscode: {code}",
"ignoreCert": "Certificaat negeren",
"image": "Afbeelding",
"imagesList": "Lijst met afbeeldingen",
"init": "Initialiseren",
"inner": "Intern",
"install": "Installeren",
"installDockerWithUrl": "Installeer eerst docker via https://docs.docker.com/engine/install.",
@@ -95,14 +127,15 @@
"keepStatusWhenErr": "Behoud de laatste serverstatus",
"keepStatusWhenErrTip": "Alleen in geval van een fout tijdens de scriptuitvoering",
"keyAuth": "Sleutelauthenticatie",
"lastFailure": "Laatst gefaald",
"lastSuccess": "Laatst succesvol",
"letterCache": "Lettercaching",
"letterCacheTip": "Aanbevolen om uit te schakelen, maar na het uitschakelen is het niet mogelijk om CJK-tekens in te voeren.",
"license": "Licentie",
"location": "Locatie",
"loss": "verlies",
"madeWithLove": "Gemaakt met ❤️ door {myGithub}",
"manual": "Handleiding",
"max": "max",
"maxConcurrency": "Maximale gelijktijdigheid",
"maxRetryCount": "Aantal serverherverbindingen",
"maxRetryCountEqual0": "Zal opnieuw blijven proberen.",
"min": "min",
@@ -115,6 +148,7 @@
"net": "Netwerk",
"netViewType": "Netweergavetype",
"newContainer": "Nieuwe container",
"noConnectionStatsData": "Geen verbindingsstatistiekgegevens",
"noLineChart": "lijndiagrammen gebruiken",
"noLineChartForCpu": "Gebruik geen lijndiagrammen voor CPU",
"noPrivateKeyTip": "De privésleutel bestaat niet, deze is mogelijk verwijderd of er is een configuratiefout.",
@@ -136,8 +170,8 @@
"plugInType": "Invoegingstype",
"port": "Poort",
"preferDiskAmount": "Geef de schijfcapaciteit prioriteit bij weergave",
"preview": "Voorbeeld",
"privateKey": "Privésleutel",
"privateKeyNotFoundFmt": "Privésleutel [{keyId}] niet gevonden.",
"process": "Proces",
"prune": "Snoeien",
"pushToken": "Push-token",
@@ -146,6 +180,7 @@
"pveVersionLow": "Deze functie bevindt zich momenteel in de testfase en is alleen getest op PVE 8+. Gebruik het met voorzichtigheid.",
"read": "Lezen",
"reboot": "Herstart",
"recentConnections": "Recente verbindingen",
"rememberPwdInMem": "Wachtwoord onthouden in geheugen",
"rememberPwdInMemTip": "Gebruikt voor containers, opschorting, enz.",
"rememberWindowSize": "Venstergrootte onthouden",
@@ -166,6 +201,8 @@
"serverDetailOrder": "Volgorde van widget op detailpagina",
"serverFuncBtns": "Server functieknoppen",
"serverOrder": "Servervolgorde",
"serverTabRequired": "Servertabblad kan niet worden verwijderd",
"servers": "servers",
"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.",
@@ -189,6 +226,12 @@
"sshConfigImportPermission": "Wilt u toestemming geven om ~/.ssh/config te lezen en automatisch serverinstellingen te importeren?",
"sshConfigImportTip": "Prompt om ~/.ssh/config te lezen bij het aanmaken van de eerste server",
"sshConfigImported": "{count} servers geïmporteerd uit SSH-configuratie",
"sshHostKeyChangedDesc": "De SSH-hostsleutel voor {serverName} is gewijzigd. Ga alleen verder als u deze server vertrouwt.",
"sshHostKeyFingerprintMd5Base64": "Vingerafdruk (MD5 Base64): {fingerprint}",
"sshHostKeyFingerprintMd5Hex": "Vingerafdruk (MD5 hex): {fingerprint}",
"sshHostKeyType": "Type SSH-hostsleutel",
"sshHostKeyNewDesc": "Er is een nieuwe SSH-hostsleutel ontvangen van {serverName}. Controleer de vingerafdruk voordat u vertrouwt.",
"sshHostKeyStoredFingerprint": "Opgeslagen vingerafdruk: {fingerprint}",
"sshConfigManualSelect": "Wilt u het SSH-configuratiebestand handmatig selecteren?",
"sshConfigNoServers": "Geen servers gevonden in SSH-configuratie",
"sshConfigPermissionDenied": "Kan geen toegang krijgen tot SSH-configuratiebestand vanwege macOS-rechten.",
@@ -206,10 +249,10 @@
"suspend": "Ophangen",
"suspendTip": "De opschortfunctie vereist rootrechten en systemd-ondersteuning.",
"switchTo": "Overschakelen naar {val}",
"sync": "Sync",
"syncTip": "Een herstart kan nodig zijn voor sommige wijzigingen om van kracht te worden.",
"system": "Systeem",
"tag": "Labels",
"tapToStartDiscovery": "Tik op de zoekknop om SSH-servers op uw netwerk te ontdekken",
"temperature": "Temperatuur",
"termFontSizeTip": "Deze instelling heeft invloed op de terminalgrootte (breedte en hoogte). U kunt inzoomen op de terminalpagina om de lettergrootte van de huidige sessie aan te passen.",
"terminal": "Terminal",
@@ -220,6 +263,7 @@
"time": "Tijd",
"times": "Keer",
"total": "Totaal",
"totalAttempts": "Totaal",
"traffic": "Verkeer",
"trySudo": "Probeer sudo te gebruiken",
"ttl": "TTL",
@@ -228,7 +272,6 @@
"update": "Bijwerken",
"updateIntervalEqual0": "Het staat op 0, het zal niet automatisch bijwerken\nCPU status kan niet berekend worden.",
"updateServerStatusInterval": "Interne server status bijwerking interval",
"upload": "Upload",
"upsideDown": "Ondersteboven",
"uptime": "Uptime",
"useCdn": "Gebruikt CDN",
@@ -237,6 +280,7 @@
"usePodmanByDefault": "Valt terug op Podman",
"used": "Gebruikt",
"view": "Weergave",
"viewDetails": "Details bekijken",
"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.",
"virtKeyHelpIME": "Toetsenbord aan/uit zetten",
@@ -250,38 +294,5 @@
"write": "Schrijven",
"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` \n | `/tmp/server_box` om de systeemstatus te monitoren. U kunt de inhoud van het script controleren.",
"connectionStats": "Verbindingsstatistieken",
"connectionStatsDesc": "Bekijk server verbindingssucces ratio en geschiedenis",
"noConnectionStatsData": "Geen verbindingsstatistiekgegevens",
"totalAttempts": "Totaal",
"lastSuccess": "Laatst succesvol",
"lastFailure": "Laatst gefaald",
"recentConnections": "Recente verbindingen",
"viewDetails": "Details bekijken",
"connectionDetails": "Verbindingsdetails",
"clearThisServerStats": "Statistieken van deze server wissen",
"clearAllStatsTitle": "Alle statistieken wissen",
"clearAllStatsContent": "Weet u zeker dat u alle serververbindingsstatistieken wilt wissen? Deze actie kan niet ongedaan worden gemaakt.",
"clearServerStatsTitle": "Statistieken van {serverName} wissen",
"@clearServerStatsTitle": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"clearServerStatsContent": "Weet u zeker dat u de verbindingsstatistieken voor server \"{serverName}\" wilt wissen? Deze actie kan niet ongedaan worden gemaakt.",
"@clearServerStatsContent": {
"placeholders": {
"serverName": {
"type": "String"
}
}
},
"homeTabs": "Home-tabbladen",
"homeTabsCustomizeDesc": "Pas aan welke tabbladen op de startpagina worden weergegeven en hun volgorde",
"reset": "Resetten",
"availableTabs": "Beschikbare tabbladen",
"atLeastOneTab": "Er moet minimaal één tabblad worden geselecteerd",
"serverTabRequired": "Server tab cannot be removed"
"logs": "Logboeken"
}

Some files were not shown because too many files have changed in this diff Show More