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,87 +111,82 @@ 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;
&:empty { &:empty {
display: none; display: none;
}
}
> .caption {
font-size: 0.85em;
padding: 8px 0 0 0;
color: var(--fgTransparentWeak);
&:empty {
display: none;
}
}
> .input {
position: relative;
> textarea {
appearance: none;
-webkit-appearance: none;
display: block;
width: 100%;
min-width: 100%;
max-width: 100%;
min-height: 130px;
margin: 0;
padding: 12px;
font: inherit;
font-weight: normal;
font-size: 1em;
color: var(--fg);
background: var(--panel);
border: solid 1px var(--panel);
border-radius: 6px;
outline: none;
box-shadow: none;
box-sizing: border-box;
transition: border-color 0.1s ease-out;
&:hover {
border-color: var(--inputBorderHover) !important;
}
}
&.focused {
> textarea {
border-color: var(--accent) !important;
}
}
&.disabled {
opacity: 0.7;
&, * {
cursor: not-allowed !important;
}
}
&.tall {
> textarea {
min-height: 200px;
}
}
&.pre {
> textarea {
white-space: pre;
}
}
}
> .save {
margin: 8px 0 0 0;
} }
} }
.caption {
font-size: 0.85em;
padding: 8px 0 0 0;
color: var(--fgTransparentWeak);
&:empty {
display: none;
}
}
.textarea {
appearance: none;
-webkit-appearance: none;
display: block;
width: 100%;
min-width: 100%;
max-width: 100%;
min-height: 130px;
margin: 0;
padding: 12px;
font: inherit;
font-weight: normal;
font-size: 1em;
color: var(--fg);
background: var(--panel);
border: solid 1px var(--panel);
border-radius: 6px;
outline: none;
box-shadow: none;
box-sizing: border-box;
transition: border-color 0.1s ease-out;
&:hover {
border-color: var(--inputBorderHover) !important;
}
}
.focused {
> .textarea {
border-color: var(--accent) !important;
}
}
.disabled {
opacity: 0.7;
cursor: not-allowed !important;
> .textarea {
cursor: not-allowed !important;
}
}
.tall {
> .textarea {
min-height: 200px;
}
}
.pre {
> .textarea {
white-space: pre;
}
}
.save {
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,65 +31,65 @@ 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%;
box-sizing: border-box; box-sizing: border-box;
padding: 10px 14px; padding: 10px 14px;
background: var(--buttonBg); background: var(--buttonBg);
border-radius: 6px; border-radius: 6px;
font-size: 0.9em; font-size: 0.9em;
&:hover { &:hover {
text-decoration: none; text-decoration: none;
background: var(--buttonHoverBg); background: var(--buttonHoverBg);
} }
&.active { &.active {
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;
color: var(--fgTransparentWeak); color: var(--fgTransparentWeak);
&:empty { &:empty {
display: none; display: none;
& + .text { & + .text {
padding-left: 4px; padding-left: 4px;
}
}
}
> .text {
flex-shrink: 1;
white-space: normal;
padding-right: 12px;
text-align: center;
}
> .right {
margin-left: auto;
opacity: 0.7;
white-space: nowrap;
> .text:not(:empty) {
margin-right: 0.75em;
}
} }
} }
} }
.text {
flex-shrink: 1;
white-space: normal;
padding-right: 12px;
text-align: center;
}
.suffix {
margin-left: auto;
opacity: 0.7;
white-space: nowrap;
> .suffixText:not(:empty) {
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; font-size: 1.35em;
margin: 0 0 0.5em 0;
}
> h2 { .h3 {
font-size: 1.35em; font-size: 1em;
margin: 0 0 0.5em 0; margin: 0 0 0.5em 0;
} }
> h3 { .h4 {
font-size: 1em; font-size: 1em;
margin: 0 0 0.5em 0; margin: 0 0 0.5em 0;
}
> h4 {
font-size: 1em;
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 { font-family: serif;
> div { }
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 { width: 1em;
margin: 8px 0; margin-right: 0.75em;
> .icon {
width: 1em;
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 }`">
<MkAvatars :userIds="list.userIds"/> <div style="margin-bottom: 4px;">{{ list.name }}</div>
</MkA> <MkAvatars :userIds="list.userIds"/>
</MkA>
</div>
</MkPagination> </MkPagination>
</div> </div>
</MkSpacer> </MkSpacer>
@ -58,29 +60,17 @@ definePageMetadata({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.qkcjvfiv { .list {
> .add { display: block;
margin: 0 auto var(--margin) auto; padding: 16px;
} border: solid 1px var(--divider);
border-radius: 6px;
margin-bottom: 8px;
> .lists { &:hover {
> .list { border: solid 1px var(--accent);
display: block; text-decoration: none;
padding: 16px;
border: solid 1px var(--divider);
border-radius: 6px;
margin-bottom: 8px;
&:hover {
border: solid 1px var(--accent);
text-decoration: none;
}
> .name {
margin-bottom: 4px;
}
}
} }
} }
</style> </style>