wip
This commit is contained in:
parent
937b6539e0
commit
5daae05bcf
|
@ -15,7 +15,7 @@ import post from './api/post';
|
||||||
import notify from './api/notify';
|
import notify from './api/notify';
|
||||||
|
|
||||||
import MkIndex from './views/pages/index.vue';
|
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 MkSelectDrive from './views/pages/selectdrive.vue';
|
||||||
import MkDrive from './views/pages/drive.vue';
|
import MkDrive from './views/pages/drive.vue';
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ export default Vue.extend({
|
||||||
search() {
|
search() {
|
||||||
const query = window.prompt('%i18n:mobile.tags.mk-ui-nav.search%');
|
const query = window.prompt('%i18n:mobile.tags.mk-ui-nav.search%');
|
||||||
if (query == null || query == '') return;
|
if (query == null || query == '') return;
|
||||||
this.page('/search?q=' + encodeURIComponent(query));
|
this.$router.push('/search?q=' + encodeURIComponent(query));
|
||||||
},
|
},
|
||||||
onReadAllNotifications() {
|
onReadAllNotifications() {
|
||||||
this.hasUnreadNotifications = false;
|
this.hasUnreadNotifications = false;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
import MkNotify from './notify.vue';
|
||||||
import XHeader from './ui.header.vue';
|
import XHeader from './ui.header.vue';
|
||||||
import XNav from './ui.nav.vue';
|
import XNav from './ui.nav.vue';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<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>
|
<span slot="header">%fa:home%%i18n:mobile.tags.mk-home.home%</span>
|
||||||
|
<template slot="funcIcon">%fa:pencil-alt%</template>
|
||||||
<mk-home @loaded="onHomeLoaded"/>
|
<mk-home @loaded="onHomeLoaded"/>
|
||||||
</mk-ui>
|
</mk-ui>
|
||||||
</template>
|
</template>
|
||||||
|
@ -9,7 +10,6 @@
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import Progress from '../../../common/scripts/loading';
|
import Progress from '../../../common/scripts/loading';
|
||||||
import getPostSummary from '../../../../../common/get-post-summary';
|
import getPostSummary from '../../../../../common/get-post-summary';
|
||||||
import openPostForm from '../../scripts/open-post-form';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
|
@ -38,7 +38,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fn() {
|
fn() {
|
||||||
openPostForm();
|
(this as any).apis.post();
|
||||||
},
|
},
|
||||||
onHomeLoaded() {
|
onHomeLoaded() {
|
||||||
Progress.done();
|
Progress.done();
|
||||||
|
|
16
src/web/app/mobile/views/pages/index.vue
Normal file
16
src/web/app/mobile/views/pages/index.vue
Normal 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>
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<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>
|
<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">
|
<div v-if="!fetching" :class="$style.user">
|
||||||
<header>
|
<header>
|
||||||
<div class="banner" :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=1024)` : ''"></div>
|
<div class="banner" :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=1024)` : ''"></div>
|
||||||
|
|
5
src/web/app/mobile/views/pages/welcome.vue
Normal file
5
src/web/app/mobile/views/pages/welcome.vue
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<mk-signin/>
|
||||||
|
</div>
|
||||||
|
</template>
|
Loading…
Reference in a new issue