Skip to content

Commit cf9396a

Browse files
authored
feature: new UI design (#266)
1 parent a9ca1cd commit cf9396a

190 files changed

Lines changed: 11769 additions & 5686 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.local.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"Read(//Users/luke/code/5stack/web/i18n/locales/**)",
1717
"Bash(done)",
1818
"Bash(for f in ko_KR ru_RU tr_TR uk_UA zh_Hans)",
19-
"Bash(for f in ar_SA ko_KR ru_RU tr_TR uk_UA zh_Hans it_IT ja_JP da_DK pt_BR de_DE pl_PL es_ES zh_Hant sv_SE fr_FR)"
19+
"Bash(for f in ar_SA ko_KR ru_RU tr_TR uk_UA zh_Hans it_IT ja_JP da_DK pt_BR de_DE pl_PL es_ES zh_Hant sv_SE fr_FR)",
20+
"Bash(tail *)",
21+
"Bash(node *)"
2022
]
2123
}
2224
}

app.vue

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,43 @@
11
<script setup lang="ts">
2+
import { computed, defineAsyncComponent } from "vue";
23
import { polyfillCountryFlagEmojis } from "country-flag-emoji-polyfill";
3-
import MatchmakingConfirm from "~/components/matchmaking/MatchmakingConfirm.vue";
4-
import PlayerNameRegistration from "~/components/PlayerNameRegistration.vue";
5-
import StreamGlobal from "~/components/StreamGlobal.vue";
64
import { useBranding } from "~/composables/useBranding";
5+
import { useApplicationSettingsStore } from "~/stores/ApplicationSettings";
6+
import { useAuthStore } from "~/stores/AuthStore";
7+
8+
const MatchmakingConfirm = defineAsyncComponent(
9+
() => import("~/components/matchmaking/MatchmakingConfirm.vue"),
10+
);
11+
const PlayerNameRegistration = defineAsyncComponent(
12+
() => import("~/components/PlayerNameRegistration.vue"),
13+
);
14+
const StreamGlobal = defineAsyncComponent(
15+
() => import("~/components/StreamGlobal.vue"),
16+
);
17+
18+
polyfillCountryFlagEmojis();
719
820
useBranding();
21+
22+
const authStore = useAuthStore();
23+
const applicationSettingsStore = useApplicationSettingsStore();
24+
25+
const me = computed(() => authStore.me);
26+
const hasGlobalStream = computed(() => !!applicationSettingsStore.globalStream);
927
</script>
1028

1129
<template>
1230
<NuxtPwaManifest />
1331

14-
<StreamGlobal />
32+
<StreamGlobal v-if="hasGlobalStream" />
1533

1634
<template v-if="me">
1735
<PlayerNameRegistration />
1836
<MatchmakingConfirm />
1937
</template>
2038

2139
<NuxtLayout>
22-
<NuxtPage></NuxtPage>
40+
<NuxtPage :page-key="(route) => route.fullPath" />
2341
</NuxtLayout>
2442
<Toaster />
2543
</template>
26-
27-
<script lang="ts">
28-
export default {
29-
beforeCreate() {
30-
polyfillCountryFlagEmojis();
31-
},
32-
computed: {
33-
me() {
34-
return useAuthStore().me;
35-
},
36-
},
37-
};
38-
</script>

assets/css/tailwind.css

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@
7474
--topnav-accent-foreground: 0 0% 98%;
7575
--topnav-border: 220 13% 91%;
7676
--topnav-ring: 217.2 91.2% 59.8%;
77+
78+
--tac-amber: 33 94% 58%;
79+
--tac-amber-foreground: 0 0% 10%;
7780
}
7881

7982
.dark {
@@ -136,6 +139,9 @@
136139
--topnav-accent-foreground: 0 0% 98%;
137140
--topnav-border: 240 3% 23%;
138141
--topnav-ring: 217.2 91.2% 59.8%;
142+
143+
--tac-amber: 33 94% 58%;
144+
--tac-amber-foreground: 0 0% 10%;
139145
}
140146
}
141147

@@ -240,7 +246,6 @@ div[role="menuitem"] {
240246
}
241247

242248

243-
244249
@layer base {
245250
* {
246251
@apply border-border;
@@ -253,4 +258,35 @@ div[role="menuitem"] {
253258

254259
mark {
255260
@apply bg-white/80;
261+
}
262+
263+
.tac-amber-cta {
264+
color: hsl(0 0% 8%);
265+
border-color: hsl(var(--tac-amber));
266+
background: linear-gradient(
267+
135deg,
268+
hsl(36 100% 65%) 0%,
269+
hsl(var(--tac-amber)) 50%,
270+
hsl(28 90% 52%) 100%
271+
);
272+
box-shadow:
273+
0 0 0 1px hsl(var(--tac-amber) / 0.35),
274+
0 4px 14px -4px hsl(var(--tac-amber) / 0.5);
275+
transition:
276+
transform 200ms,
277+
box-shadow 200ms;
278+
}
279+
.tac-amber-cta:hover {
280+
transform: translateY(-1px);
281+
box-shadow:
282+
0 0 0 1px hsl(var(--tac-amber) / 0.55),
283+
0 8px 22px -4px hsl(var(--tac-amber) / 0.7),
284+
0 0 18px hsl(var(--tac-amber) / 0.3);
285+
}
286+
.tac-amber-cta:active {
287+
transform: translateY(0);
288+
}
289+
.tac-amber-cta:disabled {
290+
pointer-events: none;
291+
opacity: 0.6;
256292
}

components/AppSidebar.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
<script setup lang="ts">
2+
import { defineAsyncComponent } from "vue";
23
import type { SidebarProps } from "~/components/ui/sidebar";
3-
import LeftNav from "@/layouts/components/LeftNav.vue";
4-
import RightHub from "@/layouts/components/RightHub.vue";
54
import { useSidebar } from "~/components/ui/sidebar/utils";
65
import { useAuthStore } from "~/stores/AuthStore";
76
7+
const LeftNav = defineAsyncComponent(
8+
() => import("@/layouts/components/LeftNav.vue"),
9+
);
10+
const RightHub = defineAsyncComponent(
11+
() => import("@/layouts/components/RightHub.vue"),
12+
);
13+
814
const props = withDefaults(defineProps<SidebarProps>(), {
915
side: "left",
1016
});

0 commit comments

Comments
 (0)