This commit is contained in:
syuilo 2018-02-22 03:11:24 +09:00
parent 937b6539e0
commit 5daae05bcf
8 changed files with 30 additions and 7 deletions

View File

@ -1,5 +1,5 @@
<template>
<component :is="os.isSignedIn ? 'home' : 'welcome'"></component>
<component :is="os.isSignedIn ? 'home' : 'welcome'"></component>
</template>
<script lang="ts">

View File

@ -15,7 +15,7 @@ import post from './api/post';
import notify from './api/notify';
import MkIndex from './views/pages/index.vue';
import MkUser from './views/pages/user/user.vue';
import MkUser from './views/pages/user.vue';
import MkSelectDrive from './views/pages/selectdrive.vue';
import MkDrive from './views/pages/drive.vue';

View File

@ -78,7 +78,7 @@ export default Vue.extend({
search() {
const query = window.prompt('%i18n:mobile.tags.mk-ui-nav.search%');
if (query == null || query == '') return;
this.page('/search?q=' + encodeURIComponent(query));
this.$router.push('/search?q=' + encodeURIComponent(query));
},
onReadAllNotifications() {
this.hasUnreadNotifications = false;

View File

@ -14,6 +14,7 @@
<script lang="ts">
import Vue from 'vue';
import MkNotify from './notify.vue';
import XHeader from './ui.header.vue';
import XNav from './ui.nav.vue';

View File

@ -1,6 +1,7 @@
<template>
<mk-ui :func="fn" func-icon="%fa:pencil-alt%">
<mk-ui :func="fn">
<span slot="header">%fa:home%%i18n:mobile.tags.mk-home.home%</span>
<template slot="funcIcon">%fa:pencil-alt%</template>
<mk-home @loaded="onHomeLoaded"/>
</mk-ui>
</template>
@ -9,7 +10,6 @@
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
import getPostSummary from '../../../../../common/get-post-summary';
import openPostForm from '../../scripts/open-post-form';
export default Vue.extend({
data() {
@ -38,7 +38,7 @@ export default Vue.extend({
},
methods: {
fn() {
openPostForm();
(this as any).apis.post();
},
onHomeLoaded() {
Progress.done();

View File

@ -0,0 +1,16 @@
<template>
<component :is="os.isSignedIn ? 'home' : 'welcome'"></component>
</template>
<script lang="ts">
import Vue from 'vue';
import Home from './home.vue';
import Welcome from './welcome.vue';
export default Vue.extend({
components: {
Home,
Welcome
}
});
</script>

View File

@ -1,6 +1,7 @@
<template>
<mk-ui :func="fn" func-icon="%fa:pencil-alt%">
<mk-ui :func="fn">
<span slot="header" v-if="!fetching">%fa:user% {{user.name}}</span>
<template slot="funcIcon">%fa:pencil-alt%</template>
<div v-if="!fetching" :class="$style.user">
<header>
<div class="banner" :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=1024)` : ''"></div>

View File

@ -0,0 +1,5 @@
<template>
<div>
<mk-signin/>
</div>
</template>