cosmetic: fix linter complaints
Mostly just reordering, whitespace changes and removing superfluous "this". eslint really wants us to add :key to the UserAvatar list in DM conversation cards. With :key Vue will reorder elements instead of patching their contents on list changes, allowing input state of elements to be preserved. This doesn’t really seem relevant here since USerAvatars do not have a state, but also not harmful. One lint complaint about using double quotes at the outer level was purposefully ignored as it results in needing to quote double quotes within the string making it rather unreadable.
This commit is contained in:
parent
e3a72827ef
commit
42595fcb2c
10 changed files with 80 additions and 66 deletions
|
|
@ -6,8 +6,9 @@
|
|||
<div class="heading">
|
||||
<div class="title-bar">
|
||||
<div class="title-bar-left">
|
||||
<div class="unread"
|
||||
<div
|
||||
v-if="conversation.unread"
|
||||
class="unread"
|
||||
>
|
||||
<span
|
||||
class="badge badge-notification"
|
||||
|
|
@ -29,7 +30,7 @@
|
|||
</button>
|
||||
|
||||
</div>
|
||||
<h4>{{ $t('dm_conv.default_name', {id: this.conversation.id}) }}</h4>
|
||||
<h4>{{ $t('dm_conv.default_name', {id: conversation.id}) }}</h4>
|
||||
</div>
|
||||
<div class="title-bar-right">
|
||||
<button
|
||||
|
|
@ -48,17 +49,21 @@
|
|||
<div class="members">
|
||||
<UserAvatar
|
||||
v-for="user in membersTruncated.users"
|
||||
:key="user.id"
|
||||
:user="user"
|
||||
:compact="compact"
|
||||
/>
|
||||
<div v-if="membersTruncated.truncated" class="ellipsis">
|
||||
<div
|
||||
v-if="membersTruncated.truncated"
|
||||
class="ellipsis"
|
||||
>
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
</router-link>
|
||||
<div
|
||||
class="last-message"
|
||||
v-if="showLastStatus"
|
||||
class="last-message"
|
||||
>
|
||||
<div class="last-message-title">
|
||||
{{ $t('dm_conv.last_message_title') }}:
|
||||
|
|
@ -76,7 +81,7 @@
|
|||
<button
|
||||
class="btn button-default"
|
||||
:title="$t('dm_conv.recipients_edit_mode_button_tooltip')"
|
||||
@click.once="$router.push({ name: 'dm-conversation-recipients', params: { id: this.conversation.id }})"
|
||||
@click.once="$router.push({ name: 'dm-conversation-recipients', params: { id: conversation.id }})"
|
||||
>
|
||||
{{ $t('dm_conv.recipients_edit_mode_button') }}
|
||||
</button>
|
||||
|
|
@ -90,7 +95,7 @@
|
|||
@accepted="doDeleteConversation"
|
||||
@cancelled="hideDeleteConfirmModal"
|
||||
>
|
||||
{{ $t('dm_conv.delete_confirm', { identifier: this.conversation.id }) }}
|
||||
{{ $t('dm_conv.delete_confirm', { identifier: conversation.id }) }}
|
||||
</confirm-modal>
|
||||
</teleport>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@
|
|||
timeline-name="dmConv"
|
||||
>
|
||||
<template
|
||||
v-slot:extraHeading
|
||||
#extraHeading
|
||||
>
|
||||
<DMConvCard
|
||||
v-if="conversation"
|
||||
:conversation="conversation"
|
||||
:compact="false"
|
||||
:showFullControls="true"
|
||||
:showLastStatus="false"
|
||||
:linkToTimeline="false"
|
||||
:show-full-controls="true"
|
||||
:show-last-status="false"
|
||||
:link-to-timeline="false"
|
||||
@deleted="forceLeave"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<StillImage
|
||||
v-else
|
||||
:src="item.emoji.imageUrl"
|
||||
noStopGifs="true"
|
||||
no-stop-gifs="true"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
<StillImage
|
||||
v-if="suggestion.img"
|
||||
:src="suggestion.img"
|
||||
noStopGifs="true"
|
||||
no-stop-gifs="true"
|
||||
/>
|
||||
<span v-else>{{ suggestion.replacement }}</span>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<StillImage
|
||||
v-else
|
||||
:src="group.first.imageUrl"
|
||||
noStopGifs="true"
|
||||
no-stop-gifs="true"
|
||||
/>
|
||||
</span>
|
||||
<span
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
:alt="currentMedia.description"
|
||||
:title="currentMedia.description"
|
||||
:image-load-handler="onImageLoaded"
|
||||
noStopGifs="true"
|
||||
no-stop-gifs="true"
|
||||
/>
|
||||
</PinchZoom>
|
||||
</SwipeClick>
|
||||
|
|
|
|||
|
|
@ -195,8 +195,8 @@
|
|||
:class="{ 'visibility-tray-edit': isEdit }"
|
||||
>
|
||||
<scope-selector
|
||||
ref="scopeselector"
|
||||
v-if="!disableVisibilitySelector"
|
||||
ref="scopeselector"
|
||||
:user-default="userDefaultScope"
|
||||
:original-scope="copyMessageScope"
|
||||
:initial-scope="newStatus.visibility"
|
||||
|
|
@ -204,10 +204,11 @@
|
|||
/>
|
||||
|
||||
<div
|
||||
class="format-selector-container">
|
||||
class="format-selector-container"
|
||||
>
|
||||
<div
|
||||
class="format-selector"
|
||||
>
|
||||
>
|
||||
<Select
|
||||
id="post-language"
|
||||
v-model="newStatus.language"
|
||||
|
|
|
|||
|
|
@ -99,19 +99,21 @@
|
|||
<router-link
|
||||
v-else
|
||||
:to="retweeterProfileLink"
|
||||
>{{ retweeter }}</router-link>
|
||||
>
|
||||
{{ retweeter }}
|
||||
</router-link>
|
||||
</div>
|
||||
{{ ' ' }}
|
||||
|
||||
<div
|
||||
class="repeat-tooltip"
|
||||
>
|
||||
<FAIcon
|
||||
icon="retweet"
|
||||
class="repeat-icon"
|
||||
:title="$t('tool_tip.repeat')"
|
||||
/>
|
||||
{{ $t('timeline.repeated') }}
|
||||
<FAIcon
|
||||
icon="retweet"
|
||||
class="repeat-icon"
|
||||
:title="$t('tool_tip.repeat')"
|
||||
/>
|
||||
{{ $t('timeline.repeated') }}
|
||||
</div>
|
||||
|
||||
<span
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
v-if="$slots.extraHeading"
|
||||
class="timeline-extra-heading"
|
||||
>
|
||||
<slot name="extraHeading"></slot>
|
||||
<slot name="extraHeading" />
|
||||
</div>
|
||||
<div :class="classes.body">
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<div class="panel-heading -flexible-height">
|
||||
<div
|
||||
class="user-info"
|
||||
:class="{ '-compact': this.compactUserInfo }"
|
||||
:class="{ '-compact': compactUserInfo }"
|
||||
>
|
||||
<div class="container">
|
||||
<a
|
||||
|
|
@ -54,7 +54,10 @@
|
|||
>
|
||||
@{{ user.screen_name_ui }}
|
||||
</router-link>
|
||||
<span class="user-roles" v-if="!hideBio && (user.deactivated || !!visibleRole || user.bot)">
|
||||
<span
|
||||
v-if="!hideBio && (user.deactivated || !!visibleRole || user.bot)"
|
||||
class="user-roles"
|
||||
>
|
||||
<span
|
||||
v-if="user.deactivated"
|
||||
class="alert user-role"
|
||||
|
|
@ -74,7 +77,10 @@
|
|||
{{ $t('user_card.bot') }}
|
||||
</span>
|
||||
</span>
|
||||
<span class="user-locked" v-if="user.locked">
|
||||
<span
|
||||
v-if="user.locked"
|
||||
class="user-locked"
|
||||
>
|
||||
<FAIcon
|
||||
class="lock-icon"
|
||||
icon="lock"
|
||||
|
|
@ -114,44 +120,44 @@
|
|||
</div>
|
||||
<div class="user-buttons">
|
||||
<button
|
||||
v-if="!isOtherUser && user.is_local"
|
||||
class="button-unstyled edit-profile-button"
|
||||
@click.stop="openProfileTab"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
class="icon"
|
||||
icon="edit"
|
||||
:title="$t('user_card.edit_profile')"
|
||||
/>
|
||||
</button>
|
||||
<a
|
||||
v-if="isOtherUser && !user.is_local"
|
||||
:href="user.statusnet_profile_url"
|
||||
target="_blank"
|
||||
class="button-unstyled external-link-button"
|
||||
>
|
||||
<FAIcon
|
||||
class="icon"
|
||||
icon="external-link-alt"
|
||||
/>
|
||||
</a>
|
||||
<a
|
||||
v-if="isOtherUser"
|
||||
:href="user.statusnet_profile_url + '.rss'"
|
||||
target="_blank"
|
||||
class="button-unstyled external-link-button"
|
||||
>
|
||||
<FAIcon
|
||||
class="icon"
|
||||
icon="rss"
|
||||
/>
|
||||
</a>
|
||||
<AccountActions
|
||||
v-if="isOtherUser && loggedIn"
|
||||
:user="user"
|
||||
:relationship="relationship"
|
||||
v-if="!isOtherUser && user.is_local"
|
||||
class="button-unstyled edit-profile-button"
|
||||
@click.stop="openProfileTab"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
class="icon"
|
||||
icon="edit"
|
||||
:title="$t('user_card.edit_profile')"
|
||||
/>
|
||||
</button>
|
||||
<a
|
||||
v-if="isOtherUser && !user.is_local"
|
||||
:href="user.statusnet_profile_url"
|
||||
target="_blank"
|
||||
class="button-unstyled external-link-button"
|
||||
>
|
||||
<FAIcon
|
||||
class="icon"
|
||||
icon="external-link-alt"
|
||||
/>
|
||||
</a>
|
||||
<a
|
||||
v-if="isOtherUser"
|
||||
:href="user.statusnet_profile_url + '.rss'"
|
||||
target="_blank"
|
||||
class="button-unstyled external-link-button"
|
||||
>
|
||||
<FAIcon
|
||||
class="icon"
|
||||
icon="rss"
|
||||
/>
|
||||
</a>
|
||||
<AccountActions
|
||||
v-if="isOtherUser && loggedIn"
|
||||
:user="user"
|
||||
:relationship="relationship"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-meta">
|
||||
|
|
@ -303,7 +309,7 @@
|
|||
:html="user.description_html"
|
||||
:emoji="user.emoji"
|
||||
:handle-links="true"
|
||||
:style='{"text-align": this.$store.getters.mergedConfig.centerAlignBio ? "center" : "start"}'
|
||||
:style='{"text-align": $store.getters.mergedConfig.centerAlignBio ? "center" : "start"}'
|
||||
/>
|
||||
</div>
|
||||
<teleport to="#modal">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue