2018-01-23 05:16:27 +00:00
|
|
|
|
<:Head>
|
2018-02-09 06:38:33 +00:00
|
|
|
|
<title>Pinafore – {{profileName}}</title>
|
2018-01-23 05:16:27 +00:00
|
|
|
|
</:Head>
|
|
|
|
|
|
|
|
|
|
<Layout page='tags'
|
2018-01-24 17:47:31 +00:00
|
|
|
|
virtual="true"
|
2018-02-03 18:57:45 +00:00
|
|
|
|
virtualRealm='account/{{params.accountId}}' >
|
2018-01-23 05:16:27 +00:00
|
|
|
|
{{#if $isUserLoggedIn}}
|
2018-01-23 17:21:21 +00:00
|
|
|
|
<DynamicPageBanner title="{{profileName}}" />
|
2018-01-28 08:29:45 +00:00
|
|
|
|
{{#if $currentAccountProfile}}
|
2018-01-28 20:51:48 +00:00
|
|
|
|
<AccountProfile profile="{{$currentAccountProfile}}"
|
|
|
|
|
relationship="{{$currentAccountRelationship}}"
|
|
|
|
|
verifyCredentials="{{$currentVerifyCredentials}}"
|
|
|
|
|
/>
|
2018-01-28 08:29:45 +00:00
|
|
|
|
{{/if}}
|
2018-01-23 05:16:27 +00:00
|
|
|
|
<LazyTimeline timeline='account/{{params.accountId}}' />
|
|
|
|
|
{{else}}
|
|
|
|
|
<HiddenFromSSR>
|
|
|
|
|
<FreeTextLayout>
|
|
|
|
|
<h1>Profile</h1>
|
|
|
|
|
|
|
|
|
|
<p>A user timeline will appear here when logged in.</p>
|
|
|
|
|
</FreeTextLayout>
|
|
|
|
|
</HiddenFromSSR>
|
|
|
|
|
{{/if}}
|
|
|
|
|
</Layout>
|
|
|
|
|
<script>
|
|
|
|
|
import Layout from '../_components/Layout.html'
|
2018-01-28 00:35:44 +00:00
|
|
|
|
import LazyTimeline from '../_components/timeline/LazyTimeline.html'
|
2018-01-23 05:16:27 +00:00
|
|
|
|
import FreeTextLayout from '../_components/FreeTextLayout.html'
|
2018-01-28 21:09:39 +00:00
|
|
|
|
import { store } from '../_store/store.js'
|
2018-01-23 05:16:27 +00:00
|
|
|
|
import HiddenFromSSR from '../_components/HiddenFromSSR'
|
|
|
|
|
import DynamicPageBanner from '../_components/DynamicPageBanner.html'
|
2018-02-09 01:51:48 +00:00
|
|
|
|
import { updateProfileAndRelationship } from '../_actions/accounts'
|
2018-01-28 08:29:45 +00:00
|
|
|
|
import AccountProfile from '../_components/AccountProfile.html'
|
2018-02-09 01:51:48 +00:00
|
|
|
|
import { updateVerifyCredentialsForInstance } from '../_actions/instances'
|
2018-01-23 05:16:27 +00:00
|
|
|
|
|
|
|
|
|
export default {
|
2018-01-23 17:21:21 +00:00
|
|
|
|
oncreate() {
|
2018-01-23 05:16:27 +00:00
|
|
|
|
let accountId = this.get('params').accountId
|
2018-01-28 20:51:48 +00:00
|
|
|
|
let instanceName = this.store.get('currentInstance')
|
|
|
|
|
updateProfileAndRelationship(accountId)
|
|
|
|
|
updateVerifyCredentialsForInstance(instanceName)
|
2018-01-23 05:16:27 +00:00
|
|
|
|
},
|
|
|
|
|
store: () => store,
|
|
|
|
|
computed: {
|
2018-01-28 04:23:52 +00:00
|
|
|
|
profileName: ($currentAccountProfile) => {
|
2018-02-01 17:59:41 +00:00
|
|
|
|
return ($currentAccountProfile && ('@' + $currentAccountProfile.acct)) || ''
|
2018-01-23 05:16:27 +00:00
|
|
|
|
},
|
2018-01-28 04:23:52 +00:00
|
|
|
|
shortProfileName: ($currentAccountProfile) => {
|
2018-02-01 17:59:41 +00:00
|
|
|
|
return ($currentAccountProfile && ('@' + $currentAccountProfile.username)) || ''
|
2018-01-23 05:16:27 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
Layout,
|
|
|
|
|
LazyTimeline,
|
|
|
|
|
FreeTextLayout,
|
|
|
|
|
HiddenFromSSR,
|
2018-01-28 08:29:45 +00:00
|
|
|
|
DynamicPageBanner,
|
|
|
|
|
AccountProfile
|
2018-01-23 05:16:27 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|