feat: SSH page background (#775)
This commit is contained in:
@@ -37,10 +37,7 @@ const _kIconSize = 23.0;
|
||||
class SettingsPage extends StatefulWidget {
|
||||
const SettingsPage({super.key});
|
||||
|
||||
static const route = AppRouteNoArg(
|
||||
page: SettingsPage.new,
|
||||
path: '/settings',
|
||||
);
|
||||
static const route = AppRouteNoArg(page: SettingsPage.new, path: '/settings');
|
||||
|
||||
@override
|
||||
State<SettingsPage> createState() => _SettingsPageState();
|
||||
@@ -70,19 +67,15 @@ class _SettingsPageState extends State<SettingsPage> with SingleTickerProviderSt
|
||||
actions: [
|
||||
Btn.text(
|
||||
text: 'Logs',
|
||||
onTap: () => DebugPage.route.go(
|
||||
context,
|
||||
args: const DebugPageArgs(title: 'Logs(${BuildData.build})'),
|
||||
),
|
||||
onTap: () =>
|
||||
DebugPage.route.go(context, args: const DebugPageArgs(title: 'Logs(${BuildData.build})')),
|
||||
),
|
||||
Btn.icon(
|
||||
icon: const Icon(Icons.delete),
|
||||
onTap: () => context.showRoundDialog(
|
||||
title: libL10n.attention,
|
||||
child: SimpleMarkdown(
|
||||
data: libL10n.askContinue(
|
||||
'${libL10n.delete} **${libL10n.all}** ${libL10n.setting}',
|
||||
),
|
||||
data: libL10n.askContinue('${libL10n.delete} **${libL10n.all}** ${libL10n.setting}'),
|
||||
),
|
||||
actions: [
|
||||
CountDownBtn(
|
||||
@@ -93,7 +86,7 @@ class _SettingsPageState extends State<SettingsPage> with SingleTickerProviderSt
|
||||
context.showSnackBar(libL10n.success);
|
||||
},
|
||||
afterColor: Colors.red,
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -114,6 +107,13 @@ final class AppSettingsPage extends StatefulWidget {
|
||||
final class _AppSettingsPageState extends State<AppSettingsPage> {
|
||||
final _setting = Stores.setting;
|
||||
|
||||
late final _sshOpacityCtrl = TextEditingController(text: _setting.sshBgOpacity.fetch().toString());
|
||||
late final _sshBlurCtrl = TextEditingController(text: _setting.sshBlurRadius.fetch().toString());
|
||||
late final _textScalerCtrl = TextEditingController(text: _setting.textFactor.toString());
|
||||
|
||||
late final _editorTextSizeCtrl = TextEditingController(text: _setting.editorFontSize.get().toString());
|
||||
late final _serverLogoCtrl = TextEditingController(text: _setting.serverLogoUrl.fetch());
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MultiList(
|
||||
@@ -121,12 +121,7 @@ final class _AppSettingsPageState extends State<AppSettingsPage> {
|
||||
[const CenterGreyTitle('App'), _buildApp()],
|
||||
[CenterGreyTitle(l10n.server), _buildServer()],
|
||||
[const CenterGreyTitle('SSH'), _buildSSH(), const CenterGreyTitle('SFTP'), _buildSFTP()],
|
||||
[
|
||||
CenterGreyTitle(l10n.container),
|
||||
_buildContainer(),
|
||||
CenterGreyTitle(l10n.editor),
|
||||
_buildEditor(),
|
||||
],
|
||||
[CenterGreyTitle(l10n.container), _buildContainer(), CenterGreyTitle(l10n.editor), _buildEditor()],
|
||||
|
||||
/// Fullscreen Mode is designed for old mobile phone which can be
|
||||
/// used as a status screen.
|
||||
@@ -140,22 +135,21 @@ enum SettingsTabs {
|
||||
app,
|
||||
privateKey,
|
||||
backup,
|
||||
about,
|
||||
;
|
||||
about;
|
||||
|
||||
String get i18n => switch (this) {
|
||||
SettingsTabs.app => libL10n.app,
|
||||
SettingsTabs.privateKey => l10n.privateKey,
|
||||
SettingsTabs.backup => libL10n.backup,
|
||||
SettingsTabs.about => libL10n.about,
|
||||
};
|
||||
SettingsTabs.app => libL10n.app,
|
||||
SettingsTabs.privateKey => l10n.privateKey,
|
||||
SettingsTabs.backup => libL10n.backup,
|
||||
SettingsTabs.about => libL10n.about,
|
||||
};
|
||||
|
||||
Widget get page => switch (this) {
|
||||
SettingsTabs.app => const AppSettingsPage(),
|
||||
SettingsTabs.privateKey => const PrivateKeysListPage(),
|
||||
SettingsTabs.backup => const BackupPage(),
|
||||
SettingsTabs.about => const _AppAboutPage(),
|
||||
};
|
||||
SettingsTabs.app => const AppSettingsPage(),
|
||||
SettingsTabs.privateKey => const PrivateKeysListPage(),
|
||||
SettingsTabs.backup => const BackupPage(),
|
||||
SettingsTabs.about => const _AppAboutPage(),
|
||||
};
|
||||
|
||||
static final List<Widget> pages = SettingsTabs.values.map((e) => e.page).toList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user