2023-07-27 05:31:52 +00:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2022-07-03 05:40:02 +00:00
|
|
|
<template>
|
2023-05-26 04:32:42 +00:00
|
|
|
<div :class="$style.root">
|
2022-07-03 16:37:47 +00:00
|
|
|
<div
|
2023-05-26 04:32:42 +00:00
|
|
|
v-for="x in defaultStore.reactiveState.statusbars.value" :key="x.id" :class="[$style.item, { [$style.black]: x.black,
|
|
|
|
[$style.verySmall]: x.size === 'verySmall',
|
|
|
|
[$style.small]: x.size === 'small',
|
|
|
|
[$style.large]: x.size === 'large',
|
|
|
|
[$style.veryLarge]: x.size === 'veryLarge',
|
2022-07-03 16:37:47 +00:00
|
|
|
}]"
|
|
|
|
>
|
2023-05-26 04:32:42 +00:00
|
|
|
<span :class="$style.name">{{ x.name }}</span>
|
|
|
|
<XRss v-if="x.type === 'rss'" :class="$style.body" :refreshIntervalSec="x.props.refreshIntervalSec" :marqueeDuration="x.props.marqueeDuration" :marqueeReverse="x.props.marqueeReverse" :display="x.props.display" :url="x.props.url" :shuffle="x.props.shuffle"/>
|
|
|
|
<XFederation v-else-if="x.type === 'federation'" :class="$style.body" :refreshIntervalSec="x.props.refreshIntervalSec" :marqueeDuration="x.props.marqueeDuration" :marqueeReverse="x.props.marqueeReverse" :display="x.props.display" :colored="x.props.colored"/>
|
|
|
|
<XUserList v-else-if="x.type === 'userList'" :class="$style.body" :refreshIntervalSec="x.props.refreshIntervalSec" :marqueeDuration="x.props.marqueeDuration" :marqueeReverse="x.props.marqueeReverse" :display="x.props.display" :userListId="x.props.userListId"/>
|
2022-07-03 05:40:02 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2023-02-16 14:09:41 +00:00
|
|
|
import { defineAsyncComponent } from 'vue';
|
2023-09-19 07:37:43 +00:00
|
|
|
import { defaultStore } from '@/store.js';
|
2022-07-03 05:40:02 +00:00
|
|
|
const XRss = defineAsyncComponent(() => import('./statusbar-rss.vue'));
|
|
|
|
const XFederation = defineAsyncComponent(() => import('./statusbar-federation.vue'));
|
|
|
|
const XUserList = defineAsyncComponent(() => import('./statusbar-user-list.vue'));
|
|
|
|
</script>
|
|
|
|
|
2023-05-26 04:32:42 +00:00
|
|
|
<style lang="scss" module>
|
|
|
|
.root {
|
2022-07-15 08:01:13 +00:00
|
|
|
font-size: 15px;
|
2022-07-03 05:40:02 +00:00
|
|
|
background: var(--panel);
|
2023-05-26 04:32:42 +00:00
|
|
|
}
|
2022-07-03 05:40:02 +00:00
|
|
|
|
2023-05-26 04:32:42 +00:00
|
|
|
.item {
|
|
|
|
--height: 24px;
|
|
|
|
--nameMargin: 10px;
|
|
|
|
font-size: 0.85em;
|
2022-07-03 05:40:02 +00:00
|
|
|
|
2023-05-26 04:32:42 +00:00
|
|
|
&.verySmall {
|
|
|
|
--nameMargin: 7px;
|
|
|
|
--height: 16px;
|
|
|
|
font-size: 0.75em;
|
|
|
|
}
|
2022-07-03 05:40:02 +00:00
|
|
|
|
2023-05-26 04:32:42 +00:00
|
|
|
&.small {
|
|
|
|
--nameMargin: 8px;
|
|
|
|
--height: 20px;
|
|
|
|
font-size: 0.8em;
|
|
|
|
}
|
2022-07-03 11:30:58 +00:00
|
|
|
|
2023-05-26 04:32:42 +00:00
|
|
|
&.large {
|
|
|
|
--nameMargin: 12px;
|
|
|
|
--height: 26px;
|
|
|
|
font-size: 0.875em;
|
|
|
|
}
|
2022-07-03 16:37:47 +00:00
|
|
|
|
2023-05-26 04:32:42 +00:00
|
|
|
&.veryLarge {
|
|
|
|
--nameMargin: 14px;
|
|
|
|
--height: 30px;
|
|
|
|
font-size: 0.9em;
|
|
|
|
}
|
2022-07-03 05:40:02 +00:00
|
|
|
|
2023-05-26 04:32:42 +00:00
|
|
|
display: flex;
|
|
|
|
vertical-align: bottom;
|
|
|
|
width: 100%;
|
|
|
|
line-height: var(--height);
|
|
|
|
height: var(--height);
|
|
|
|
overflow: clip;
|
|
|
|
contain: strict;
|
2022-07-07 11:19:50 +00:00
|
|
|
|
2023-05-26 04:32:42 +00:00
|
|
|
&.black {
|
|
|
|
background: #000;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
}
|
2022-07-03 05:40:02 +00:00
|
|
|
|
2023-05-26 04:32:42 +00:00
|
|
|
.name {
|
|
|
|
padding: 0 var(--nameMargin);
|
|
|
|
font-weight: bold;
|
|
|
|
color: var(--accent);
|
2022-07-03 05:40:02 +00:00
|
|
|
|
2023-05-26 04:32:42 +00:00
|
|
|
&:empty {
|
|
|
|
display: none;
|
2022-07-03 05:40:02 +00:00
|
|
|
}
|
|
|
|
}
|
2023-05-26 04:32:42 +00:00
|
|
|
|
|
|
|
.body {
|
|
|
|
min-width: 0;
|
|
|
|
flex: 1;
|
|
|
|
}
|
2022-07-03 05:40:02 +00:00
|
|
|
</style>
|