2025-04-24 16:49:14 +02:00
|
|
|
<template>
|
2025-06-05 07:48:01 +02:00
|
|
|
<img v-if="useFallback" ref="fallback" src="/admin-logo.png" alt="LOGO" class="h-full w-auto" />
|
|
|
|
<img
|
|
|
|
v-else
|
|
|
|
ref="logo"
|
|
|
|
:src="url + '/api/public/applogo.png'"
|
|
|
|
alt="LOGO"
|
|
|
|
class="h-full w-auto"
|
|
|
|
@error="useFallback = true"
|
|
|
|
/>
|
2025-04-24 16:49:14 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import { url } from "@/serverCom";
|
2025-04-30 10:51:07 +02:00
|
|
|
import { useSettingStore } from "@/stores/admin/management/setting";
|
|
|
|
import { mapState } from "pinia";
|
|
|
|
import { defineComponent } from "vue";
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
export default defineComponent({
|
|
|
|
watch: {
|
|
|
|
logo() {
|
|
|
|
(this.$refs.logo as HTMLImageElement).src = url + "/api/public/applogo.png?t=" + new Date().getTime();
|
|
|
|
},
|
|
|
|
},
|
2025-06-05 07:48:01 +02:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
useFallback: false,
|
|
|
|
};
|
|
|
|
},
|
2025-04-30 10:51:07 +02:00
|
|
|
computed: {
|
|
|
|
...mapState(useSettingStore, ["readSetting"]),
|
|
|
|
logo() {
|
|
|
|
return this.readSetting("club.logo");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
2025-04-24 16:49:14 +02:00
|
|
|
</script>
|