Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Dec 10, 2024
2 parents 3dcbd9c + 2938214 commit cb0dbdb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 25 deletions.
4 changes: 0 additions & 4 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@
}
},
"otp": "One Time Passcode",
"publicAlpha": "Public Alpha",
"Sync": "Sync",
"syncing": "Syncing...",
"turnAnalyticsOff": "Turn off",
Expand Down Expand Up @@ -518,9 +517,6 @@
"importGameErrorMessageExecutable": "Game Executable not found, importing game is not possible",
"importGameErrorTitle": "Import Game Error",
"info": {
"hyperplay": {
"version": "HyperPlay Version"
},
"save-sync": {
"searching": "Trying to detect the correct save folder (click to cancel)"
},
Expand Down
14 changes: 1 addition & 13 deletions src/frontend/components/UI/AppVersion/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'

const storage = window.localStorage
let lastVersion = storage.getItem('last_version')?.replaceAll('"', '')
Expand All @@ -8,7 +7,6 @@ if (lastVersion === undefined) {
}

export default function AppVersion() {
const { t } = useTranslation()
const [appVersion, setAppVersion] = useState(lastVersion)

useEffect(() => {
Expand All @@ -18,15 +16,5 @@ export default function AppVersion() {
})
}, [])

return (
<div
className="body-sm"
style={{
color: 'var(--color-neutral-400)',
margin: 'var(--space-xl) 0px var(--space-md) 0px'
}}
>
{t('info.hyperplay.version', 'HyperPlay Version') + `: ${appVersion}`}
</div>
)
return <div>{appVersion}</div>
}
6 changes: 3 additions & 3 deletions src/frontend/components/UI/TopNavBar/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
}

.alphaBadge {
background-color: var(--color-tertiary-700);
padding: var(--space-3xs) var(--space-sm);
background-color: var(--color-secondary-700);
padding: var(--space-2xs) var(--space-sm);
border-radius: var(--space-xs);
margin-left: var(--space-sm);
margin: var(--space-xs) var(--space-md);
}

.hpLogo {
Expand Down
5 changes: 3 additions & 2 deletions src/frontend/components/UI/TopNavBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
} from 'frontend/constants'
import webviewNavigationStore from 'frontend/store/WebviewNavigationStore'
import { extractMainDomain } from '../../../helpers/extract-main-domain'
import AppVersion from '../AppVersion'

const TopNavBar = observer(() => {
const { t } = useTranslation()
Expand Down Expand Up @@ -63,8 +64,8 @@ const TopNavBar = observer(() => {
className={styles.hpTextLogo}
/>
<div className={styles.alphaBadge}>
<div className={`caption ${styles.alphaCaption}`}>
{t(`hyperplay.publicAlpha`, `Public Alpha`)}
<div className={`menu-item ${styles.alphaCaption}`}>
<AppVersion />
</div>
</div>
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,13 @@ import {
UseDarkTrayIcon,
WinePrefixesBasePath
} from '../../components'
import AppVersion from 'frontend/components/UI/AppVersion'
import AutoLaunchHyperPlay from '../../components/AutoLaunchHyperPlay'

export default function GeneralSettings() {
const { t } = useTranslation()

return (
<>
<AppVersion />

<div className="settingSubheader settingsSectionHeader title">
{t('settings.navbar.general')}
</div>
Expand Down

0 comments on commit cb0dbdb

Please sign in to comment.