Merge pull request #1726 from nextcloud/artonge/fix/aother_tiny_fixes

Another round of tiny fixes
pull/1728/head
Louis 2023-04-11 13:15:30 +02:00 zatwierdzone przez GitHub
commit 8fc2528449
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 38 dodań i 20 usunięć

Wyświetl plik

@ -197,13 +197,12 @@ export default {
+ '</div>' + '</div>'
}, },
selectTemplate(item) { selectTemplate(item) {
return ` return '<span class="mention" contenteditable="false">'
<span class="mention" contenteditable="false"> + `<a href="${item.original.url}" target="_blank">`
<a href="${item.original.url}" target="_blank"> + `<img src="${item.original.avatar}"/>`
<img src="${item.original.avatar}"/> + `@${item.original.value}`
@${item.original.value} + '</a>'
</a> + '</span>&nbsp;'
</span>`
}, },
values: debounce(async (text, populate) => { values: debounce(async (text, populate) => {
if (text.length < 1) { if (text.length < 1) {
@ -305,13 +304,19 @@ export default {
return return
} }
this.$refs.composerInput.innerHTML = ` let handle = account.acct
<span class="mention" contenteditable="false">
<a href="${account.url}" target="_blank"> if (!handle.includes('@')) {
<img src="${account.avatar}"/> handle += `@${this.hostname}`
@${account.acct} }
</a>
</span>&nbsp;` this.$refs.composerInput.innerHTML
= '<span class="mention" contenteditable="false">'
+ `<a href="${account.url}" target="_blank">`
+ `<img src="${account.avatar}"/>`
+ `@${handle}`
+ '</a>'
+ '</span>&nbsp;'
this.updateStatusContent() this.updateStatusContent()
}, },
updateStatusContent() { updateStatusContent() {
@ -486,10 +491,16 @@ export default {
padding: 5px; padding: 5px;
padding-left: 30px; padding-left: 30px;
.avatardiv {
margin: 0 4px;
margin-block-start: 2px;
}
.reply-info { .reply-info {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.close-button { .close-button {
margin-left: auto; margin-left: auto;
opacity: .7; opacity: .7;

Wyświetl plik

@ -31,20 +31,19 @@
:disable-tooltip="true" :disable-tooltip="true"
:size="128" /> :size="128" />
<h2>{{ displayName }}</h2> <h2>{{ displayName }}</h2>
<!-- TODO: we have no details, timeline and follower list for non-local accounts for now --> <ul class="user-profile__info user-profile__sections">
<ul v-if="isLocal" class="user-profile__info user-profile__sections">
<li> <li>
<router-link :to="{ name: 'profile', params: { account: uid } }" class="icon-category-monitoring"> <router-link :class="{ disabled: !isLocal }" :to="{ name: 'profile', params: { account: uid } }" class="icon-category-monitoring">
{{ accountInfo.statuses_count }} {{ t('social', 'posts') }} {{ accountInfo.statuses_count }} {{ t('social', 'posts') }}
</router-link> </router-link>
</li> </li>
<li> <li>
<router-link :to="{ name: 'profile.following', params: { account: uid } }" class="icon-category-social"> <router-link :class="{ disabled: !isLocal }" :to="{ name: 'profile.following', params: { account: uid } }" class="icon-category-social">
{{ accountInfo.following_count }} {{ t('social', 'following') }} {{ accountInfo.following_count }} {{ t('social', 'following') }}
</router-link> </router-link>
</li> </li>
<li> <li>
<router-link :to="{ name: 'profile.followers', params: { account: uid } }" class="icon-category-social"> <router-link :class="{ disabled: !isLocal }" :to="{ name: 'profile.followers', params: { account: uid } }" class="icon-category-social">
{{ accountInfo.followers_count }} {{ t('social', 'followers') }} {{ accountInfo.followers_count }} {{ t('social', 'followers') }}
</router-link> </router-link>
</li> </li>
@ -58,7 +57,7 @@
</p> </p>
<!-- Hack to render note safely --> <!-- Hack to render note safely -->
<MessageContent v-if="accountInfo.note" class="user-profile__note" :item="{content: accountInfo.note, tag: [], mentions: []}" /> <MessageContent v-if="accountInfo.note" class="user-profile__note user-profile__info" :item="{content: accountInfo.note, tag: [], mentions: []}" />
<FollowButton class="user-profile__info" :account="accountInfo.acct" :uid="uid" /> <FollowButton class="user-profile__info" :account="accountInfo.acct" :uid="uid" />
<NcButton v-if="serverData.public" <NcButton v-if="serverData.public"
@ -184,6 +183,14 @@ export default {
opacity: 1; opacity: 1;
border-bottom: 1px solid var(--color-main-text); border-bottom: 1px solid var(--color-main-text);
} }
&.disabled {
opacity: 1;
border-bottom: none;
text-decoration: none;
cursor: auto;
pointer-events: none;
}
} }
} }
} }