forked from FoundKeyGang/FoundKey
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:
parent
09ebbe1d49
commit
2e3bd6ddc2
3 changed files with 6 additions and 4 deletions
|
@ -7,7 +7,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { instanceName } from '@/config';
|
import { instanceName, version, software } from '@/config';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
instance?: {
|
instance?: {
|
||||||
|
@ -24,8 +24,8 @@ const instance = props.instance ?? {
|
||||||
faviconUrl: '/favicon.ico',
|
faviconUrl: '/favicon.ico',
|
||||||
name: instanceName,
|
name: instanceName,
|
||||||
themeColor: (document.querySelector('meta[name="theme-color-orig"]') as HTMLMetaElement).content,
|
themeColor: (document.querySelector('meta[name="theme-color-orig"]') as HTMLMetaElement).content,
|
||||||
softwareName: 'misskey',
|
softwareName: software,
|
||||||
softwareVersion: '',
|
softwareVersion: version,
|
||||||
};
|
};
|
||||||
|
|
||||||
const themeColor = instance.themeColor ?? '#777777';
|
const themeColor = instance.themeColor ?? '#777777';
|
||||||
|
|
|
@ -10,6 +10,7 @@ export const lang = localStorage.getItem('lang');
|
||||||
export const langs = _LANGS_;
|
export const langs = _LANGS_;
|
||||||
export const locale = JSON.parse(localStorage.getItem('locale'));
|
export const locale = JSON.parse(localStorage.getItem('locale'));
|
||||||
export const version = _VERSION_;
|
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 ui = localStorage.getItem('ui');
|
||||||
export const debug = localStorage.getItem('debug') === 'true';
|
export const debug = localStorage.getItem('debug') === 'true';
|
||||||
|
|
|
@ -33,6 +33,7 @@ export default defineConfig(({ command, mode }) => {
|
||||||
|
|
||||||
define: {
|
define: {
|
||||||
_VERSION_: JSON.stringify(meta.version),
|
_VERSION_: JSON.stringify(meta.version),
|
||||||
|
_SOFTWARE_: JSON.stringify(meta.name),
|
||||||
_LANGS_: JSON.stringify(Object.entries(locales).map(([k, v]) => [k, v._lang_])),
|
_LANGS_: JSON.stringify(Object.entries(locales).map(([k, v]) => [k, v._lang_])),
|
||||||
_ENV_: JSON.stringify(process.env.NODE_ENV),
|
_ENV_: JSON.stringify(process.env.NODE_ENV),
|
||||||
_DEV_: process.env.NODE_ENV !== 'production',
|
_DEV_: process.env.NODE_ENV !== 'production',
|
||||||
|
|
Loading…
Reference in a new issue