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,
alpine,
rocky;
String get iconPath {
return 'assets/linux/$name.png';
}
}
extension StringX on String {

View File

@@ -14,6 +14,7 @@ class VirtualKeyboard extends TerminalInputHandler with ChangeNotifier {
notifyListeners();
}
}
bool _alt = false;
bool get alt => _alt;
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/data/model/server/cpu.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/temp.dart';
@@ -77,7 +76,6 @@ class _ServerDetailPageState extends State<ServerDetailPage>
_cardsOrder.move(oldIndex, newIndex, _setting.detailCardOrder);
});
},
header: _buildLinuxIcon(si.status.sysVer),
footer: height13,
children: _buildMainList(si.status),
),
@@ -102,23 +100,6 @@ class _ServerDetailPageState extends State<ServerDetailPage>
.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) {
return RoundRectCard(
Padding(

View File

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

View File

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