feat: beta program

This commit is contained in:
lollipopkit
2024-06-06 16:18:10 +08:00
parent 97267cdfbf
commit 701b1b811f
18 changed files with 52 additions and 27 deletions

View File

@@ -2,9 +2,9 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 934;
static const int build = 935;
static const String engine = "3.22.1";
static const String buildAt = "2024-06-05 19:20:48";
static const int modifications = 6;
static const String buildAt = "2024-06-06 16:17:37";
static const int modifications = 18;
static const int script = 48;
}

View File

@@ -276,6 +276,8 @@ class SettingStore extends PersistentStore {
/// fmt: https://example.com/{DIST}-{BRIGHT}.png
late final serverLogoUrl = property('serverLogoUrl', '');
late final betaTest = property('betaTest', false);
// Never show these settings for users
//
// ------BEGIN------

View File

@@ -2,6 +2,7 @@
"@@locale": "de",
"about": "Über",
"aboutThanks": "Vielen Dank an die folgenden Personen, die daran teilgenommen haben.\n",
"acceptBeta": "Akzeptieren Sie Testversion-Updates",
"add": "Neu",
"addAServer": "Server hinzufügen",
"addPrivateKey": "Private key hinzufügen",

View File

@@ -2,6 +2,7 @@
"@@locale": "en",
"about": "About",
"aboutThanks": "Thanks to the following people who participated in.",
"acceptBeta": "Accept test version updates",
"add": "Add",
"addAServer": "add a server",
"addPrivateKey": "Add private key",

View File

@@ -2,6 +2,7 @@
"@@locale": "es",
"about": "Acerca de",
"aboutThanks": "Gracias a los siguientes participantes.",
"acceptBeta": "Aceptar actualizaciones de la versión de prueba",
"add": "Añadir",
"addAServer": "Agregar un servidor",
"addPrivateKey": "Agregar una llave privada",

View File

@@ -2,6 +2,7 @@
"@@locale": "fr",
"about": "À propos",
"aboutThanks": "Merci aux personnes suivantes qui ont participé.",
"acceptBeta": "Accepter les mises à jour de la version de test",
"add": "Ajouter",
"addAServer": "Ajouter un serveur",
"addPrivateKey": "Ajouter une clé privée",

View File

@@ -2,6 +2,7 @@
"@@locale": "id",
"about": "Tentang",
"aboutThanks": "Terima kasih kepada orang -orang berikut yang berpartisipasi.",
"acceptBeta": "Terima pembaruan versi uji coba",
"add": "Menambahkan",
"addAServer": "tambahkan server",
"addPrivateKey": "Tambahkan kunci pribadi",

View File

@@ -2,6 +2,7 @@
"@@locale": "ja",
"about": "約",
"aboutThanks": "以下の参加者に感謝します。",
"acceptBeta": "テストバージョンの更新を受け入れる",
"add": "追加",
"addAServer": "サーバーを追加する",
"addPrivateKey": "プライベートキーを追加",

View File

@@ -2,6 +2,7 @@
"@@locale": "nl",
"about": "Over",
"aboutThanks": "Met dank aan de volgende mensen die hebben deelgenomen aan.",
"acceptBeta": "Accepteer testversie-updates",
"add": "Toevoegen",
"addAServer": "een server toevoegen",
"addPrivateKey": "Privésleutel toevoegen",

View File

@@ -2,6 +2,7 @@
"@@locale": "pt",
"about": "Sobre",
"aboutThanks": "Agradecimentos a todos os participantes.",
"acceptBeta": "Aceitar atualizações da versão de teste",
"add": "Adicionar",
"addAServer": "Adicionar um servidor",
"addPrivateKey": "Adicionar uma chave privada",

View File

@@ -2,6 +2,7 @@
"@@locale": "ru",
"about": "о",
"aboutThanks": "Благодарности всем участникам.",
"acceptBeta": "Принять обновления тестовой версии",
"add": "добавить",
"addAServer": "добавить сервер",
"addPrivateKey": "добавить приватный ключ",

View File

@@ -2,6 +2,7 @@
"@@locale": "zh",
"about": "关于",
"aboutThanks": "感谢以下参与的各位。",
"acceptBeta": "接受测试版更新推送",
"add": "新增",
"addAServer": "添加服务器",
"addPrivateKey": "添加一个私钥",

View File

@@ -2,6 +2,7 @@
"@@locale": "zh_TW",
"about": "關於",
"aboutThanks": "感謝以下參與的各位。",
"acceptBeta": "接受測試版更新推送",
"add": "新增",
"addAServer": "新增服務器",
"addPrivateKey": "新增一個私鑰",

View File

@@ -100,6 +100,8 @@ Future<void> _initData() async {
Pros.snippet.load();
Pros.key.load();
await Pros.app.init();
if (Stores.setting.betaTest.fetch()) AppUpdate.chan = AppUpdateChan.beta;
}
void _setupDebug() {

View File

@@ -1066,6 +1066,7 @@ class _SettingPageState extends State<SettingPage> {
leading: const Icon(MingCute.more_3_fill),
title: Text(l10n.more),
children: [
_buildBeta(),
_buildWakeLock(),
if (isAndroid || isIOS) _buildCollectUsage(),
_buildCollapseUI(),
@@ -1195,4 +1196,12 @@ class _SettingPageState extends State<SettingPage> {
},
);
}
Widget _buildBeta() {
return ListTile(
title: const Text('Beta Program'),
subtitle: Text(l10n.acceptBeta, style: UIs.textGrey),
trailing: StoreSwitch(prop: _setting.betaTest),
);
}
}