mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-11-01 07:35:57 +09:00
wip
This commit is contained in:
parent
24142cd5c6
commit
a77ac7e651
@ -12,7 +12,6 @@
|
||||
@keydown="onSearchResultKeydown(i)"
|
||||
@click="navigate(user)"
|
||||
tabindex="-1"
|
||||
:key="user.id"
|
||||
>
|
||||
<img class="avatar" :src="`${user.avatar_url}?thumbnail&size=32`" alt=""/>
|
||||
<span class="name">{{ user.name }}</span>
|
||||
@ -38,7 +37,7 @@
|
||||
<mk-time :time="message.created_at"/>
|
||||
</header>
|
||||
<div class="body">
|
||||
<p class="text"><span class="me" v-if="isMe(message)">%i18n:common.tags.mk-messaging.you%:</span>{{ text }}</p>
|
||||
<p class="text"><span class="me" v-if="isMe(message)">%i18n:common.tags.mk-messaging.you%:</span>{{ message.text }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div class="mk-activity">
|
||||
<div class="mk-activity" :data-melt="design == 2">
|
||||
<template v-if="design == 0">
|
||||
<p class="title">%fa:chart-bar%%i18n:desktop.tags.mk-activity-widget.title%</p>
|
||||
<button @click="toggle" title="%i18n:desktop.tags.mk-activity-widget.toggle%">%fa:sort%</button>
|
||||
</template>
|
||||
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
||||
<template v-else>
|
||||
<x-calender v-show="view == 0" :data="[].concat(activity)"/>
|
||||
<x-calendar v-show="view == 0" :data="[].concat(activity)"/>
|
||||
<x-chart v-show="view == 1" :data="[].concat(activity)"/>
|
||||
</template>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<mk-window ref="window" is-modal width='800px' height='500px' @closed="$destroy">
|
||||
<mk-window ref="window" is-modal width="800px" height="500px" @closed="$destroy">
|
||||
<span slot="header">
|
||||
<span v-html="title" :class="$style.title"></span>
|
||||
</span>
|
||||
@ -10,7 +10,7 @@
|
||||
:multiple="false"
|
||||
/>
|
||||
<div :class="$style.footer">
|
||||
<button :class="$style.cancel" @click="close">キャンセル</button>
|
||||
<button :class="$style.cancel" @click="cancel">キャンセル</button>
|
||||
<button :class="$style.ok" @click="ok">決定</button>
|
||||
</div>
|
||||
</mk-window>
|
||||
|
@ -147,7 +147,8 @@ export default Vue.extend({
|
||||
this.$emit('loaded');
|
||||
},
|
||||
onWidgetContextmenu(widgetId) {
|
||||
(this.$refs[widgetId] as any)[0].func();
|
||||
const w = (this.$refs[widgetId] as any)[0];
|
||||
if (w.func) w.func();
|
||||
},
|
||||
onWidgetSort() {
|
||||
this.saveHome();
|
||||
|
@ -37,6 +37,16 @@ import wBroadcast from './widgets/broadcast.vue';
|
||||
import wTimemachine from './widgets/timemachine.vue';
|
||||
import wProfile from './widgets/profile.vue';
|
||||
import wServer from './widgets/server.vue';
|
||||
import wActivity from './widgets/activity.vue';
|
||||
import wRss from './widgets/rss.vue';
|
||||
import wTrends from './widgets/trends.vue';
|
||||
import wVersion from './widgets/version.vue';
|
||||
import wUsers from './widgets/users.vue';
|
||||
import wPolls from './widgets/polls.vue';
|
||||
import wPostForm from './widgets/post-form.vue';
|
||||
import wMessaging from './widgets/messaging.vue';
|
||||
import wChannel from './widgets/channel.vue';
|
||||
import wAccessLog from './widgets/access-log.vue';
|
||||
|
||||
Vue.component('mk-ui', ui);
|
||||
Vue.component('mk-ui-notification', uiNotification);
|
||||
@ -67,7 +77,7 @@ Vue.component('mk-activity', activity);
|
||||
Vue.component('mkw-nav', wNav);
|
||||
Vue.component('mkw-calendar', wCalendar);
|
||||
Vue.component('mkw-photo-stream', wPhotoStream);
|
||||
Vue.component('mkw-slideshoe', wSlideshow);
|
||||
Vue.component('mkw-slideshow', wSlideshow);
|
||||
Vue.component('mkw-tips', wTips);
|
||||
Vue.component('mkw-donation', wDonation);
|
||||
Vue.component('mkw-notifications', wNotifications);
|
||||
@ -75,3 +85,13 @@ Vue.component('mkw-broadcast', wBroadcast);
|
||||
Vue.component('mkw-timemachine', wTimemachine);
|
||||
Vue.component('mkw-profile', wProfile);
|
||||
Vue.component('mkw-server', wServer);
|
||||
Vue.component('mkw-activity', wActivity);
|
||||
Vue.component('mkw-rss', wRss);
|
||||
Vue.component('mkw-trends', wTrends);
|
||||
Vue.component('mkw-version', wVersion);
|
||||
Vue.component('mkw-users', wUsers);
|
||||
Vue.component('mkw-polls', wPolls);
|
||||
Vue.component('mkw-post-form', wPostForm);
|
||||
Vue.component('mkw-messaging', wMessaging);
|
||||
Vue.component('mkw-channel', wChannel);
|
||||
Vue.component('mkw-access-log', wAccessLog);
|
||||
|
@ -6,7 +6,7 @@
|
||||
<div ref="log">
|
||||
<p v-for="req in requests">
|
||||
<span class="ip" :style="`color:${ req.fg }; background:${ req.bg }`">{{ req.ip }}</span>
|
||||
<span>{{ req.method }}</span>
|
||||
<b>{{ req.method }}</b>
|
||||
<span>{{ req.path }}</span>
|
||||
</p>
|
||||
</div>
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../../common/define-widget';
|
||||
import seedrandom from 'seedrandom';
|
||||
import * as seedrandom from 'seedrandom';
|
||||
|
||||
export default define({
|
||||
name: 'broadcast',
|
||||
@ -101,4 +101,7 @@ export default define({
|
||||
> .ip
|
||||
margin-right 4px
|
||||
|
||||
> b
|
||||
margin-right 4px
|
||||
|
||||
</style>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="mkw-channel">
|
||||
<template v-if="!data.compact">
|
||||
<template v-if="!props.compact">
|
||||
<p class="title">%fa:tv%{{ channel ? channel.title : '%i18n:desktop.tags.mk-channel-home-widget.title%' }}</p>
|
||||
<button @click="settings" title="%i18n:desktop.tags.mk-channel-home-widget.settings%">%fa:cog%</button>
|
||||
</template>
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../../common/define-widget';
|
||||
import MkMessagingRoomWindow from '../messaging-room-window.vue';
|
||||
|
||||
export default define({
|
||||
name: 'messaging',
|
||||
props: () => ({
|
||||
@ -15,11 +17,11 @@ export default define({
|
||||
}).extend({
|
||||
methods: {
|
||||
navigate(user) {
|
||||
if (this.platform == 'desktop') {
|
||||
this.wapi_openMessagingRoomWindow(user);
|
||||
} else {
|
||||
// TODO: open room page in new tab
|
||||
}
|
||||
document.body.appendChild(new MkMessagingRoomWindow({
|
||||
propsData: {
|
||||
user: user
|
||||
}
|
||||
}).$mount().$el);
|
||||
},
|
||||
func() {
|
||||
if (this.props.design == 1) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="mkw-post-form">
|
||||
<template v-if="data.design == 0">
|
||||
<template v-if="props.design == 0">
|
||||
<p class="title">%fa:pencil-alt%%i18n:desktop.tags.mk-post-form-home-widget.title%</p>
|
||||
</template>
|
||||
<textarea :disabled="posting" v-model="text" @keydown="onKeydown" placeholder="%i18n:desktop.tags.mk-post-form-home-widget.placeholder%"></textarea>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="mkw-slideshow">
|
||||
<div @click="choose">
|
||||
<p v-if="data.folder === undefined">クリックしてフォルダを指定してください</p>
|
||||
<p v-if="data.folder !== undefined && images.length == 0 && !fetching">このフォルダには画像がありません</p>
|
||||
<p v-if="props.folder === undefined">クリックしてフォルダを指定してください</p>
|
||||
<p v-if="props.folder !== undefined && images.length == 0 && !fetching">このフォルダには画像がありません</p>
|
||||
<div ref="slideA" class="slide a"></div>
|
||||
<div ref="slideB" class="slide b"></div>
|
||||
</div>
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="mkw-trends">
|
||||
<template v-if="!data.compact">
|
||||
<template v-if="!props.compact">
|
||||
<p class="title">%fa:fire%%i18n:desktop.tags.mk-trends-home-widget.title%</p>
|
||||
<button @click="fetch" title="%i18n:desktop.tags.mk-trends-home-widget.refresh%">%fa:sync%</button>
|
||||
</template>
|
||||
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
||||
<div class="post" v-else-if="post != null">
|
||||
<p class="text"><a href="/{ post.user.username }/{ post.id }">{ post.text }</a></p>
|
||||
<p class="author">―<a href="/{ post.user.username }">@{ post.user.username }</a></p>
|
||||
<p class="text"><router-link :to="`/${ post.user.username }/${ post.id }`">{{ post.text }}</router-link></p>
|
||||
<p class="author">―<router-link :to="`/${ post.user.username }`">@{{ post.user.username }}</router-link></p>
|
||||
</div>
|
||||
<p class="empty" v-else>%i18n:desktop.tags.mk-trends-home-widget.nothing%</p>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user