rm: linux dist logos

This commit is contained in:
lollipopkit
2023-06-05 16:50:22 +08:00
parent d2cdbe4774
commit 378baf589a
17 changed files with 119 additions and 124 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

View File

@@ -10,10 +10,6 @@ enum Dist {
arch, arch,
alpine, alpine,
rocky; rocky;
String get iconPath {
return 'assets/linux/$name.png';
}
} }
extension StringX on String { extension StringX on String {

View File

@@ -14,6 +14,7 @@ class VirtualKeyboard extends TerminalInputHandler with ChangeNotifier {
notifyListeners(); notifyListeners();
} }
} }
bool _alt = false; bool _alt = false;
bool get alt => _alt; bool get alt => _alt;
set alt(bool value) { set alt(bool value) {

View File

@@ -4,7 +4,6 @@ import 'package:provider/provider.dart';
import 'package:toolbox/core/extension/order.dart'; import 'package:toolbox/core/extension/order.dart';
import 'package:toolbox/data/model/server/cpu.dart'; import 'package:toolbox/data/model/server/cpu.dart';
import 'package:toolbox/data/model/server/disk.dart'; import 'package:toolbox/data/model/server/disk.dart';
import 'package:toolbox/data/model/server/dist.dart';
import 'package:toolbox/data/model/server/memory.dart'; import 'package:toolbox/data/model/server/memory.dart';
import 'package:toolbox/data/model/server/temp.dart'; import 'package:toolbox/data/model/server/temp.dart';
@@ -77,7 +76,6 @@ class _ServerDetailPageState extends State<ServerDetailPage>
_cardsOrder.move(oldIndex, newIndex, _setting.detailCardOrder); _cardsOrder.move(oldIndex, newIndex, _setting.detailCardOrder);
}); });
}, },
header: _buildLinuxIcon(si.status.sysVer),
footer: height13, footer: height13,
children: _buildMainList(si.status), children: _buildMainList(si.status),
), ),
@@ -102,23 +100,6 @@ class _ServerDetailPageState extends State<ServerDetailPage>
.toList(); .toList();
} }
Widget _buildLinuxIcon(String sysVer) {
if (!_setting.showDistLogo.fetch()!) return placeholder;
final iconPath = sysVer.dist?.iconPath;
if (iconPath == null) return placeholder;
return ConstrainedBox(
constraints: BoxConstraints(
maxHeight: _media.size.height * 0.13,
maxWidth: _media.size.width * 0.6,
),
child: Image.asset(
iconPath,
fit: BoxFit.contain,
semanticLabel: _s.showDistLogo,
),
);
}
Widget _buildCPUView(Cpus cs) { Widget _buildCPUView(Cpus cs) {
return RoundRectCard( return RoundRectCard(
Padding( Padding(

View File

@@ -305,23 +305,26 @@ class _SettingPageState extends State<SettingPage> {
onTap: () { onTap: () {
startPageKey.currentState?.showButtonMenu(); startPageKey.currentState?.showButtonMenu();
}, },
trailing: ValueBuilder(listenable: _launchPageIdx, build: () => PopupMenuButton( trailing: ValueBuilder(
key: startPageKey, listenable: _launchPageIdx,
itemBuilder: (BuildContext context) => items, build: () => PopupMenuButton(
initialValue: _launchPageIdx.value, key: startPageKey,
onSelected: (int idx) { itemBuilder: (BuildContext context) => items,
_launchPageIdx.value = idx; initialValue: _launchPageIdx.value,
_setting.launchPage.put(_launchPageIdx.value); onSelected: (int idx) {
}, _launchPageIdx.value = idx;
child: ConstrainedBox( _setting.launchPage.put(_launchPageIdx.value);
constraints: BoxConstraints(maxWidth: _media.size.width * 0.35), },
child: Text( child: ConstrainedBox(
tabTitleName(context, AppTab.values[_launchPageIdx.value]), constraints:
textAlign: TextAlign.right, BoxConstraints(maxWidth: _media.size.width * 0.35),
style: textSize15, child: Text(
), tabTitleName(context, AppTab.values[_launchPageIdx.value]),
), textAlign: TextAlign.right,
)), style: textSize15,
),
),
)),
); );
} }
@@ -346,19 +349,22 @@ class _SettingPageState extends State<SettingPage> {
onTap: () { onTap: () {
maxRetryKey.currentState?.showButtonMenu(); maxRetryKey.currentState?.showButtonMenu();
}, },
trailing: ValueBuilder(build: () => PopupMenuButton( trailing: ValueBuilder(
key: maxRetryKey, build: () => PopupMenuButton(
itemBuilder: (BuildContext context) => items, key: maxRetryKey,
initialValue: _maxRetryCount.value, itemBuilder: (BuildContext context) => items,
onSelected: (int val) { initialValue: _maxRetryCount.value,
_maxRetryCount.value = val; onSelected: (int val) {
_setting.maxRetryCount.put(_maxRetryCount.value); _maxRetryCount.value = val;
}, _setting.maxRetryCount.put(_maxRetryCount.value);
child: Text( },
'${_maxRetryCount.value} ${_s.times}', child: Text(
style: textSize15, '${_maxRetryCount.value} ${_s.times}',
style: textSize15,
),
), ),
), listenable: _maxRetryCount,), listenable: _maxRetryCount,
),
); );
} }
@@ -382,19 +388,22 @@ class _SettingPageState extends State<SettingPage> {
onTap: () { onTap: () {
themeKey.currentState?.showButtonMenu(); themeKey.currentState?.showButtonMenu();
}, },
trailing: ValueBuilder(listenable: _nightMode, build: () => PopupMenuButton( trailing: ValueBuilder(
key: themeKey, listenable: _nightMode,
itemBuilder: (BuildContext context) => items, build: () => PopupMenuButton(
initialValue: _nightMode.value, key: themeKey,
onSelected: (int idx) { itemBuilder: (BuildContext context) => items,
_nightMode.value = idx; initialValue: _nightMode.value,
_setting.themeMode.put(_nightMode.value); onSelected: (int idx) {
}, _nightMode.value = idx;
child: Text( _setting.themeMode.put(_nightMode.value);
_buildThemeModeStr(_nightMode.value), },
style: textSize15, child: Text(
_buildThemeModeStr(_nightMode.value),
style: textSize15,
),
), ),
),), ),
); );
} }
@@ -516,40 +525,44 @@ class _SettingPageState extends State<SettingPage> {
} }
Widget _buildTermFontSize() { Widget _buildTermFontSize() {
return ValueBuilder(listenable: _fontSize, build: () => ListTile( return ValueBuilder(
title: Text(_s.fontSize), listenable: _fontSize,
trailing: Text( build: () => ListTile(
_fontSize.value.toString(), title: Text(_s.fontSize),
style: textSize15, trailing: Text(
), _fontSize.value.toString(),
onTap: () { style: textSize15,
final ctrller = TextEditingController(text: _fontSize.value.toString()); ),
showRoundDialog( onTap: () {
context: context, final ctrller =
title: Text(_s.fontSize), TextEditingController(text: _fontSize.value.toString());
child: Input( showRoundDialog(
controller: ctrller, context: context,
type: TextInputType.number, title: Text(_s.fontSize),
icon: Icons.font_download, child: Input(
), controller: ctrller,
actions: [ type: TextInputType.number,
TextButton( icon: Icons.font_download,
onPressed: () {
context.pop();
final fontSize = double.tryParse(ctrller.text);
if (fontSize == null) {
showRoundDialog(context: context, child: Text(_s.failed));
return;
}
_fontSize.value = fontSize;
_setting.termFontSize.put(_fontSize.value);
},
child: Text(_s.ok),
), ),
], actions: [
); TextButton(
}, onPressed: () {
),); context.pop();
final fontSize = double.tryParse(ctrller.text);
if (fontSize == null) {
showRoundDialog(context: context, child: Text(_s.failed));
return;
}
_fontSize.value = fontSize;
_setting.termFontSize.put(_fontSize.value);
},
child: Text(_s.ok),
),
],
);
},
),
);
} }
Widget _buildDiskIgnorePath() { Widget _buildDiskIgnorePath() {
@@ -602,20 +615,22 @@ class _SettingPageState extends State<SettingPage> {
onTap: () { onTap: () {
localeKey.currentState?.showButtonMenu(); localeKey.currentState?.showButtonMenu();
}, },
trailing: ValueBuilder(listenable: _localeCode, build: () => PopupMenuButton( trailing: ValueBuilder(
key: localeKey, listenable: _localeCode,
itemBuilder: (BuildContext context) => items, build: () => PopupMenuButton(
initialValue: _localeCode.value, key: localeKey,
onSelected: (String idx) { itemBuilder: (BuildContext context) => items,
_localeCode.value = idx; initialValue: _localeCode.value,
_setting.locale.put(idx); onSelected: (String idx) {
_showRestartSnackbar(); _localeCode.value = idx;
}, _setting.locale.put(idx);
child: Text( _showRestartSnackbar();
_s.languageName, },
style: textSize15, child: Text(
), _s.languageName,
)), style: textSize15,
),
)),
); );
} }
@@ -638,19 +653,22 @@ class _SettingPageState extends State<SettingPage> {
).toList(); ).toList();
return ListTile( return ListTile(
title: Text("${_s.editor} ${_s.theme}"), title: Text("${_s.editor} ${_s.theme}"),
trailing: ValueBuilder(listenable: _editorTheme, build: () => PopupMenuButton( trailing: ValueBuilder(
key: editorThemeKey, listenable: _editorTheme,
itemBuilder: (BuildContext context) => items, build: () => PopupMenuButton(
initialValue: _editorTheme.value, key: editorThemeKey,
onSelected: (String idx) { itemBuilder: (BuildContext context) => items,
_editorTheme.value = idx; initialValue: _editorTheme.value,
_setting.editorTheme.put(idx); onSelected: (String idx) {
}, _editorTheme.value = idx;
child: Text( _setting.editorTheme.put(idx);
_editorTheme.value, },
style: textSize15, child: Text(
_editorTheme.value,
style: textSize15,
),
), ),
),), ),
onTap: () { onTap: () {
editorThemeKey.currentState?.showButtonMenu(); editorThemeKey.currentState?.showButtonMenu();
}, },

View File

@@ -95,7 +95,6 @@ flutter:
# To add assets to your application, add an assets section, like this: # To add assets to your application, add an assets section, like this:
assets: assets:
- assets/app_icon.png - assets/app_icon.png
- assets/linux/
# - images/a_dot_burr.jpeg # - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg # - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see # An image asset can refer to one or more resolution-specific "variants", see