mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
14
README.md
14
README.md
@@ -30,16 +30,20 @@ Especially thanks to <a href="https://github.com/TerminalStudio/dartssh2">dartss
|
|||||||
## ⬇️ Download
|
## ⬇️ Download
|
||||||
Platform | Support | Sign
|
Platform | Support | Sign
|
||||||
--- | --- | ---
|
--- | --- | ---
|
||||||
[iOS](https://apps.apple.com/app/id1586449703) / [Android](https://res.lolli.tech/serverbox/latest.apk) / [macOS](https://apps.apple.com/app/id1586449703) | Full | Signed with my own certificate
|
[iOS](https://apps.apple.com/app/id1586449703) / [Android](https://res.lolli.tech/serverbox/latest.apk) / [macOS](https://apps.apple.com/app/id1586449703) | Full | My own certificate
|
||||||
[Linux](https://res.lolli.tech/serverbox/latest.AppImage) / [Windows](https://res.lolli.tech/serverbox/latest.7z) | Not tested | Signed with flutter default certificate. It's advised to build your own version.
|
[Linux](https://res.lolli.tech/serverbox/latest.AppImage) / [Windows](https://res.lolli.tech/serverbox/latest.7z) | Not tested | Flutter default certificate
|
||||||
|
|
||||||
Due to Chinese government policy and the [BEIAN](https://github.com/lollipopkit/flutter_server_box/discussions/180) issue. iOS app is now free. Please download it from other regions of AppStore.
|
- Due to Chinese government policy and the [BEIAN](https://github.com/lollipopkit/flutter_server_box/discussions/180) issue. iOS app is now free. Please download it from other regions of AppStore.
|
||||||
|
- Security:
|
||||||
|
- To prevent injection attacks and etc., please don't download from untrusted sources.
|
||||||
|
- Since `Linux / Windows` is signed with flutter default certificate, it is recommended to **build it yourself**.
|
||||||
|
|
||||||
|
|
||||||
## 🆘 Help
|
## 🆘 Help
|
||||||
- In order to push server status to your portable device without opening ServerBox app (Such as **message push** and **home widget**), you need to install [ServerBoxMonitor](https://github.com/lollipopkit/server_box_monitor) on your servers, and config it correctly. See [wiki](https://github.com/lollipopkit/server_box_monitor/wiki) for more details.
|
- In order to push server status to your portable device without opening ServerBox app (Such as **message push** and **home widget**), you need to install [ServerBoxMonitor](https://github.com/lollipopkit/server_box_monitor) on your servers, and config it correctly. See [wiki](https://github.com/lollipopkit/server_box_monitor/wiki) for more details.
|
||||||
- If you have any question or feature request, please open a [discussion](https://github.com/lollipopkit/flutter_server_box/discussions/new/choose).
|
- **Common issues** can be found in [app wiki](https://github.com/lollipopkit/flutter_server_box/wiki).
|
||||||
- If ServerBox app has any bug, please open an [issue](https://github.com/lollipopkit/flutter_server_box/issues/new).
|
- If you have **any question or feature request**, please open a [discussion](https://github.com/lollipopkit/flutter_server_box/discussions/new/choose).
|
||||||
|
- If ServerBox app has **any bug**, please open an [issue](https://github.com/lollipopkit/flutter_server_box/issues/new).
|
||||||
|
|
||||||
|
|
||||||
## 🏙️ ScreenShots
|
## 🏙️ ScreenShots
|
||||||
|
|||||||
18
README_zh.md
18
README_zh.md
@@ -24,22 +24,26 @@
|
|||||||
- [x] `SSH` 终端, `SFTP`, `Docker & 包 & 进程` 管理器, 状态图表, 代码编辑器...
|
- [x] `SSH` 终端, `SFTP`, `Docker & 包 & 进程` 管理器, 状态图表, 代码编辑器...
|
||||||
- [x] 特殊支持:`生物认证`、`推送`、`桌面小部件`、`watchOS App`、`跟随系统颜色`...
|
- [x] 特殊支持:`生物认证`、`推送`、`桌面小部件`、`watchOS App`、`跟随系统颜色`...
|
||||||
- [x] 本地化 ( English, 简体中文, Deutsch, 繁體中文, Indonesian。 [如何贡献?](#l10n))
|
- [x] 本地化 ( English, 简体中文, Deutsch, 繁體中文, Indonesian。 [如何贡献?](#l10n))
|
||||||
- [x] 支持平台:`iOS / Android / macOS / Windows / Linux`
|
- [x] 全平台支持(除 `Web`)
|
||||||
|
|
||||||
|
|
||||||
## ⬇️ 下载
|
## ⬇️ 下载
|
||||||
平台 | 支持 | 签名
|
平台 | 支持 | 签名
|
||||||
--- | --- | ---
|
:-: | :-: | :-:
|
||||||
[iOS](https://apps.apple.com/app/id1586449703) / [Android](https://res.lolli.tech/serverbox/latest.apk) / [macOS](https://apps.apple.com/app/id1586449703) | 完整 | 个人可信签名
|
[iOS](https://apps.apple.com/app/id1586449703) / [Android](https://res.lolli.tech/serverbox/latest.apk) / [macOS](https://apps.apple.com/app/id1586449703) | 完整 | 个人可信签名
|
||||||
[Linux](https://res.lolli.tech/serverbox/latest.AppImage) / [Windows](https://res.lolli.tech/serverbox/latest.7z) | 未测试 | 使用 Flutter 默认签名。建议自行构建。
|
[Linux](https://res.lolli.tech/serverbox/latest.AppImage) / [Windows](https://res.lolli.tech/serverbox/latest.7z) | 未测试 | Flutter 默认签名
|
||||||
|
|
||||||
由于中国政策原因,且无法完成[备案](https://github.com/lollipopkit/flutter_server_box/discussions/180)。iOS 端现已转为免费,请移步 AppStore 其他区下载。
|
- 由于中国政策原因,且**目前**无法完成[备案](https://github.com/lollipopkit/flutter_server_box/discussions/180)。iOS 端现已转为免费,请移步 AppStore 其他区下载。
|
||||||
|
- 关于安全:
|
||||||
|
- 为了防止注入攻击等因素,请勿从不可信来源下载。
|
||||||
|
- 由于 `Linux / Windows` 使用了默认签名,因此建议**自行构建**。
|
||||||
|
|
||||||
|
|
||||||
## 🆘 帮助
|
## 🆘 帮助
|
||||||
- 为了可以在不使用 ServerBox app 时获取服务器状态(例如:桌面小部件、推送服务),你需要在你的服务器上安装 [ServerBoxMonitor](https://github.com/lollipopkit/server_box_monitor),并且正确配置,详情可见 [wiki](https://github.com/lollipopkit/server_box_monitor/wiki/%E4%B8%BB%E9%A1%B5)。
|
- 为了可以在不使用 ServerBox app 时获取服务器状态(例如:桌面小部件、推送服务),你需要在你的服务器上安装 [ServerBoxMonitor](https://github.com/lollipopkit/server_box_monitor),并且正确配置,详情可见 [wiki](https://github.com/lollipopkit/server_box_monitor/wiki/%E4%B8%BB%E9%A1%B5)。
|
||||||
- 如果你有任何问题或者功能请求,请在 [讨论](https://github.com/lollipopkit/flutter_server_box/discussions/new/choose) 中交流。
|
- **常见问题**可以在 [app wiki](https://github.com/lollipopkit/flutter_server_box/wiki/主页) 查看。
|
||||||
- 如果 ServerBox app 有任何 bug,请在 [问题](https://github.com/lollipopkit/flutter_server_box/issues/new) 中反馈。
|
- 如果你有**任何问题或者功能请求**,请在 [讨论](https://github.com/lollipopkit/flutter_server_box/discussions/new/choose) 中交流。
|
||||||
|
- 如果 ServerBox app 有**任何 bug**,请在 [问题](https://github.com/lollipopkit/flutter_server_box/issues/new) 中反馈。
|
||||||
|
|
||||||
|
|
||||||
## 🏙️ 截屏
|
## 🏙️ 截屏
|
||||||
@@ -84,5 +88,5 @@
|
|||||||
6. 在我的项目中发起 Pull Request
|
6. 在我的项目中发起 Pull Request
|
||||||
|
|
||||||
|
|
||||||
## 📝 开源协议
|
## 📝 协议
|
||||||
`GPL v3 lollipopkit 2023`
|
`GPL v3 lollipopkit 2023`
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
import WidgetKit
|
import WidgetKit
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
import Intents
|
import Intents
|
||||||
|
import AppIntents
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
let demoStatus = Status(name: "Server", cpu: "31.7%", mem: "1.3g / 1.9g", disk: "7.1g / 30.0g", net: "712.3k / 1.2m")
|
let demoStatus = Status(name: "Server", cpu: "31.7%", mem: "1.3g / 1.9g", disk: "7.1g / 30.0g", net: "712.3k / 1.2m")
|
||||||
@@ -95,8 +96,21 @@ struct StatusWidgetEntryView : View {
|
|||||||
Text("\(data.name) \(data.cpu)").widgetBackground()
|
Text("\(data.name) \(data.cpu)").widgetBackground()
|
||||||
default:
|
default:
|
||||||
VStack(alignment: .leading, spacing: 3.7) {
|
VStack(alignment: .leading, spacing: 3.7) {
|
||||||
|
if #available(iOS 17.0, *) {
|
||||||
|
HStack {
|
||||||
Text(data.name).font(.system(.title3, design: .monospaced))
|
Text(data.name).font(.system(.title3, design: .monospaced))
|
||||||
Spacer()
|
Spacer()
|
||||||
|
Button(intent: RefreshIntent()) {
|
||||||
|
Image(systemName: "arrow.clockwise")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 10, height: 12.7)
|
||||||
|
}
|
||||||
|
tint(.gray)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Text(data.name).font(.system(.title3, design: .monospaced))
|
||||||
|
}
|
||||||
|
Spacer()
|
||||||
DetailItem(icon: "cpu", text: data.cpu, color: sumColor)
|
DetailItem(icon: "cpu", text: data.cpu, color: sumColor)
|
||||||
DetailItem(icon: "memorychip", text: data.mem, color: sumColor)
|
DetailItem(icon: "memorychip", text: data.mem, color: sumColor)
|
||||||
DetailItem(icon: "externaldrive", text: data.disk, color: sumColor)
|
DetailItem(icon: "externaldrive", text: data.disk, color: sumColor)
|
||||||
@@ -147,16 +161,20 @@ struct StatusWidget: Widget {
|
|||||||
let kind: String = "StatusWidget"
|
let kind: String = "StatusWidget"
|
||||||
|
|
||||||
var body: some WidgetConfiguration {
|
var body: some WidgetConfiguration {
|
||||||
let cfg = IntentConfiguration(kind: kind, intent: ConfigurationIntent.self, provider: Provider()) { entry in
|
if #available(iOSApplicationExtension 16.0, *) {
|
||||||
|
IntentConfiguration(kind: kind, intent: ConfigurationIntent.self, provider: Provider()) { entry in
|
||||||
StatusWidgetEntryView(entry: entry)
|
StatusWidgetEntryView(entry: entry)
|
||||||
}
|
}
|
||||||
.configurationDisplayName("Status")
|
.configurationDisplayName("Status")
|
||||||
.description("Status of your servers.")
|
.description("Status of your servers.")
|
||||||
|
.supportedFamilies([.systemSmall, .accessoryRectangular, .accessoryInline])
|
||||||
if #available(iOSApplicationExtension 16.0, *) {
|
|
||||||
return cfg.supportedFamilies([.systemSmall, .accessoryRectangular, .accessoryInline])
|
|
||||||
} else {
|
} else {
|
||||||
return cfg.supportedFamilies([.systemSmall])
|
IntentConfiguration(kind: kind, intent: ConfigurationIntent.self, provider: Provider()) { entry in
|
||||||
|
StatusWidgetEntryView(entry: entry)
|
||||||
|
}
|
||||||
|
.configurationDisplayName("Status")
|
||||||
|
.description("Status of your servers.")
|
||||||
|
.supportedFamilies([.systemSmall])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -236,21 +254,6 @@ struct DetailItem: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct DetailItemSmall: View {
|
|
||||||
let icon: String
|
|
||||||
let text: String
|
|
||||||
let color: Color
|
|
||||||
|
|
||||||
var body: some View {
|
|
||||||
HStack(spacing: 6.7) {
|
|
||||||
Image(systemName: icon).resizable().foregroundColor(color).frame(width: 11, height: 11, alignment: .center)
|
|
||||||
Text(text)
|
|
||||||
.font(.system(size: 11, design: .monospaced))
|
|
||||||
.foregroundColor(color)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 空心圆,显示百分比
|
// 空心圆,显示百分比
|
||||||
struct CirclePercent: View {
|
struct CirclePercent: View {
|
||||||
// eg: 31.7%
|
// eg: 31.7%
|
||||||
@@ -281,3 +284,14 @@ struct DynamicColor {
|
|||||||
return self.light
|
return self.light
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@available(iOS 16.0, macOS 13.0, watchOS 9.0, tvOS 16.0, *)
|
||||||
|
struct RefreshIntent: AppIntent {
|
||||||
|
static var title: LocalizedStringResource = "Refresh"
|
||||||
|
static var description = IntentDescription("Refresh status.")
|
||||||
|
|
||||||
|
func perform() async throws -> some IntentResult {
|
||||||
|
|
||||||
|
return .result()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ class BuildData {
|
|||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 596;
|
static const int build = 596;
|
||||||
static const String engine = "3.13.7";
|
static const String engine = "3.13.7";
|
||||||
static const String buildAt = "2023-10-14 23:16:48";
|
static const String buildAt = "2023-10-14 23:24:14";
|
||||||
static const int modifications = 4;
|
static const int modifications = 1;
|
||||||
static const int script = 21;
|
static const int script = 21;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user