[+] Display splash and app version in frontend

pull/17/head
Azalea 2024-03-03 14:45:15 -05:00
parent c821626dc1
commit e842a37654
3 changed files with 15 additions and 0 deletions

View File

@ -8,6 +8,17 @@
import Ranking from "./pages/Ranking.svelte";
import { USER } from "./libs/sdk";
console.log(`%c
┏━┓ ┳━┓━┓┏━
┣━┫┏━┓┓ ┏┏━┓┃ ┃ ┣┫
┛ ┗┗━┫┗━┻┗━┻┻━┛━┛┗━
┗ v${APP_VERSION}`, `
background: linear-gradient(-45deg, rgba(18,194,233,1) 0%, rgba(196,113,237,1) 50%, rgba(246,79,89,1) 100%);
font-weight: bold;
font-size: 2em;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;`)
export let url = "";
let path = window.location.pathname;

View File

@ -1,2 +1,3 @@
/// <reference types="svelte" />
/// <reference types="vite/client" />
declare const APP_VERSION: string;

View File

@ -4,4 +4,7 @@ import { svelte } from '@sveltejs/vite-plugin-svelte'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()],
define: {
APP_VERSION: JSON.stringify(process.env.npm_package_version),
},
})