mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-25 00:49:17 +09:00
refactor
This commit is contained in:
parent
fd03e2e1a7
commit
10634b3615
@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<div class="dlrsnxqu">
|
||||
<div :class="$style.root">
|
||||
<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',
|
||||
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.medium]: x.size === 'medium',
|
||||
[$style.large]: x.size === 'large',
|
||||
[$style.veryLarge]: x.size === 'veryLarge',
|
||||
}]"
|
||||
>
|
||||
<span class="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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -25,12 +25,13 @@ const XFederation = defineAsyncComponent(() => import('./statusbar-federation.vu
|
||||
const XUserList = defineAsyncComponent(() => import('./statusbar-user-list.vue'));
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.dlrsnxqu {
|
||||
<style lang="scss" module>
|
||||
.root {
|
||||
font-size: 15px;
|
||||
background: var(--panel);
|
||||
}
|
||||
|
||||
> .item {
|
||||
.item {
|
||||
--height: 24px;
|
||||
--nameMargin: 10px;
|
||||
font-size: 0.85em;
|
||||
@ -67,7 +68,13 @@ const XUserList = defineAsyncComponent(() => import('./statusbar-user-list.vue')
|
||||
overflow: clip;
|
||||
contain: strict;
|
||||
|
||||
> .name {
|
||||
&.black {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.name {
|
||||
padding: 0 var(--nameMargin);
|
||||
font-weight: bold;
|
||||
color: var(--accent);
|
||||
@ -77,15 +84,8 @@ const XUserList = defineAsyncComponent(() => import('./statusbar-user-list.vue')
|
||||
}
|
||||
}
|
||||
|
||||
> .body {
|
||||
.body {
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
&.black {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user