feat: show real local info in instance ticker

add software info to client meta-config, "Foundkey" as default site name
This commit is contained in:
Chloe Kudryavtsev 2022-08-25 17:18:02 -04:00 committed by Gitea
parent 09ebbe1d49
commit 2e3bd6ddc2
3 changed files with 6 additions and 4 deletions

View file

@ -7,7 +7,7 @@
</template>
<script lang="ts" setup>
import { instanceName } from '@/config';
import { instanceName, version, software } from '@/config';
const props = defineProps<{
instance?: {
@ -24,8 +24,8 @@ const instance = props.instance ?? {
faviconUrl: '/favicon.ico',
name: instanceName,
themeColor: (document.querySelector('meta[name="theme-color-orig"]') as HTMLMetaElement).content,
softwareName: 'misskey',
softwareVersion: '',
softwareName: software,
softwareVersion: version,
};
const themeColor = instance.themeColor ?? '#777777';

View file

@ -10,6 +10,7 @@ export const lang = localStorage.getItem('lang');
export const langs = _LANGS_;
export const locale = JSON.parse(localStorage.getItem('locale'));
export const version = _VERSION_;
export const instanceName = siteName === 'Misskey' ? host : siteName;
export const software = _SOFTWARE_;
export const instanceName = siteName === 'FoundKey' ? host : siteName;
export const ui = localStorage.getItem('ui');
export const debug = localStorage.getItem('debug') === 'true';

View file

@ -33,6 +33,7 @@ export default defineConfig(({ command, mode }) => {
define: {
_VERSION_: JSON.stringify(meta.version),
_SOFTWARE_: JSON.stringify(meta.name),
_LANGS_: JSON.stringify(Object.entries(locales).map(([k, v]) => [k, v._lang_])),
_ENV_: JSON.stringify(process.env.NODE_ENV),
_DEV_: process.env.NODE_ENV !== 'production',