summaryrefslogtreecommitdiff
path: root/packages/frontend/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src')
-rw-r--r--packages/frontend/src/components/MkUrlPreview.vue41
-rw-r--r--packages/frontend/src/pages/settings/profile.vue2
2 files changed, 19 insertions, 24 deletions
diff --git a/packages/frontend/src/components/MkUrlPreview.vue b/packages/frontend/src/components/MkUrlPreview.vue
index ca8f6848e5..0cba73ef05 100644
--- a/packages/frontend/src/components/MkUrlPreview.vue
+++ b/packages/frontend/src/components/MkUrlPreview.vue
@@ -65,13 +65,14 @@ SPDX-License-Identifier: AGPL-3.0-only
</footer>
</article>
</component>
- <footer v-if="linkAttribution" :class="$style.footer" style="text-align: right">
- <a :href="'/@' + linkAttribution.username">
- <p :class="$style.linkAttribution">{{ i18n.ts.writtenBy }}</p>
- <MkImgWithBlurhash :class="$style.linkAttributionIcon" :src="linkAttribution.avatarUrl" :hash="linkAttribution.avatarBlurhash" :cover="true" :onlyAvgColor="true"/>
- <b :class="$style.linkAttribution" style="color: var(--MI_THEME-accent)">{{ linkAttribution.name }}</b>
- </a>
- </footer>
+ <I18n v-if="linkAttribution" :src="i18n.ts.writtenBy" :class="$style.linkAttribution" tag="p">
+ <template #user>
+ <MkA v-user-preview="linkAttribution.user.id" :to="userPage(linkAttribution.user)">
+ <MkAvatar :class="$style.linkAttributionIcon" :user="linkAttribution.user"/>
+ <MkUserName :user="linkAttribution.user" style="color: var(--MI_THEME-accent)"/>
+ </MkA>
+ </template>
+ </I18n>
<template v-if="showActions">
<div v-if="tweetId" :class="$style.action">
<MkButton :small="true" inline @click="tweetExpanded = true">
@@ -114,6 +115,7 @@ import { misskeyApi } from '@/utility/misskey-api.js';
import { warningExternalWebsite } from '@/utility/warning-external-website.js';
import DynamicNoteSimple from '@/components/DynamicNoteSimple.vue';
import { $i } from '@/i';
+import { userPage } from '@/filters/user.js';
type SummalyResult = Awaited<ReturnType<typeof summaly>>;
@@ -155,10 +157,7 @@ const player = ref<SummalyResult['player']>({
allow: [],
});
const linkAttribution = ref<{
- name: string,
- username: string,
- avatarUrl: string,
- avatarBlurhash: string,
+ user: Misskey.entities.User,
} | null>(null);
const playerEnabled = ref(false);
const tweetId = ref<string | null>(null);
@@ -238,10 +237,7 @@ function refresh(withFetch = false) {
.then(async (info: SummalyResult & {
haveNoteLocally?: boolean,
linkAttribution?: {
- name: string,
- username: string,
- avatarUrl: string,
- avatarBlurhash: string,
+ user: Misskey.entities.User
}
} | null) => {
unknownUrl.value = info == null;
@@ -420,11 +416,11 @@ refresh();
.linkAttributionIcon {
display: inline-block;
- width: 1em;
- height: 1em;
- margin-left: 0.5em;
+ width: 16px;
+ height: 16px;
+ margin-left: 0.25em;
margin-right: 0.25em;
- vertical-align: top;
+ vertical-align: middle;
border-radius: 50%;
* {
border-radius: 4px;
@@ -432,11 +428,12 @@ refresh();
}
.linkAttribution {
+ width: 100%;
font-size: 0.8em;
display: inline-block;
- margin: 0;
- line-height: 16px;
- vertical-align: top;
+ margin: auto;
+ padding-top: 0.5em;
+ text-align: right;
}
.action {
diff --git a/packages/frontend/src/pages/settings/profile.vue b/packages/frontend/src/pages/settings/profile.vue
index 9dc7398062..4cc13a2552 100644
--- a/packages/frontend/src/pages/settings/profile.vue
+++ b/packages/frontend/src/pages/settings/profile.vue
@@ -220,7 +220,6 @@ const profile = reactive({
isBot: $i.isBot ?? false,
isCat: $i.isCat ?? false,
speakAsCat: $i.speakAsCat ?? false,
- attributionDomains: $i.attributionDomains,
});
watch(() => profile, () => {
@@ -280,7 +279,6 @@ function save() {
isBot: !!profile.isBot,
isCat: !!profile.isCat,
speakAsCat: !!profile.speakAsCat,
- attributionDomains: !!profile.attributionDomains,
}, undefined, {
'0b3f9f6a-2f4d-4b1f-9fb4-49d3a2fd7191': {
title: i18n.ts.yourNameContainsProhibitedWords,