fix: profile modal style and color in web build

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei
2024-07-30 13:02:09 +08:00
parent 317c4cffba
commit 97be5889b6
7 changed files with 34 additions and 20 deletions
@@ -36,7 +36,7 @@ export const ListItemHoverOverlay = ({
const mClassName = clsx(
"absolute rounded-lg",
"dark:bg-neutral-850 bg-native/50",
"dark:bg-neutral-850 bg-zinc-200/80",
"inset-0",
className,
)
+9 -2
View File
@@ -48,14 +48,21 @@ export const initializeApp = async () => {
appLog(`Initialize ${APP_NAME}...`)
window.version = APP_VERSION
const now = Date.now()
// Set Environment
const isElectronBuild = ELECTRON
document.documentElement.dataset.buildType = isElectronBuild ? "electron" : "web"
// Initialize dayjs
dayjs.extend(duration)
dayjs.extend(relativeTime)
dayjs.extend(localizedFormat)
const now = Date.now()
// Enable Map/Set in immer
enableMapSet()
subscribeNetworkStatus()
registerGlobalContext({
@@ -158,6 +158,7 @@ export const UserProfileModalContent: FC<{
<ScrollArea.ScrollArea
ref={setScrollerRef}
rootClassName="mb-4 h-[400px] grow w-[70ch] max-w-full px-5"
viewportClassName="[&>div]:space-y-4"
>
{subscriptions.isLoading ? (
<LoadingCircle
@@ -168,7 +169,7 @@ export const UserProfileModalContent: FC<{
subscriptions.data &&
Object.keys(subscriptions.data).map((category) => (
<div key={category}>
<div className="mb-4 flex items-center text-2xl font-bold">
<div className="mb-2 flex items-center text-2xl font-bold">
<h3>{category}</h3>
</div>
<div>
@@ -189,7 +190,7 @@ export const UserProfileModalContent: FC<{
{!user.data && (
<LoadingCircle
size="large"
className="center h-48 w-[46.125rem] max-w-full"
className="center h-[80vh] w-[39.125rem] max-w-full"
/>
)}
</m.div>
@@ -18,12 +18,10 @@ const useUISettingSync = () => {
const fontCss = `${setting.uiFontFamily},"SN Pro", system-ui, sans-serif`
Object.assign(root.style, {
fontFamily: fontCss,
})
root.style.cssText += `\n--fo-font-family: ${fontCss}`
Object.assign(document.body.style, {
fontFamily: fontCss,
})
}, [setting.uiFontFamily])
+19
View File
@@ -46,3 +46,22 @@
--fo-button-hover: theme(colors.neutral.400/0.15);
}
:root {
--fo-native: 240 1.6% 87.6%;
--fo-native-active: 240 0.9% 78.2%;
}
[data-theme="dark"] {
--fo-native: 30 1.7% 23.5%;
--fo-native-active: 20 2.1% 28.4%;
}
:root[data-build-type="web"] {
--fo-native: 240 4.8% 95.9%;
--fo-native-active: 240 4.9% 83.9%;
}
:root[data-build-type="web"][data-theme="dark"] {
--fo-native: 240 5.9% 10%;
--fo-native-active: 240 3.7% 15.9%;
}
-11
View File
@@ -50,17 +50,6 @@
}
}
@layer base {
:root {
--native: 240 1.6% 87.6%;
--native-active: 240 0.9% 78.2%;
}
[data-theme="dark"] {
--native: 30 1.7% 23.5%;
--native-active: 20 2.1% 28.4%;
}
}
@layer base {
* {
@apply border-border;
+2 -2
View File
@@ -66,8 +66,8 @@ export default resolveConfig({
foreground: "hsl(var(--card-foreground) / <alpha-value>)",
},
native: {
DEFAULT: "hsl(var(--native) / <alpha-value>)",
active: "hsl(var(--native-active) / <alpha-value>)",
DEFAULT: "hsl(var(--fo-native) / <alpha-value>)",
active: "hsl(var(--fo-native-active) / <alpha-value>)",
},
theme: {