From cbc7ae84657a1ef0977c4a7136b2abb0397115d7 Mon Sep 17 00:00:00 2001 From: LynithDev <61880709+LynithDev@users.noreply.github.com> Date: Sat, 23 Nov 2024 19:34:50 +0100 Subject: [PATCH] feat: Themes --- apps/frontend/src/index.tsx | 5 +- apps/frontend/src/styles/globals.css | 22 ++- apps/frontend/src/styles/themes.scss | 126 ++++++++++++++++++ apps/frontend/src/ui/components/Navbar.tsx | 4 +- apps/frontend/src/ui/components/Sidebar.tsx | 2 +- .../src/ui/components/base/Button.module.scss | 6 +- .../ui/components/base/Checkbox.module.scss | 6 +- .../ui/components/base/Dropdown.module.scss | 2 +- .../src/ui/components/base/Dropdown.tsx | 2 +- .../ui/components/base/SelectList.module.scss | 4 +- .../src/ui/components/base/Tag.module.scss | 2 +- .../ui/components/base/TextField.module.scss | 2 +- .../src/ui/components/base/Toggle.tsx | 2 +- .../ui/components/content/FormattedLog.tsx | 2 +- .../ui/components/content/LauncherIcon.tsx | 2 +- .../ui/components/content/ProviderIcon.tsx | 2 +- .../ui/components/content/SearchResults.tsx | 2 +- .../components/game/ClusterCover.module.scss | 2 +- .../src/ui/components/logos/PolyfrostFull.tsx | 2 +- .../src/ui/components/overlay/ContextMenu.tsx | 6 +- .../components/overlay/FullscreenOverlay.tsx | 2 +- .../overlay/account/AccountsPopup.tsx | 6 +- .../overlay/cluster/ClusterGameSetup.tsx | 2 +- .../notifications/NotificationPopup.tsx | 6 +- apps/frontend/src/ui/hooks/useSettings.tsx | 1 + apps/frontend/src/ui/pages/Home.tsx | 6 +- .../src/ui/pages/browser/BrowserMain.tsx | 2 +- .../src/ui/pages/browser/BrowserPackage.tsx | 4 +- .../src/ui/pages/cluster/ClusterMods.tsx | 4 +- .../src/ui/pages/cluster/ClusterOverview.tsx | 2 +- .../ui/pages/cluster/ClusterScreenshots.tsx | 2 +- .../src/ui/pages/cluster/ClusterWorlds.tsx | 2 +- .../ui/pages/onboarding/OnboardingImport.tsx | 2 +- .../pages/onboarding/OnboardingLanguage.tsx | 2 +- .../settings/launcher/SettingsAppearance.tsx | 71 +++++++++- apps/frontend/src/utils/theming.ts | 48 +++++++ apps/frontend/uno.config.ts | 108 ++++++--------- packages/client/src/bindings.ts | 24 +--- packages/client/src/utils/programInfo.ts | 12 ++ packages/core/src/api/mod.rs | 2 +- packages/core/src/store/settings.rs | 26 ++-- 41 files changed, 374 insertions(+), 163 deletions(-) create mode 100644 apps/frontend/src/styles/themes.scss create mode 100644 apps/frontend/src/utils/theming.ts diff --git a/apps/frontend/src/index.tsx b/apps/frontend/src/index.tsx index 16dd0feb..fa901ef2 100644 --- a/apps/frontend/src/index.tsx +++ b/apps/frontend/src/index.tsx @@ -10,6 +10,7 @@ import '@fontsource/poppins/600.css'; import 'virtual:uno.css'; import '@unocss/reset/tailwind.css'; import 'overlayscrollbars/overlayscrollbars.css'; +import '~styles/themes.scss'; import '~styles/globals.css'; import '~styles/highlightjs.css'; @@ -23,11 +24,9 @@ import { render } from 'solid-js/web'; import RootLayout from './RootLayout'; import HomePage from './ui/pages/Home'; import UpdatesPage from './ui/pages/Updates'; -import { getProgramInfo, initProgramInfo } from '@onelauncher/client'; +import { initProgramInfo } from '@onelauncher/client'; initProgramInfo().finally(() => { - document.body.setAttribute('data-platform', getProgramInfo().platform); - render(() => ( diff --git a/apps/frontend/src/styles/globals.css b/apps/frontend/src/styles/globals.css index b2b2994e..8df619f0 100644 --- a/apps/frontend/src/styles/globals.css +++ b/apps/frontend/src/styles/globals.css @@ -2,6 +2,18 @@ body { @apply font-sans text-fg-primary text-md; } +body.theme-transition * { + transition-delay: 0ms !important; + transition-duration: 400ms !important; + transition-property: color, border, background-color !important; +} + +body[data-platform="linux"].theme-transition * { + transition-delay: 0ms !important; + transition-duration: 400ms !important; + transition-property: background-color !important; +} + /* start lynith's native experience (tm) */ * { -webkit-user-select: none; @@ -24,13 +36,13 @@ img { } /* end lynith's native experience (tm) */ -/* lynith's epic webkit gtk <=2.44 fixer */ -body[data-platform="linux"] img { - /* Forces webkit gtk to use the GPU for image rendering, should speed up loading of some pages. Temporary until Tauri updates to at least 2.45 - 2.45 is the first version to use Skia for rendering, which prioritises the GPU over the CPU unlike Cairo */ +/* lynith's epic webkit gtk <=2.45 fixer */ +body[data-platform="linux"][data-skia-renderer="false"] img { + /* Forces webkit gtk to use the GPU for image rendering, should speed up loading of some pages. Temporary until Tauri updates to at least 2.46 + 2.46 is the first version to use Skia for rendering, which prioritises the GPU over the CPU unlike Cairo */ @apply transform-gpu; } -/* end lynith's epic webkit gtk <=2.44 fixer */ +/* end lynith's epic webkit gtk <=2.45 fixer */ h1 { @apply text-2xl font-semibold; line-height: 1.5 !important; } h2 { @apply text-xxl font-semibold; line-height: 1.25 !important; } diff --git a/apps/frontend/src/styles/themes.scss b/apps/frontend/src/styles/themes.scss new file mode 100644 index 00000000..d19cacd8 --- /dev/null +++ b/apps/frontend/src/styles/themes.scss @@ -0,0 +1,126 @@ +@mixin define-theme($name, $selectors: "") { + $selector: "#{$selectors} [data-theme="#{$name}"], .theme-#{$name}"; + + #{$selector} { + @content; + } +} + +@include define-theme("dark", ":root,") { + --clr-white: 255, 255, 255; + --clr-black: 0, 0, 0; + + --clr-border: 255, 255, 255; + + --clr-fg-primary: 213, 219, 255; + --clr-fg-primary-hover: 218, 224, 255; + --clr-fg-primary-pressed: 225, 229, 255; + --clr-fg-primary-disabled: 225, 229, 255, 0.5; + + --clr-fg-secondary: 120, 129, 141; + --clr-fg-secondary-hover: 95, 104, 116; + --clr-fg-secondary-pressed: 130, 141, 155; + --clr-fg-secondary-disabled: 120, 129, 141, 0.5; + + --clr-brand: 43, 75, 255; + --clr-brand-hover: 40, 67, 221; + --clr-brand-pressed: 57, 87, 255; + --clr-brand-disabled: 57, 87, 255, 0.5; + + --clr-onbrand: 213, 219, 255; + --clr-onbrand-hover: 218, 224, 255; + --clr-onbrand-pressed: 225, 229, 255; + --clr-onbrand-disabled: 225, 229, 255, 0.5; + + --clr-danger: 255, 68, 68; + --clr-danger-hover: 214, 52, 52; + --clr-danger-pressed: 255, 86, 86; + --clr-danger-disabled: 255, 68, 68, 0.5; + + --clr-success: 35, 154, 96; + --clr-success-hover: 26, 135, 82; + --clr-success-pressed: 44, 172, 110; + --clr-success-disabled: 35, 154, 96, 0.5; + + --clr-component-bg: 26, 34, 41; + --clr-component-bg-hover: 23, 31, 37; + --clr-component-bg-pressed: 34, 44, 53; + --clr-component-bg-disabled: 26, 34, 41, 0.5; + + --clr-code-info: 97, 175, 239; + --clr-code-warn: 229, 192, 123; + --clr-code-error: 190, 80, 70; + --clr-code-debug: 43, 75, 255; + --clr-code-trace: 253, 253, 253; + + --clr-link: 97, 175, 239; + --clr-link-hover: 95, 135, 255; + --clr-link-pressed: 114, 175, 255; + --clr-link-disabled: 97, 175, 239, 0.5; + + --clr-page: 17, 23, 28; + --clr-page-elevated: 21, 28, 34; + --clr-page-pressed: 14, 19, 23; + + --clr-secondary: 25, 32, 38; +} + +@include define-theme("light") { + --clr-white: 255, 255, 255; + --clr-black: 0, 0, 0; + + --clr-border: 40, 40, 40; + + --clr-fg-primary: 40, 40, 40; + --clr-fg-primary-hover: 30, 30, 30; + --clr-fg-primary-pressed: 20, 20, 20; + --clr-fg-primary-disabled: 40, 40, 40, 0.5; + + --clr-fg-secondary: 80, 80, 80; + --clr-fg-secondary-hover: 60, 60, 60; + --clr-fg-secondary-pressed: 100, 100, 100; + --clr-fg-secondary-disabled: 80, 80, 80, 0.5; + + --clr-brand: 43, 75, 255; + --clr-brand-hover: 35, 60, 200; + --clr-brand-pressed: 30, 50, 170; + --clr-brand-disabled: 43, 75, 255, 0.5; + + --clr-onbrand: 255, 255, 255; + --clr-onbrand-hover: 245, 245, 245; + --clr-onbrand-pressed: 230, 230, 230; + --clr-onbrand-disabled: 230, 230, 230, 0.5; + + --clr-danger: 200, 50, 50; + --clr-danger-hover: 180, 40, 40; + --clr-danger-pressed: 220, 60, 60; + --clr-danger-disabled: 200, 50, 50, 0.5; + + --clr-success: 50, 160, 100; + --clr-success-hover: 40, 140, 90; + --clr-success-pressed: 60, 180, 110; + --clr-success-disabled: 50, 160, 100, 0.5; + + --clr-component-bg: 240, 240, 240; + --clr-component-bg-hover: 230, 230, 230; + --clr-component-bg-pressed: 220, 220, 220; + --clr-component-bg-disabled: 240, 240, 240, 0.5; + + --clr-code-info: 40, 120, 200; + --clr-code-warn: 200, 150, 90; + --clr-code-error: 180, 70, 60; + --clr-code-debug: 40, 70, 200; + --clr-code-trace: 40, 40, 40; + + --clr-link: 40, 120, 200; + --clr-link-hover: 30, 100, 180; + --clr-link-pressed: 20, 80, 160; + --clr-link-disabled: 40, 120, 200, 0.5; + + --clr-page: 255, 255, 255; + --clr-page-elevated: 245, 245, 245; + --clr-page-pressed: 230, 230, 230; + + --clr-secondary: 220, 220, 220; + +} diff --git a/apps/frontend/src/ui/components/Navbar.tsx b/apps/frontend/src/ui/components/Navbar.tsx index d507cf93..ecad23ba 100644 --- a/apps/frontend/src/ui/components/Navbar.tsx +++ b/apps/frontend/src/ui/components/Navbar.tsx @@ -41,8 +41,8 @@ function Navbar() { return (
-
-
open(WEBSITE)}> +
+
open(WEBSITE)}>
diff --git a/apps/frontend/src/ui/components/Sidebar.tsx b/apps/frontend/src/ui/components/Sidebar.tsx index edbc6d66..1e78a130 100644 --- a/apps/frontend/src/ui/components/Sidebar.tsx +++ b/apps/frontend/src/ui/components/Sidebar.tsx @@ -48,7 +48,7 @@ function Sidebar(props: SidebarProps) { return ( goto(link[2], link[3])} > diff --git a/apps/frontend/src/ui/components/base/Button.module.scss b/apps/frontend/src/ui/components/base/Button.module.scss index 7672b4e3..9adcf47d 100644 --- a/apps/frontend/src/ui/components/base/Button.module.scss +++ b/apps/frontend/src/ui/components/base/Button.module.scss @@ -7,7 +7,7 @@ } &__secondary, &__iconSecondary { - @apply border box-border border-gray-05; + @apply border box-border border-border/05; @apply text-fg-primary hover:text-fg-primary-hover active:text-fg-primary-pressed disabled:text-fg-primary-disabled; @apply bg-component-bg hover:bg-component-bg-hover active:bg-component-bg-pressed disabled:bg-component-bg-disabled; } @@ -22,7 +22,7 @@ } &__ghost { - @apply hover:bg-gray-05 [&[aria-checked="true"]]:bg-gray-10 active:bg-gray-10; + @apply hover:bg-border/05 [&[aria-checked="true"]]:(bg-border/10) active:bg-border/10; } &__icon, &__iconPrimary, &__iconSecondary, &__iconDanger { @@ -41,7 +41,7 @@ } &__icon, &__iconSecondary { - @apply hover:bg-gray-05 [&[aria-checked="true"]]:bg-gray-10 active:bg-gray-10; + @apply hover:bg-border/05 [&[aria-checked="true"]]:bg-border/10 active:bg-border/10; &:hover > * { @apply stroke-fg-primary-hover; diff --git a/apps/frontend/src/ui/components/base/Checkbox.module.scss b/apps/frontend/src/ui/components/base/Checkbox.module.scss index 7cb24253..2597c9dc 100644 --- a/apps/frontend/src/ui/components/base/Checkbox.module.scss +++ b/apps/frontend/src/ui/components/base/Checkbox.module.scss @@ -2,7 +2,7 @@ @apply flex flex-row gap-x-1 items-center; .box { - @apply w-[18px] h-[18px] flex flex-col justify-center items-center rounded-md bg-component-bg hover:bg-component-bg-hover active:bg-component-bg-pressed border border-gray-05 transition-all; + @apply w-[18px] h-[18px] flex flex-col justify-center items-center rounded-md bg-component-bg hover:bg-component-bg-hover active:bg-component-bg-pressed border border-border/05 transition-all; > svg { @apply w-[18px] h-[18px] mt-px opacity-0 transition-opacity; @@ -10,11 +10,11 @@ &.checked { @apply bg-brand hover:bg-brand-hover active:bg-brand-pressed border-transparent; - + > svg { @apply opacity-100; } } } -} \ No newline at end of file +} diff --git a/apps/frontend/src/ui/components/base/Dropdown.module.scss b/apps/frontend/src/ui/components/base/Dropdown.module.scss index 7a936649..b9891b6c 100644 --- a/apps/frontend/src/ui/components/base/Dropdown.module.scss +++ b/apps/frontend/src/ui/components/base/Dropdown.module.scss @@ -10,7 +10,7 @@ } .dropdown_element { - @apply bg-page-elevated rounded-lg border border-gray-05 p-1 shadow-md shadow-black/30 h-full; + @apply bg-page-elevated rounded-lg border border-border/05 p-1 shadow-md shadow-black/30 h-full; } .list { diff --git a/apps/frontend/src/ui/components/base/Dropdown.tsx b/apps/frontend/src/ui/components/base/Dropdown.tsx index fd30ab8f..ef6a4b92 100644 --- a/apps/frontend/src/ui/components/base/Dropdown.tsx +++ b/apps/frontend/src/ui/components/base/Dropdown.tsx @@ -82,7 +82,7 @@ function Dropdown(props: DropdownProps) { {(item, index) => (
select(index)}> -
+
{item()}
diff --git a/apps/frontend/src/ui/components/base/SelectList.module.scss b/apps/frontend/src/ui/components/base/SelectList.module.scss index 50d7e92d..6cfe4197 100644 --- a/apps/frontend/src/ui/components/base/SelectList.module.scss +++ b/apps/frontend/src/ui/components/base/SelectList.module.scss @@ -1,5 +1,5 @@ .select_list { - @apply bg-component-bg rounded-lg overflow-hidden border border-gray-05; + @apply bg-component-bg rounded-lg overflow-hidden border border-border/05; .row { @apply min-h-4 py-1 px-2 text-left; @@ -9,4 +9,4 @@ @apply bg-white/10; } } -} \ No newline at end of file +} diff --git a/apps/frontend/src/ui/components/base/Tag.module.scss b/apps/frontend/src/ui/components/base/Tag.module.scss index af25cce4..42728dd9 100644 --- a/apps/frontend/src/ui/components/base/Tag.module.scss +++ b/apps/frontend/src/ui/components/base/Tag.module.scss @@ -1,6 +1,6 @@ .tag { @apply flex flex-row justify-center items-center gap-x-2; - @apply bg-component-bg/60 border border-gray-05 text-fg-secondary text-sm font-medium backdrop-blur-md rounded-lg px-2.5 py-0.5; + @apply bg-component-bg/60 border border-border/05 text-fg-secondary text-sm font-medium backdrop-blur-md rounded-lg px-2.5 py-0.5; } .icon > * { diff --git a/apps/frontend/src/ui/components/base/TextField.module.scss b/apps/frontend/src/ui/components/base/TextField.module.scss index f5c4f256..2d1894a0 100644 --- a/apps/frontend/src/ui/components/base/TextField.module.scss +++ b/apps/frontend/src/ui/components/base/TextField.module.scss @@ -1,6 +1,6 @@ .textfield { @apply bg-component-bg [&:not(:focus-within)]:hover:bg-component-bg-hover focus-within:bg-component-bg-pressed disabled:bg-component-bg-disabled; - @apply border border-gray-05 text-fg-primary fill-fg-primary; + @apply border border-border/05 text-fg-primary fill-fg-primary; @apply rounded-lg px-2.5 py-1.5 min-h-8; @apply flex flex-row items-center justify-start gap-x-1.5; @apply text-sm; diff --git a/apps/frontend/src/ui/components/base/Toggle.tsx b/apps/frontend/src/ui/components/base/Toggle.tsx index 1850c7f3..f18ccdf3 100644 --- a/apps/frontend/src/ui/components/base/Toggle.tsx +++ b/apps/frontend/src/ui/components/base/Toggle.tsx @@ -23,7 +23,7 @@ function Toggle(props: ToggleProps) { return (
toggle()} {...rest} > diff --git a/apps/frontend/src/ui/components/content/FormattedLog.tsx b/apps/frontend/src/ui/components/content/FormattedLog.tsx index b789dad3..483aa211 100644 --- a/apps/frontend/src/ui/components/content/FormattedLog.tsx +++ b/apps/frontend/src/ui/components/content/FormattedLog.tsx @@ -43,7 +43,7 @@ function FormattedLog(props: FormattedLogProps) { return (
-
+
} /> +
} /> )} when={split.launcher !== undefined} /> diff --git a/apps/frontend/src/ui/components/content/ProviderIcon.tsx b/apps/frontend/src/ui/components/content/ProviderIcon.tsx index 0975f92c..0530b339 100644 --- a/apps/frontend/src/ui/components/content/ProviderIcon.tsx +++ b/apps/frontend/src/ui/components/content/ProviderIcon.tsx @@ -43,7 +43,7 @@ function ProviderIcon(props: ProviderIconProps) { )} fallback={( -
} /> +
} /> )} when={split.provider !== undefined} /> diff --git a/apps/frontend/src/ui/components/content/SearchResults.tsx b/apps/frontend/src/ui/components/content/SearchResults.tsx index ef0126ee..a8c5417c 100644 --- a/apps/frontend/src/ui/components/content/SearchResults.tsx +++ b/apps/frontend/src/ui/components/content/SearchResults.tsx @@ -122,7 +122,7 @@ function PackageItem(props: SearchResult & { provider: Providers; row?: boolean + diff --git a/apps/frontend/src/ui/components/overlay/ContextMenu.tsx b/apps/frontend/src/ui/components/overlay/ContextMenu.tsx index 464f353c..e2746826 100644 --- a/apps/frontend/src/ui/components/overlay/ContextMenu.tsx +++ b/apps/frontend/src/ui/components/overlay/ContextMenu.tsx @@ -36,7 +36,7 @@ function ContextMenu(props: ContextMenuProps) { setVisible={props.setVisible} visible={props.visible} > -
+
{props.children}
@@ -46,7 +46,7 @@ function ContextMenu(props: ContextMenuProps) { } ContextMenu.Seperator = function () { - return
; + return
; }; interface ContextMenuRowProps { @@ -58,7 +58,7 @@ interface ContextMenuRowProps { ContextMenu.Row = function (props: ContextMenuRowProps) { return (
props.onClick?.(e)} > {props.icon} diff --git a/apps/frontend/src/ui/components/overlay/FullscreenOverlay.tsx b/apps/frontend/src/ui/components/overlay/FullscreenOverlay.tsx index fe565a9c..4d5ab98e 100644 --- a/apps/frontend/src/ui/components/overlay/FullscreenOverlay.tsx +++ b/apps/frontend/src/ui/components/overlay/FullscreenOverlay.tsx @@ -22,7 +22,7 @@ function FullscreenOverlay(props: FullscreenOverlayProps) { return (
diff --git a/apps/frontend/src/ui/components/overlay/account/AccountsPopup.tsx b/apps/frontend/src/ui/components/overlay/account/AccountsPopup.tsx index 30323cec..e3c0e1ee 100644 --- a/apps/frontend/src/ui/components/overlay/account/AccountsPopup.tsx +++ b/apps/frontend/src/ui/components/overlay/account/AccountsPopup.tsx @@ -26,7 +26,7 @@ function AccountComponent(props: AccountComponentProps) { return (
@@ -60,7 +60,7 @@ function AccountPopup(props: PopupProps) { return ( -
+
-
+
diff --git a/apps/frontend/src/ui/components/overlay/cluster/ClusterGameSetup.tsx b/apps/frontend/src/ui/components/overlay/cluster/ClusterGameSetup.tsx index 27778213..c4b2c06a 100644 --- a/apps/frontend/src/ui/components/overlay/cluster/ClusterGameSetup.tsx +++ b/apps/frontend/src/ui/components/overlay/cluster/ClusterGameSetup.tsx @@ -140,7 +140,7 @@ function VersionSelector(props: { setVersion: (version: string) => void }) { -
+
{name => ( -
+

Notifications

@@ -39,7 +39,7 @@ function NotificationPopup(props: PopupProps) { {noti => (
- +
)} @@ -48,7 +48,7 @@ function NotificationPopup(props: PopupProps) { You have no notifications - + diff --git a/apps/frontend/src/ui/hooks/useSettings.tsx b/apps/frontend/src/ui/hooks/useSettings.tsx index b1abd66c..e30cc942 100644 --- a/apps/frontend/src/ui/hooks/useSettings.tsx +++ b/apps/frontend/src/ui/hooks/useSettings.tsx @@ -10,6 +10,7 @@ import useCommand from './useCommand'; */ export function syncSettings(settings: Settings) { document.body.classList.toggle('reduce-motion', settings.disable_animations); + document.body.setAttribute('data-theme', settings.theme ?? 'dark'); } interface SettingsControllerType { diff --git a/apps/frontend/src/ui/pages/Home.tsx b/apps/frontend/src/ui/pages/Home.tsx index 811442aa..1104caf1 100644 --- a/apps/frontend/src/ui/pages/Home.tsx +++ b/apps/frontend/src/ui/pages/Home.tsx @@ -64,7 +64,7 @@ function HomePage() {
@@ -108,7 +108,7 @@ function Banner() { const navigate = useNavigate(); return ( -
+
openClusterPage(e)} >
diff --git a/apps/frontend/src/ui/pages/browser/BrowserMain.tsx b/apps/frontend/src/ui/pages/browser/BrowserMain.tsx index 08bc290a..59710e64 100644 --- a/apps/frontend/src/ui/pages/browser/BrowserMain.tsx +++ b/apps/frontend/src/ui/pages/browser/BrowserMain.tsx @@ -60,7 +60,7 @@ function Featured(props: FeaturedProps) {

{props.package.title}

-
+
OneConfig Integrated
diff --git a/apps/frontend/src/ui/pages/browser/BrowserPackage.tsx b/apps/frontend/src/ui/pages/browser/BrowserPackage.tsx index 6cede6a4..9f0a4ae9 100644 --- a/apps/frontend/src/ui/pages/browser/BrowserPackage.tsx +++ b/apps/frontend/src/ui/pages/browser/BrowserPackage.tsx @@ -216,7 +216,7 @@ function BrowserSidebar(props: { package: ManagedPackage }) {
1)}> -
+
)} @@ -481,7 +481,7 @@ function colorForType(type: string) { case 'alpha': return 'bg-code-error'; default: - return 'bg-gray-05'; + return 'bg-border/05'; } } diff --git a/apps/frontend/src/ui/pages/cluster/ClusterMods.tsx b/apps/frontend/src/ui/pages/cluster/ClusterMods.tsx index 43239c7e..9b377c1f 100644 --- a/apps/frontend/src/ui/pages/cluster/ClusterMods.tsx +++ b/apps/frontend/src/ui/pages/cluster/ClusterMods.tsx @@ -200,7 +200,7 @@ function ModEntry(props: ModEntryProps) {
} - fallback={
} + fallback={
} when={icon()} />
@@ -215,7 +215,7 @@ function ModEntry(props: ModEntryProps) { -
+
Screenshots No screenshots found. Press F2 in game to take a screenshot!
} + fallback={
No screenshots found. Press F2 in game to take a screenshot!
} when={list() !== undefined && list()!.length > 0} >
diff --git a/apps/frontend/src/ui/pages/cluster/ClusterWorlds.tsx b/apps/frontend/src/ui/pages/cluster/ClusterWorlds.tsx index ef047849..20a1fd7d 100644 --- a/apps/frontend/src/ui/pages/cluster/ClusterWorlds.tsx +++ b/apps/frontend/src/ui/pages/cluster/ClusterWorlds.tsx @@ -26,7 +26,7 @@ function ClusterWorlds() {

Worlds

No worlds found.
} + fallback={
No worlds found.
} when={list() !== undefined && list()!.length > 0} >
diff --git a/apps/frontend/src/ui/pages/onboarding/OnboardingImport.tsx b/apps/frontend/src/ui/pages/onboarding/OnboardingImport.tsx index d99de6d6..74863c7f 100644 --- a/apps/frontend/src/ui/pages/onboarding/OnboardingImport.tsx +++ b/apps/frontend/src/ui/pages/onboarding/OnboardingImport.tsx @@ -43,7 +43,7 @@ function OnboardingImport() { {type => (