Skip to content

Commit abe3e08

Browse files
authored
[UX] Improve empty library instructions and denied anticheat copy (#4312)
Improve empty library instructions and denied anticheat copy
1 parent 7f91117 commit abe3e08

File tree

6 files changed

+39
-12
lines changed

6 files changed

+39
-12
lines changed

public/locales/en/gamepage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
"install": {
150150
"anticheat-warning": {
151151
"cancel": "No",
152-
"disabled_installation": "The anticheat support is broken or denied and the multiplayer features will not work. The game cannot be installed. To install this game, disable this check in the advanced settings.",
152+
"disabled_installation": "This game uses anticheat software that is not compatible with your operating system or the support was not enabled by the game developers. This means that the multiplayer features will not work, and there is nothing you (or the Heroic team) can do about it.<1></1><2></2>To install this game and try it anyway, go to Settings, Advanced, and check the option to allow the installation of games with broken or denied anticheat.<4></4><5></5>Note that there is no solution for this and you will risk getting banned in the game.",
153153
"install_anyway": "Yes (I understand the multiplayer features will not work)",
154154
"multiplayer_message": "The anticheat support is broken or denied. The game may open but the multiplayer features will not work. Do you want to install it anyway?",
155155
"ok": "Ok",

public/locales/en/translation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
"title": "Downloads"
245245
},
246246
"emptyLibrary": {
247-
"noGames": "Your library is empty. You can <1>log in</1> using a store or click <3></3> to add one manually.",
247+
"noGames": "Your library is empty.<1></1><2></2>Click <4>here</4> to log in with your Epic, GOG.com, or Amazon accounts. Then, your games will show up here in the Library.<6></6><7></7>To use games or apps from other sources, click <9></9> to add them manually.",
248248
"noResults": "The current filters produced no results."
249249
},
250250
"epic": {

src/frontend/components/UI/DialogHandler/components/MessageBoxModal/index.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import './index.css'
2-
import React, { useMemo } from 'react'
2+
import React, { ReactElement, useMemo } from 'react'
33
import {
44
Dialog,
55
DialogContent,
@@ -11,7 +11,7 @@ import { useTranslation } from 'react-i18next'
1111
import { DialogType, ButtonOptions } from 'common/types'
1212
interface MessageBoxModalProps {
1313
title: string
14-
message: string
14+
message: string | ReactElement
1515
onClose: () => void
1616
buttons: Array<ButtonOptions>
1717
type: DialogType
@@ -34,7 +34,10 @@ function decodeHTML(html: string): Array<JSX.Element> {
3434
const MessageBoxModal: React.FC<MessageBoxModalProps> = function (props) {
3535
const { t } = useTranslation()
3636

37-
const message = useMemo(() => decodeHTML(props.message), [props.message])
37+
const message = useMemo(() => {
38+
if (typeof props.message === 'string') return decodeHTML(props.message)
39+
else return props.message
40+
}, [props.message])
3841

3942
const getButtons = function () {
4043
const allButtons = []

src/frontend/screens/Library/components/EmptyLibrary/index.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,16 @@ function EmptyLibraryMessage() {
1111

1212
let message = (
1313
<Trans i18n={i18n} i18nKey="emptyLibrary.noGames">
14-
Your library is empty. You can <NavLink to="/login">log in</NavLink> using
15-
a store or click <AddGameButton /> to add one manually.
14+
Your library is empty.
15+
<br />
16+
<br />
17+
Click <NavLink to="/login">here</NavLink> to log in with your Epic,
18+
GOG.com, or Amazon accounts. Then, your games will show up here in the
19+
Library.
20+
<br />
21+
<br />
22+
To use games or apps from other sources, click <AddGameButton /> to add
23+
them manually.
1624
</Trans>
1725
)
1826

src/frontend/screens/Library/components/InstallModal/DownloadDialog/index.tsx

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import React, {
4343
useMemo,
4444
useState
4545
} from 'react'
46-
import { useTranslation } from 'react-i18next'
46+
import { Trans, useTranslation } from 'react-i18next'
4747
import { AvailablePlatforms } from '../index'
4848
import { configStore } from 'frontend/helpers/electronStores'
4949
import DLCDownloadListing from './DLCDownloadListing'
@@ -222,9 +222,25 @@ export default function DownloadDialog({
222222
} else {
223223
showDialogModal({
224224
title,
225-
message: t(
226-
'install.anticheat-warning.disabled_installation',
227-
'The anticheat support is broken or denied and the multiplayer features will not work. The game cannot be installed. To install this game, disable this check in the advanced settings.'
225+
message: (
226+
<Trans
227+
key="install.anticheat-warning.disabled_installation"
228+
i18n={i18n}
229+
>
230+
This game uses anticheat software that is not compatible with your
231+
operating system or the support was not enabled by the game
232+
developers. This means that the multiplayer features will not work,
233+
and there is nothing you (or the Heroic team) can do about it.
234+
<br />
235+
<br />
236+
To install this game and try it anyway, go to Settings, Advanced,
237+
and check the option to allow the installation of games with broken
238+
or denied anticheat.
239+
<br />
240+
<br />
241+
Note that there is no solution for this and you will risk getting
242+
banned in the game.
243+
</Trans>
228244
),
229245
buttons: [
230246
{

src/frontend/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export interface ContextType {
127127
export type DialogModalOptions = {
128128
showDialog?: boolean
129129
title?: string
130-
message?: string
130+
message?: string | React.ReactElement
131131
buttons?: Array<ButtonOptions>
132132
type?: DialogType
133133
}

0 commit comments

Comments
 (0)