This commit is contained in:
syuilo 2023-05-27 11:35:26 +09:00
parent 98aef974df
commit a879607479
9 changed files with 206 additions and 283 deletions

View file

@ -14,8 +14,8 @@
> >
<MkEmojiPicker <MkEmojiPicker
ref="picker" ref="picker"
class="ryghynhb _popup _shadow" class="_popup _shadow"
:class="{ drawer: type === 'drawer' }" :class="{ [$style.drawer]: type === 'drawer' }"
:showPinned="showPinned" :showPinned="showPinned"
:asReactionPicker="asReactionPicker" :asReactionPicker="asReactionPicker"
:asDrawer="type === 'drawer'" :asDrawer="type === 'drawer'"
@ -67,12 +67,10 @@ function opening() {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.ryghynhb { .drawer {
&.drawer {
border-radius: 24px; border-radius: 24px;
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
}
} }
</style> </style>

View file

@ -1,12 +1,12 @@
<template> <template>
<div class="adhpbeos"> <div>
<div class="label" @click="focus"><slot name="label"></slot></div> <div :class="$style.label" @click="focus"><slot name="label"></slot></div>
<div class="input" :class="{ disabled, focused, tall, pre }"> <div :class="{ [$style.disabled]: disabled, [$style.focused]: focused, [$style.tall]: tall, [$style.pre]: pre }" style="position: relative;">
<textarea <textarea
ref="inputEl" ref="inputEl"
v-model="v" v-model="v"
v-adaptive-border v-adaptive-border
:class="{ code, _monospace: code }" :class="[$style.textarea, { [$style.code]: code, _monospace: code }]"
:disabled="disabled" :disabled="disabled"
:required="required" :required="required"
:readonly="readonly" :readonly="readonly"
@ -20,9 +20,9 @@
@input="onInput" @input="onInput"
></textarea> ></textarea>
</div> </div>
<div class="caption"><slot name="caption"></slot></div> <div :class="$style.caption"><slot name="caption"></slot></div>
<MkButton v-if="manualSave && changed" primary class="save" @click="updated"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton> <MkButton v-if="manualSave && changed" primary :class="$style.save" @click="updated"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton>
</div> </div>
</template> </template>
@ -111,9 +111,8 @@ onMounted(() => {
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.adhpbeos { .label {
> .label {
font-size: 0.85em; font-size: 0.85em;
padding: 0 0 8px 0; padding: 0 0 8px 0;
user-select: none; user-select: none;
@ -121,9 +120,9 @@ onMounted(() => {
&:empty { &:empty {
display: none; display: none;
} }
} }
> .caption { .caption {
font-size: 0.85em; font-size: 0.85em;
padding: 8px 0 0 0; padding: 8px 0 0 0;
color: var(--fgTransparentWeak); color: var(--fgTransparentWeak);
@ -131,12 +130,9 @@ onMounted(() => {
&:empty { &:empty {
display: none; display: none;
} }
} }
> .input { .textarea {
position: relative;
> textarea {
appearance: none; appearance: none;
-webkit-appearance: none; -webkit-appearance: none;
display: block; display: block;
@ -161,37 +157,36 @@ onMounted(() => {
&:hover { &:hover {
border-color: var(--inputBorderHover) !important; border-color: var(--inputBorderHover) !important;
} }
} }
&.focused { .focused {
> textarea { > .textarea {
border-color: var(--accent) !important; border-color: var(--accent) !important;
} }
} }
&.disabled { .disabled {
opacity: 0.7; opacity: 0.7;
cursor: not-allowed !important;
&, * { > .textarea {
cursor: not-allowed !important; cursor: not-allowed !important;
} }
} }
&.tall { .tall {
> textarea { > .textarea {
min-height: 200px; min-height: 200px;
} }
} }
&.pre { .pre {
> textarea { > .textarea {
white-space: pre; white-space: pre;
} }
} }
}
> .save { .save {
margin: 8px 0 0 0; margin: 8px 0 0 0;
}
} }
</style> </style>

View file

@ -1,19 +1,19 @@
<template> <template>
<div class="ffcbddfc" :class="{ inline }"> <div :class="[$style.root, { [$style.inline]: inline }]">
<a v-if="external" class="main _button" :href="to" target="_blank"> <a v-if="external" :class="$style.main" class="_button" :href="to" target="_blank">
<span class="icon"><slot name="icon"></slot></span> <span :class="$style.icon"><slot name="icon"></slot></span>
<span class="text"><slot></slot></span> <span :class="$style.text"><slot></slot></span>
<span class="right"> <span :class="$style.suffix">
<span class="text"><slot name="suffix"></slot></span> <span :class="$style.suffixText"><slot name="suffix"></slot></span>
<i class="ti ti-external-link icon"></i> <i class="ti ti-external-link" :class="$style.suffixIcon"></i>
</span> </span>
</a> </a>
<MkA v-else class="main _button" :class="{ active }" :to="to" :behavior="behavior"> <MkA v-else :class="[$style.main, { [$style.active]: active }]" class="_button" :to="to" :behavior="behavior">
<span class="icon"><slot name="icon"></slot></span> <span :class="$style.icon"><slot name="icon"></slot></span>
<span class="text"><slot></slot></span> <span :class="$style.text"><slot></slot></span>
<span class="right"> <span :class="$style.suffix">
<span class="text"><slot name="suffix"></slot></span> <span :class="$style.suffixText"><slot name="suffix"></slot></span>
<i class="ti ti-chevron-right icon"></i> <i class="ti ti-chevron-right" :class="$style.suffixIcon"></i>
</span> </span>
</MkA> </MkA>
</div> </div>
@ -31,15 +31,16 @@ const props = defineProps<{
}>(); }>();
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.ffcbddfc { .root {
display: block; display: block;
&.inline { &.inline {
display: inline-block; display: inline-block;
} }
}
> .main { .main {
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
@ -58,8 +59,9 @@ const props = defineProps<{
color: var(--accent); color: var(--accent);
background: var(--buttonHoverBg); background: var(--buttonHoverBg);
} }
}
> .icon { .icon {
margin-right: 0.75em; margin-right: 0.75em;
flex-shrink: 0; flex-shrink: 0;
text-align: center; text-align: center;
@ -72,24 +74,22 @@ const props = defineProps<{
padding-left: 4px; padding-left: 4px;
} }
} }
} }
> .text { .text {
flex-shrink: 1; flex-shrink: 1;
white-space: normal; white-space: normal;
padding-right: 12px; padding-right: 12px;
text-align: center; text-align: center;
} }
> .right { .suffix {
margin-left: auto; margin-left: auto;
opacity: 0.7; opacity: 0.7;
white-space: nowrap; white-space: nowrap;
> .text:not(:empty) { > .suffixText:not(:empty) {
margin-right: 0.75em; margin-right: 0.75em;
} }
}
}
} }
</style> </style>

View file

@ -1,8 +1,8 @@
<template> <template>
<section class="sdgxphyu"> <section>
<component :is="'h' + h">{{ block.title }}</component> <component :is="'h' + h" :class="h < 5 ? $style['h' + h] : null">{{ block.title }}</component>
<div class="children"> <div class="_gaps">
<XBlock v-for="child in block.children" :key="child.id" :page="page" :block="child" :h="h + 1"/> <XBlock v-for="child in block.children" :key="child.id" :page="page" :block="child" :h="h + 1"/>
</div> </div>
</section> </section>
@ -22,27 +22,19 @@ defineProps<{
}>(); }>();
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.sdgxphyu { .h2 {
margin: 1.5em 0;
> h2 {
font-size: 1.35em; font-size: 1.35em;
margin: 0 0 0.5em 0; margin: 0 0 0.5em 0;
} }
> h3 { .h3 {
font-size: 1em; font-size: 1em;
margin: 0 0 0.5em 0; margin: 0 0 0.5em 0;
} }
> h4 { .h4 {
font-size: 1em; font-size: 1em;
margin: 0 0 0.5em 0; margin: 0 0 0.5em 0;
}
> .children {
//padding 16px
}
} }
</style> </style>

View file

@ -1,7 +1,7 @@
<template> <template>
<div class="mrdgzndn"> <div class="_gaps">
<Mfm :text="block.text" :isNote="false" :i="$i"/> <Mfm :text="block.text" :isNote="false" :i="$i"/>
<MkUrlPreview v-for="url in urls" :key="url" :url="url" class="url"/> <MkUrlPreview v-for="url in urls" :key="url" :url="url"/>
</div> </div>
</template> </template>
@ -22,19 +22,3 @@ const props = defineProps<{
const urls = props.block.text ? extractUrlFromMfm(mfm.parse(props.block.text)) : []; const urls = props.block.text ? extractUrlFromMfm(mfm.parse(props.block.text)) : [];
</script> </script>
<style lang="scss" scoped>
.mrdgzndn {
&:not(:first-child) {
margin-top: 0.5em;
}
&:not(:last-child) {
margin-bottom: 0.5em;
}
> .url {
margin: 0.5em 0;
}
}
</style>

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="iroscrza" :class="{ center: page.alignCenter, serif: page.font === 'serif' }"> <div :class="{ [$style.center]: page.alignCenter, [$style.serif]: page.font === 'serif' }">
<XBlock v-for="child in page.content" :key="child.id" :block="child" :h="2"/> <XBlock v-for="child in page.content" :key="child.id" :block="child" :h="2"/>
</div> </div>
</template> </template>
@ -14,16 +14,12 @@ defineProps<{
}>(); }>();
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.iroscrza { .serif {
&.serif {
> div {
font-family: serif; font-family: serif;
} }
}
&.center { .center {
text-align: center; text-align: center;
}
} }
</style> </style>

View file

@ -5,10 +5,10 @@
<div class="_gaps"> <div class="_gaps">
<div v-for="relay in relays" :key="relay.inbox" class="relaycxt _panel" style="padding: 16px;"> <div v-for="relay in relays" :key="relay.inbox" class="relaycxt _panel" style="padding: 16px;">
<div>{{ relay.inbox }}</div> <div>{{ relay.inbox }}</div>
<div class="status"> <div style="margin: 8px 0;">
<i v-if="relay.status === 'accepted'" class="ti ti-check icon accepted"></i> <i v-if="relay.status === 'accepted'" class="ti ti-check" :class="$style.icon" style="color: var(--success);"></i>
<i v-else-if="relay.status === 'rejected'" class="ti ti-ban icon rejected"></i> <i v-else-if="relay.status === 'rejected'" class="ti ti-ban" :class="$style.icon" style="color: var(--error);"></i>
<i v-else class="ti ti-clock icon requesting"></i> <i v-else class="ti ti-clock" :class="$style.icon"></i>
<span>{{ i18n.t(`_relayStatus.${relay.status}`) }}</span> <span>{{ i18n.t(`_relayStatus.${relay.status}`) }}</span>
</div> </div>
<MkButton class="button" inline danger @click="remove(relay.inbox)"><i class="ti ti-trash"></i> {{ i18n.ts.remove }}</MkButton> <MkButton class="button" inline danger @click="remove(relay.inbox)"><i class="ti ti-trash"></i> {{ i18n.ts.remove }}</MkButton>
@ -83,23 +83,9 @@ definePageMetadata({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.relaycxt { .icon {
> .status {
margin: 8px 0;
> .icon {
width: 1em; width: 1em;
margin-right: 0.75em; margin-right: 0.75em;
&.accepted {
color: var(--success);
}
&.rejected {
color: var(--error);
}
}
}
} }
</style> </style>

View file

@ -2,29 +2,29 @@
<MkStickyContainer> <MkStickyContainer>
<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template> <template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :contentMax="700"> <MkSpacer :contentMax="700">
<div v-if="tab === 'featured'" class=""> <div v-if="tab === 'featured'">
<MkPagination v-slot="{items}" :pagination="featuredFlashsPagination"> <MkPagination v-slot="{items}" :pagination="featuredFlashsPagination">
<div class="_gaps_s"> <div class="_gaps_s">
<MkFlashPreview v-for="flash in items" :key="flash.id" class="" :flash="flash"/> <MkFlashPreview v-for="flash in items" :key="flash.id" :flash="flash"/>
</div> </div>
</MkPagination> </MkPagination>
</div> </div>
<div v-else-if="tab === 'my'" class="my"> <div v-else-if="tab === 'my'">
<div class="_gaps"> <div class="_gaps">
<MkButton class="new" gradate rounded style="margin: 0 auto;" @click="create()"><i class="ti ti-plus"></i></MkButton> <MkButton gradate rounded style="margin: 0 auto;" @click="create()"><i class="ti ti-plus"></i></MkButton>
<MkPagination v-slot="{items}" :pagination="myFlashsPagination"> <MkPagination v-slot="{items}" :pagination="myFlashsPagination">
<div class="_gaps_s"> <div class="_gaps_s">
<MkFlashPreview v-for="flash in items" :key="flash.id" class="" :flash="flash"/> <MkFlashPreview v-for="flash in items" :key="flash.id" :flash="flash"/>
</div> </div>
</MkPagination> </MkPagination>
</div> </div>
</div> </div>
<div v-else-if="tab === 'liked'" class=""> <div v-else-if="tab === 'liked'">
<MkPagination v-slot="{items}" :pagination="likedFlashsPagination"> <MkPagination v-slot="{items}" :pagination="likedFlashsPagination">
<div class="_gaps_s"> <div class="_gaps_s">
<MkFlashPreview v-for="like in items" :key="like.flash.id" class="" :flash="like.flash"/> <MkFlashPreview v-for="like in items" :key="like.flash.id" :flash="like.flash"/>
</div> </div>
</MkPagination> </MkPagination>
</div> </div>
@ -87,21 +87,3 @@ definePageMetadata(computed(() => ({
icon: 'ti ti-player-play', icon: 'ti ti-player-play',
}))); })));
</script> </script>
<style lang="scss" scoped>
.rknalgpo {
&.my .ckltabjg:first-child {
margin-top: 16px;
}
.ckltabjg:not(:last-child) {
margin-bottom: 8px;
}
@media (min-width: 500px) {
.ckltabjg:not(:last-child) {
margin-bottom: 16px;
}
}
}
</style>

View file

@ -2,14 +2,16 @@
<MkStickyContainer> <MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template> <template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :contentMax="700"> <MkSpacer :contentMax="700">
<div class="qkcjvfiv"> <div class="_gaps">
<MkButton primary class="add" @click="create"><i class="ti ti-plus"></i> {{ i18n.ts.createList }}</MkButton> <MkButton primary rounded style="margin: 0 auto;" @click="create"><i class="ti ti-plus"></i> {{ i18n.ts.createList }}</MkButton>
<MkPagination v-slot="{items}" ref="pagingComponent" :pagination="pagination" class="lists"> <MkPagination v-slot="{items}" ref="pagingComponent" :pagination="pagination">
<MkA v-for="list in items" :key="list.id" class="list _panel" :to="`/my/lists/${ list.id }`"> <div class="_gaps">
<div class="name">{{ list.name }}</div> <MkA v-for="list in items" :key="list.id" class="_panel" :class="$style.list" :to="`/my/lists/${ list.id }`">
<div style="margin-bottom: 4px;">{{ list.name }}</div>
<MkAvatars :userIds="list.userIds"/> <MkAvatars :userIds="list.userIds"/>
</MkA> </MkA>
</div>
</MkPagination> </MkPagination>
</div> </div>
</MkSpacer> </MkSpacer>
@ -58,14 +60,8 @@ definePageMetadata({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.qkcjvfiv { .list {
> .add {
margin: 0 auto var(--margin) auto;
}
> .lists {
> .list {
display: block; display: block;
padding: 16px; padding: 16px;
border: solid 1px var(--divider); border: solid 1px var(--divider);
@ -76,11 +72,5 @@ definePageMetadata({
border: solid 1px var(--accent); border: solid 1px var(--accent);
text-decoration: none; text-decoration: none;
} }
> .name {
margin-bottom: 4px;
}
}
}
} }
</style> </style>