mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 09:03:08 +02:00
wip
This commit is contained in:
parent
937b6539e0
commit
5daae05bcf
8 changed files with 30 additions and 7 deletions
|
@ -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';
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
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>
|
||||
<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>
|
||||
|
|
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