Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
25 lines
527 B
TypeScript
25 lines
527 B
TypeScript
import axios from "axios";
|
|
import type { AppInfo } from "~/lib/api/types/admin";
|
|
|
|
export default defineNuxtPlugin({
|
|
async setup() {
|
|
const { data } = await axios.get<AppInfo>("/api/app/about");
|
|
|
|
useHead({
|
|
title: data.brandingName,
|
|
link: data.brandingLogoUrl
|
|
? [
|
|
{ rel: "icon", href: data.brandingLogoUrl },
|
|
{ rel: "shortcut icon", href: data.brandingLogoUrl },
|
|
]
|
|
: [],
|
|
});
|
|
|
|
return {
|
|
provide: {
|
|
appInfo: data,
|
|
},
|
|
};
|
|
},
|
|
});
|