Skip to content

Commit

Permalink
[UI] New Icons + new Default Theme + CSS Variables Overhaul (#2384)
Browse files Browse the repository at this point in the history
* feat: add new icons

* feat: updated card and frontend assets

* feat: add heroic icon to sidebar

* feat: add figma colors

* ui: update button colors

* feat: add new theme

* feat: better anti-cheat box

* feat: check for anticheat on macOS

* ui: updated colors variables

* ui: adjust anticheat box alignment

* fix: library item should be active on gamepage

* wip: fix some themes

* Revert "wip: fix some themes"

This reverts commit f9c9b7b.

* fix: setting icon

* ui: use fallback variables to fix the old themes

* ui: more style updates

* fix: anticheatbox width and margins

* ui: dm and other style fixes

* ui: updated settings icon and more fixes

* ui: add different icons to anticheat info

* ui: summary improvements

* ui: color updates

* ui: button states changes

* ui: update colors and set new default theme

* fix: sideload dialog image width

* fix: remove button title on not available game

* fix: add default theme to context provider

* ui: fix action icon colors

* ui: game list update

* chore: remove unused variables

* feat: add community themes to the list

* other: move default variables to colors.scss and update theme selector

* ui: more color fixes

* fix_ action icon colors

* fix: fix built-in themes

* fix: game submenu hover

* fix: marine colors

* ui: small fixes on nord light theme
  • Loading branch information
flavioislima authored Feb 2, 2023
1 parent 4c112ca commit 5e9003e
Show file tree
Hide file tree
Showing 52 changed files with 1,008 additions and 707 deletions.
Binary file modified public/icon.icns
Binary file not shown.
Binary file modified public/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion public/locales/en/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
"repairing": "Repairing"
},
"generic": {
"error": "Unknown error"
"error": "Unknown error",
"noDescription": "No description available"
},
"help": {
"cloud_save_unsupported": "This game does not support cloud saves. This information is provided by the game developers. Some games do implement their own cloud save system"
Expand Down
Binary file modified public/win_icon.ico
Binary file not shown.
6 changes: 3 additions & 3 deletions src/backend/anticheat/utils.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { heroicAnticheatDataPath, isLinux } from '../constants'
import { heroicAnticheatDataPath, isWindows } from '../constants'
import * as axios from 'axios'
import { logInfo, LogPrefix, logWarning } from '../logger/logger'
import { readFileSync, writeFileSync } from 'graceful-fs'
import { AntiCheatInfo } from 'common/types'
import { runOnceWhenOnline } from '../online_monitor'

async function downloadAntiCheatData() {
if (!isLinux) return
if (isWindows) return

runOnceWhenOnline(async () => {
try {
Expand All @@ -25,7 +25,7 @@ async function downloadAntiCheatData() {
}

function gameAnticheatInfo(appNamespace: string): AntiCheatInfo | null {
if (!isLinux) return null
if (isWindows) return null

const data = readFileSync(heroicAnticheatDataPath)
const jsonData = JSON.parse(data.toString())
Expand Down
2 changes: 1 addition & 1 deletion src/backend/gog/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ export class GOGLibrary {
art_square: verticalCover,
cloud_save_enabled: cloudSavesEnabledGames.includes(String(info.id)),
extra: {
about: { description: description, longDescription: '' },
about: { description: description, shortDescription: '' },
reqs: [],
storeUrl: `https://gog.com${info.url}`
},
Expand Down
6 changes: 3 additions & 3 deletions src/backend/legendary/games.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class LegendaryGame extends Game {
return {
about: {
description: res.sandbox.configuration[0].configs.shortDescription,
longDescription: ''
shortDescription: ''
},
reqs: requirements,
storeUrl: `https://www.epicgames.com/store/product/${slug}`
Expand Down Expand Up @@ -275,7 +275,7 @@ class LegendaryGame extends Game {
return {
about: {
description: '',
longDescription: ''
shortDescription: ''
},
reqs: [],
storeUrl: ''
Expand All @@ -301,7 +301,7 @@ class LegendaryGame extends Game {
return {
about: {
description: '',
longDescription: ''
shortDescription: ''
},
reqs: [],
storeUrl: ''
Expand Down
4 changes: 2 additions & 2 deletions src/backend/legendary/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ export class LegendaryLibrary {

const {
description,
longDescription = '',
shortDescription = '',
keyImages = [],
title,
developer,
Expand Down Expand Up @@ -552,7 +552,7 @@ export class LegendaryLibrary {
extra: {
about: {
description,
longDescription
shortDescription
},
reqs: [],
storeUrl: formatEpicStoreUrl(title)
Expand Down
4 changes: 2 additions & 2 deletions src/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type LaunchParams = {

interface About {
description: string
longDescription: string
shortDescription: string
}

export type Release = {
Expand Down Expand Up @@ -397,7 +397,7 @@ type AntiCheat =
| 'Zakynthos'

export interface AntiCheatInfo {
status: ''
status: 'Broken' | 'Denied' | 'Working' | 'Running' | 'Supported'
anticheats: AntiCheat[]
notes: string[]
native: boolean
Expand Down
2 changes: 1 addition & 1 deletion src/common/types/legendary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ interface GameMetadataInner {
keyImages: KeyImage[]
lastModifiedDate: string
mainGameItem?: GameMetadataInner
longDescription?: string
shortDescription?: string
namespace: string
releaseInfo: ReleaseInfo[]
requiresSecureAccount?: boolean
Expand Down
5 changes: 5 additions & 0 deletions src/frontend/assets/denied_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/frontend/assets/heroic-icon.png
Binary file not shown.
23 changes: 16 additions & 7 deletions src/frontend/assets/heroic-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/frontend/assets/heroic_card.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/frontend/assets/info_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/frontend/assets/rounded_checkmark_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/frontend/assets/settings_icon_alt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
168 changes: 0 additions & 168 deletions src/frontend/assets/sideload.svg

This file was deleted.

32 changes: 0 additions & 32 deletions src/frontend/components/UI/Anticheat/index.css

This file was deleted.

54 changes: 54 additions & 0 deletions src/frontend/components/UI/Anticheat/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.anticheatInfo {
display: flex;
max-width: 560px;
padding: var(--space-md);
gap: 0.4rem;
border-radius: 20px;
background-color: var(--current-background);
margin-bottom: var(--space-lg);

.statusInfo {
flex-direction: column;
display: flex;
padding-left: var(--space-md);
}
}

.anticheatInfo h4 {
margin: 0 0 var(--space-md);
}

.anticheatInfo p {
margin: 0 0 var(--space-md);
}

.anticheatInfo.Denied {
border: 2px solid var(--anticheat-denied);
.statusIcon path {
fill: var(--anticheat-denied);
}
}
.anticheatInfo.Broken {
border: 2px solid var(--anticheat-broken);
.statusIcon path {
fill: var(--anticheat-broken);
}
}
.anticheatInfo.Running {
border: 2px solid var(--anticheat-running);
.statusIcon path {
fill: var(--anticheat-running);
}
}
.anticheatInfo.Supported {
border: 2px solid var(--anticheat-supported);
.statusIcon path {
fill: var(--anticheat-supported);
}
}
.anticheatInfo.Planned {
border: 2px solid var(--anticheat-planned);
.statusIcon path {
fill: var(--anticheat-planned);
}
}
Loading

0 comments on commit 5e9003e

Please sign in to comment.