forked from FoundKeyGang/FoundKey
client: tweak ui
This commit is contained in:
parent
4cc2a561d5
commit
f38b6a1806
33 changed files with 199 additions and 185 deletions
|
@ -12,66 +12,67 @@
|
|||
<template #header>
|
||||
{{ title }}
|
||||
</template>
|
||||
<FormBase class="xkpnjxcv">
|
||||
|
||||
<MkSpacer :margin-min="20" :margin-max="32">
|
||||
<div class="xkpnjxcv _formRoot">
|
||||
<template v-for="item in Object.keys(form).filter(item => !form[item].hidden)">
|
||||
<FormInput v-if="form[item].type === 'number'" v-model="values[item]" type="number" :step="form[item].step || 1">
|
||||
<span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span>
|
||||
<template v-if="form[item].description" #desc>{{ form[item].description }}</template>
|
||||
<FormInput v-if="form[item].type === 'number'" v-model="values[item]" type="number" :step="form[item].step || 1" class="_formBlock">
|
||||
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
||||
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
||||
</FormInput>
|
||||
<FormInput v-else-if="form[item].type === 'string' && !form[item].multiline" v-model="values[item]" type="text">
|
||||
<span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span>
|
||||
<template v-if="form[item].description" #desc>{{ form[item].description }}</template>
|
||||
<FormInput v-else-if="form[item].type === 'string' && !form[item].multiline" v-model="values[item]" type="text" class="_formBlock">
|
||||
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
||||
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
||||
</FormInput>
|
||||
<FormTextarea v-else-if="form[item].type === 'string' && form[item].multiline" v-model="values[item]">
|
||||
<span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span>
|
||||
<template v-if="form[item].description" #desc>{{ form[item].description }}</template>
|
||||
<FormTextarea v-else-if="form[item].type === 'string' && form[item].multiline" v-model="values[item]" class="_formBlock">
|
||||
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
||||
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
||||
</FormTextarea>
|
||||
<FormSwitch v-else-if="form[item].type === 'boolean'" v-model="values[item]">
|
||||
<FormSwitch v-else-if="form[item].type === 'boolean'" v-model="values[item]" class="_formBlock">
|
||||
<span v-text="form[item].label || item"></span>
|
||||
<template v-if="form[item].description" #desc>{{ form[item].description }}</template>
|
||||
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
||||
</FormSwitch>
|
||||
<FormSelect v-else-if="form[item].type === 'enum'" v-model="values[item]">
|
||||
<FormSelect v-else-if="form[item].type === 'enum'" v-model="values[item]" class="_formBlock">
|
||||
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
||||
<option v-for="item in form[item].enum" :key="item.value" :value="item.value">{{ item.label }}</option>
|
||||
</FormSelect>
|
||||
<FormRadios v-else-if="form[item].type === 'radio'" v-model="values[item]">
|
||||
<template #desc><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
||||
<FormRadios v-else-if="form[item].type === 'radio'" v-model="values[item]" class="_formBlock">
|
||||
<template #caption><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
||||
<option v-for="item in form[item].options" :key="item.value" :value="item.value">{{ item.label }}</option>
|
||||
</FormRadios>
|
||||
<FormRange v-else-if="form[item].type === 'range'" v-model="values[item]" :min="form[item].mim" :max="form[item].max" :step="form[item].step">
|
||||
<FormRange v-else-if="form[item].type === 'range'" v-model="values[item]" :min="form[item].mim" :max="form[item].max" :step="form[item].step" class="_formBlock">
|
||||
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
||||
<template v-if="form[item].description" #desc>{{ form[item].description }}</template>
|
||||
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
||||
</FormRange>
|
||||
<FormButton v-else-if="form[item].type === 'button'" @click="form[item].action($event, values)">
|
||||
<MkButton v-else-if="form[item].type === 'button'" @click="form[item].action($event, values)" class="_formBlock">
|
||||
<span v-text="form[item].content || item"></span>
|
||||
</FormButton>
|
||||
</MkButton>
|
||||
</template>
|
||||
</FormBase>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
</XModalWindow>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import XModalWindow from '@/components/ui/modal-window.vue';
|
||||
import FormBase from './debobigego/base.vue';
|
||||
import FormInput from './debobigego/input.vue';
|
||||
import FormTextarea from './debobigego/textarea.vue';
|
||||
import FormSwitch from './debobigego/switch.vue';
|
||||
import FormSelect from './debobigego/select.vue';
|
||||
import FormRange from './debobigego/range.vue';
|
||||
import FormButton from './debobigego/button.vue';
|
||||
import FormRadios from './debobigego/radios.vue';
|
||||
import FormInput from './form/input.vue';
|
||||
import FormTextarea from './form/textarea.vue';
|
||||
import FormSwitch from './form/switch.vue';
|
||||
import FormSelect from './form/select.vue';
|
||||
import FormRange from './form/range.vue';
|
||||
import MkButton from './ui/button.vue';
|
||||
import FormRadios from './form/radios.vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
XModalWindow,
|
||||
FormBase,
|
||||
FormInput,
|
||||
FormTextarea,
|
||||
FormSwitch,
|
||||
FormSelect,
|
||||
FormRange,
|
||||
FormButton,
|
||||
MkButton,
|
||||
FormRadios,
|
||||
},
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ export default defineComponent({
|
|||
> .icon {
|
||||
display: block;
|
||||
width: 60px;
|
||||
font-size: 60px; // unicodeな絵文字についてはwidthが効かないため
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@ export default defineComponent({
|
|||
> .icon {
|
||||
display: block;
|
||||
width: 60px;
|
||||
font-size: 60px; // unicodeな絵文字についてはwidthが効かないため
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ export default defineComponent({
|
|||
|
||||
> .title {
|
||||
opacity: 0.7;
|
||||
margin: 0 0 8px 12px;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
> .items {
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</div>
|
||||
-->
|
||||
|
||||
<MkPagination #default="{items}" ref="reports" :pagination="pagination" style="margin-top: var(--margin);">
|
||||
<MkPagination v-slot="{items}" ref="reports" :pagination="pagination" style="margin-top: var(--margin);">
|
||||
<div v-for="report in items" :key="report.id" class="bcekxzvu _card _gap">
|
||||
<div class="_content target">
|
||||
<MkAvatar class="avatar" :user="report.targetUser" :show-indicator="true"/>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</MkInput>
|
||||
<MkPagination ref="emojis" :pagination="pagination">
|
||||
<template #empty><span>{{ $ts.noCustomEmojis }}</span></template>
|
||||
<template #default="{items}">
|
||||
<template v-slot="{items}">
|
||||
<div class="ldhfsamy">
|
||||
<button v-for="emoji in items" :key="emoji.id" class="emoji _panel _button" @click="edit(emoji)">
|
||||
<img :src="emoji.url" class="img" :alt="emoji.name"/>
|
||||
|
@ -31,7 +31,7 @@
|
|||
</MkInput>
|
||||
<MkPagination ref="remoteEmojis" :pagination="remotePagination">
|
||||
<template #empty><span>{{ $ts.noCustomEmojis }}</span></template>
|
||||
<template #default="{items}">
|
||||
<template v-slot="{items}">
|
||||
<div class="ldhfsamy">
|
||||
<div v-for="emoji in items" :key="emoji.id" class="emoji _panel _button" @click="remoteMenu(emoji, $event)">
|
||||
<img :src="emoji.url" class="img" :alt="emoji.name"/>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<template #label>MIME type</template>
|
||||
</MkInput>
|
||||
</div>
|
||||
<MkPagination #default="{items}" ref="files" :pagination="pagination" class="urempief">
|
||||
<MkPagination v-slot="{items}" ref="files" :pagination="pagination" class="urempief">
|
||||
<button v-for="file in items" :key="file.id" class="file _panel _button _gap" @click="show(file, $event)">
|
||||
<MkDriveFileThumbnail class="thumbnail" :file="file" fit="contain"/>
|
||||
<div class="body">
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
</MkInput>
|
||||
</div>
|
||||
|
||||
<MkPagination #default="{items}" ref="users" :pagination="pagination" class="users">
|
||||
<MkPagination v-slot="{items}" ref="users" :pagination="pagination" class="users">
|
||||
<button v-for="user in items" :key="user.id" class="user _panel _button _gap" @click="show(user)">
|
||||
<MkAvatar class="avatar" :user="user" :disable-link="true" :show-indicator="true"/>
|
||||
<div class="body">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<MkSpacer :content-max="800">
|
||||
<MkPagination #default="{items}" :pagination="pagination" class="ruryvtyk _content">
|
||||
<MkPagination v-slot="{items}" :pagination="pagination" class="ruryvtyk _content">
|
||||
<section v-for="(announcement, i) in items" :key="announcement.id" class="_card announcement">
|
||||
<div class="_title"><span v-if="$i && !announcement.isRead">🆕 </span>{{ announcement.title }}</div>
|
||||
<div class="_content">
|
||||
|
|
|
@ -10,20 +10,20 @@
|
|||
|
||||
<div class="_section">
|
||||
<div v-if="tab === 'featured'" class="_content grwlizim featured">
|
||||
<MkPagination #default="{items}" :pagination="featuredPagination">
|
||||
<MkPagination v-slot="{items}" :pagination="featuredPagination">
|
||||
<MkChannelPreview v-for="channel in items" :key="channel.id" class="_gap" :channel="channel"/>
|
||||
</MkPagination>
|
||||
</div>
|
||||
|
||||
<div v-if="tab === 'following'" class="_content grwlizim following">
|
||||
<MkPagination #default="{items}" :pagination="followingPagination">
|
||||
<MkPagination v-slot="{items}" :pagination="followingPagination">
|
||||
<MkChannelPreview v-for="channel in items" :key="channel.id" class="_gap" :channel="channel"/>
|
||||
</MkPagination>
|
||||
</div>
|
||||
|
||||
<div v-if="tab === 'owned'" class="_content grwlizim owned">
|
||||
<MkButton class="new" @click="create()"><i class="fas fa-plus"></i></MkButton>
|
||||
<MkPagination #default="{items}" :pagination="ownedPagination">
|
||||
<MkPagination v-slot="{items}" :pagination="ownedPagination">
|
||||
<MkChannelPreview v-for="channel in items" :key="channel.id" class="_gap" :channel="channel"/>
|
||||
</MkPagination>
|
||||
</div>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<MkPagination #default="{items}" ref="instances" :key="host + state" :pagination="pagination">
|
||||
<MkPagination v-slot="{items}" ref="instances" :key="host + state" :pagination="pagination">
|
||||
<div class="dqokceoi">
|
||||
<MkA v-for="instance in items" :key="instance.id" class="instance" :to="`/instance-info/${instance.host}`">
|
||||
<div class="host"><img :src="instance.faviconUrl">{{ instance.host }}</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div>{{ $ts.noFollowRequests }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #default="{items}">
|
||||
<template v-slot="{items}">
|
||||
<div v-for="req in items" :key="req.id" class="user _panel">
|
||||
<MkAvatar class="avatar" :user="req.follower" :show-indicator="true"/>
|
||||
<div class="body">
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div v-if="tab === 'explore'">
|
||||
<MkFolder class="_gap">
|
||||
<template #header><i class="fas fa-clock"></i>{{ $ts.recentPosts }}</template>
|
||||
<MkPagination #default="{items}" :pagination="recentPostsPagination" :disable-auto-load="true">
|
||||
<MkPagination v-slot="{items}" :pagination="recentPostsPagination" :disable-auto-load="true">
|
||||
<div class="vfpdbgtk">
|
||||
<MkGalleryPostPreview v-for="post in items" :key="post.id" :post="post" class="post"/>
|
||||
</div>
|
||||
|
@ -17,7 +17,7 @@
|
|||
</MkFolder>
|
||||
<MkFolder class="_gap">
|
||||
<template #header><i class="fas fa-fire-alt"></i>{{ $ts.popularPosts }}</template>
|
||||
<MkPagination #default="{items}" :pagination="popularPostsPagination" :disable-auto-load="true">
|
||||
<MkPagination v-slot="{items}" :pagination="popularPostsPagination" :disable-auto-load="true">
|
||||
<div class="vfpdbgtk">
|
||||
<MkGalleryPostPreview v-for="post in items" :key="post.id" :post="post" class="post"/>
|
||||
</div>
|
||||
|
@ -25,7 +25,7 @@
|
|||
</MkFolder>
|
||||
</div>
|
||||
<div v-else-if="tab === 'liked'">
|
||||
<MkPagination #default="{items}" :pagination="likedPostsPagination">
|
||||
<MkPagination v-slot="{items}" :pagination="likedPostsPagination">
|
||||
<div class="vfpdbgtk">
|
||||
<MkGalleryPostPreview v-for="like in items" :key="like.id" :post="like.post" class="post"/>
|
||||
</div>
|
||||
|
@ -33,7 +33,7 @@
|
|||
</div>
|
||||
<div v-else-if="tab === 'my'">
|
||||
<MkA to="/gallery/new" class="_link" style="margin: 16px;"><i class="fas fa-plus"></i> {{ $ts.postToGallery }}</MkA>
|
||||
<MkPagination #default="{items}" :pagination="myPostsPagination">
|
||||
<MkPagination v-slot="{items}" :pagination="myPostsPagination">
|
||||
<div class="vfpdbgtk">
|
||||
<MkGalleryPostPreview v-for="post in items" :key="post.id" :post="post" class="post"/>
|
||||
</div>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<MkAd :prefer="['horizontal', 'horizontal-big']"/>
|
||||
<MkContainer :max-height="300" :foldable="true" class="other">
|
||||
<template #header><i class="fas fa-clock"></i> {{ $ts.recentPosts }}</template>
|
||||
<MkPagination #default="{items}" :pagination="otherPostsPagination">
|
||||
<MkPagination v-slot="{items}" :pagination="otherPostsPagination">
|
||||
<div class="sdrarzaf">
|
||||
<MkGalleryPostPreview v-for="post in items" :key="post.id" :post="post" class="post"/>
|
||||
</div>
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
<template>
|
||||
<div class="ieepwinx _section">
|
||||
<MkSpacer :content-max="700">
|
||||
<div class="ieepwinx">
|
||||
<MkButton :link="true" to="/my/antennas/create" primary class="add"><i class="fas fa-plus"></i> {{ $ts.add }}</MkButton>
|
||||
|
||||
<div class="_content">
|
||||
<MkPagination #default="{items}" ref="list" :pagination="pagination">
|
||||
<div class="">
|
||||
<MkPagination v-slot="{items}" ref="list" :pagination="pagination">
|
||||
<MkA v-for="antenna in items" :key="antenna.id" class="ljoevbzj" :to="`/my/antennas/${antenna.id}`">
|
||||
<div class="name">{{ antenna.name }}</div>
|
||||
</MkA>
|
||||
</MkPagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -29,6 +31,7 @@ export default defineComponent({
|
|||
[symbols.PAGE_INFO]: {
|
||||
title: this.$ts.manageAntennas,
|
||||
icon: 'fas fa-satellite',
|
||||
bg: 'var(--bg)',
|
||||
action: {
|
||||
icon: 'fas fa-plus',
|
||||
handler: this.create
|
||||
|
@ -45,7 +48,6 @@ export default defineComponent({
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.ieepwinx {
|
||||
padding: 16px;
|
||||
|
||||
> .add {
|
||||
margin: 0 auto 16px auto;
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<template>
|
||||
<div class="_section qtcaoidl">
|
||||
<MkSpacer :content-max="700">
|
||||
<div class="qtcaoidl">
|
||||
<MkButton primary class="add" @click="create"><i class="fas fa-plus"></i> {{ $ts.add }}</MkButton>
|
||||
|
||||
<div class="_content">
|
||||
<MkPagination #default="{items}" ref="list" :pagination="pagination" class="list">
|
||||
<MkPagination v-slot="{items}" ref="list" :pagination="pagination" class="list">
|
||||
<MkA v-for="item in items" :key="item.id" :to="`/clips/${item.id}`" class="item _panel _gap">
|
||||
<b>{{ item.name }}</b>
|
||||
<div v-if="item.description" class="description">{{ item.description }}</div>
|
||||
</MkA>
|
||||
</MkPagination>
|
||||
</div>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -31,6 +31,7 @@ export default defineComponent({
|
|||
[symbols.PAGE_INFO]: {
|
||||
title: this.$ts.clip,
|
||||
icon: 'fas fa-paperclip',
|
||||
bg: 'var(--bg)',
|
||||
action: {
|
||||
icon: 'fas fa-plus',
|
||||
handler: this.create
|
||||
|
@ -86,7 +87,6 @@ export default defineComponent({
|
|||
margin: 0 auto 16px auto;
|
||||
}
|
||||
|
||||
> ._content {
|
||||
> .list {
|
||||
> .item {
|
||||
display: block;
|
||||
|
@ -99,6 +99,5 @@ export default defineComponent({
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<div v-if="tab === 'owned'" class="_content">
|
||||
<MkButton primary style="margin: 0 auto var(--margin) auto;" @click="create"><i class="fas fa-plus"></i> {{ $ts.createGroup }}</MkButton>
|
||||
|
||||
<MkPagination #default="{items}" ref="owned" :pagination="ownedPagination">
|
||||
<MkPagination v-slot="{items}" ref="owned" :pagination="ownedPagination">
|
||||
<div v-for="group in items" :key="group.id" class="_card">
|
||||
<div class="_title"><MkA :to="`/my/groups/${ group.id }`" class="_link">{{ group.name }}</MkA></div>
|
||||
<div class="_content"><MkAvatars :user-ids="group.userIds"/></div>
|
||||
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
|
||||
<div v-else-if="tab === 'joined'" class="_content">
|
||||
<MkPagination #default="{items}" ref="joined" :pagination="joinedPagination">
|
||||
<MkPagination v-slot="{items}" ref="joined" :pagination="joinedPagination">
|
||||
<div v-for="group in items" :key="group.id" class="_card">
|
||||
<div class="_title">{{ group.name }}</div>
|
||||
<div class="_content"><MkAvatars :user-ids="group.userIds"/></div>
|
||||
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
|
||||
<div v-else-if="tab === 'invites'" class="_content">
|
||||
<MkPagination #default="{items}" ref="invitations" :pagination="invitationPagination">
|
||||
<MkPagination v-slot="{items}" ref="invitations" :pagination="invitationPagination">
|
||||
<div v-for="invitation in items" :key="invitation.id" class="_card">
|
||||
<div class="_title">{{ invitation.group.name }}</div>
|
||||
<div class="_content"><MkAvatars :user-ids="invitation.group.userIds"/></div>
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<template>
|
||||
<div class="qkcjvfiv">
|
||||
<MkSpacer :content-max="700">
|
||||
<div class="qkcjvfiv">
|
||||
<MkButton primary class="add" @click="create"><i class="fas fa-plus"></i> {{ $ts.createList }}</MkButton>
|
||||
|
||||
<MkPagination #default="{items}" ref="list" :pagination="pagination" class="lists _content">
|
||||
<MkPagination v-slot="{items}" ref="list" :pagination="pagination" class="lists _content">
|
||||
<MkA v-for="list in items" :key="list.id" class="list _panel" :to="`/my/lists/${ list.id }`">
|
||||
<div class="name">{{ list.name }}</div>
|
||||
<MkAvatars :user-ids="list.userIds"/>
|
||||
</MkA>
|
||||
</MkPagination>
|
||||
</div>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -60,8 +62,6 @@ export default defineComponent({
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.qkcjvfiv {
|
||||
padding: 16px;
|
||||
|
||||
> .add {
|
||||
margin: 0 auto var(--margin) auto;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<div class="mk-list-page">
|
||||
<MkSpacer :content-max="700">
|
||||
<div class="mk-list-page">
|
||||
<transition name="zoom" mode="out-in">
|
||||
<div v-if="list" class="_section">
|
||||
<div class="_content">
|
||||
|
@ -29,7 +30,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -49,6 +51,7 @@ export default defineComponent({
|
|||
[symbols.PAGE_INFO]: computed(() => this.list ? {
|
||||
title: this.list.name,
|
||||
icon: 'fas fa-list-ul',
|
||||
bg: 'var(--bg)',
|
||||
} : null),
|
||||
list: null,
|
||||
users: [],
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<MkAd :prefer="['horizontal', 'horizontal-big']"/>
|
||||
<MkContainer :max-height="300" :foldable="true" class="other">
|
||||
<template #header><i class="fas fa-clock"></i> {{ $ts.recentPosts }}</template>
|
||||
<MkPagination #default="{items}" :pagination="otherPostsPagination">
|
||||
<MkPagination v-slot="{items}" :pagination="otherPostsPagination">
|
||||
<MkPagePreview v-for="page in items" :key="page.id" :page="page" class="_gap"/>
|
||||
</MkPagination>
|
||||
</MkContainer>
|
||||
|
|
|
@ -1,50 +1,40 @@
|
|||
<template>
|
||||
<MkSpacer>
|
||||
<!-- TODO: MkHeaderに統合 -->
|
||||
<MkTab v-if="$i" v-model="tab">
|
||||
<option value="featured"><i class="fas fa-fire-alt"></i> {{ $ts._pages.featured }}</option>
|
||||
<option value="my"><i class="fas fa-edit"></i> {{ $ts._pages.my }}</option>
|
||||
<option value="liked"><i class="fas fa-heart"></i> {{ $ts._pages.liked }}</option>
|
||||
</MkTab>
|
||||
|
||||
<div class="_section">
|
||||
<div v-if="tab === 'featured'" class="rknalgpo _content">
|
||||
<MkPagination #default="{items}" :pagination="featuredPagesPagination">
|
||||
<MkSpacer :content-max="700">
|
||||
<div v-if="tab === 'featured'" class="rknalgpo">
|
||||
<MkPagination v-slot="{items}" :pagination="featuredPagesPagination">
|
||||
<MkPagePreview v-for="page in items" :key="page.id" class="ckltabjg" :page="page"/>
|
||||
</MkPagination>
|
||||
</div>
|
||||
|
||||
<div v-if="tab === 'my'" class="rknalgpo _content my">
|
||||
<div v-else-if="tab === 'my'" class="rknalgpo my">
|
||||
<MkButton class="new" @click="create()"><i class="fas fa-plus"></i></MkButton>
|
||||
<MkPagination #default="{items}" :pagination="myPagesPagination">
|
||||
<MkPagination v-slot="{items}" :pagination="myPagesPagination">
|
||||
<MkPagePreview v-for="page in items" :key="page.id" class="ckltabjg" :page="page"/>
|
||||
</MkPagination>
|
||||
</div>
|
||||
|
||||
<div v-if="tab === 'liked'" class="rknalgpo _content">
|
||||
<MkPagination #default="{items}" :pagination="likedPagesPagination">
|
||||
<div v-else-if="tab === 'liked'" class="rknalgpo">
|
||||
<MkPagination v-slot="{items}" :pagination="likedPagesPagination">
|
||||
<MkPagePreview v-for="like in items" :key="like.page.id" class="ckltabjg" :page="like.page"/>
|
||||
</MkPagination>
|
||||
</div>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { computed, defineComponent } from 'vue';
|
||||
import MkPagePreview from '@/components/page-preview.vue';
|
||||
import MkPagination from '@/components/ui/pagination.vue';
|
||||
import MkButton from '@/components/ui/button.vue';
|
||||
import MkTab from '@/components/tab.vue';
|
||||
import * as symbols from '@/symbols';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
MkPagePreview, MkPagination, MkButton, MkTab
|
||||
MkPagePreview, MkPagination, MkButton
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
[symbols.PAGE_INFO]: {
|
||||
[symbols.PAGE_INFO]: computed(() => ({
|
||||
title: this.$ts.pages,
|
||||
icon: 'fas fa-sticky-note',
|
||||
bg: 'var(--bg)',
|
||||
|
@ -53,7 +43,23 @@ export default defineComponent({
|
|||
text: this.$ts.create,
|
||||
handler: this.create,
|
||||
}],
|
||||
},
|
||||
tabs: [{
|
||||
active: this.tab === 'featured',
|
||||
title: this.$ts._pages.featured,
|
||||
icon: 'fas fa-fire-alt',
|
||||
onClick: () => { this.tab = 'featured'; },
|
||||
}, {
|
||||
active: this.tab === 'my',
|
||||
title: this.$ts._pages.my,
|
||||
icon: 'fas fa-edit',
|
||||
onClick: () => { this.tab = 'my'; },
|
||||
}, {
|
||||
active: this.tab === 'liked',
|
||||
title: this.$ts._pages.liked,
|
||||
icon: 'fas fa-heart',
|
||||
onClick: () => { this.tab = 'liked'; },
|
||||
},]
|
||||
})),
|
||||
tab: 'featured',
|
||||
featuredPagesPagination: {
|
||||
endpoint: 'pages/featured',
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div>{{ $ts.nothing }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #default="{items}">
|
||||
<template v-slot="{items}">
|
||||
<div v-for="token in items" :key="token.id" class="_debobigegoPanel bfomjevm">
|
||||
<img v-if="token.iconUrl" class="icon" :src="token.iconUrl" alt=""/>
|
||||
<div class="body">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div ref="el" class="vvcocwet" :class="{ wide: !narrow }">
|
||||
<div v-if="!narrow || page == null" class="nav">
|
||||
<MkSpacer :content-max="700">
|
||||
<MkSpacer :content-max="700" :margin-min="20">
|
||||
<div class="baaadecd">
|
||||
<div class="title">{{ $ts.settings }}</div>
|
||||
<MkInfo v-if="emailNotConfigured" warn class="info">{{ $ts.emailNotConfiguredWarning }} <MkA to="/settings/email" class="_link">{{ $ts.configure }}</MkA></MkInfo>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div v-if="tab === 'mute'">
|
||||
<MkPagination :pagination="mutingPagination" class="muting">
|
||||
<template #empty><FormInfo>{{ $ts.noUsers }}</FormInfo></template>
|
||||
<template #default="{items}">
|
||||
<template v-slot="{items}">
|
||||
<FormGroup>
|
||||
<FormLink v-for="mute in items" :key="mute.id" :to="userPage(mute.mutee)">
|
||||
<MkAcct :user="mute.mutee"/>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<div v-if="tab === 'block'">
|
||||
<MkPagination :pagination="blockingPagination" class="blocking">
|
||||
<template #empty><FormInfo>{{ $ts.noUsers }}</FormInfo></template>
|
||||
<template #default="{items}">
|
||||
<template v-slot="{items}">
|
||||
<FormGroup>
|
||||
<FormLink v-for="block in items" :key="block.id" :to="userPage(block.blockee)">
|
||||
<MkAcct :user="block.blockee"/>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<FormSection>
|
||||
<template #label>{{ $ts.signinHistory }}</template>
|
||||
<FormPagination :pagination="pagination">
|
||||
<template #default="{items}">
|
||||
<template v-slot="{items}">
|
||||
<div>
|
||||
<div v-for="item in items" :key="item.id" v-panel class="timnmucd">
|
||||
<header>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<FormBase>
|
||||
<FormSelect v-model="selectedThemeId">
|
||||
<div class="_formRoot">
|
||||
<FormSelect v-model="selectedThemeId" class="_formBlock">
|
||||
<template #label>{{ $ts.theme }}</template>
|
||||
<optgroup :label="$ts._theme.installedThemes">
|
||||
<option v-for="x in installedThemes" :key="x.id" :value="x.id">{{ x.name }}</option>
|
||||
|
@ -10,31 +10,31 @@
|
|||
</optgroup>
|
||||
</FormSelect>
|
||||
<template v-if="selectedTheme">
|
||||
<FormInput readonly :modelValue="selectedTheme.author">
|
||||
<span>{{ $ts.author }}</span>
|
||||
<FormInput readonly :modelValue="selectedTheme.author" class="_formBlock">
|
||||
<template #label>{{ $ts.author }}</template>
|
||||
</FormInput>
|
||||
<FormTextarea v-if="selectedTheme.desc" readonly :modelValue="selectedTheme.desc">
|
||||
<span>{{ $ts._theme.description }}</span>
|
||||
<FormTextarea v-if="selectedTheme.desc" readonly :modelValue="selectedTheme.desc" class="_formBlock">
|
||||
<template #label>{{ $ts._theme.description }}</template>
|
||||
</FormTextarea>
|
||||
<FormTextarea readonly tall :modelValue="selectedThemeCode">
|
||||
<span>{{ $ts._theme.code }}</span>
|
||||
<template #desc><button class="_textButton" @click="copyThemeCode()">{{ $ts.copy }}</button></template>
|
||||
<FormTextarea readonly tall :modelValue="selectedThemeCode" class="_formBlock">
|
||||
<template #label>{{ $ts._theme.code }}</template>
|
||||
<template #caption><button class="_textButton" @click="copyThemeCode()">{{ $ts.copy }}</button></template>
|
||||
</FormTextarea>
|
||||
<FormButton v-if="!builtinThemes.some(t => t.id == selectedTheme.id)" danger @click="uninstall()"><i class="fas fa-trash-alt"></i> {{ $ts.uninstall }}</FormButton>
|
||||
<FormButton v-if="!builtinThemes.some(t => t.id == selectedTheme.id)" class="_formBlock" danger @click="uninstall()"><i class="fas fa-trash-alt"></i> {{ $ts.uninstall }}</FormButton>
|
||||
</template>
|
||||
</FormBase>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import * as JSON5 from 'json5';
|
||||
import FormTextarea from '@/components/debobigego/textarea.vue';
|
||||
import FormSelect from '@/components/debobigego/select.vue';
|
||||
import FormRadios from '@/components/debobigego/radios.vue';
|
||||
import FormTextarea from '@/components/form/textarea.vue';
|
||||
import FormSelect from '@/components/form/select.vue';
|
||||
import FormRadios from '@/components/form/radios.vue';
|
||||
import FormBase from '@/components/debobigego/base.vue';
|
||||
import FormGroup from '@/components/debobigego/group.vue';
|
||||
import FormInput from '@/components/debobigego/input.vue';
|
||||
import FormButton from '@/components/debobigego/button.vue';
|
||||
import FormInput from '@/components/form/input.vue';
|
||||
import FormButton from '@/components/ui/button.vue';
|
||||
import { Theme, builtinThemes } from '@/scripts/theme';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||
import * as os from '@/os';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<MkPagination #default="{items}" ref="list" :pagination="pagination">
|
||||
<MkPagination v-slot="{items}" ref="list" :pagination="pagination">
|
||||
<MkA v-for="item in items" :key="item.id" :to="`/clips/${item.id}`" class="item _panel _gap">
|
||||
<b>{{ item.name }}</b>
|
||||
<div v-if="item.description" class="description">{{ item.description }}</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<MkPagination #default="{items}" ref="list" :pagination="pagination" class="mk-following-or-followers">
|
||||
<MkPagination v-slot="{items}" ref="list" :pagination="pagination" class="mk-following-or-followers">
|
||||
<div class="users _isolated">
|
||||
<MkUserInfo v-for="user in items.map(x => type === 'following' ? x.followee : x.follower)" :key="user.id" class="user" :user="user"/>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<MkPagination #default="{items}" :pagination="pagination">
|
||||
<MkPagination v-slot="{items}" :pagination="pagination">
|
||||
<div class="jrnovfpt">
|
||||
<MkGalleryPostPreview v-for="post in items" :key="post.id" :post="post" class="post"/>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<MkPagination #default="{items}" ref="list" :pagination="pagination">
|
||||
<MkPagination v-slot="{items}" ref="list" :pagination="pagination">
|
||||
<MkPagePreview v-for="page in items" :key="page.id" :page="page" class="_gap"/>
|
||||
</MkPagination>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<MkPagination #default="{items}" ref="list" :pagination="pagination">
|
||||
<MkPagination v-slot="{items}" ref="list" :pagination="pagination">
|
||||
<div v-for="item in items" :key="item.id" :to="`/clips/${item.id}`" class="item _panel _gap afdcfbfb">
|
||||
<div class="header">
|
||||
<MkAvatar class="avatar" :user="user"/>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { isScreenTouching } from '@/os';
|
||||
import { Ref, ref } from 'vue';
|
||||
import { isDeviceTouch } from './is-device-touch';
|
||||
|
||||
export function useTooltip(onShow: (showing: Ref<boolean>) => void) {
|
||||
let isHovering = false;
|
||||
|
@ -13,7 +14,7 @@ export function useTooltip(onShow: (showing: Ref<boolean>) => void) {
|
|||
|
||||
// iOS(Androidも?)では、要素をタップした直後に(おせっかいで)mouseoverイベントを発火させたりするため、その対策
|
||||
// これが無いと、画面に触れてないのにツールチップが出たりしてしまう
|
||||
if (!isScreenTouching) return;
|
||||
if (isDeviceTouch && !isScreenTouching) return;
|
||||
|
||||
const showing = ref(true);
|
||||
onShow(showing);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
<div class="announcements panel">
|
||||
<header>{{ $ts.announcements }}</header>
|
||||
<MkPagination #default="{items}" :pagination="announcements" class="list">
|
||||
<MkPagination v-slot="{items}" :pagination="announcements" class="list">
|
||||
<section v-for="announcement in items" :key="announcement.id" class="item">
|
||||
<div class="title">{{ announcement.title }}</div>
|
||||
<div class="content">
|
||||
|
|
Loading…
Reference in a new issue