wip
This commit is contained in:
parent
f2fbf7f818
commit
f64a921575
@ -19,6 +19,7 @@ import MkSignup from './views/pages/signup.vue';
|
|||||||
import MkUser from './views/pages/user.vue';
|
import MkUser from './views/pages/user.vue';
|
||||||
import MkSelectDrive from './views/pages/selectdrive.vue';
|
import MkSelectDrive from './views/pages/selectdrive.vue';
|
||||||
import MkDrive from './views/pages/drive.vue';
|
import MkDrive from './views/pages/drive.vue';
|
||||||
|
import MkNotifications from './views/pages/notifications.vue';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* init
|
* init
|
||||||
@ -47,6 +48,7 @@ init((launch) => {
|
|||||||
app.$router.addRoutes([
|
app.$router.addRoutes([
|
||||||
{ path: '/', name: 'index', component: MkIndex },
|
{ path: '/', name: 'index', component: MkIndex },
|
||||||
{ path: '/signup', name: 'signup', component: MkSignup },
|
{ path: '/signup', name: 'signup', component: MkSignup },
|
||||||
|
{ path: '/i/notifications', component: MkNotifications },
|
||||||
{ path: '/i/drive', component: MkDrive },
|
{ path: '/i/drive', component: MkDrive },
|
||||||
{ path: '/i/drive/folder/:folder', component: MkDrive },
|
{ path: '/i/drive/folder/:folder', component: MkDrive },
|
||||||
{ path: '/selectdrive', component: MkSelectDrive },
|
{ path: '/selectdrive', component: MkSelectDrive },
|
||||||
|
@ -13,6 +13,7 @@ import userCard from './user-card.vue';
|
|||||||
import postDetail from './post-detail.vue';
|
import postDetail from './post-detail.vue';
|
||||||
import followButton from './follow-button.vue';
|
import followButton from './follow-button.vue';
|
||||||
import friendsMaker from './friends-maker.vue';
|
import friendsMaker from './friends-maker.vue';
|
||||||
|
import notifications from './notifications.vue';
|
||||||
|
|
||||||
Vue.component('mk-ui', ui);
|
Vue.component('mk-ui', ui);
|
||||||
Vue.component('mk-home', home);
|
Vue.component('mk-home', home);
|
||||||
@ -27,3 +28,4 @@ Vue.component('mk-user-card', userCard);
|
|||||||
Vue.component('mk-post-detail', postDetail);
|
Vue.component('mk-post-detail', postDetail);
|
||||||
Vue.component('mk-follow-button', followButton);
|
Vue.component('mk-follow-button', followButton);
|
||||||
Vue.component('mk-friends-maker', friendsMaker);
|
Vue.component('mk-friends-maker', friendsMaker);
|
||||||
|
Vue.component('mk-notifications', notifications);
|
||||||
|
@ -4,16 +4,16 @@
|
|||||||
<template v-for="(notification, i) in _notifications">
|
<template v-for="(notification, i) in _notifications">
|
||||||
<mk-notification :notification="notification" :key="notification.id"/>
|
<mk-notification :notification="notification" :key="notification.id"/>
|
||||||
<p class="date" v-if="i != notifications.length - 1 && notification._date != _notifications[i + 1]._date">
|
<p class="date" v-if="i != notifications.length - 1 && notification._date != _notifications[i + 1]._date">
|
||||||
<span>%fa:angle-up%{ notification._datetext }</span>
|
<span>%fa:angle-up%{{ notification._datetext }}</span>
|
||||||
<span>%fa:angle-down%{ _notifications[i + 1]._datetext }</span>
|
<span>%fa:angle-down%{{ _notifications[i + 1]._datetext }}</span>
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<button class="more" v-if="moreNotifications" @click="fetchMoreNotifications" disabled={ fetchingMoreNotifications }>
|
<button class="more" v-if="moreNotifications" @click="fetchMoreNotifications" :disabled="fetchingMoreNotifications">
|
||||||
<template v-if="fetchingMoreNotifications">%fa:spinner .pulse .fw%</template>{ fetchingMoreNotifications ? '%i18n:common.fetching%' : '%i18n:mobile.tags.mk-notifications.more%' }
|
<template v-if="fetchingMoreNotifications">%fa:spinner .pulse .fw%</template>{ fetchingMoreNotifications ? '%i18n:common.loading%' : '%i18n:mobile.tags.mk-notifications.more%' }
|
||||||
</button>
|
</button>
|
||||||
<p class="empty" v-if="notifications.length == 0 && !fetching">%i18n:mobile.tags.mk-notifications.empty%</p>
|
<p class="empty" v-if="notifications.length == 0 && !fetching">%i18n:mobile.tags.mk-notifications.empty%</p>
|
||||||
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.fetching%<mk-ellipsis/></p>
|
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -59,6 +59,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
this.notifications = notifications;
|
this.notifications = notifications;
|
||||||
this.fetching = false;
|
this.fetching = false;
|
||||||
|
this.$emit('fetched');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<mk-ui :func="fn" func-icon="%fa:check%">
|
<mk-ui :func="fn">
|
||||||
<span slot="header">%fa:R bell%%i18n:mobile.tags.mk-notifications-page.notifications%</span>
|
<span slot="header">%fa:R bell%%i18n:mobile.tags.mk-notifications-page.notifications%</span>
|
||||||
|
<span slot="funcIcon">%fa:check%</span>
|
||||||
<mk-notifications @fetched="onFetched"/>
|
<mk-notifications @fetched="onFetched"/>
|
||||||
</mk-ui>
|
</mk-ui>
|
||||||
</template>
|
</template>
|
Loading…
Reference in New Issue
Block a user