Merge branch 'notification-read-api' into swn
This commit is contained in:
commit
853982aa94
64 changed files with 158 additions and 437 deletions
|
|
@ -186,14 +186,6 @@ export default defineComponent({
|
|||
os.success();
|
||||
},
|
||||
|
||||
setAsAvatar() {
|
||||
os.updateAvatar(this.file);
|
||||
},
|
||||
|
||||
setAsBanner() {
|
||||
os.updateBanner(this.file);
|
||||
},
|
||||
|
||||
addApp() {
|
||||
alert('not implemented yet');
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,37 +1,58 @@
|
|||
import { App } from 'vue';
|
||||
|
||||
import mfm from './global/misskey-flavored-markdown.vue';
|
||||
import a from './global/a.vue';
|
||||
import acct from './global/acct.vue';
|
||||
import avatar from './global/avatar.vue';
|
||||
import emoji from './global/emoji.vue';
|
||||
import userName from './global/user-name.vue';
|
||||
import ellipsis from './global/ellipsis.vue';
|
||||
import time from './global/time.vue';
|
||||
import url from './global/url.vue';
|
||||
import i18n from './global/i18n';
|
||||
import loading from './global/loading.vue';
|
||||
import error from './global/error.vue';
|
||||
import ad from './global/ad.vue';
|
||||
import header from './global/header.vue';
|
||||
import spacer from './global/spacer.vue';
|
||||
import stickyContainer from './global/sticky-container.vue';
|
||||
import Mfm from './global/misskey-flavored-markdown.vue';
|
||||
import MkA from './global/a.vue';
|
||||
import MkAcct from './global/acct.vue';
|
||||
import MkAvatar from './global/avatar.vue';
|
||||
import MkEmoji from './global/emoji.vue';
|
||||
import MkUserName from './global/user-name.vue';
|
||||
import MkEllipsis from './global/ellipsis.vue';
|
||||
import MkTime from './global/time.vue';
|
||||
import MkUrl from './global/url.vue';
|
||||
import I18n from './global/i18n';
|
||||
import MkLoading from './global/loading.vue';
|
||||
import MkError from './global/error.vue';
|
||||
import MkAd from './global/ad.vue';
|
||||
import MkHeader from './global/header.vue';
|
||||
import MkSpacer from './global/spacer.vue';
|
||||
import MkStickyContainer from './global/sticky-container.vue';
|
||||
|
||||
export default function(app: App) {
|
||||
app.component('I18n', i18n);
|
||||
app.component('Mfm', mfm);
|
||||
app.component('MkA', a);
|
||||
app.component('MkAcct', acct);
|
||||
app.component('MkAvatar', avatar);
|
||||
app.component('MkEmoji', emoji);
|
||||
app.component('MkUserName', userName);
|
||||
app.component('MkEllipsis', ellipsis);
|
||||
app.component('MkTime', time);
|
||||
app.component('MkUrl', url);
|
||||
app.component('MkLoading', loading);
|
||||
app.component('MkError', error);
|
||||
app.component('MkAd', ad);
|
||||
app.component('MkHeader', header);
|
||||
app.component('MkSpacer', spacer);
|
||||
app.component('MkStickyContainer', stickyContainer);
|
||||
app.component('I18n', I18n);
|
||||
app.component('Mfm', Mfm);
|
||||
app.component('MkA', MkA);
|
||||
app.component('MkAcct', MkAcct);
|
||||
app.component('MkAvatar', MkAvatar);
|
||||
app.component('MkEmoji', MkEmoji);
|
||||
app.component('MkUserName', MkUserName);
|
||||
app.component('MkEllipsis', MkEllipsis);
|
||||
app.component('MkTime', MkTime);
|
||||
app.component('MkUrl', MkUrl);
|
||||
app.component('MkLoading', MkLoading);
|
||||
app.component('MkError', MkError);
|
||||
app.component('MkAd', MkAd);
|
||||
app.component('MkHeader', MkHeader);
|
||||
app.component('MkSpacer', MkSpacer);
|
||||
app.component('MkStickyContainer', MkStickyContainer);
|
||||
}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
I18n: typeof I18n;
|
||||
Mfm: typeof Mfm;
|
||||
MkA: typeof MkA;
|
||||
MkAcct: typeof MkAcct;
|
||||
MkAvatar: typeof MkAvatar;
|
||||
MkEmoji: typeof MkEmoji;
|
||||
MkUserName: typeof MkUserName;
|
||||
MkEllipsis: typeof MkEllipsis;
|
||||
MkTime: typeof MkTime;
|
||||
MkUrl: typeof MkUrl;
|
||||
MkLoading: typeof MkLoading;
|
||||
MkError: typeof MkError;
|
||||
MkAd: typeof MkAd;
|
||||
MkHeader: typeof MkHeader;
|
||||
MkSpacer: typeof MkSpacer;
|
||||
MkStickyContainer: typeof MkStickyContainer;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@
|
|||
</div>
|
||||
<footer class="footer">
|
||||
<div class="info">
|
||||
<span class="mobile" v-if="appearNote.viaMobile"><i class="fas fa-mobile-alt"></i></span>
|
||||
<MkTime class="created-at" :time="appearNote.createdAt" mode="detail"/>
|
||||
</div>
|
||||
<XReactionsViewer :note="appearNote" ref="reactionsViewer"/>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
<div class="admin" v-if="note.user.isAdmin"><i class="fas fa-bookmark"></i></div>
|
||||
<div class="moderator" v-if="!note.user.isAdmin && note.user.isModerator"><i class="far fa-bookmark"></i></div>
|
||||
<div class="info">
|
||||
<span class="mobile" v-if="note.viaMobile"><i class="fas fa-mobile-alt"></i></span>
|
||||
<MkA class="created-at" :to="notePage(note)">
|
||||
<MkTime :time="note.createdAt"/>
|
||||
</MkA>
|
||||
|
|
@ -99,10 +98,6 @@ export default defineComponent({
|
|||
margin-left: auto;
|
||||
font-size: 0.9em;
|
||||
|
||||
> .mobile {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
> .visibility {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ import { noteVisibilities } from 'misskey-js';
|
|||
import * as os from '@/os';
|
||||
import { selectFile } from '@/scripts/select-file';
|
||||
import { defaultStore, notePostInterruptors, postFormActions } from '@/store';
|
||||
import { isMobile } from '@/scripts/is-mobile';
|
||||
import { throttle } from 'throttle-debounce';
|
||||
import MkInfo from '@/components/ui/info.vue';
|
||||
import { defaultStore } from '@/store';
|
||||
|
|
@ -648,7 +647,6 @@ export default defineComponent({
|
|||
localOnly: this.localOnly,
|
||||
visibility: this.visibility,
|
||||
visibleUserIds: this.visibility == 'specified' ? this.visibleUsers.map(u => u.id) : undefined,
|
||||
viaMobile: isMobile
|
||||
};
|
||||
|
||||
if (this.withHashtags && this.hashtags && this.hashtags.trim() !== '') {
|
||||
|
|
|
|||
|
|
@ -1,147 +0,0 @@
|
|||
<template>
|
||||
<div class="mk-users-dialog">
|
||||
<div class="header">
|
||||
<span>{{ title }}</span>
|
||||
<button class="_button" @click="close()"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
|
||||
<div class="users">
|
||||
<MkA v-for="item in items" class="user" :key="item.id" :to="userPage(extract ? extract(item) : item)">
|
||||
<MkAvatar :user="extract ? extract(item) : item" class="avatar" :disable-link="true" :show-indicator="true"/>
|
||||
<div class="body">
|
||||
<MkUserName :user="extract ? extract(item) : item" class="name"/>
|
||||
<MkAcct :user="extract ? extract(item) : item" class="acct"/>
|
||||
</div>
|
||||
</MkA>
|
||||
</div>
|
||||
<button class="more _button" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" v-show="more" :disabled="moreFetching">
|
||||
<template v-if="!moreFetching">{{ $ts.loadMore }}</template>
|
||||
<template v-if="moreFetching"><i class="fas fa-spinner fa-pulse fa-fw"></i></template>
|
||||
</button>
|
||||
|
||||
<p class="empty" v-if="empty">{{ $ts.noUsers }}</p>
|
||||
|
||||
<MkError v-if="error" @retry="init()"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import paging from '@/scripts/paging';
|
||||
import { userPage } from '@/filters/user';
|
||||
|
||||
export default defineComponent({
|
||||
mixins: [
|
||||
paging({}),
|
||||
],
|
||||
|
||||
props: {
|
||||
title: {
|
||||
required: true
|
||||
},
|
||||
pagination: {
|
||||
required: true
|
||||
},
|
||||
extract: {
|
||||
required: false
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
userPage
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mk-users-dialog {
|
||||
width: 350px;
|
||||
height: 350px;
|
||||
background: var(--panel);
|
||||
border-radius: var(--radius);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
> .header {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
|
||||
> button {
|
||||
height: 58px;
|
||||
width: 58px;
|
||||
|
||||
@media (max-width: 500px) {
|
||||
height: 42px;
|
||||
width: 42px;
|
||||
}
|
||||
}
|
||||
|
||||
> span {
|
||||
flex: 1;
|
||||
line-height: 58px;
|
||||
padding-left: 32px;
|
||||
font-weight: bold;
|
||||
|
||||
@media (max-width: 500px) {
|
||||
line-height: 42px;
|
||||
padding-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .users {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
> .user {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
padding: 8px 32px;
|
||||
|
||||
@media (max-width: 500px) {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
> * {
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
> .avatar {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
> .body {
|
||||
padding: 0 8px;
|
||||
overflow: hidden;
|
||||
|
||||
> .name {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
> .acct {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .empty {
|
||||
text-align: center;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue