mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-28 09:33:08 +02:00
wip
This commit is contained in:
parent
ec63c3463a
commit
131bbce66e
5 changed files with 84 additions and 87 deletions
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
42
src/web/app/mobile/views/pages/followers.vue
Normal file
42
src/web/app/mobile/views/pages/followers.vue
Normal 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>
|
42
src/web/app/mobile/views/pages/following.vue
Normal file
42
src/web/app/mobile/views/pages/following.vue
Normal 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>
|
Loading…
Reference in a new issue