mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 12:39:59 +01:00
wip
This commit is contained in:
parent
5149eca4bc
commit
384b2cbe14
@ -1,27 +0,0 @@
|
||||
<mk-user-page>
|
||||
<mk-ui ref="ui">
|
||||
<mk-user ref="user" user={ parent.user } page={ parent.opts.page }/>
|
||||
</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.user = this.opts.user;
|
||||
|
||||
this.on('mount', () => {
|
||||
document.documentElement.style.background = '#313a42';
|
||||
Progress.start();
|
||||
|
||||
this.$refs.ui.refs.user.on('loaded', user => {
|
||||
Progress.done();
|
||||
document.title = user.name + ' | Misskey';
|
||||
// TODO: ユーザー名をエスケープ
|
||||
ui.trigger('title', '%fa:user%' + user.name);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</mk-user-page>
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<mk-ui :func="fn" func-icon="%fa:pencil-alt%">
|
||||
<span slot="header">%fa:user% {{user.name}}</span>
|
||||
<span slot="header" v-if="!fetching">%fa:user% {{user.name}}</span>
|
||||
<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>
|
||||
@ -58,6 +58,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
const age = require('s-age');
|
||||
import Progress from '../../../common/scripts/loading';
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
@ -81,12 +82,17 @@ export default Vue.extend({
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
document.documentElement.style.background = '#313a42';
|
||||
Progress.start();
|
||||
|
||||
this.$root.$data.os.api('users/show', {
|
||||
username: this.username
|
||||
}).then(user => {
|
||||
this.fetching = false;
|
||||
this.user = user;
|
||||
this.$emit('loaded', user);
|
||||
|
||||
Progress.done();
|
||||
document.title = user.name + ' | Misskey';
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user