1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-11-30 15:58:24 +09:00
This commit is contained in:
こぴなたみぽ 2018-02-16 13:19:23 +09:00
parent ec63c3463a
commit 131bbce66e
5 changed files with 84 additions and 87 deletions

View File

@ -1,7 +0,0 @@
<mk-new-post-page>
<mk-post-form ref="form"/>
<style lang="stylus" scoped>
:scope
display block
</style>
</mk-new-post-page>

View File

@ -1,40 +0,0 @@
<mk-user-followers-page>
<mk-ui ref="ui">
<mk-user-followers ref="list" v-if="!parent.fetching" user={ parent.user }/>
</mk-ui>
<style lang="stylus" scoped>
:scope
display block
</style>
<script lang="typescript">
import ui from '../../scripts/ui-event';
import Progress from '../../../common/scripts/loading';
this.mixin('api');
this.fetching = true;
this.user = null;
this.on('mount', () => {
Progress.start();
this.$root.$data.os.api('users/show', {
username: this.opts.user
}).then(user => {
this.update({
fetching: false,
user: user
});
document.title = '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', user.name) + ' | Misskey';
// TODO: ユーザー名をエスケープ
ui.trigger('title', '<img src="' + user.avatar_url + '?thumbnail&size=64">' + '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', user.name));
document.documentElement.style.background = '#313a42';
this.$refs.ui.refs.list.on('loaded', () => {
Progress.done();
});
});
});
</script>
</mk-user-followers-page>

View File

@ -1,40 +0,0 @@
<mk-user-following-page>
<mk-ui ref="ui">
<mk-user-following ref="list" v-if="!parent.fetching" user={ parent.user }/>
</mk-ui>
<style lang="stylus" scoped>
:scope
display block
</style>
<script lang="typescript">
import ui from '../../scripts/ui-event';
import Progress from '../../../common/scripts/loading';
this.mixin('api');
this.fetching = true;
this.user = null;
this.on('mount', () => {
Progress.start();
this.$root.$data.os.api('users/show', {
username: this.opts.user
}).then(user => {
this.update({
fetching: false,
user: user
});
document.title = '%i18n:mobile.tags.mk-user-following-page.following-of%'.replace('{}', user.name) + ' | Misskey';
// TODO: ユーザー名をエスケープ
ui.trigger('title', '<img src="' + user.avatar_url + '?thumbnail&size=64">' + '%i18n:mobile.tags.mk-user-following-page.following-of%'.replace('{}', user.name));
document.documentElement.style.background = '#313a42';
this.$refs.ui.refs.list.on('loaded', () => {
Progress.done();
});
});
});
</script>
</mk-user-following-page>

View File

@ -0,0 +1,42 @@
<template>
<mk-ui>
<span slot="header" v-if="!fetching">
<img :src="`${user.avatar_url}?thumbnail&size=64`" alt="">
{{ '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', user.name) }}
</span>
<mk-user-followers v-if="!fetching" :user="user" @loaded="onLoaded"/>
</mk-ui>
</template>
<script lang="ts">
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
export default Vue.extend({
props: ['username'],
data() {
return {
fetching: true,
user: null
};
},
mounted() {
Progress.start();
this.$root.$data.os.api('users/show', {
username: this.username
}).then(user => {
this.fetching = false;
this.user = user;
document.title = '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', user.name) + ' | Misskey';
document.documentElement.style.background = '#313a42';
});
},
methods: {
onLoaded() {
Progress.done();
}
}
});
</script>

View File

@ -0,0 +1,42 @@
<template>
<mk-ui>
<span slot="header" v-if="!fetching">
<img :src="`${user.avatar_url}?thumbnail&size=64`" alt="">
{{ '%i18n:mobile.tags.mk-user-following-page.following-of'.replace('{}', user.name) }}
</span>
<mk-user-following v-if="!fetching" :user="user" @loaded="onLoaded"/>
</mk-ui>
</template>
<script lang="ts">
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
export default Vue.extend({
props: ['username'],
data() {
return {
fetching: true,
user: null
};
},
mounted() {
Progress.start();
this.$root.$data.os.api('users/show', {
username: this.username
}).then(user => {
this.fetching = false;
this.user = user;
document.title = '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', user.name) + ' | Misskey';
document.documentElement.style.background = '#313a42';
});
},
methods: {
onLoaded() {
Progress.done();
}
}
});
</script>