forked from FoundKeyGang/FoundKey
✌️
This commit is contained in:
parent
366b7ef946
commit
da52f980c4
5 changed files with 107 additions and 6 deletions
|
@ -846,6 +846,10 @@ mobile/views/components/ui.nav.vue:
|
|||
messaging: "メッセージ"
|
||||
search: "検索"
|
||||
drive: "ドライブ"
|
||||
favorites: "お気に入り"
|
||||
widgets: "ウィジェット"
|
||||
game: "ゲーム"
|
||||
darkmode: "ダークモード"
|
||||
settings: "設定"
|
||||
about: "Misskeyについて"
|
||||
|
||||
|
@ -859,8 +863,12 @@ mobile/views/components/users-list.vue:
|
|||
known: "知り合い"
|
||||
load-more: "もっと"
|
||||
|
||||
mobile/views/pages/favorites.vue:
|
||||
title: "お気に入り"
|
||||
|
||||
mobile/views/pages/drive.vue:
|
||||
drive: "ドライブ"
|
||||
more: "もっと見る"
|
||||
|
||||
mobile/views/pages/followers.vue:
|
||||
followers-of: "{}のフォロワー"
|
||||
|
|
|
@ -36,6 +36,7 @@ import MkNote from './views/pages/note.vue';
|
|||
import MkSearch from './views/pages/search.vue';
|
||||
import MkFollowers from './views/pages/followers.vue';
|
||||
import MkFollowing from './views/pages/following.vue';
|
||||
import MkFavorites from './views/pages/favorites.vue';
|
||||
import MkSettings from './views/pages/settings.vue';
|
||||
import MkOthello from './views/pages/othello.vue';
|
||||
|
||||
|
@ -72,6 +73,7 @@ init((launch) => {
|
|||
{ path: '/signup', name: 'signup', component: MkSignup },
|
||||
{ path: '/i/settings', name: 'settings', component: MkSettings },
|
||||
{ path: '/i/notifications', name: 'notifications', component: MkNotifications },
|
||||
{ path: '/i/favorites', name: 'favorites', component: MkFavorites },
|
||||
{ path: '/i/widgets', name: 'widgets', component: MkWidgets },
|
||||
{ path: '/i/messaging', name: 'messaging', component: MkMessaging },
|
||||
{ path: '/i/messaging/:user', component: MkMessagingRoom },
|
||||
|
|
|
@ -216,8 +216,6 @@ export default Vue.extend({
|
|||
|
||||
root(isDark)
|
||||
overflow hidden
|
||||
margin 0 auto
|
||||
padding 0
|
||||
width 100%
|
||||
text-align left
|
||||
background isDark ? #282C37 : #fff
|
||||
|
|
|
@ -18,18 +18,17 @@
|
|||
<li><router-link to="/" :data-active="$route.name == 'index'">%fa:home%%i18n:@home%%fa:angle-right%</router-link></li>
|
||||
<li><router-link to="/i/notifications" :data-active="$route.name == 'notifications'">%fa:R bell%%i18n:@notifications%<template v-if="hasUnreadNotification">%fa:circle%</template>%fa:angle-right%</router-link></li>
|
||||
<li><router-link to="/i/messaging" :data-active="$route.name == 'messaging'">%fa:R comments%%i18n:@messaging%<template v-if="hasUnreadMessagingMessage">%fa:circle%</template>%fa:angle-right%</router-link></li>
|
||||
<li><router-link to="/othello" :data-active="$route.name == 'othello'">%fa:gamepad%ゲーム<template v-if="hasGameInvitation">%fa:circle%</template>%fa:angle-right%</router-link></li>
|
||||
<li><router-link to="/othello" :data-active="$route.name == 'othello'">%fa:gamepad%%i18n:@game%<template v-if="hasGameInvitation">%fa:circle%</template>%fa:angle-right%</router-link></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><router-link to="/i/widgets" :data-active="$route.name == 'widgets'">%fa:quidditch%%i18n:@widgets%%fa:angle-right%</router-link></li>
|
||||
<li><router-link to="/i/favorites" :data-active="$route.name == 'favorites'">%fa:star%%i18n:@favorites%%fa:angle-right%</router-link></li>
|
||||
<li><router-link to="/i/drive" :data-active="$route.name == 'drive'">%fa:cloud%%i18n:@drive%%fa:angle-right%</router-link></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a @click="search">%fa:search%%i18n:@search%%fa:angle-right%</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><router-link to="/i/settings" :data-active="$route.name == 'settings'">%fa:cog%%i18n:@settings%%fa:angle-right%</router-link></li>
|
||||
<li @click="dark"><p><template v-if="$store.state.device.darkmode">%fa:moon%</template><template v-else>%fa:R moon%</template><span>ダークモード</span></p></li>
|
||||
<li @click="dark"><p><template v-if="$store.state.device.darkmode">%fa:moon%</template><template v-else>%fa:R moon%</template><span>%i18n:@darkmode%</span></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a :href="aboutUrl"><p class="about">%i18n:@about%</p></a>
|
||||
|
|
94
src/client/app/mobile/views/pages/favorites.vue
Normal file
94
src/client/app/mobile/views/pages/favorites.vue
Normal file
|
@ -0,0 +1,94 @@
|
|||
<template>
|
||||
<mk-ui>
|
||||
<span slot="header">%fa:star%%i18n:@title%</span>
|
||||
|
||||
<main>
|
||||
<template v-for="favorite in favorites">
|
||||
<mk-note-detail class="post" :note="favorite.note" :key="favorite.note.id"/>
|
||||
</template>
|
||||
<a v-if="existMore" @click="more">%i18n:@more%</a>
|
||||
</main>
|
||||
</mk-ui>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import Progress from '../../../common/scripts/loading';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
fetching: true,
|
||||
favorites: [],
|
||||
existMore: false,
|
||||
moreFetching: false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.fetch();
|
||||
},
|
||||
mounted() {
|
||||
document.title = 'Misskey | %i18n:@notifications%';
|
||||
},
|
||||
methods: {
|
||||
fetch() {
|
||||
Progress.start();
|
||||
this.fetching = true;
|
||||
|
||||
(this as any).api('i/favorites', {
|
||||
limit: 11
|
||||
}).then(favorites => {
|
||||
if (favorites.length == 11) {
|
||||
this.existMore = true;
|
||||
favorites.pop();
|
||||
}
|
||||
|
||||
this.favorites = favorites;
|
||||
this.fetching = false;
|
||||
|
||||
Progress.done();
|
||||
});
|
||||
},
|
||||
more() {
|
||||
this.moreFetching = true;
|
||||
(this as any).api('i/favorites', {
|
||||
limit: 11,
|
||||
maxId: this.favorites[this.favorites.length - 1].id
|
||||
}).then(favorites => {
|
||||
if (favorites.length == 11) {
|
||||
this.existMore = true;
|
||||
favorites.pop();
|
||||
} else {
|
||||
this.existMore = false;
|
||||
}
|
||||
|
||||
this.favorites = this.favorites.concat(favorites);
|
||||
this.moreFetching = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~const.styl'
|
||||
|
||||
main
|
||||
width 100%
|
||||
max-width 680px
|
||||
margin 0 auto
|
||||
padding 8px
|
||||
|
||||
> .post
|
||||
margin-bottom 8px
|
||||
|
||||
@media (min-width 500px)
|
||||
padding 16px
|
||||
|
||||
> .post
|
||||
margin-bottom 16px
|
||||
|
||||
@media (min-width 600px)
|
||||
padding 32px
|
||||
|
||||
</style>
|
Loading…
Reference in a new issue