Compare commits

...

7 Commits

Author SHA1 Message Date
dependabot[bot]
8f76281fe3
build(deps): bump notify-rust from 4.11.7 to 4.12.0 in /rust (#195)
Bumps [notify-rust](https://github.com/hoodie/notify-rust) from 4.11.7 to 4.12.0.
- [Release notes](https://github.com/hoodie/notify-rust/releases)
- [Changelog](https://github.com/hoodie/notify-rust/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hoodie/notify-rust/compare/v4.11.7...v4.12.0)

---
updated-dependencies:
- dependency-name: notify-rust
  dependency-version: 4.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-02 20:07:06 +08:00
dependabot[bot]
c1fc848c92
build(deps): bump wmi from 0.18.0 to 0.18.1 in /rust (#196)
Bumps [wmi](https://github.com/ohadravid/wmi-rs) from 0.18.0 to 0.18.1.
- [Release notes](https://github.com/ohadravid/wmi-rs/releases)
- [Commits](https://github.com/ohadravid/wmi-rs/compare/v0.18.0...v0.18.1)

---
updated-dependencies:
- dependency-name: wmi
  dependency-version: 0.18.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-02 20:06:59 +08:00
dependabot[bot]
a74f0d62cc
build(deps): bump file_picker from 10.3.8 to 10.3.10 (#197)
Bumps [file_picker](https://github.com/miguelpruivo/flutter_file_picker) from 10.3.8 to 10.3.10.
- [Release notes](https://github.com/miguelpruivo/flutter_file_picker/releases)
- [Changelog](https://github.com/miguelpruivo/flutter_file_picker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/miguelpruivo/flutter_file_picker/compare/v10.3.8...v10.3.10)

---
updated-dependencies:
- dependency-name: file_picker
  dependency-version: 10.3.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-02 20:06:52 +08:00
xkeyC
74021dd8b6 feat: update cache clear ui 2026-02-02 20:06:07 +08:00
xkeyC
4503a0f099 fix: background 2026-02-02 19:11:42 +08:00
xkeyC
b6f0fb41aa bump: deps 2026-02-02 19:10:49 +08:00
xkeyC
43e7154ffc Revert "feat: bump deps"
This reverts commit 6263a0a5e6.
2026-02-02 19:05:34 +08:00
21 changed files with 389 additions and 77 deletions

View File

@ -183,9 +183,6 @@ class AppGlobalModel extends _$AppGlobalModel {
state = state.copyWith(windowsVersion: 10);
await Window.setEffect(effect: WindowEffect.disabled);
}
} else {
state = state.copyWith(windowsVersion: 9);
await Window.setEffect(effect: WindowEffect.disabled);
}
// Show window after acrylic effect is applied
await windowManager.show();
@ -268,8 +265,6 @@ class AppGlobalModel extends _$AppGlobalModel {
Timer? _activityThemeColorTimer;
void checkActivityThemeColor(AppVersionData networkVersionData) {
final isDisableAcrylic = state.windowsVersion <= 11;
if (_activityThemeColorTimer != null) {
_activityThemeColorTimer?.cancel();
_activityThemeColorTimer = null;
@ -293,8 +288,8 @@ class AppGlobalModel extends _$AppGlobalModel {
final colorCfg = networkVersionData.activityColors;
state = state.copyWith(
themeConf: ThemeConf(
backgroundColor: HexColor(colorCfg?.background ?? "#132431").withValues(alpha: isDisableAcrylic ? 1 : .75),
menuColor: HexColor(colorCfg?.menu ?? "#132431").withValues(alpha: isDisableAcrylic ? 1 : .95),
backgroundColor: HexColor(colorCfg?.background ?? "#132431").withValues(alpha: .75),
menuColor: HexColor(colorCfg?.menu ?? "#132431").withValues(alpha: .95),
micaColor: HexColor(colorCfg?.mica ?? "#0A3142"),
),
);
@ -308,8 +303,8 @@ class AppGlobalModel extends _$AppGlobalModel {
dPrint("reset Color ....");
state = state.copyWith(
themeConf: ThemeConf(
backgroundColor: HexColor("#132431").withValues(alpha: isDisableAcrylic ? 1 : .75),
menuColor: HexColor("#132431").withValues(alpha: isDisableAcrylic ? 1 : .95),
backgroundColor: HexColor("#132431").withValues(alpha: .75),
menuColor: HexColor("#132431").withValues(alpha: .95),
micaColor: HexColor("#0A3142"),
),
);

View File

@ -402,6 +402,9 @@ class MessageLookup extends MessageLookupByLibrary {
"Loading images...",
),
"app_common_network_error": m1,
"app_common_recommended": MessageLookupByLibrary.simpleMessage(
"Recommended",
),
"app_common_tip": MessageLookupByLibrary.simpleMessage("Tip"),
"app_common_tip_cancel": MessageLookupByLibrary.simpleMessage("Cancel"),
"app_common_tip_confirm": MessageLookupByLibrary.simpleMessage("Confirm"),
@ -2166,6 +2169,9 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage(
"Hosts Acceleration (Experimental)",
),
"tools_action_info_cleaning": MessageLookupByLibrary.simpleMessage(
"Cleaning...",
),
"tools_action_info_cleanup_complete": MessageLookupByLibrary.simpleMessage(
"Cleanup complete, please complete one installation / game launch operation.",
),
@ -2277,6 +2283,9 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_action_rsi_launcher_log_fix": MessageLookupByLibrary.simpleMessage(
"RSI Launcher Log Fix",
),
"tools_action_start_cleaning": MessageLookupByLibrary.simpleMessage(
"Start Cleaning",
),
"tools_action_switch_graphics_renderer":
MessageLookupByLibrary.simpleMessage("Switch DirectX/Vulkan Renderer"),
"tools_action_switch_graphics_renderer_info": m104,
@ -2407,12 +2416,18 @@ class MessageLookup extends MessageLookupByLibrary {
"Installing patch, this will take some time depending on your computer\'s performance...",
),
"tools_shader_clean_all": MessageLookupByLibrary.simpleMessage("Clean All"),
"tools_shader_clean_all_desc": MessageLookupByLibrary.simpleMessage(
"Clean all version caches (only keep GraphicsSettings). Suitable for graphics anomalies or post-update cleaning.",
),
"tools_shader_clean_dialog_title": MessageLookupByLibrary.simpleMessage(
"Clear Shader Cache",
),
"tools_shader_clean_keep_latest": MessageLookupByLibrary.simpleMessage(
"Keep Latest",
),
"tools_shader_clean_keep_latest_desc": MessageLookupByLibrary.simpleMessage(
"Suitable for use after game updates and completing the first launch. Keep all files in the latest version, clean other old versions (only keep GraphicsSettings).",
),
"tools_unp4k_action_cancel_multi_select":
MessageLookupByLibrary.simpleMessage("Cancel Multi-Select"),
"tools_unp4k_action_deselect_all": MessageLookupByLibrary.simpleMessage(

View File

@ -349,6 +349,7 @@ class MessageLookup extends MessageLookupByLibrary {
"画像を読み込み中...",
),
"app_common_network_error": m1,
"app_common_recommended": MessageLookupByLibrary.simpleMessage("推奨"),
"app_common_tip": MessageLookupByLibrary.simpleMessage("ヒント"),
"app_common_tip_cancel": MessageLookupByLibrary.simpleMessage("キャンセル"),
"app_common_tip_confirm": MessageLookupByLibrary.simpleMessage("確認"),
@ -1844,6 +1845,9 @@ class MessageLookup extends MessageLookupByLibrary {
),
"tools_action_hosts_acceleration_experimental":
MessageLookupByLibrary.simpleMessage("Hosts加速実験的"),
"tools_action_info_cleaning": MessageLookupByLibrary.simpleMessage(
"クリーニング中...",
),
"tools_action_info_cleanup_complete": MessageLookupByLibrary.simpleMessage(
"クリーンアップが完了しました。インストールまたはゲーム起動操作を完了してください。",
),
@ -1945,6 +1949,9 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_action_rsi_launcher_log_fix": MessageLookupByLibrary.simpleMessage(
"RSI Launcher ログ修復",
),
"tools_action_start_cleaning": MessageLookupByLibrary.simpleMessage(
"クリーニング開始",
),
"tools_action_unp4k": MessageLookupByLibrary.simpleMessage("P4Kビューア"),
"tools_action_unp4k_info": MessageLookupByLibrary.simpleMessage(
"Star Citizen p4kファイルを解凍",
@ -2037,12 +2044,18 @@ class MessageLookup extends MessageLookupByLibrary {
"パッチをインストール中、これはコンピュータのパフォーマンスによって時間がかかります...",
),
"tools_shader_clean_all": MessageLookupByLibrary.simpleMessage("すべてクリア"),
"tools_shader_clean_all_desc": MessageLookupByLibrary.simpleMessage(
"すべてのバージョンのキャッシュをクリアGraphicsSettingsのみ保持。グラフィック異常またはアップデート後のクリーニングに適しています。",
),
"tools_shader_clean_dialog_title": MessageLookupByLibrary.simpleMessage(
"シェーダーキャッシュをクリア",
),
"tools_shader_clean_keep_latest": MessageLookupByLibrary.simpleMessage(
"最新を保持",
),
"tools_shader_clean_keep_latest_desc": MessageLookupByLibrary.simpleMessage(
"ゲームアップデート後と初回起動完了後の使用に適しています。最新バージョンのすべてのファイルを保持し、他の古いバージョンをクリアGraphicsSettingsのみ保持",
),
"tools_unp4k_missing_runtime": MessageLookupByLibrary.simpleMessage(
"ランタイムがありません",
),

View File

@ -372,6 +372,9 @@ class MessageLookup extends MessageLookupByLibrary {
"Загрузка изображений...",
),
"app_common_network_error": m1,
"app_common_recommended": MessageLookupByLibrary.simpleMessage(
"Рекомендуется",
),
"app_common_tip": MessageLookupByLibrary.simpleMessage("Подсказка"),
"app_common_tip_cancel": MessageLookupByLibrary.simpleMessage("Отмена"),
"app_common_tip_confirm": MessageLookupByLibrary.simpleMessage(
@ -2078,6 +2081,9 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage(
"Ускорение через Hosts (экспериментально)",
),
"tools_action_info_cleaning": MessageLookupByLibrary.simpleMessage(
"Очистка...",
),
"tools_action_info_cleanup_complete": MessageLookupByLibrary.simpleMessage(
"Очистка завершена, пожалуйста, выполните установку или запуск игры.",
),
@ -2190,6 +2196,9 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_action_rsi_launcher_log_fix": MessageLookupByLibrary.simpleMessage(
"Исправление лог-файла RSI Launcher",
),
"tools_action_start_cleaning": MessageLookupByLibrary.simpleMessage(
"Начать очистку",
),
"tools_action_unp4k": MessageLookupByLibrary.simpleMessage(
"Просмотрщик P4K",
),
@ -2296,12 +2305,18 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_shader_clean_all": MessageLookupByLibrary.simpleMessage(
"Очистить всё",
),
"tools_shader_clean_all_desc": MessageLookupByLibrary.simpleMessage(
"Очистить кеш всех версий (сохранить только GraphicsSettings). Подходит для графических аномалий или очистки после обновления.",
),
"tools_shader_clean_dialog_title": MessageLookupByLibrary.simpleMessage(
"Очистить кеш шейдеров",
),
"tools_shader_clean_keep_latest": MessageLookupByLibrary.simpleMessage(
"Сохранить последнее",
),
"tools_shader_clean_keep_latest_desc": MessageLookupByLibrary.simpleMessage(
"Подходит для использования после обновления игры и завершения первого запуска. Сохранить все файлы последней версии, очистить другие старые версии (сохранить только GraphicsSettings).",
),
"tools_unp4k_missing_runtime": MessageLookupByLibrary.simpleMessage(
"Отсутствует среда выполнения",
),

View File

@ -363,6 +363,7 @@ class MessageLookup extends MessageLookupByLibrary {
"加载图片...",
),
"app_common_network_error": m1,
"app_common_recommended": MessageLookupByLibrary.simpleMessage("推荐"),
"app_common_tip": MessageLookupByLibrary.simpleMessage("提示"),
"app_common_tip_cancel": MessageLookupByLibrary.simpleMessage("取消"),
"app_common_tip_confirm": MessageLookupByLibrary.simpleMessage("确认"),
@ -1834,6 +1835,9 @@ class MessageLookup extends MessageLookupByLibrary {
),
"tools_action_hosts_acceleration_experimental":
MessageLookupByLibrary.simpleMessage("Hosts 加速(实验性)"),
"tools_action_info_cleaning": MessageLookupByLibrary.simpleMessage(
"正在清理...",
),
"tools_action_info_cleanup_complete": MessageLookupByLibrary.simpleMessage(
"清理完毕,请完成一次安装 / 游戏启动 操作。",
),
@ -1929,6 +1933,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_action_rsi_launcher_log_fix": MessageLookupByLibrary.simpleMessage(
"RSI Launcher Log 修复",
),
"tools_action_start_cleaning": MessageLookupByLibrary.simpleMessage("开始清理"),
"tools_action_switch_graphics_renderer":
MessageLookupByLibrary.simpleMessage("切换 DirectX/Vulkan 渲染器"),
"tools_action_switch_graphics_renderer_info": m104,
@ -2045,12 +2050,18 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_rsi_launcher_enhance_working_msg2":
MessageLookupByLibrary.simpleMessage("安装补丁,这需要一点时间,取决于您的计算机性能 ..."),
"tools_shader_clean_all": MessageLookupByLibrary.simpleMessage("全部清理"),
"tools_shader_clean_all_desc": MessageLookupByLibrary.simpleMessage(
"清理所有版本的缓存。适合画面异常或更新后清理。",
),
"tools_shader_clean_dialog_title": MessageLookupByLibrary.simpleMessage(
"清理着色器缓存",
),
"tools_shader_clean_keep_latest": MessageLookupByLibrary.simpleMessage(
"保留最新",
),
"tools_shader_clean_keep_latest_desc": MessageLookupByLibrary.simpleMessage(
"适合游戏更新并完成首次启动后使用。保留最新版本的所有文件,清理其他旧版本。",
),
"tools_unp4k_action_cancel_multi_select":
MessageLookupByLibrary.simpleMessage("取消多选"),
"tools_unp4k_action_deselect_all": MessageLookupByLibrary.simpleMessage(

View File

@ -334,6 +334,7 @@ class MessageLookup extends MessageLookupByLibrary {
"載入圖片...",
),
"app_common_network_error": m1,
"app_common_recommended": MessageLookupByLibrary.simpleMessage("推薦"),
"app_common_tip": MessageLookupByLibrary.simpleMessage("提示"),
"app_common_tip_cancel": MessageLookupByLibrary.simpleMessage("取消"),
"app_common_tip_confirm": MessageLookupByLibrary.simpleMessage("確認"),
@ -1729,6 +1730,9 @@ class MessageLookup extends MessageLookupByLibrary {
),
"tools_action_hosts_acceleration_experimental":
MessageLookupByLibrary.simpleMessage("Hosts 加速Beta"),
"tools_action_info_cleaning": MessageLookupByLibrary.simpleMessage(
"正在清理...",
),
"tools_action_info_cleanup_complete": MessageLookupByLibrary.simpleMessage(
"清理完畢,請完成一次安裝 / 遊戲啟動 操作。",
),
@ -1822,6 +1826,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_action_rsi_launcher_log_fix": MessageLookupByLibrary.simpleMessage(
"啟動器日誌修復",
),
"tools_action_start_cleaning": MessageLookupByLibrary.simpleMessage("開始清理"),
"tools_action_unp4k": MessageLookupByLibrary.simpleMessage("P4K 查看器"),
"tools_action_unp4k_info": MessageLookupByLibrary.simpleMessage(
"解包星際公民 p4k 文件",
@ -1908,12 +1913,18 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_rsi_launcher_enhance_working_msg2":
MessageLookupByLibrary.simpleMessage("安裝補丁,這需要一點時間,取決於您的電腦性能 ..."),
"tools_shader_clean_all": MessageLookupByLibrary.simpleMessage("全部清理"),
"tools_shader_clean_all_desc": MessageLookupByLibrary.simpleMessage(
"清理所有版本的快取(僅保留 GraphicsSettings。適合畫面異常或更新後清理。",
),
"tools_shader_clean_dialog_title": MessageLookupByLibrary.simpleMessage(
"清理著色器緩存",
),
"tools_shader_clean_keep_latest": MessageLookupByLibrary.simpleMessage(
"保留最新",
),
"tools_shader_clean_keep_latest_desc": MessageLookupByLibrary.simpleMessage(
"適合遊戲更新並完成首次啟動後使用。保留最新版本的所有檔案,清理其他舊版本(僅保留 GraphicsSettings",
),
"tools_unp4k_missing_runtime": MessageLookupByLibrary.simpleMessage(
"缺少運行庫",
),

View File

@ -9576,6 +9576,56 @@ class S {
args: [],
);
}
/// `Suitable for use after game updates and completing the first launch. Keep all files in the latest version, clean other old versions (only keep GraphicsSettings).`
String get tools_shader_clean_keep_latest_desc {
return Intl.message(
'Suitable for use after game updates and completing the first launch. Keep all files in the latest version, clean other old versions (only keep GraphicsSettings).',
name: 'tools_shader_clean_keep_latest_desc',
desc: '',
args: [],
);
}
/// `Clean all version caches (only keep GraphicsSettings). Suitable for graphics anomalies or post-update cleaning.`
String get tools_shader_clean_all_desc {
return Intl.message(
'Clean all version caches (only keep GraphicsSettings). Suitable for graphics anomalies or post-update cleaning.',
name: 'tools_shader_clean_all_desc',
desc: '',
args: [],
);
}
/// `Cleaning...`
String get tools_action_info_cleaning {
return Intl.message(
'Cleaning...',
name: 'tools_action_info_cleaning',
desc: '',
args: [],
);
}
/// `Start Cleaning`
String get tools_action_start_cleaning {
return Intl.message(
'Start Cleaning',
name: 'tools_action_start_cleaning',
desc: '',
args: [],
);
}
/// `Recommended`
String get app_common_recommended {
return Intl.message(
'Recommended',
name: 'app_common_recommended',
desc: '',
args: [],
);
}
}
class AppLocalizationDelegate extends LocalizationsDelegate<S> {

View File

@ -1918,5 +1918,15 @@
"tools_shader_clean_keep_latest": "Keep Latest",
"@tools_shader_clean_keep_latest": {},
"tools_shader_clean_all": "Clean All",
"@tools_shader_clean_all": {}
"@tools_shader_clean_all": {},
"tools_shader_clean_keep_latest_desc": "Suitable for use after game updates and completing the first launch. Keep all files in the latest version, clean other old versions (only keep GraphicsSettings).",
"@tools_shader_clean_keep_latest_desc": {},
"tools_shader_clean_all_desc": "Clean all version caches (only keep GraphicsSettings). Suitable for graphics anomalies or post-update cleaning.",
"@tools_shader_clean_all_desc": {},
"tools_action_info_cleaning": "Cleaning...",
"@tools_action_info_cleaning": {},
"tools_action_start_cleaning": "Start Cleaning",
"@tools_action_start_cleaning": {},
"app_common_recommended": "Recommended",
"@app_common_recommended": {}
}

View File

@ -1740,5 +1740,15 @@
"tools_shader_clean_keep_latest": "最新を保持",
"@tools_shader_clean_keep_latest": {},
"tools_shader_clean_all": "すべてクリア",
"@tools_shader_clean_all": {}
"@tools_shader_clean_all": {},
"tools_shader_clean_keep_latest_desc": "ゲームアップデート後と初回起動完了後の使用に適しています。最新バージョンのすべてのファイルを保持し、他の古いバージョンをクリアGraphicsSettingsのみ保持。",
"@tools_shader_clean_keep_latest_desc": {},
"tools_shader_clean_all_desc": "すべてのバージョンのキャッシュをクリアGraphicsSettingsのみ保持。グラフィック異常またはアップデート後のクリーニングに適しています。",
"@tools_shader_clean_all_desc": {},
"tools_action_info_cleaning": "クリーニング中...",
"@tools_action_info_cleaning": {},
"tools_action_start_cleaning": "クリーニング開始",
"@tools_action_start_cleaning": {},
"app_common_recommended": "推奨",
"@app_common_recommended": {}
}

View File

@ -1740,5 +1740,15 @@
"tools_shader_clean_keep_latest": "Сохранить последнее",
"@tools_shader_clean_keep_latest": {},
"tools_shader_clean_all": "Очистить всё",
"@tools_shader_clean_all": {}
"@tools_shader_clean_all": {},
"tools_shader_clean_keep_latest_desc": "Подходит для использования после обновления игры и завершения первого запуска. Сохранить все файлы последней версии, очистить другие старые версии (сохранить только GraphicsSettings).",
"@tools_shader_clean_keep_latest_desc": {},
"tools_shader_clean_all_desc": "Очистить кеш всех версий (сохранить только GraphicsSettings). Подходит для графических аномалий или очистки после обновления.",
"@tools_shader_clean_all_desc": {},
"tools_action_info_cleaning": "Очистка...",
"@tools_action_info_cleaning": {},
"tools_action_start_cleaning": "Начать очистку",
"@tools_action_start_cleaning": {},
"app_common_recommended": "Рекомендуется",
"@app_common_recommended": {}
}

View File

@ -1331,5 +1331,10 @@
"yearly_report_card_desc": "查看您在{year}年的星际公民游玩统计,数据来自本地 log ,请确保在常用电脑上查看。",
"tools_shader_clean_dialog_title": "清理着色器缓存",
"tools_shader_clean_keep_latest": "保留最新",
"tools_shader_clean_all": "全部清理"
"tools_shader_clean_all": "全部清理",
"tools_shader_clean_keep_latest_desc": "适合游戏更新并完成首次启动后使用。保留最新版本的所有文件,清理其他旧版本。",
"tools_shader_clean_all_desc": "清理所有版本的缓存。适合画面异常或更新后清理。",
"tools_action_info_cleaning": "正在清理...",
"tools_action_start_cleaning": "开始清理",
"app_common_recommended": "推荐"
}

View File

@ -1673,5 +1673,10 @@
"yearly_report_card_desc": "查看您在{year}年的星際公民遊玩統計,數據來自本地 log ,請確保在常用電腦上查看。",
"tools_shader_clean_dialog_title": "清理著色器緩存",
"tools_shader_clean_keep_latest": "保留最新",
"tools_shader_clean_all": "全部清理"
"tools_shader_clean_all": "全部清理",
"tools_shader_clean_keep_latest_desc": "適合遊戲更新並完成首次啟動後使用。保留最新版本的所有檔案,清理其他舊版本(僅保留 GraphicsSettings。",
"tools_shader_clean_all_desc": "清理所有版本的快取(僅保留 GraphicsSettings。適合畫面異常或更新後清理。",
"tools_action_info_cleaning": "正在清理...",
"tools_action_start_cleaning": "開始清理",
"app_common_recommended": "推薦"
}

View File

@ -44,9 +44,6 @@ Future<void> _initWindow() async {
await windowManager.setSize(const Size(1280, 810));
await windowManager.setMinimumSize(const Size(1280, 810));
await windowManager.center(animate: true);
if (Platform.isWindows) {
await Window.setEffect(effect: WindowEffect.transparent, color: Colors.transparent, dark: true);
}
}
class App extends HookConsumerWidget with WindowListener {

View File

@ -41,7 +41,7 @@ final class HomeUIModelProvider
}
}
String _$homeUIModelHash() => r'c3affcfc99a0cd7e3587cc58f02dbdc24c4f8ae7';
String _$homeUIModelHash() => r'9e16e9021ef2b68403f5d5ce21829d1fee0f4c8a';
abstract class _$HomeUIModel extends $Notifier<HomeUIModelState> {
HomeUIModelState build();

View File

@ -677,9 +677,11 @@ class LocalizationUIModel extends _$LocalizationUIModel {
child: Row(
children: [
Expanded(
child: Text(
item.value.note ?? S.current.home_localization_msg_no_note,
style: const TextStyle(fontSize: 15),
child: SelectionArea(
child: Text(
item.value.note ?? S.current.home_localization_msg_no_note,
style: const TextStyle(fontSize: 15),
),
),
),
],

View File

@ -0,0 +1,196 @@
import 'package:fluent_ui/fluent_ui.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:starcitizen_doctor/generated/l10n.dart';
///
class ShaderCacheCleanDialog extends StatefulWidget {
final Future<void> Function(String mode) onClean;
const ShaderCacheCleanDialog({super.key, required this.onClean});
@override
State<ShaderCacheCleanDialog> createState() => _ShaderCacheCleanDialogState();
}
class _ShaderCacheCleanDialogState extends State<ShaderCacheCleanDialog> {
bool _isCleaning = false;
String? _selectedMode;
@override
Widget build(BuildContext context) {
return ContentDialog(
title: Row(
children: [
const Icon(FontAwesomeIcons.shapes, size: 20),
const SizedBox(width: 12),
Text(S.current.tools_shader_clean_dialog_title),
],
),
constraints: const BoxConstraints(maxWidth: 500),
content: _isCleaning
? SizedBox(
height: 120,
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const ProgressRing(),
const SizedBox(height: 16),
Text(S.current.tools_action_info_cleaning),
],
),
),
)
: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const SizedBox(height: 12),
//
_CleanModeOption(
icon: FluentIcons.save,
title: S.current.tools_shader_clean_keep_latest,
description: S.current.tools_shader_clean_keep_latest_desc,
isSelected: _selectedMode == "keep_latest",
isRecommended: true,
onTap: () {
setState(() {
_selectedMode = "keep_latest";
});
},
),
const SizedBox(height: 12),
//
_CleanModeOption(
icon: FluentIcons.delete,
title: S.current.tools_shader_clean_all,
description: S.current.tools_shader_clean_all_desc,
isSelected: _selectedMode == "clean_all",
onTap: () {
setState(() {
_selectedMode = "clean_all";
});
},
),
],
),
actions: [
if (!_isCleaning) ...[
Button(onPressed: () => Navigator.of(context).pop(), child: Text(S.current.app_common_tip_cancel)),
FilledButton(
onPressed: _selectedMode == null
? null
: () async {
setState(() {
_isCleaning = true;
});
try {
await widget.onClean(_selectedMode!);
} finally {
if (mounted) {
setState(() {
_isCleaning = false;
});
}
}
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
child: Text(S.current.tools_action_start_cleaning),
),
),
],
],
);
}
}
///
class _CleanModeOption extends StatelessWidget {
final IconData icon;
final String title;
final String description;
final bool isSelected;
final bool isRecommended;
final VoidCallback onTap;
const _CleanModeOption({
required this.icon,
required this.title,
required this.description,
required this.isSelected,
this.isRecommended = false,
required this.onTap,
});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: isSelected
? FluentTheme.of(context).accentColor.withValues(alpha: .15)
: FluentTheme.of(context).cardColor,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: isSelected ? FluentTheme.of(context).accentColor : Colors.transparent, width: 2),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(
icon,
size: 20,
color: isSelected ? FluentTheme.of(context).accentColor : Colors.white.withValues(alpha: .7),
),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Expanded(
child: Text(
title,
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w600,
color: isSelected ? FluentTheme.of(context).accentColor : Colors.white,
),
),
),
if (isRecommended)
Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: const Color(0xFF4CAF50),
borderRadius: BorderRadius.circular(4),
),
child: Text(
S.current.app_common_recommended,
style: const TextStyle(fontSize: 11, color: Colors.white, fontWeight: FontWeight.w600),
),
),
],
),
const SizedBox(height: 8),
Text(
description,
style: TextStyle(fontSize: 13, color: Colors.white.withValues(alpha: .6), height: 1.4),
),
],
),
),
],
),
],
),
),
);
}
}

View File

@ -25,6 +25,7 @@ import 'package:xml/xml.dart';
import 'dialogs/hosts_booster_dialog_ui.dart';
import 'dialogs/rsi_launcher_enhance_dialog_ui.dart';
import 'dialogs/shader_cache_clean_dialog.dart';
import 'yearly_report_ui/yearly_report_ui.dart';
part 'tools_ui_model.g.dart';
@ -627,62 +628,28 @@ class ToolsUIModel extends _$ToolsUIModel {
//
// GraphicsSettings
// GraphicsSettings
await _cleanShaderCacheDirectory(scDir);
}
}
}
Future<void> _cleanShaderCache(BuildContext context) async {
//
final result = await showDialog<String>(
await showDialog<String>(
context: context,
builder: (dialogContext) => ContentDialog(
constraints: BoxConstraints(maxWidth: 380),
title: Text(S.current.tools_shader_clean_dialog_title),
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
const SizedBox(height: 12),
SizedBox(
width: double.infinity,
child: FilledButton(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: Text(S.current.tools_shader_clean_keep_latest),
),
onPressed: () => Navigator.pop(dialogContext, "keep_latest"),
),
),
const SizedBox(height: 12),
SizedBox(
width: double.infinity,
child: Button(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: Text(S.current.tools_shader_clean_all),
),
onPressed: () => Navigator.pop(dialogContext, "clean_all"),
),
),
],
),
actions: [Button(child: Text(S.current.app_common_tip_cancel), onPressed: () => Navigator.pop(dialogContext))],
builder: (dialogContext) => ShaderCacheCleanDialog(
onClean: (mode) async {
state = state.copyWith(working: true);
if (mode == "keep_latest") {
await cleanShaderCacheKeepLatest();
} else {
await cleanShaderCache();
}
if (!context.mounted) return;
loadToolsCard(context, skipPathScan: true);
state = state.copyWith(working: false);
Navigator.of(dialogContext).pop();
},
),
);
if (result == null || !context.mounted) return;
state = state.copyWith(working: true);
if (result == "keep_latest") {
await cleanShaderCacheKeepLatest();
} else {
await cleanShaderCache();
}
if (!context.mounted) return;
loadToolsCard(context, skipPathScan: true);
state = state.copyWith(working: false);
}
/// GraphicsSettings

View File

@ -429,10 +429,10 @@ packages:
dependency: "direct main"
description:
name: file_picker
sha256: d974b6ba2606371ac71dd94254beefb6fa81185bde0b59bdc1df09885da85fde
sha256: "57d9a1dd5063f85fa3107fb42d1faffda52fdc948cefd5fe5ea85267a5fc7343"
url: "https://pub.dev"
source: hosted
version: "10.3.8"
version: "10.3.10"
file_sizes:
dependency: "direct main"
description:

View File

@ -38,7 +38,7 @@ dependencies:
extended_image: ^10.0.1
animate_do: ^4.2.0
device_info_plus: ^12.3.0
file_picker: ^10.3.8
file_picker: ^10.3.10
file_sizes: ^1.0.6
flutter_svg: ^2.2.3
archive: ^4.0.7

8
rust/Cargo.lock generated
View File

@ -3678,9 +3678,9 @@ checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21"
[[package]]
name = "notify-rust"
version = "4.11.7"
version = "4.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6442248665a5aa2514e794af3b39661a8e73033b1cc5e59899e1276117ee4400"
checksum = "21af20a1b50be5ac5861f74af1a863da53a11c38684d9818d82f1c42f7fdc6c2"
dependencies = [
"futures-lite",
"log",
@ -7098,9 +7098,9 @@ checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"
[[package]]
name = "wmi"
version = "0.18.0"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d71d1d435f7745ba9ed55c43049d47b5fbd1104449beaa2afbc80a1e10a4a018"
checksum = "746791db82f029aaefc774ccbb8e61306edba18ef2c8998337cadccc0b8067f7"
dependencies = [
"chrono",
"futures",

View File

@ -37,7 +37,7 @@ reqwest = { version = "0.12.26", features = [
hickory-resolver = { version = "0.25.2" }
anyhow = "1.0.100"
scopeguard = "1.0"
notify-rust = "4.11.7"
notify-rust = "4.12.0"
asar = "0.3.0"
walkdir = "2.5.0"
ort = { version = "2.0.0-rc.11", features = [