This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2021-07-10 07:46:29 -07:00
|
|
|
<template>
|
2022-01-04 07:04:37 -08:00
|
|
|
<Profile v-if="profile" :user="user" :profile="profile" class="pb-3 mt-5" expandLinks>
|
2021-07-10 07:46:29 -07:00
|
|
|
<nuxt-link to="/">
|
|
|
|
<h1 class="text-nowrap h5">
|
|
|
|
<Icon v="tags"/>
|
2021-09-05 05:30:49 -07:00
|
|
|
<T>domain</T><span v-if="profile">/@{{user.username}}</span>
|
2021-07-10 07:46:29 -07:00
|
|
|
</h1>
|
|
|
|
</nuxt-link>
|
|
|
|
</Profile>
|
|
|
|
<NotFound v-else/>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { head } from "../src/helpers";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
layout: 'basic',
|
|
|
|
async asyncData({ app, route }) {
|
|
|
|
return {
|
2021-07-24 05:54:15 -07:00
|
|
|
user: await app.$axios.$get(`/profile/get/${encodeURIComponent(route.params.pathMatch)}`),
|
2021-07-10 07:46:29 -07:00
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
profile() {
|
2021-07-24 05:54:15 -07:00
|
|
|
for (let locale in this.user.profiles) {
|
2021-07-10 07:46:29 -07:00
|
|
|
if (locale === this.config.locale) {
|
2021-07-24 05:54:15 -07:00
|
|
|
return this.user.profiles[locale];
|
2021-07-10 07:46:29 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
head() {
|
|
|
|
return head({
|
|
|
|
title: `@${this.$route.params.pathMatch}`,
|
|
|
|
banner: `api/banner/@${this.$route.params.pathMatch}.png`,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|