22import { computed , ref } from ' vue' ;
33import VersionNumber from ' ../../../model/VersionNumber' ;
44import ManagerInformation from ' ../../../_managerinf/ManagerInformation' ;
5+ import { getStore } from ' ../../../providers/generic/store/StoreProvider' ;
6+ import { State } from ' ../../../store' ;
7+ import appWindow from ' ../../../providers/node/app/app_window' ;
58import { Hero } from ' ../../all' ;
69import SettingsSection from ' ./SettingsSection.vue' ;
710import GameDirectory from ' ./entries/GameDirectory.vue' ;
811import DataDirectory from ' ./entries/DataDirectory.vue' ;
12+ import SteamDirectory from ' ./entries/SteamDirectory.vue' ;
913import ExportProfile from ' ./entries/ExportProfile.vue' ;
1014import Theme from ' ./entries/Theme.vue' ;
1115import ExpandCards from ' ./entries/ExpandCards.vue' ;
1216import FunkyMode from ' ./entries/FunkyMode.vue' ;
13- import RefreshOnlineModList from ' ./entries/RefreshOnlineModList .vue' ;
17+ import OnlineModList from ' ./entries/OnlineModList .vue' ;
1418import ModState from ' ./entries/ModState.vue' ;
1519import UpdateAllMods from ' ./entries/UpdateAllMods.vue' ;
16- import DownloadCache from ' ./entries/DownloadCache .vue' ;
20+ import ModCache from ' ./entries/ModCache .vue' ;
1721import CopyLogToClipboard from ' ./entries/CopyLogToClipboard.vue' ;
1822import CopyTroubleshooting from ' ./entries/CopyTroubleshooting.vue' ;
1923import ImportLocalMod from ' ./entries/ImportLocalMod.vue' ;
20- import CleanModCache from ' ./entries/CleanModCache.vue' ;
21- import CleanOnlineModListCache from ' ./entries/CleanOnlineModListCache.vue' ;
2224import ToggleCdn from ' ./entries/ToggleCdn.vue' ;
25+ import LaunchArguments from ' ./entries/LaunchArguments.vue' ;
26+ import ShowDependencyStrings from ' ./entries/ShowDependencyStrings.vue' ;
27+ import ResetGameInstallation from ' ./entries/ResetGameInstallation.vue' ;
28+ import ChangeLaunchBehaviour from ' ./entries/ChangeLaunchBehaviour.vue' ;
2329
2430const searchTerm = ref <string >(' ' );
2531
2632const managerVersionNumber = ref <VersionNumber >(ManagerInformation .VERSION );
2733const appName = computed (() => ManagerInformation .APP_NAME );
2834
29- const categories = [' All' , ' Directories' , ' Profile' , ' Appearance' , ' Debugging' , ' Other' ] as const ;
35+ const store = getStore <State >();
36+ const isSteamGame = computed <boolean >(() => store .state .activeGame .isInstalledViaSteam );
37+ const isSteamAndNotWindows = computed <boolean >(() => [' linux' , ' darwin' ].includes (appWindow .getPlatform ()) && isSteamGame .value );
38+
39+ const categories = [' All' , ' Directories' , ' Profile' , ' Appearance' , ' Debugging' , ' Modpacks' , ' Other' ] as const ;
3040type Category = typeof categories [number ];
3141
3242const activeCategory = ref <Category >(' All' );
@@ -74,6 +84,9 @@ function isVisible(section: Category): boolean {
7484 <SettingsSection v-if =" isVisible (' Directories' )" name="Directories">
7585 <DataDirectory :search-term =" searchTerm " />
7686 <GameDirectory :search-term =" searchTerm " />
87+ <template v-if =" isSteamGame " >
88+ <SteamDirectory :search-term =" searchTerm " />
89+ </template >
7790 </SettingsSection >
7891
7992 <SettingsSection v-if =" isVisible (' Profile' )" name="Profile">
@@ -90,16 +103,25 @@ function isVisible(section: Category): boolean {
90103 </SettingsSection >
91104
92105 <SettingsSection v-if =" isVisible (' Debugging' )" name="Debugging">
106+ <LaunchArguments :search-term =" searchTerm " />
107+ <template v-if =" isSteamGame " >
108+ <ResetGameInstallation :search-term =" searchTerm " />
109+ </template >
110+ <template v-if =" isSteamAndNotWindows " >
111+ <ChangeLaunchBehaviour :search-term =" searchTerm " />
112+ </template >
93113 <CopyLogToClipboard :search-term =" searchTerm " />
94114 <CopyTroubleshooting :search-term =" searchTerm " />
95- <DownloadCache :search-term =" searchTerm " />
96- <CleanModCache :search-term =" searchTerm " />
97- <CleanOnlineModListCache :search-term =" searchTerm " />
115+ <ModCache :search-term =" searchTerm " />
98116 <ToggleCdn :search-term =" searchTerm " />
99117 </SettingsSection >
100118
119+ <SettingsSection v-if =" isVisible (' Modpacks' )" name="Modpacks">
120+ <ShowDependencyStrings :search-term =" searchTerm " />
121+ </SettingsSection >
122+
101123 <SettingsSection v-if =" isVisible (' Other' )" name="Other">
102- <RefreshOnlineModList :search-term =" searchTerm " />
124+ <OnlineModList :search-term =" searchTerm " />
103125 </SettingsSection >
104126 </div >
105127 </div >
0 commit comments