mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
chore: README
This commit is contained in:
@@ -9,7 +9,7 @@ English | [简体中文](README_zh.md)
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
A Flutter project which provide charts to display <a href="../../issues/43">Linux</a> server status and tools to manage server.
|
A Flutter project which provide charts to display <a href="https://github.com/lollipopkit/flutter_server_box/issues/43">Linux</a> server status and tools to manage server.
|
||||||
<br>
|
<br>
|
||||||
Especially thanks to <a href="https://github.com/TerminalStudio/dartssh2">dartssh2</a> & <a href="https://github.com/TerminalStudio/xterm.dart">xterm.dart</a>.
|
Especially thanks to <a href="https://github.com/TerminalStudio/dartssh2">dartssh2</a> & <a href="https://github.com/TerminalStudio/xterm.dart">xterm.dart</a>.
|
||||||
</p>
|
</p>
|
||||||
@@ -29,10 +29,10 @@ Especially thanks to <a href="https://github.com/TerminalStudio/dartssh2">dartss
|
|||||||
## 📥 Install
|
## 📥 Install
|
||||||
|
|
||||||
Platform | From
|
Platform | From
|
||||||
--- | ---
|
----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
iOS / macOS | [AppStore](https://apps.apple.com/app/id1586449703)
|
iOS / macOS | [AppStore](https://apps.apple.com/app/id1586449703)
|
||||||
Android | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lolli.tech/serverbox/?sort=time&order=desc&layout=grid) / [F-Droid](https://f-droid.org/packages/tech.lolli.toolbox) / [OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/)
|
Android | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid) / [F-Droid](https://f-droid.org/packages/tech.lolli.toolbox) / [OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/)
|
||||||
Linux / Windows | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lolli.tech/serverbox/?sort=time&order=desc&layout=grid)
|
Linux / Windows | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)
|
||||||
|
|
||||||
Please only download pkgs from the source that **you trust**!
|
Please only download pkgs from the source that **you trust**!
|
||||||
|
|
||||||
|
|||||||
10
README_zh.md
10
README_zh.md
@@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
使用 Flutter 开发的 <a href="../../issues/43">Linux</a> 服务器工具箱,提供服务器状态图表和管理工具。
|
使用 Flutter 开发的 <a href="https://github.com/lollipopkit/flutter_server_box/issues/43">Linux</a> 服务器工具箱,提供服务器状态图表和管理工具。
|
||||||
<br>
|
<br>
|
||||||
特别感谢 <a href="https://github.com/TerminalStudio/dartssh2">dartssh2</a> & <a href="https://github.com/TerminalStudio/xterm.dart">xterm.dart</a>。
|
特别感谢 <a href="https://github.com/TerminalStudio/dartssh2">dartssh2</a> & <a href="https://github.com/TerminalStudio/xterm.dart">xterm.dart</a>。
|
||||||
</p>
|
</p>
|
||||||
@@ -29,10 +29,10 @@
|
|||||||
## 📥 安装
|
## 📥 安装
|
||||||
|
|
||||||
平台 | 下载
|
平台 | 下载
|
||||||
--- | ---
|
----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
iOS / macOS | [AppStore](https://apps.apple.com/app/id1586449703)
|
iOS / macOS | [AppStore](https://apps.apple.com/app/id1586449703)
|
||||||
Android | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lolli.tech/serverbox/?sort=time&order=desc&layout=grid) / [F-Droid](https://f-droid.org/packages/tech.lolli.toolbox) / [OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/)
|
Android | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid) / [F-Droid](https://f-droid.org/packages/tech.lolli.toolbox) / [OpenAPK](https://www.openapk.net/serverbox/tech.lolli.toolbox/)
|
||||||
Linux / Windows | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lolli.tech/serverbox/?sort=time&order=desc&layout=grid)
|
Linux / Windows | [GitHub](https://github.com/lollipopkit/flutter_server_box/releases) / [CDN](https://cdn.lpkt.cn/serverbox/pkg/?sort=time&order=desc&layout=grid)
|
||||||
|
|
||||||
请从 **信任** 的来源下载!
|
请从 **信任** 的来源下载!
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ Linux / Windows | [GitHub](https://github.com/lollipopkit/flutter_server_box/rel
|
|||||||
3. 运行 `dart run fl_build -p PLATFORM` 构建应用
|
3. 运行 `dart run fl_build -p PLATFORM` 构建应用
|
||||||
|
|
||||||
### 翻译
|
### 翻译
|
||||||
[指南](https://blog.lolli.tech/faq/) 可在我的博客中找到。
|
[指南](https://blog.lpkt.cn/faq/) 可在我的博客中找到。
|
||||||
|
|
||||||
## 💡 我的其它 Apps
|
## 💡 我的其它 Apps
|
||||||
- [GPT Box](https://github.com/lollipopkit/flutter_gpt_box) - 支持 OpenAI API 的 第三方全平台客户端。
|
- [GPT Box](https://github.com/lollipopkit/flutter_gpt_box) - 支持 OpenAI API 的 第三方全平台客户端。
|
||||||
|
|||||||
@@ -124,7 +124,17 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
return CustomAppBar(
|
return CustomAppBar(
|
||||||
title: Hero(
|
title: Hero(
|
||||||
tag: 'home_card_title_${si.spi.id}',
|
tag: 'home_card_title_${si.spi.id}',
|
||||||
child: Text(si.spi.name),
|
transitionOnUserGestures: true,
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Text(
|
||||||
|
si.spi.name,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
color: context.isDark ? Colors.white : Colors.black,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
QrShareBtn(
|
QrShareBtn(
|
||||||
|
|||||||
@@ -316,13 +316,11 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
final cardStatus = _getCardNoti(id);
|
final cardStatus = _getCardNoti(id);
|
||||||
final title = _buildServerCardTitle(srv);
|
final title = _buildServerCardTitle(srv);
|
||||||
|
|
||||||
return ListenableBuilder(
|
return cardStatus.listenVal((_) {
|
||||||
listenable: cardStatus,
|
|
||||||
builder: (_, __) {
|
|
||||||
final List<Widget> children = [title];
|
final List<Widget> children = [title];
|
||||||
if (srv.conn == ServerConn.finished) {
|
if (srv.conn == ServerConn.finished) {
|
||||||
if (cardStatus.value.flip) {
|
if (cardStatus.value.flip) {
|
||||||
children.addAll(_buildFlippedCard(srv));
|
children.add(_buildFlippedCard(srv));
|
||||||
} else {
|
} else {
|
||||||
children.addAll(_buildNormalCard(srv.status, srv.spi));
|
children.addAll(_buildNormalCard(srv.status, srv.spi));
|
||||||
}
|
}
|
||||||
@@ -342,18 +340,17 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
maxHeight: height != _kCardHeightMin ? height : null,
|
maxHeight: height != _kCardHeightMin ? height : null,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: children,
|
children: children,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _buildFlippedCard(Server srv) {
|
Widget _buildFlippedCard(Server srv) {
|
||||||
const textStyle = TextStyle(color: Colors.grey);
|
const color = Colors.grey;
|
||||||
|
const textStyle = TextStyle(fontSize: 13, color: color);
|
||||||
final children = [
|
final children = [
|
||||||
Btn.column(
|
Btn.column(
|
||||||
onTap: () => _askFor(
|
onTap: () => _askFor(
|
||||||
@@ -374,7 +371,7 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
typ: l10n.suspend,
|
typ: l10n.suspend,
|
||||||
name: srv.spi.name,
|
name: srv.spi.name,
|
||||||
),
|
),
|
||||||
icon: const Icon(Icons.stop, color: Colors.grey),
|
icon: const Icon(Icons.stop, color: color),
|
||||||
text: l10n.suspend,
|
text: l10n.suspend,
|
||||||
textStyle: textStyle,
|
textStyle: textStyle,
|
||||||
),
|
),
|
||||||
@@ -388,7 +385,7 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
typ: l10n.shutdown,
|
typ: l10n.shutdown,
|
||||||
name: srv.spi.name,
|
name: srv.spi.name,
|
||||||
),
|
),
|
||||||
icon: const Icon(Icons.power_off, color: Colors.grey),
|
icon: const Icon(Icons.power_off, color: color),
|
||||||
text: l10n.shutdown,
|
text: l10n.shutdown,
|
||||||
textStyle: textStyle,
|
textStyle: textStyle,
|
||||||
),
|
),
|
||||||
@@ -402,29 +399,29 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
typ: l10n.reboot,
|
typ: l10n.reboot,
|
||||||
name: srv.spi.name,
|
name: srv.spi.name,
|
||||||
),
|
),
|
||||||
icon: const Icon(Icons.restart_alt, color: Colors.grey),
|
icon: const Icon(Icons.restart_alt, color: color),
|
||||||
text: l10n.reboot,
|
text: l10n.reboot,
|
||||||
textStyle: textStyle,
|
textStyle: textStyle,
|
||||||
),
|
),
|
||||||
Btn.column(
|
Btn.column(
|
||||||
onTap: () => ServerEditPage.route.go(context, args: srv.spi),
|
onTap: () => ServerEditPage.route.go(context, args: srv.spi),
|
||||||
icon: const Icon(Icons.edit, color: Colors.grey),
|
icon: const Icon(Icons.edit, color: color),
|
||||||
text: libL10n.edit,
|
text: libL10n.edit,
|
||||||
textStyle: textStyle,
|
textStyle: textStyle,
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|
||||||
final width = (_media.size.width - _cardPad) / children.length;
|
final width = (_media.size.width - _cardPad) / children.length;
|
||||||
return [
|
return Padding(
|
||||||
UIs.height13,
|
padding: const EdgeInsets.only(top: 9),
|
||||||
Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: children.map((e) {
|
children: children.map((e) {
|
||||||
if (width == 0) return e;
|
if (width == 0) return e;
|
||||||
return SizedBox(width: width, child: e);
|
return SizedBox(width: width, child: e);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
),
|
),
|
||||||
];
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _buildNormalCard(ServerStatus ss, Spi spi) {
|
List<Widget> _buildNormalCard(ServerStatus ss, Spi spi) {
|
||||||
@@ -463,14 +460,20 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
constraints: BoxConstraints(maxWidth: _media.size.width / 2.3),
|
constraints: BoxConstraints(maxWidth: _media.size.width / 2.3),
|
||||||
child: Hero(
|
child: Hero(
|
||||||
tag: 'home_card_title_${s.spi.id}',
|
tag: 'home_card_title_${s.spi.id}',
|
||||||
|
transitionOnUserGestures: true,
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
child: Text(
|
child: Text(
|
||||||
s.spi.name,
|
s.spi.name,
|
||||||
style: UIs.text13Bold,
|
style: UIs.text13Bold.copyWith(
|
||||||
|
color: context.isDark ? Colors.white : Colors.black,
|
||||||
|
),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const Icon(
|
const Icon(
|
||||||
Icons.keyboard_arrow_right,
|
Icons.keyboard_arrow_right,
|
||||||
size: 17,
|
size: 17,
|
||||||
|
|||||||
Reference in New Issue
Block a user