Skip to content

Commit

Permalink
Show 'import game' hint/instructions in 'add game' dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
arielj committed Dec 14, 2024
1 parent a1a6f4a commit b237e73
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
4 changes: 4 additions & 0 deletions public/locales/en/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@
"field": {
"title": "Title"
},
"import-hint": {
"content": "Do NOT use this feature for that.<1></1>Instead, <3>log into</3> the store, look for the game in your library, open the installation dialog, and click the &quot;Import Game&quot; button",
"title": "Important! Are you adding a game from Epic/GOG/Amazon? Click here!"
},
"info": {
"broser": "BrowserURL",
"exe": "Select Executable",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
CachedImage,
TextInputField,
PathSelectionBox,
ToggleSwitch
ToggleSwitch,
InfoBox
} from 'frontend/components/UI'
import { DialogContent, DialogFooter } from 'frontend/components/UI/Dialog'
import {
Expand All @@ -17,12 +18,13 @@ import {
writeConfig
} from 'frontend/helpers'
import React, { useContext, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Trans, useTranslation } from 'react-i18next'
import { AvailablePlatforms } from '..'
import fallbackImage from 'frontend/assets/heroic_card.jpg'
import ContextProvider from 'frontend/state/ContextProvider'
import classNames from 'classnames'
import axios from 'axios'
import { NavLink } from 'react-router-dom'

type Props = {
availablePlatforms: AvailablePlatforms
Expand Down Expand Up @@ -289,6 +291,22 @@ export default function SideloadDialog({
</span>
</div>
<div className="sideloadForm">
<InfoBox
text={t(
'sideload.import-hint.title',
'Important! Are you adding a game from Epic/GOG/Amazon? Click here!'
)}
>
<div className="sideloadImportHint">
<Trans key="sideload.import-hint.content">
Do NOT use this feature for that.
<br />
Instead, <NavLink to={'/login'}>log into</NavLink> the store,
look for the game in your library, open the installation
dialog, and click the &quot;Import Game&quot; button
</Trans>
</div>
</InfoBox>
<TextInputField
label={t('sideload.info.title', 'Game/App Title')}
placeholder={t(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,9 @@
.sideloadForm {
padding-inline-start: var(--space-xs);
}

.sideloadImportHint {
a {
text-decoration: underline;
}
}

0 comments on commit b237e73

Please sign in to comment.