This commit is contained in:
syuilo 2023-05-26 13:32:42 +09:00
parent fd03e2e1a7
commit 10634b3615
1 changed files with 63 additions and 63 deletions

View File

@ -1,18 +1,18 @@
<template> <template>
<div class="dlrsnxqu"> <div :class="$style.root">
<div <div
v-for="x in defaultStore.reactiveState.statusbars.value" :key="x.id" class="item" :class="[{ black: x.black }, { v-for="x in defaultStore.reactiveState.statusbars.value" :key="x.id" :class="[$style.item, { [$style.black]: x.black,
verySmall: x.size === 'verySmall', [$style.verySmall]: x.size === 'verySmall',
small: x.size === 'small', [$style.small]: x.size === 'small',
medium: x.size === 'medium', [$style.medium]: x.size === 'medium',
large: x.size === 'large', [$style.large]: x.size === 'large',
veryLarge: x.size === 'veryLarge', [$style.veryLarge]: x.size === 'veryLarge',
}]" }]"
> >
<span class="name">{{ x.name }}</span> <span :class="$style.name">{{ x.name }}</span>
<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"/> <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="body" :refreshIntervalSec="x.props.refreshIntervalSec" :marqueeDuration="x.props.marqueeDuration" :marqueeReverse="x.props.marqueeReverse" :display="x.props.display" :colored="x.props.colored"/> <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="body" :refreshIntervalSec="x.props.refreshIntervalSec" :marqueeDuration="x.props.marqueeDuration" :marqueeReverse="x.props.marqueeReverse" :display="x.props.display" :userListId="x.props.userListId"/> <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"/>
</div> </div>
</div> </div>
</template> </template>
@ -25,67 +25,67 @@ const XFederation = defineAsyncComponent(() => import('./statusbar-federation.vu
const XUserList = defineAsyncComponent(() => import('./statusbar-user-list.vue')); const XUserList = defineAsyncComponent(() => import('./statusbar-user-list.vue'));
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.dlrsnxqu { .root {
font-size: 15px; font-size: 15px;
background: var(--panel); background: var(--panel);
}
> .item { .item {
--height: 24px; --height: 24px;
--nameMargin: 10px; --nameMargin: 10px;
font-size: 0.85em; font-size: 0.85em;
&.verySmall { &.verySmall {
--nameMargin: 7px; --nameMargin: 7px;
--height: 16px; --height: 16px;
font-size: 0.75em; font-size: 0.75em;
} }
&.small { &.small {
--nameMargin: 8px; --nameMargin: 8px;
--height: 20px; --height: 20px;
font-size: 0.8em; font-size: 0.8em;
} }
&.large { &.large {
--nameMargin: 12px; --nameMargin: 12px;
--height: 26px; --height: 26px;
font-size: 0.875em; font-size: 0.875em;
} }
&.veryLarge { &.veryLarge {
--nameMargin: 14px; --nameMargin: 14px;
--height: 30px; --height: 30px;
font-size: 0.9em; font-size: 0.9em;
} }
display: flex; display: flex;
vertical-align: bottom; vertical-align: bottom;
width: 100%; width: 100%;
line-height: var(--height); line-height: var(--height);
height: var(--height); height: var(--height);
overflow: clip; overflow: clip;
contain: strict; contain: strict;
> .name { &.black {
padding: 0 var(--nameMargin); background: #000;
font-weight: bold; color: #fff;
color: var(--accent);
&:empty {
display: none;
}
}
> .body {
min-width: 0;
flex: 1;
}
&.black {
background: #000;
color: #fff;
}
} }
} }
.name {
padding: 0 var(--nameMargin);
font-weight: bold;
color: var(--accent);
&:empty {
display: none;
}
}
.body {
min-width: 0;
flex: 1;
}
</style> </style>