mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 12:43:48 -04:00
refactor: address some review comments
This commit is contained in:
parent
c5ec0603c8
commit
75179eed26
@ -1,4 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { clearUrl } from '../src/helpers.ts';
|
||||
|
||||
const { $locales: locales, $t } = useNuxtApp();
|
||||
const config = useConfig();
|
||||
const route = useRoute();
|
||||
@ -28,9 +30,10 @@ const returnPath = getSanitizedReturnPath();
|
||||
|
||||
const options = (config.macrolanguage?.languages || []).map(({ code }) => ({
|
||||
key: code,
|
||||
text: locales[code]?.fullName || code,
|
||||
name: locales[code]?.name,
|
||||
extra: locales[code]?.extra,
|
||||
url: `${locales[code]?.url}${returnPath}`,
|
||||
domain: locales[code]?.url,
|
||||
domain: clearUrl(locales[code]?.url || ''),
|
||||
}));
|
||||
</script>
|
||||
|
||||
@ -50,7 +53,10 @@ const options = (config.macrolanguage?.languages || []).map(({ code }) => ({
|
||||
class="list-group-item list-group-item-action"
|
||||
>
|
||||
<div class="d-flex w-100 justify-content-between">
|
||||
<h5 class="mb-1">{{ option.text }}</h5>
|
||||
<h5 class="mb-1">
|
||||
{{ option.name }}
|
||||
<small v-if="option.extra">({{ option.extra }})</small>
|
||||
</h5>
|
||||
</div>
|
||||
<p class="mb-1">{{ option.domain }}</p>
|
||||
</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user