File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Library/components/GameCard Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ export default observer(function GamePage(): React.JSX.Element | null {
125
125
const isLinux = platform === 'linux'
126
126
const isMac = platform === 'darwin'
127
127
const isSideloaded = runner === 'sideload'
128
+ const isSteam = runner === 'steam'
128
129
129
130
const isInstalling = DMQueueState . isInstalling ( appName )
130
131
const isPlaying = status === 'playing'
@@ -249,7 +250,7 @@ export default observer(function GamePage(): React.JSX.Element | null {
249
250
runner === 'hyperplay' ? hpPlatforms : othersPlatforms
250
251
251
252
if (
252
- runner !== 'sideload' &&
253
+ ! [ 'sideload' , 'steam' ] . includes ( runner ) &&
253
254
! notSupportedGame &&
254
255
! notInstallable &&
255
256
! isOffline
@@ -931,7 +932,10 @@ export default observer(function GamePage(): React.JSX.Element | null {
931
932
}
932
933
933
934
async function mainAction ( is_installed : boolean ) {
934
- // TODO: Add a way to pause download from the game page
935
+ if ( isSteam ) {
936
+ window . api . openExternalUrl ( `steam://install/${ appName } ` )
937
+ return
938
+ }
935
939
936
940
// resume download
937
941
if ( isPaused ) {
Original file line number Diff line number Diff line change @@ -434,10 +434,14 @@ const GameCard = ({
434
434
)
435
435
436
436
async function mainAction ( runner : Runner ) {
437
+ if ( runner === 'steam' ) {
438
+ window . api . openExternalUrl ( `steam://install/${ appName } ` )
439
+ return
440
+ }
441
+
437
442
if ( isInstalling || isExtracting || isPaused ) {
438
443
return setShowStopInstallModal ( true )
439
444
}
440
-
441
445
// ask to install if the game is not installed
442
446
if ( ! isInstalled && ! isQueued && gameInfo . runner !== 'sideload' ) {
443
447
return install ( {
You can’t perform that action at this time.
0 commit comments