Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sessions light theme #28

Merged
merged 6 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/auth-server/assets/css/style.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
body {
@apply min-h-[100dvh] bg-white dark:bg-black dark:text-white;
@apply min-h-[100dvh] bg-white text-neutral-950 dark:bg-black dark:text-white;
}
4 changes: 2 additions & 2 deletions packages/auth-server/components/common/Alert.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<div class="rounded-xl bg-primary-500/20 p-2">
<div class="rounded-xl bg-primary-50 dark:bg-primary-500/20 p-2">
<div class="flex">
<div
v-if="$slots.icon"
class="shrink-0 text-blue-400 size-5"
>
<slot name="icon" />
</div>
<div class="ml-3 text-primary-100">
<div class="ml-3 text-primary-300 dark:text-primary-100">
<slot />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-server/components/common/ContentLoader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ defineProps({

<style lang="scss" scoped>
.content-loader {
@apply rounded-xl bg-neutral-700;
@apply rounded-xl bg-neutral-300 dark:bg-neutral-700;
}
</style>
2 changes: 1 addition & 1 deletion packages/auth-server/components/session/row/Expiry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</div>
<div class="session-row-line">
<div
class="bg-white rounded-full h-full will-change-[width] transition-[width] duration-300"
class="session-row-line-inner"
:style="{ width: `${timeLeftPercentage}%` }"
/>
</div>
Expand Down
6 changes: 5 additions & 1 deletion packages/auth-server/components/session/row/Row.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ fetchSessionState();
@apply text-neutral-500 text-xs;
}
.session-row-line {
@apply bg-neutral-900 rounded-full w-full h-1 mt-1;
@apply bg-neutral-100 dark:bg-neutral-900 rounded-full w-full h-1 mt-1;

.session-row-line-inner {
@apply bg-primary-300 dark:bg-white rounded-full h-full will-change-[width,opacity] transition-[width,opacity];
}
}
}
</style>
2 changes: 1 addition & 1 deletion packages/auth-server/components/session/row/SpendLimit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
:class="tokensLoading ? 'animate-pulse' : ''"
>
<div
class="bg-white rounded-full h-full will-change-[width,opacity] transition-[width,opacity]"
class="session-row-line-inner"
:class="{ 'opacity-30': tokensLoading || !totalSpentUsd || isInactive }"
:style="{ width: `${usedPercentage}%` }"
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-server/components/zk/button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const types = {
secondary:
"bg-neutral-200 text-neutral-700 hover:bg-neutral-300 hover:text-neutral-800 focus:bg-neutral-300 active:bg-neutral-400 active:text-neutral-900 disabled:bg-neutral-100 disabled:text-neutral-500 dark:bg-neutral-900 dark:text-neutral-100 dark:hover:bg-neutral-800 dark:hover:text-neutral-200 dark:focus:bg-neutral-800 dark:active:bg-neutral-900 dark:active:text-neutral-400 dark:disabled:bg-neutral-900 dark:disabled:text-neutral-500",
danger:
"bg-error-100 text-error-950 focus:bg-error-200 hover:bg-error-200 active:bg-error-300 disabled:bg-transparent dark:bg-error-400/20 dark:text-error-300 dark:hover:bg-error-400/40 dark:active:bg-error-400/20 disabled:bg-error-100/70 disabled:text-error-800/70 disabled:dark:hover:bg-error-100/70",
"bg-error-100 text-error-700 focus:bg-error-200 hover:bg-error-200 active:bg-error-300 disabled:bg-transparent dark:bg-error-400/20 dark:text-error-300 dark:hover:bg-error-400/40 dark:active:bg-error-400/20 disabled:bg-error-100/70 disabled:text-error-800/70 disabled:dark:hover:bg-error-100/70",
ghost:
"border-neutral-100 bg-inherit text-neutral-800 focus:bg-neutral-100 hover:bg-neutral-100 active:bg-neutral-300 active:text-neutral-950/70 disabled:bg-neutral-100 disabled:text-neutral-600 dark:border-neutral-700 dark:bg-transparent dark:text-neutral-100 dark:hover:bg-neutral-800 dark:hover:text-neutral-200 dark:focus:bg-neutral-800 dark:active:bg-neutral-900 dark:active:text-neutral-300 disabled:dark:bg-neutral-100 disabled:dark:text-neutral-600",
tertiary:
Expand Down
5 changes: 3 additions & 2 deletions packages/auth-server/pages/dashboard/sessions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</layout-header>

<CommonAlert
v-if="sessions?.length"
class="mb-4"
>
<template #icon>
Expand All @@ -41,7 +42,7 @@
>No sessions yet...</span>
<div
v-else
class="bg-neutral-950 border border-neutral-900 rounded-3xl divide-y divide-neutral-900"
class="border rounded-3xl divide-y bg-white border-neutral-200 divide-neutral-200 dark:bg-neutral-950 dark:border-neutral-900 dark:divide-neutral-900"
>
<template v-if="!sessions?.length && sessionsInProgress">
<SessionRowLoader
Expand All @@ -64,7 +65,7 @@
</div>

<CommonAlert
v-if="defaultChain.id === zksyncInMemoryNode.id"
v-if="defaultChain.id === zksyncInMemoryNode.id && sessions?.length"
class="mt-4"
>
<template #icon>
Expand Down
Loading