show software name and version in instance ticker #85

Manually merged
FoundKeyGang merged 3 commits from instance-software into main 2022-08-25 21:29:27 +00:00
3 changed files with 6 additions and 4 deletions
Showing only changes of commit 2e3bd6ddc2 - Show all commits

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',