mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 05:23:08 +02:00
wip
This commit is contained in:
parent
6426a6ed5b
commit
99296bc639
4 changed files with 53 additions and 54 deletions
|
@ -1,31 +0,0 @@
|
|||
<mk-messaging-room-page>
|
||||
<mk-ui ref="ui">
|
||||
<mk-messaging-room v-if="!parent.fetching" user={ parent.user } is-naked={ true }/>
|
||||
</mk-ui>
|
||||
<style lang="stylus" scoped>
|
||||
:scope
|
||||
display block
|
||||
</style>
|
||||
<script lang="typescript">
|
||||
import ui from '../../scripts/ui-event';
|
||||
|
||||
this.mixin('api');
|
||||
|
||||
this.fetching = true;
|
||||
|
||||
this.on('mount', () => {
|
||||
this.$root.$data.os.api('users/show', {
|
||||
username: this.opts.username
|
||||
}).then(user => {
|
||||
this.update({
|
||||
fetching: false,
|
||||
user: user
|
||||
});
|
||||
|
||||
document.title = `%i18n:mobile.tags.mk-messaging-room-page.message%: ${user.name} | Misskey`;
|
||||
// TODO: ユーザー名をエスケープ
|
||||
ui.trigger('title', '%fa:R comments%' + user.name);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</mk-messaging-room-page>
|
|
@ -1,23 +0,0 @@
|
|||
<mk-messaging-page>
|
||||
<mk-ui ref="ui">
|
||||
<mk-messaging ref="index"/>
|
||||
</mk-ui>
|
||||
<style lang="stylus" scoped>
|
||||
:scope
|
||||
display block
|
||||
</style>
|
||||
<script lang="typescript">
|
||||
import ui from '../../scripts/ui-event';
|
||||
|
||||
this.mixin('page');
|
||||
|
||||
this.on('mount', () => {
|
||||
document.title = 'Misskey | %i18n:mobile.tags.mk-messaging-page.message%';
|
||||
ui.trigger('title', '%fa:R comments%%i18n:mobile.tags.mk-messaging-page.message%');
|
||||
|
||||
this.$refs.ui.refs.index.on('navigate-user', user => {
|
||||
this.page('/i/messaging/' + user.username);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</mk-messaging-page>
|
32
src/web/app/mobile/views/pages/messaging-room.vue
Normal file
32
src/web/app/mobile/views/pages/messaging-room.vue
Normal file
|
@ -0,0 +1,32 @@
|
|||
<template>
|
||||
<mk-ui>
|
||||
<span slot="header">
|
||||
<template v-if="user">%fa:R comments%{{ user.name }}</template>
|
||||
<template v-else><mk-ellipsis/></template>
|
||||
</span>
|
||||
<mk-messaging-room v-if="!fetching" :user="user" is-naked/>
|
||||
</mk-ui>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
fetching: true,
|
||||
user: null
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
(this as any).api('users/show', {
|
||||
username: (this as any).$route.params.user
|
||||
}).then(user => {
|
||||
this.user = user;
|
||||
this.fetching = false;
|
||||
|
||||
document.title = `%i18n:mobile.tags.mk-messaging-room-page.message%: ${user.name} | Misskey`;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
21
src/web/app/mobile/views/pages/messaging.vue
Normal file
21
src/web/app/mobile/views/pages/messaging.vue
Normal file
|
@ -0,0 +1,21 @@
|
|||
<template>
|
||||
<mk-ui>
|
||||
<span slot="header">%fa:R comments%%i18n:mobile.tags.mk-messaging-page.message%</span>
|
||||
<mk-messaging @navigate="navigate"/>
|
||||
</mk-ui>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
export default Vue.extend({
|
||||
mounted() {
|
||||
document.title = 'Misskey | %i18n:mobile.tags.mk-messaging-page.message%';
|
||||
},
|
||||
methods: {
|
||||
navigate(user) {
|
||||
(this as any).$router.push(`/i/messaging/${user.username}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
Loading…
Reference in a new issue