File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <script lang =" ts" >
2+ export let label: string ;
3+ export let value: string ;
4+ export let href: string | null = null ;
5+ </script >
6+
7+ <div class =" flex justify-between" >
8+ <span class ="text-gray-400" >{label }:</span >
9+ {#if href }
10+ <a {href } target ="_blank" rel ="noopener noreferrer" class ="font-mono text-indigo-400 hover:text-indigo-300 hover:underline truncate" >{value }</a >
11+ {:else }
12+ <span class ="font-mono text-gray-200 truncate" >{value }</span >
13+ {/if }
14+ </div >
Original file line number Diff line number Diff line change 11<script lang =" ts" >
2- import { sessionMetadata } from " ./stores" ;
2+ import { sessionMetadata , sessionState } from " ./stores" ;
3+ import MetadataRow from " ./MetadataRow.svelte" ;
4+
5+ declare const __COMMIT_SHA__: string ;
6+ const commitSha = __COMMIT_SHA__ ;
7+
8+ $ : showWebVersion = $sessionState !== " closed" && $sessionState !== " readonly" ;
39 </script >
410
511{#if $sessionMetadata }
612 <div class =" text-xs space-y-1" >
7- <div class ="flex justify-between" ><span class ="text-gray-400" >Started:</span ><span class ="font-mono text-gray-200" >{new Date ($sessionMetadata .startedAt ).toLocaleString ()}</span ></div >
8- <div class ="flex justify-between" ><span class ="text-gray-400" >Branch:</span ><a href ="https://steamdb.info/app/4000/depots/?branch= {$sessionMetadata .branch }" target ="_blank" rel ="noopener noreferrer" class ="font-mono text-indigo-400 hover:text-indigo-300 hover:underline truncate" >{$sessionMetadata .branch }</a ></div >
9- <div class ="flex justify-between" ><span class ="text-gray-400" >Game Ver:</span ><a href ="https://steamdb.info/patchnotes/ {$sessionMetadata .gameVersion }" target ="_blank" rel ="noopener noreferrer" class ="font-mono text-indigo-400 hover:text-indigo-300 hover:underline truncate" >{$sessionMetadata .gameVersion }</a ></div >
10- <div class ="flex justify-between" ><span class ="text-gray-400" >Container:</span ><span class ="font-mono text-gray-200 truncate" >{$sessionMetadata .containerTag }</span ></div >
13+ <MetadataRow label ="Started" value ={new Date ($sessionMetadata .startedAt ).toLocaleString ()} />
14+ <MetadataRow label ="Branch" value ={$sessionMetadata .branch } href ="https://steamdb.info/app/4000/depots/?branch= {$sessionMetadata .branch }" />
15+ <MetadataRow label ="Game Ver" value ={$sessionMetadata .gameVersion } href ="https://steamdb.info/patchnotes/ {$sessionMetadata .gameVersion }" />
16+ <MetadataRow label ="Container" value ={$sessionMetadata .containerTag } />
17+ {#if showWebVersion }
18+ <MetadataRow label ="Web Ver" value ={commitSha } href ="https://github.com/CFC-Servers/glua.dev/tree/ {commitSha }" />
19+ {/if }
1120 </div >
1221{/if }
Original file line number Diff line number Diff line change 1- import { defineConfig } from 'vite'
2- import { svelte } from '@sveltejs/vite-plugin-svelte'
1+ import { defineConfig } from "vite"
2+ import { svelte } from "@sveltejs/vite-plugin-svelte"
3+ import { execSync } from "child_process"
4+
5+ const commitSha = execSync ( "git rev-parse --short HEAD" ) . toString ( ) . trim ( )
36
47// https://vite.dev/config/
58export default defineConfig ( {
69 plugins : [ svelte ( ) ] ,
10+ define : {
11+ __COMMIT_SHA__ : JSON . stringify ( commitSha ) ,
12+ } ,
713} )
You can’t perform that action at this time.
0 commit comments