2022-07-03 08:40:02 +03:00
|
|
|
<template>
|
2022-07-03 19:37:47 +03:00
|
|
|
<div class="dlrsnxqu">
|
|
|
|
<div
|
|
|
|
v-for="x in defaultStore.reactiveState.statusbars.value" :key="x.id" class="item" :class="[{ black: x.black }, {
|
|
|
|
verySmall: x.size === 'verySmall',
|
|
|
|
small: x.size === 'small',
|
|
|
|
medium: x.size === 'medium',
|
|
|
|
large: x.size === 'large',
|
|
|
|
veryLarge: x.size === 'veryLarge',
|
|
|
|
}]"
|
|
|
|
>
|
2022-07-03 08:40:02 +03:00
|
|
|
<span class="name">{{ x.name }}</span>
|
2023-05-19 14:52:15 +03:00
|
|
|
<XRss v-if="x.type === 'rss'" class="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="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="body" :refreshIntervalSec="x.props.refreshIntervalSec" :marqueeDuration="x.props.marqueeDuration" :marqueeReverse="x.props.marqueeReverse" :display="x.props.display" :userListId="x.props.userListId"/>
|
2022-07-03 08:40:02 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2023-02-16 16:09:41 +02:00
|
|
|
import { defineAsyncComponent } from 'vue';
|
2022-07-03 08:40:02 +03:00
|
|
|
import { defaultStore } from '@/store';
|
|
|
|
const XRss = defineAsyncComponent(() => import('./statusbar-rss.vue'));
|
|
|
|
const XFederation = defineAsyncComponent(() => import('./statusbar-federation.vue'));
|
|
|
|
const XUserList = defineAsyncComponent(() => import('./statusbar-user-list.vue'));
|
|
|
|
</script>
|
|
|
|
|
2022-12-27 11:29:39 +02:00
|
|
|
<style lang="scss" scoped>
|
2022-07-03 08:40:02 +03:00
|
|
|
.dlrsnxqu {
|
2022-07-15 11:01:13 +03:00
|
|
|
font-size: 15px;
|
2022-07-03 08:40:02 +03:00
|
|
|
background: var(--panel);
|
|
|
|
|
2022-07-03 19:37:47 +03:00
|
|
|
> .item {
|
|
|
|
--height: 24px;
|
|
|
|
--nameMargin: 10px;
|
|
|
|
font-size: 0.85em;
|
2022-07-03 08:40:02 +03:00
|
|
|
|
2022-07-03 19:37:47 +03:00
|
|
|
&.verySmall {
|
|
|
|
--nameMargin: 7px;
|
|
|
|
--height: 16px;
|
|
|
|
font-size: 0.75em;
|
|
|
|
}
|
2022-07-03 08:40:02 +03:00
|
|
|
|
2022-07-03 19:37:47 +03:00
|
|
|
&.small {
|
|
|
|
--nameMargin: 8px;
|
|
|
|
--height: 20px;
|
|
|
|
font-size: 0.8em;
|
|
|
|
}
|
2022-07-03 08:40:02 +03:00
|
|
|
|
2022-07-03 19:37:47 +03:00
|
|
|
&.large {
|
|
|
|
--nameMargin: 12px;
|
|
|
|
--height: 26px;
|
|
|
|
font-size: 0.875em;
|
|
|
|
}
|
2022-07-03 14:30:58 +03:00
|
|
|
|
2022-07-03 19:37:47 +03:00
|
|
|
&.veryLarge {
|
|
|
|
--nameMargin: 14px;
|
|
|
|
--height: 30px;
|
|
|
|
font-size: 0.9em;
|
|
|
|
}
|
|
|
|
|
|
|
|
display: flex;
|
2022-07-03 08:40:02 +03:00
|
|
|
vertical-align: bottom;
|
|
|
|
width: 100%;
|
|
|
|
line-height: var(--height);
|
|
|
|
height: var(--height);
|
2022-07-13 15:41:06 +03:00
|
|
|
overflow: clip;
|
2022-07-03 08:40:02 +03:00
|
|
|
contain: strict;
|
|
|
|
|
|
|
|
> .name {
|
2022-07-03 19:12:36 +03:00
|
|
|
padding: 0 var(--nameMargin);
|
2022-07-03 08:40:02 +03:00
|
|
|
font-weight: bold;
|
|
|
|
color: var(--accent);
|
2022-07-07 14:19:50 +03:00
|
|
|
|
|
|
|
&:empty {
|
|
|
|
display: none;
|
|
|
|
}
|
2022-07-03 08:40:02 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
> .body {
|
|
|
|
min-width: 0;
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.black {
|
|
|
|
background: #000;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|