summaryrefslogtreecommitdiff
path: root/src/client/app/mobile
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-02-15 06:31:03 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-02-15 06:31:03 +0900
commit95b157ac3e40408ab0298f3e247ef36feb6123be (patch)
tree47d0a199d3354cf5ec466e494aa116d139304a78 /src/client/app/mobile
parentMerge branch 'develop' of https://github.com/syuilo/misskey into develop (diff)
downloadmisskey-95b157ac3e40408ab0298f3e247ef36feb6123be.tar.gz
misskey-95b157ac3e40408ab0298f3e247ef36feb6123be.tar.bz2
misskey-95b157ac3e40408ab0298f3e247ef36feb6123be.zip
Add featured page
Diffstat (limited to 'src/client/app/mobile')
-rw-r--r--src/client/app/mobile/script.ts2
-rw-r--r--src/client/app/mobile/views/components/ui.nav.vue3
-rw-r--r--src/client/app/mobile/views/pages/featured.vue49
3 files changed, 53 insertions, 1 deletions
diff --git a/src/client/app/mobile/script.ts b/src/client/app/mobile/script.ts
index bbbdc0ebb0..f912c0d53b 100644
--- a/src/client/app/mobile/script.ts
+++ b/src/client/app/mobile/script.ts
@@ -12,7 +12,6 @@ import init from '../init';
import MkIndex from './views/pages/index.vue';
import MkSignup from './views/pages/signup.vue';
-import MkUser from './views/pages/user.vue';
import MkSelectDrive from './views/pages/selectdrive.vue';
import MkDrive from './views/pages/drive.vue';
import MkNotifications from './views/pages/notifications.vue';
@@ -134,6 +133,7 @@ init((launch) => {
{ path: '/selectdrive', component: MkSelectDrive },
{ path: '/search', component: MkSearch },
{ path: '/tags/:tag', component: MkTag },
+ { path: '/featured', name: 'featured', component: () => import('./views/pages/featured.vue').then(m => m.default) },
{ path: '/share', component: MkShare },
{ path: '/games/reversi/:game?', name: 'reversi', component: MkReversi },
{ path: '/@:user', component: () => import('./views/pages/user.vue').then(m => m.default) },
diff --git a/src/client/app/mobile/views/components/ui.nav.vue b/src/client/app/mobile/views/components/ui.nav.vue
index c59d624f77..af2e3e4c6f 100644
--- a/src/client/app/mobile/views/components/ui.nav.vue
+++ b/src/client/app/mobile/views/components/ui.nav.vue
@@ -19,6 +19,7 @@
<li><router-link to="/i/notifications" :data-active="$route.name == 'notifications'"><i><fa :icon="['far', 'bell']" fixed-width/></i>{{ $t('notifications') }}<i v-if="hasUnreadNotification" class="circle"><fa icon="circle"/></i><i><fa icon="angle-right"/></i></router-link></li>
<li><router-link to="/i/messaging" :data-active="$route.name == 'messaging'"><i><fa :icon="['far', 'comments']" fixed-width/></i>{{ $t('@.messaging') }}<i v-if="hasUnreadMessagingMessage" class="circle"><fa icon="circle"/></i><i><fa icon="angle-right"/></i></router-link></li>
<li v-if="$store.getters.isSignedIn && ($store.state.i.isLocked || $store.state.i.carefulBot)"><router-link to="/i/received-follow-requests" :data-active="$route.name == 'received-follow-requests'"><i><fa :icon="['far', 'envelope']" fixed-width/></i>{{ $t('follow-requests') }}<i v-if="$store.getters.isSignedIn && $store.state.i.pendingReceivedFollowRequestsCount" class="circle"><fa icon="circle"/></i><i><fa icon="angle-right"/></i></router-link></li>
+ <li><router-link to="/featured" :data-active="$route.name == 'featured'"><i><fa :icon="faNewspaper" fixed-width/></i>{{ $t('@.featured-notes') }}<i><fa icon="angle-right"/></i></router-link></li>
<li><router-link to="/games/reversi" :data-active="$route.name == 'reversi'"><i><fa icon="gamepad" fixed-width/></i>{{ $t('game') }}<i v-if="hasGameInvitation" class="circle"><fa icon="circle"/></i><i><fa icon="angle-right"/></i></router-link></li>
</ul>
<ul>
@@ -50,6 +51,7 @@
import Vue from 'vue';
import i18n from '../../../i18n';
import { lang } from '../../../config';
+import { faNewspaper } from '@fortawesome/free-solid-svg-icons';
export default Vue.extend({
i18n: i18n('mobile/views/components/ui.nav.vue'),
@@ -62,6 +64,7 @@ export default Vue.extend({
aboutUrl: `/docs/${lang}/about`,
announcements: [],
searching: false,
+ faNewspaper
};
},
diff --git a/src/client/app/mobile/views/pages/featured.vue b/src/client/app/mobile/views/pages/featured.vue
new file mode 100644
index 0000000000..f97fb3b542
--- /dev/null
+++ b/src/client/app/mobile/views/pages/featured.vue
@@ -0,0 +1,49 @@
+<template>
+<mk-ui>
+ <span slot="header"><span style="margin-right:4px;"><fa :icon="faNewspaper"/></span>{{ $t('@.featured-notes') }}</span>
+
+ <main>
+ <sequential-entrance animation="entranceFromTop" delay="25">
+ <template v-for="note in notes">
+ <mk-note-detail class="post" :note="note" :key="note.id"/>
+ </template>
+ </sequential-entrance>
+ </main>
+</mk-ui>
+</template>
+
+<script lang="ts">
+import Vue from 'vue';
+import i18n from '../../../i18n';
+import Progress from '../../../common/scripts/loading';
+import { faNewspaper } from '@fortawesome/free-solid-svg-icons';
+
+export default Vue.extend({
+ i18n: i18n(''),
+ data() {
+ return {
+ fetching: true,
+ notes: [],
+ faNewspaper
+ };
+ },
+ created() {
+ this.fetch();
+ },
+ methods: {
+ fetch() {
+ Progress.start();
+ this.fetching = true;
+
+ this.$root.api('notes/featured', {
+ limit: 10
+ }).then(notes => {
+ this.notes = notes;
+ this.fetching = false;
+
+ Progress.done();
+ });
+ },
+ }
+});
+</script>