Skip to content

Commit 2903c9a

Browse files
committed
update
1 parent 119ed54 commit 2903c9a

5 files changed

Lines changed: 29 additions & 13 deletions

File tree

packages/app/app/components/Commits.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ onBeforeMount(async () => {
7171
},
7272
code({ text }) {
7373
return `<code class="language-bash">${shiki.codeToHtml(text, {
74-
theme: colorMode.value === 'dark' ? 'github-dark' : 'github-light',
74+
theme: colorMode.preference === 'dark' ? 'github-dark' : 'github-light',
7575
lang: 'bash',
7676
})}</code>`
7777
},
@@ -81,7 +81,7 @@ onBeforeMount(async () => {
8181
})
8282
8383
onBeforeUnmount(() => {
84-
shiki.dispose()
84+
shiki?.dispose()
8585
})
8686
8787
// Pagination

packages/app/app/layouts/default.vue

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,17 @@ const route = useRoute()
2323
<UButton
2424
aria-label="Toggle theme"
2525
:icon="
26-
colorMode.preference === 'dark'
27-
? 'ph-moon'
28-
: colorMode.preference === 'light'
29-
? 'ph-sun'
30-
: 'ph-moon-stars'
26+
colorMode.preference === 'light'
27+
? 'ph-sun'
28+
: 'ph-moon-stars'
3129
"
3230
color="neutral"
3331
variant="link"
3432
@click="
3533
colorMode.preference
3634
= colorMode.preference === 'dark'
37-
? 'system'
38-
: colorMode.preference === 'system'
39-
? 'light'
40-
: 'dark'
35+
? 'light'
36+
: 'dark'
4137
"
4238
/>
4339
<template #fallback>

packages/app/nuxt.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { resolve } from 'pathe'
33

44
// https://nuxt.com/docs/api/configuration/nuxt-config
55
export default defineNuxtConfig({
6+
sourcemap: true,
67
compatibilityDate: '2024-07-30',
78

89
// https://nuxt.com/docs/getting-started/upgrade#testing-nuxt-4
@@ -32,7 +33,6 @@ export default defineNuxtConfig({
3233
preset: 'cloudflare-pages',
3334
sourceMap: 'inline',
3435
compatibilityDate: '2024-09-19',
35-
// modules: ["nitro-cloudflare-dev"],
3636
externals: {
3737
inline: [
3838
'@octokit',
@@ -51,11 +51,13 @@ export default defineNuxtConfig({
5151
},
5252

5353
runtimeConfig: {
54+
nitro: {
55+
envPrefix: 'NITRO_',
56+
},
5457
appId: '',
5558
webhookSecret: '',
5659
privateKey: '',
5760
rmStaleKey: '',
58-
githubToken: '',
5961
ghBaseUrl: 'https://api.github.com',
6062
test: '',
6163
},
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// This plugin ensures runtime config is properly initialized early in the request lifecycle
2+
export default defineNitroPlugin((nitro) => {
3+
nitro.hooks.hook('request', async (event) => {
4+
try {
5+
// Pre-load the configuration to ensure it's initialized
6+
const config = useRuntimeConfig(event)
7+
// eslint-disable-next-line no-console
8+
console.log(
9+
'Runtime config initialized successfully:',
10+
Object.keys(config),
11+
)
12+
}
13+
catch (error) {
14+
console.error('Failed to initialize runtime config:', error)
15+
}
16+
})
17+
})

packages/app/wrangler.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
compatibility_date = "2024-03-14"
22
logpush = true
3+
upload_source_maps = true
34

45
[[r2_buckets]]
56
binding = "CR_BUCKET"

0 commit comments

Comments
 (0)