This commit is contained in:
Florian Metz
2024-07-16 02:36:42 +02:00
parent 3e86393b25
commit fb279a418a
6 changed files with 19 additions and 6 deletions

View File

@@ -33,6 +33,8 @@ const cardGradientColor = computed(() => {
computedBackground = computed(() => {
return `background: linear-gradient(-35deg, ${cardGradientColor.value.secondary} 20%, ${cardGradientColor.value.primary} 130%); box-shadow: 0 2px 52px 0 ${cardShadowColor.value}`;
});
const nonce = useNonce();
</script>
<template>
@@ -53,6 +55,7 @@ const cardGradientColor = computed(() => {
<div class="relative ml2">
<NuxtImg
v-if="user?.user?.avatar"
:nonce="nonce"
:src="`${user?.user?.avatar}?size=40`"
class="h-auto w-10 min-w-10 rd-100"
draggable="false"

View File

@@ -97,6 +97,8 @@ const linkSections = computed(() => [
],
},
] as LinkSection[] satisfies LinkSection[]);
const nonce = useNonce();
</script>
<template>
@@ -115,7 +117,7 @@ const linkSections = computed(() => [
target="_blank"
rel="noopener noreferrer"
>
<NuxtImg :src="partner.image" :alt="partner.label" height="32px" width="32px" />
<NuxtImg :src="partner.image" :alt="partner.label" height="32px" width="32px" :nonce="nonce" />
</a>
</div>
</div>

View File

@@ -24,6 +24,8 @@ const userColor = computed(() => {
});
const localePath = useLocalePath();
const nonce = useNonce();
</script>
<template>
@@ -34,6 +36,7 @@ const localePath = useLocalePath();
class="rounded-full h-6 w-6"
:src="userAvatar"
alt="User avatar"
:nonce="nonce"
/>
<p
class="font-bold" :style="{

View File

@@ -12,11 +12,11 @@ export default defineNuxtConfig({
"img-src": ["'self'", "data:", "https:"],
"script-src": [
"'self'",
"https:",
"'unsafe-inline'",
"'strict-dynamic'",
"'nonce-{{nonce}}'",
"'unsafe-eval'",
"'strict-dynamic'",
// Add Cloudflare's script sources
"*.cloudflare.com",
"*.cloudflareinsights.com",
],
"script-src-attr": ["'self'"],
},

View File

@@ -140,6 +140,8 @@ const computedUsage = computed(() =>
);
const localePath = useLocalePath();
const nonce = useNonce();
</script>
<template>
@@ -156,6 +158,7 @@ const localePath = useLocalePath();
class="mb-2 w-32"
width="128px"
height="128px"
:nonce="nonce"
/>
<h1 class="font-extrabold mb-4 text-4xl">
{{ $t("page.home.title") }}

View File

@@ -10,13 +10,15 @@ const presences = computed(() => [...data.value.authorPresences, ...data.value.c
if (status.value === "success" && !user.value) {
router.replace("/store");
}
const nonce = useNonce();
</script>
<template>
<div class="flex flex-col gap-10 w-full">
<template v-if="user">
<div class="flex justify-center items-center gap-3">
<NuxtImg :src="`${user?.avatar}?size=1024`" alt="User Avatar" class="w-20 h-20 rounded-full" />
<NuxtImg :src="`${user?.avatar}?size=1024`" alt="User Avatar" class="w-20 h-20 rounded-full" :nonce="nonce" />
<h1 class="font-bold text-xl">
{{ user?.name }}
</h1>