diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-08-31 00:24:33 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-08-31 00:24:33 +0900 |
| commit | 786b150ea75111b5f6102c256d5cfa42cb83d1fb (patch) | |
| tree | d552d0c371829d7ff027890d1036a80bb08517f7 /packages/client/src/components/instance-ticker.vue | |
| parent | update deps (diff) | |
| download | misskey-786b150ea75111b5f6102c256d5cfa42cb83d1fb.tar.gz misskey-786b150ea75111b5f6102c256d5cfa42cb83d1fb.tar.bz2 misskey-786b150ea75111b5f6102c256d5cfa42cb83d1fb.zip | |
refactor(client): align filename to component name
Diffstat (limited to 'packages/client/src/components/instance-ticker.vue')
| -rw-r--r-- | packages/client/src/components/instance-ticker.vue | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/packages/client/src/components/instance-ticker.vue b/packages/client/src/components/instance-ticker.vue deleted file mode 100644 index d9f196f887..0000000000 --- a/packages/client/src/components/instance-ticker.vue +++ /dev/null @@ -1,69 +0,0 @@ -<template> -<div class="hpaizdrt" :style="bg"> - <img v-if="instance.faviconUrl" class="icon" :src="instance.faviconUrl"/> - <span class="name">{{ instance.name }}</span> -</div> -</template> - -<script lang="ts" setup> -import { } from 'vue'; -import { instanceName } from '@/config'; -import { instance as Instance } from '@/instance'; - -const props = defineProps<{ - instance?: { - faviconUrl?: string - name: string - themeColor?: string - } -}>(); - -// if no instance data is given, this is for the local instance -const instance = props.instance ?? { - faviconUrl: Instance.iconUrl || Instance.faviconUrl || '/favicon.ico', - name: instanceName, - themeColor: (document.querySelector('meta[name="theme-color-orig"]') as HTMLMetaElement)?.content -}; - -const themeColor = instance.themeColor ?? '#777777'; - -const bg = { - background: `linear-gradient(90deg, ${themeColor}, ${themeColor}00)` -}; -</script> - -<style lang="scss" scoped> -.hpaizdrt { - $height: 1.1rem; - - height: $height; - border-radius: 4px 0 0 4px; - overflow: hidden; - color: #fff; - text-shadow: /* .866 ≈ sin(60deg) */ - 1px 0 1px #000, - .866px .5px 1px #000, - .5px .866px 1px #000, - 0 1px 1px #000, - -.5px .866px 1px #000, - -.866px .5px 1px #000, - -1px 0 1px #000, - -.866px -.5px 1px #000, - -.5px -.866px 1px #000, - 0 -1px 1px #000, - .5px -.866px 1px #000, - .866px -.5px 1px #000; - - > .icon { - height: 100%; - } - - > .name { - margin-left: 4px; - line-height: $height; - font-size: 0.9em; - vertical-align: top; - font-weight: bold; - } -} -</style> |