2020-11-29 23:13:27 +01:00
|
|
|
<h1 class="sr-only">{profileForAccount}</h1>
|
2019-02-23 05:35:19 +01:00
|
|
|
{#if moved}
|
|
|
|
<AccountProfileMovedBanner {account} />
|
|
|
|
{/if}
|
2019-01-26 22:50:45 +01:00
|
|
|
<div class={className}
|
2020-06-29 08:12:14 +02:00
|
|
|
style="background-image: url({headerImage});"
|
|
|
|
ref:accountProfile>
|
2018-04-01 01:51:18 +02:00
|
|
|
<div class="account-profile-grid-wrapper">
|
|
|
|
<div class="account-profile-grid">
|
2018-05-02 02:05:36 +02:00
|
|
|
<AccountProfileHeader {account} {relationship} {verifyCredentials} />
|
|
|
|
<AccountProfileFollow {account} {relationship} {verifyCredentials} />
|
|
|
|
<AccountProfileNote {account} />
|
2018-08-21 04:41:42 +02:00
|
|
|
<AccountProfileMeta {account} />
|
2018-05-02 02:05:36 +02:00
|
|
|
<AccountProfileDetails {account} {relationship} {verifyCredentials} />
|
2018-04-01 01:51:18 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-05-05 21:30:08 +02:00
|
|
|
<AccountProfileFilters account={$currentAccountProfile} {filter} />
|
2018-04-01 01:51:18 +02:00
|
|
|
</div>
|
|
|
|
<style>
|
|
|
|
.account-profile {
|
|
|
|
position: relative;
|
|
|
|
background-size: cover;
|
|
|
|
background-position: center;
|
|
|
|
padding-top: 175px;
|
|
|
|
}
|
|
|
|
|
2019-02-23 05:35:19 +01:00
|
|
|
.account-profile.moved {
|
|
|
|
filter: grayscale(0.8);
|
|
|
|
}
|
|
|
|
|
2018-04-01 01:51:18 +02:00
|
|
|
.account-profile.header-image-is-missing {
|
|
|
|
padding-top: 0;
|
|
|
|
background-color: #ccc;
|
|
|
|
}
|
|
|
|
|
|
|
|
.account-profile-grid {
|
|
|
|
display: grid;
|
2018-08-24 03:41:43 +02:00
|
|
|
grid-template-areas: "avatar name label followed-by follow"
|
|
|
|
"avatar username username username follow"
|
2022-04-28 17:18:50 +02:00
|
|
|
"avatar note note note follow"
|
2018-08-21 04:41:42 +02:00
|
|
|
"meta meta meta meta meta"
|
2018-08-24 03:41:43 +02:00
|
|
|
"details details details details details";
|
|
|
|
grid-template-columns: min-content auto 1fr 1fr min-content;
|
2018-04-01 01:51:18 +02:00
|
|
|
grid-column-gap: 10px;
|
|
|
|
grid-row-gap: 5px;
|
|
|
|
padding: 20px;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
@supports (-webkit-backdrop-filter: blur(1px) saturate(1%)) or (backdrop-filter: blur(1px) saturate(1%)) {
|
|
|
|
:global(.account-profile-grid-wrapper) {
|
|
|
|
-webkit-backdrop-filter: blur(7px) saturate(110%);
|
|
|
|
backdrop-filter: blur(7px) saturate(110%);
|
2018-04-12 04:53:43 +02:00
|
|
|
background-color: var(--account-profile-bg-backdrop-filter);
|
2018-04-01 01:51:18 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@supports not ((-webkit-backdrop-filter: blur(1px) saturate(1%)) or (backdrop-filter: blur(1px) saturate(1%))) {
|
|
|
|
:global(.account-profile-grid-wrapper) {
|
2018-04-12 04:53:43 +02:00
|
|
|
background-color: var(--account-profile-bg);
|
2018-04-01 01:51:18 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 767px) {
|
2019-09-24 09:29:42 +02:00
|
|
|
.account-profile {
|
|
|
|
padding-top: 100px;
|
|
|
|
}
|
2020-06-29 08:12:14 +02:00
|
|
|
|
2018-04-01 01:51:18 +02:00
|
|
|
.account-profile-grid {
|
|
|
|
display: grid;
|
|
|
|
grid-template-areas: "avatar name follow"
|
2018-08-24 03:41:43 +02:00
|
|
|
"avatar label follow"
|
2018-04-01 01:51:18 +02:00
|
|
|
"avatar username follow"
|
2022-04-28 17:18:50 +02:00
|
|
|
"avatar followed-by follow"
|
2018-04-01 01:51:18 +02:00
|
|
|
"note note note"
|
2018-08-21 04:41:42 +02:00
|
|
|
"meta meta meta"
|
2018-04-01 01:51:18 +02:00
|
|
|
"details details details";
|
|
|
|
grid-template-columns: min-content minmax(auto, 1fr) min-content;
|
|
|
|
grid-template-rows: min-content min-content 1fr min-content;
|
|
|
|
padding: 10px;
|
|
|
|
}
|
|
|
|
}
|
2019-09-24 09:29:42 +02:00
|
|
|
|
|
|
|
@media (max-width: 320px) {
|
|
|
|
.account-profile {
|
|
|
|
padding-top: 50px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 240px) {
|
|
|
|
.account-profile {
|
|
|
|
padding-top: 0;
|
|
|
|
}
|
|
|
|
.account-profile-grid {
|
|
|
|
grid-template-areas: "avatar name"
|
|
|
|
"avatar label"
|
|
|
|
"username username"
|
|
|
|
"followed-by followed-by"
|
|
|
|
"follow follow"
|
|
|
|
"note note"
|
|
|
|
"meta meta"
|
|
|
|
"details details";
|
|
|
|
grid-template-columns: min-content 1fr;
|
|
|
|
grid-column-gap: 5px;
|
|
|
|
grid-row-gap: 0;
|
|
|
|
}
|
|
|
|
}
|
2018-04-01 01:51:18 +02:00
|
|
|
</style>
|
|
|
|
<script>
|
|
|
|
import AccountProfileHeader from './AccountProfileHeader.html'
|
|
|
|
import AccountProfileFollow from './AccountProfileFollow.html'
|
|
|
|
import AccountProfileNote from './AccountProfileNote.html'
|
2018-08-21 04:41:42 +02:00
|
|
|
import AccountProfileMeta from './AccountProfileMeta.html'
|
2018-04-01 01:51:18 +02:00
|
|
|
import AccountProfileDetails from './AccountProfileDetails.html'
|
2019-02-23 05:35:19 +01:00
|
|
|
import AccountProfileMovedBanner from './AccountProfileMovedBanner.html'
|
2019-05-05 21:30:08 +02:00
|
|
|
import AccountProfileFilters from './AccountProfileFilters.html'
|
2021-07-05 05:19:04 +02:00
|
|
|
import { store } from '../../_store/store.js'
|
|
|
|
import { classname } from '../../_utils/classname.js'
|
|
|
|
import { scheduleIdleTask } from '../../_utils/scheduleIdleTask.js'
|
|
|
|
import { addEmojiTooltips } from '../../_utils/addEmojiTooltips.js'
|
|
|
|
import { formatIntl } from '../../_utils/formatIntl.js'
|
2018-04-01 01:51:18 +02:00
|
|
|
|
|
|
|
export default {
|
2020-06-29 08:12:14 +02:00
|
|
|
oncreate () {
|
|
|
|
scheduleIdleTask(() => addEmojiTooltips(this.refs.accountProfile))
|
|
|
|
},
|
2018-04-01 01:51:18 +02:00
|
|
|
store: () => store,
|
|
|
|
computed: {
|
2018-05-02 02:05:36 +02:00
|
|
|
headerImageIsMissing: ({ account }) => account.header.endsWith('missing.png'),
|
2018-08-28 15:44:36 +02:00
|
|
|
headerImage: ({ $autoplayGifs, account }) => $autoplayGifs ? account.header : account.header_static,
|
2019-01-26 22:50:45 +01:00
|
|
|
accountName: ({ account }) => (account && (account.display_name || account.username)) || '',
|
2019-02-23 05:35:19 +01:00
|
|
|
moved: ({ account }) => account.moved,
|
|
|
|
className: ({ headerImageIsMissing, $underlineLinks, moved }) => (classname(
|
2019-01-26 22:50:45 +01:00
|
|
|
'account-profile',
|
2019-02-23 05:35:19 +01:00
|
|
|
moved && 'moved',
|
2019-01-26 22:50:45 +01:00
|
|
|
headerImageIsMissing && 'header-image-is-missing',
|
|
|
|
$underlineLinks && 'underline-links'
|
2020-11-29 23:13:27 +01:00
|
|
|
)),
|
|
|
|
profileForAccount: ({ accountName }) => (
|
|
|
|
formatIntl('intl.profileForAccount', { account: accountName })
|
|
|
|
)
|
2018-04-01 01:51:18 +02:00
|
|
|
},
|
|
|
|
components: {
|
|
|
|
AccountProfileHeader,
|
|
|
|
AccountProfileFollow,
|
|
|
|
AccountProfileNote,
|
2018-08-21 04:41:42 +02:00
|
|
|
AccountProfileMeta,
|
2019-02-23 05:35:19 +01:00
|
|
|
AccountProfileDetails,
|
2019-05-05 21:30:08 +02:00
|
|
|
AccountProfileMovedBanner,
|
|
|
|
AccountProfileFilters
|
2018-04-01 01:51:18 +02:00
|
|
|
}
|
|
|
|
}
|
2019-01-26 22:50:45 +01:00
|
|
|
</script>
|