merge develop and fix conflicts AGAIN
This commit is contained in:
commit
54e7e0e31b
|
@ -3,19 +3,10 @@ import statusPosterService from '../../services/status_poster/status_poster.serv
|
||||||
import fileSizeFormatService from '../../services/file_size_format/file_size_format.js'
|
import fileSizeFormatService from '../../services/file_size_format/file_size_format.js'
|
||||||
|
|
||||||
const mediaUpload = {
|
const mediaUpload = {
|
||||||
mounted () {
|
|
||||||
const input = this.$el.querySelector('input')
|
|
||||||
|
|
||||||
input.addEventListener('change', ({target}) => {
|
|
||||||
for (var i = 0; i < target.files.length; i++) {
|
|
||||||
let file = target.files[i]
|
|
||||||
this.uploadFile(file)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
uploading: false
|
uploading: false,
|
||||||
|
uploadReady: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -56,6 +47,18 @@ const mediaUpload = {
|
||||||
} else {
|
} else {
|
||||||
e.dataTransfer.dropEffect = 'none'
|
e.dataTransfer.dropEffect = 'none'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
clearFile () {
|
||||||
|
this.uploadReady = false
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.uploadReady = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
change ({target}) {
|
||||||
|
for (var i = 0; i < target.files.length; i++) {
|
||||||
|
let file = target.files[i]
|
||||||
|
this.uploadFile(file)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: [
|
props: [
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<label class="btn btn-default" :title="$t('tool_tip.media_upload')">
|
<label class="btn btn-default" :title="$t('tool_tip.media_upload')">
|
||||||
<i class="icon-spin4 animate-spin" v-if="uploading"></i>
|
<i class="icon-spin4 animate-spin" v-if="uploading"></i>
|
||||||
<i class="icon-upload" v-if="!uploading"></i>
|
<i class="icon-upload" v-if="!uploading"></i>
|
||||||
<input type="file" style="position: fixed; top: -100em" multiple="true"></input>
|
<input type="file" v-if="uploadReady" @change="change" style="position: fixed; top: -100em" multiple="true"></input>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Status from '../status/status.vue'
|
import Status from '../status/status.vue'
|
||||||
import StillImage from '../still-image/still-image.vue'
|
import UserAvatar from '../user_avatar/user_avatar.vue'
|
||||||
import UserCardContent from '../user_card_content/user_card_content.vue'
|
import UserCardContent from '../user_card_content/user_card_content.vue'
|
||||||
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
|
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
|
||||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||||
|
@ -13,7 +13,7 @@ const Notification = {
|
||||||
},
|
},
|
||||||
props: [ 'notification' ],
|
props: [ 'notification' ],
|
||||||
components: {
|
components: {
|
||||||
Status, StillImage, UserCardContent
|
Status, UserAvatar, UserCardContent
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleUserExpanded () {
|
toggleUserExpanded () {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<status v-if="notification.type === 'mention'" :compact="true" :statusoid="notification.status"></status>
|
<status v-if="notification.type === 'mention'" :compact="true" :statusoid="notification.status"></status>
|
||||||
<div class="non-mention" :class="[userClass, { highlighted: userStyle }]" :style="[ userStyle ]"v-else>
|
<div class="non-mention" :class="[userClass, { highlighted: userStyle }]" :style="[ userStyle ]"v-else>
|
||||||
<a class='avatar-container' :href="notification.action.user.statusnet_profile_url" @click.stop.prevent.capture="toggleUserExpanded">
|
<a class='avatar-container' :href="notification.action.user.statusnet_profile_url" @click.stop.prevent.capture="toggleUserExpanded">
|
||||||
<StillImage class='avatar-compact' :class="{'better-shadow': betterShadow}" :src="notification.action.user.profile_image_url_original"/>
|
<UserAvatar :compact="true" :betterShadow="betterShadow" :src="notification.action.user.profile_image_url_original"/>
|
||||||
</a>
|
</a>
|
||||||
<div class='notification-right'>
|
<div class='notification-right'>
|
||||||
<div class="usercard notification-usercard" v-if="userExpanded">
|
<div class="usercard notification-usercard" v-if="userExpanded">
|
||||||
|
|
|
@ -36,26 +36,7 @@
|
||||||
border-color: $fallback--border;
|
border-color: $fallback--border;
|
||||||
border-color: var(--border, $fallback--border);
|
border-color: var(--border, $fallback--border);
|
||||||
|
|
||||||
.avatar-compact {
|
&:hover .animated.avatar {
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
box-shadow: var(--avatarStatusShadow);
|
|
||||||
border-radius: $fallback--avatarAltRadius;
|
|
||||||
border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
|
|
||||||
overflow: hidden;
|
|
||||||
line-height: 0;
|
|
||||||
|
|
||||||
&.better-shadow {
|
|
||||||
box-shadow: var(--avatarStatusShadowInset);
|
|
||||||
filter: var(--avatarStatusShadowFilter)
|
|
||||||
}
|
|
||||||
|
|
||||||
&.animated::before {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover .animated.avatar-compact {
|
|
||||||
canvas {
|
canvas {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,6 +250,7 @@ const PostStatusForm = {
|
||||||
visibility: newStatus.visibility,
|
visibility: newStatus.visibility,
|
||||||
contentType: newStatus.contentType
|
contentType: newStatus.contentType
|
||||||
}
|
}
|
||||||
|
this.$refs.mediaUpload.clearFile()
|
||||||
this.$emit('posted')
|
this.$emit('posted')
|
||||||
let el = this.$el.querySelector('textarea')
|
let el = this.$el.querySelector('textarea')
|
||||||
el.style.height = 'auto'
|
el.style.height = 'auto'
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='form-bottom'>
|
<div class='form-bottom'>
|
||||||
<media-upload @uploading="disableSubmit" @uploaded="addMediaFile" @upload-failed="uploadFailed" :drop-files="dropFiles"></media-upload>
|
<media-upload ref="mediaUpload" @uploading="disableSubmit" @uploaded="addMediaFile" @upload-failed="uploadFailed" :drop-files="dropFiles"></media-upload>
|
||||||
|
|
||||||
<p v-if="isOverLengthLimit" class="error">{{ charactersLeft }}</p>
|
<p v-if="isOverLengthLimit" class="error">{{ charactersLeft }}</p>
|
||||||
<p class="faint" v-else-if="hasStatusLengthLimit">{{ charactersLeft }}</p>
|
<p class="faint" v-else-if="hasStatusLengthLimit">{{ charactersLeft }}</p>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import RetweetButton from '../retweet_button/retweet_button.vue'
|
||||||
import DeleteButton from '../delete_button/delete_button.vue'
|
import DeleteButton from '../delete_button/delete_button.vue'
|
||||||
import PostStatusForm from '../post_status_form/post_status_form.vue'
|
import PostStatusForm from '../post_status_form/post_status_form.vue'
|
||||||
import UserCardContent from '../user_card_content/user_card_content.vue'
|
import UserCardContent from '../user_card_content/user_card_content.vue'
|
||||||
import StillImage from '../still-image/still-image.vue'
|
import UserAvatar from '../user_avatar/user_avatar.vue'
|
||||||
import Gallery from '../gallery/gallery.vue'
|
import Gallery from '../gallery/gallery.vue'
|
||||||
import LinkPreview from '../link-preview/link-preview.vue'
|
import LinkPreview from '../link-preview/link-preview.vue'
|
||||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||||
|
@ -36,6 +36,7 @@ const Status = {
|
||||||
preview: null,
|
preview: null,
|
||||||
showPreview: false,
|
showPreview: false,
|
||||||
showingTall: this.inConversation && this.focused,
|
showingTall: this.inConversation && this.focused,
|
||||||
|
showingLongSubject: false,
|
||||||
expandingSubject: typeof this.$store.state.config.collapseMessageWithSubject === 'undefined'
|
expandingSubject: typeof this.$store.state.config.collapseMessageWithSubject === 'undefined'
|
||||||
? !this.$store.state.instance.collapseMessageWithSubject
|
? !this.$store.state.instance.collapseMessageWithSubject
|
||||||
: !this.$store.state.config.collapseMessageWithSubject,
|
: !this.$store.state.config.collapseMessageWithSubject,
|
||||||
|
@ -89,6 +90,7 @@ const Status = {
|
||||||
retweet () { return !!this.statusoid.retweeted_status },
|
retweet () { return !!this.statusoid.retweeted_status },
|
||||||
retweeter () { return this.statusoid.user.name || this.statusoid.user.screen_name },
|
retweeter () { return this.statusoid.user.name || this.statusoid.user.screen_name },
|
||||||
retweeterHtml () { return this.statusoid.user.name_html },
|
retweeterHtml () { return this.statusoid.user.name_html },
|
||||||
|
retweeterProfileLink () { return this.generateUserProfileLink(this.statusoid.user.id, this.statusoid.user.screen_name) },
|
||||||
status () {
|
status () {
|
||||||
if (this.retweet) {
|
if (this.retweet) {
|
||||||
return this.statusoid.retweeted_status
|
return this.statusoid.retweeted_status
|
||||||
|
@ -129,6 +131,9 @@ const Status = {
|
||||||
const lengthScore = this.status.statusnet_html.split(/<p|<br/).length + this.status.text.length / 80
|
const lengthScore = this.status.statusnet_html.split(/<p|<br/).length + this.status.text.length / 80
|
||||||
return lengthScore > 20
|
return lengthScore > 20
|
||||||
},
|
},
|
||||||
|
longSubject () {
|
||||||
|
return this.status.summary.length > 900
|
||||||
|
},
|
||||||
isReply () {
|
isReply () {
|
||||||
return !!(this.status.in_reply_to_status_id && this.status.in_reply_to_user_id)
|
return !!(this.status.in_reply_to_status_id && this.status.in_reply_to_user_id)
|
||||||
},
|
},
|
||||||
|
@ -244,7 +249,7 @@ const Status = {
|
||||||
DeleteButton,
|
DeleteButton,
|
||||||
PostStatusForm,
|
PostStatusForm,
|
||||||
UserCardContent,
|
UserCardContent,
|
||||||
StillImage,
|
UserAvatar,
|
||||||
Gallery,
|
Gallery,
|
||||||
LinkPreview
|
LinkPreview
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,10 +13,13 @@
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div v-if="retweet && !noHeading" :class="[repeaterClass, { highlighted: repeaterStyle }]" :style="[repeaterStyle]" class="media container retweet-info">
|
<div v-if="retweet && !noHeading" :class="[repeaterClass, { highlighted: repeaterStyle }]" :style="[repeaterStyle]" class="media container retweet-info">
|
||||||
<StillImage v-if="retweet" class='avatar' :class='{ "better-shadow": betterShadow }' :src="statusoid.user.profile_image_url_original"/>
|
<UserAvatar v-if="retweet" :betterShadow="betterShadow" :src="statusoid.user.profile_image_url_original"/>
|
||||||
<div class="media-body faint">
|
<div class="media-body faint">
|
||||||
<a v-if="retweeterHtml" :href="statusoid.user.statusnet_profile_url" class="user-name" :title="'@'+statusoid.user.screen_name" v-html="retweeterHtml"></a>
|
<span class="user-name">
|
||||||
<a v-else :href="statusoid.user.statusnet_profile_url" class="user-name" :title="'@'+statusoid.user.screen_name">{{retweeter}}</a>
|
<router-link :to="retweeterProfileLink">
|
||||||
|
{{retweeterHtml || retweeter}}
|
||||||
|
</router-link>
|
||||||
|
</span>
|
||||||
<i class='fa icon-retweet retweeted' :title="$t('tool_tip.repeat')"></i>
|
<i class='fa icon-retweet retweeted' :title="$t('tool_tip.repeat')"></i>
|
||||||
{{$t('timeline.repeated')}}
|
{{$t('timeline.repeated')}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,7 +28,7 @@
|
||||||
<div :class="[userClass, { highlighted: userStyle, 'is-retweet': retweet }]" :style="[ userStyle ]" class="media status">
|
<div :class="[userClass, { highlighted: userStyle, 'is-retweet': retweet }]" :style="[ userStyle ]" class="media status">
|
||||||
<div v-if="!noHeading" class="media-left">
|
<div v-if="!noHeading" class="media-left">
|
||||||
<router-link :to="userProfileLink" @click.stop.prevent.capture.native="toggleUserExpanded">
|
<router-link :to="userProfileLink" @click.stop.prevent.capture.native="toggleUserExpanded">
|
||||||
<StillImage class='avatar' :class="{'avatar-compact': compact, 'better-shadow': betterShadow}" :src="status.user.profile_image_url_original"/>
|
<UserAvatar :compact="compact" :betterShadow="betterShadow" :src="status.user.profile_image_url_original"/>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="status-body">
|
<div class="status-body">
|
||||||
|
@ -85,7 +88,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :class="{'tall-status': hideTallStatus}" class="status-content-wrapper">
|
<div class="status-content-wrapper" :class="{ 'tall-status': !showingLongSubject }" v-if="longSubject">
|
||||||
|
<a class="tall-status-hider" :class="{ 'tall-status-hider_focused': isFocused }" v-if="!showingLongSubject" href="#" @click.prevent="showingLongSubject=true">Show more</a>
|
||||||
|
<div @click.prevent="linkClicked" class="status-content media-body" v-html="status.statusnet_html"></div>
|
||||||
|
<a v-if="showingLongSubject" href="#" class="status-unhider" @click.prevent="showingLongSubject=false">Show less</a>
|
||||||
|
</div>
|
||||||
|
<div :class="{'tall-status': hideTallStatus}" class="status-content-wrapper" v-else>
|
||||||
<a class="tall-status-hider" :class="{ 'tall-status-hider_focused': isFocused }" v-if="hideTallStatus" href="#" @click.prevent="toggleShowMore">Show more</a>
|
<a class="tall-status-hider" :class="{ 'tall-status-hider_focused': isFocused }" v-if="hideTallStatus" href="#" @click.prevent="toggleShowMore">Show more</a>
|
||||||
<div @click.prevent="linkClicked" class="status-content media-body" v-html="status.statusnet_html" v-if="!hideSubjectStatus"></div>
|
<div @click.prevent="linkClicked" class="status-content media-body" v-html="status.statusnet_html" v-if="!hideSubjectStatus"></div>
|
||||||
<div @click.prevent="linkClicked" class="status-content media-body" v-html="status.summary_html" v-else></div>
|
<div @click.prevent="linkClicked" class="status-content media-body" v-html="status.summary_html" v-else></div>
|
||||||
|
@ -93,7 +101,7 @@
|
||||||
<a v-if="showingMore" href="#" class="status-unhider" @click.prevent="toggleShowMore">Show less</a>
|
<a v-if="showingMore" href="#" class="status-unhider" @click.prevent="toggleShowMore">Show less</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="status.attachments && !hideSubjectStatus" class="attachments media-body">
|
<div v-if="status.attachments && (!hideSubjectStatus || showingLongSubject)" class="attachments media-body">
|
||||||
<attachment
|
<attachment
|
||||||
class="non-gallery"
|
class="non-gallery"
|
||||||
v-for="attachment in nonGalleryAttachments"
|
v-for="attachment in nonGalleryAttachments"
|
||||||
|
@ -285,6 +293,14 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
& > span {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
& > a:last-child {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.reply-info {
|
.reply-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -405,7 +421,7 @@
|
||||||
padding: 0.4em 0.6em 0 0.6em;
|
padding: 0.4em 0.6em 0 0.6em;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
.avatar {
|
.avatar.still-image {
|
||||||
border-radius: $fallback--avatarAltRadius;
|
border-radius: $fallback--avatarAltRadius;
|
||||||
border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
|
border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
|
||||||
margin-left: 28px;
|
margin-left: 28px;
|
||||||
|
@ -489,46 +505,6 @@
|
||||||
color: var(--cBlue, $fallback--cBlue);
|
color: var(--cBlue, $fallback--cBlue);
|
||||||
}
|
}
|
||||||
|
|
||||||
.status .avatar-compact {
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
box-shadow: var(--avatarStatusShadow);
|
|
||||||
border-radius: $fallback--avatarAltRadius;
|
|
||||||
border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
|
|
||||||
|
|
||||||
&.better-shadow {
|
|
||||||
box-shadow: var(--avatarStatusShadowInset);
|
|
||||||
filter: var(--avatarStatusShadowFilter)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatar.still-image {
|
|
||||||
width: 48px;
|
|
||||||
height: 48px;
|
|
||||||
box-shadow: var(--avatarStatusShadow);
|
|
||||||
border-radius: $fallback--avatarRadius;
|
|
||||||
border-radius: var(--avatarRadius, $fallback--avatarRadius);
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&.better-shadow {
|
|
||||||
box-shadow: var(--avatarStatusShadowInset);
|
|
||||||
filter: var(--avatarStatusShadowFilter)
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.animated::before {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.retweeted {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.status:hover .animated.avatar {
|
.status:hover .animated.avatar {
|
||||||
canvas {
|
canvas {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -586,7 +562,7 @@ a.unmute {
|
||||||
@media all and (max-width: 800px) {
|
@media all and (max-width: 800px) {
|
||||||
.status-el {
|
.status-el {
|
||||||
.retweet-info {
|
.retweet-info {
|
||||||
.avatar {
|
.avatar.still-image {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -595,15 +571,15 @@ a.unmute {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status .avatar {
|
.status .avatar.still-image {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
|
||||||
|
|
||||||
.status .avatar-compact {
|
&.avatar-compact {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -2,7 +2,8 @@ const StillImage = {
|
||||||
props: [
|
props: [
|
||||||
'src',
|
'src',
|
||||||
'referrerpolicy',
|
'referrerpolicy',
|
||||||
'mimetype'
|
'mimetype',
|
||||||
|
'imageLoadError'
|
||||||
],
|
],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class='still-image' :class='{ animated: animated }' >
|
<div class='still-image' :class='{ animated: animated }' >
|
||||||
<canvas ref="canvas" v-if="animated"></canvas>
|
<canvas ref="canvas" v-if="animated"></canvas>
|
||||||
<img ref="src" :src="src" :referrerpolicy="referrerpolicy" v-on:load="onLoad"/>
|
<img ref="src" :src="src" :referrerpolicy="referrerpolicy" v-on:load="onLoad" @error="imageLoadError"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
import StillImage from '../still-image/still-image.vue'
|
||||||
|
|
||||||
|
const UserAvatar = {
|
||||||
|
props: [
|
||||||
|
'src',
|
||||||
|
'betterShadow',
|
||||||
|
'compact'
|
||||||
|
],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
showPlaceholder: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
StillImage
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
imgSrc () {
|
||||||
|
return this.showPlaceholder ? '/images/avi.png' : this.src
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
imageLoadError () {
|
||||||
|
this.showPlaceholder = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default UserAvatar
|
|
@ -0,0 +1,37 @@
|
||||||
|
<template>
|
||||||
|
<StillImage class="avatar" :class="{ 'avatar-compact': compact, 'better-shadow': betterShadow }" :src="imgSrc" :imageLoadError="imageLoadError"/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script src="./user_avatar.js"></script>
|
||||||
|
<style lang="scss">
|
||||||
|
@import '../../_variables.scss';
|
||||||
|
|
||||||
|
.avatar.still-image {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
box-shadow: var(--avatarStatusShadow);
|
||||||
|
border-radius: $fallback--avatarRadius;
|
||||||
|
border-radius: var(--avatarRadius, $fallback--avatarRadius);
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.better-shadow {
|
||||||
|
box-shadow: var(--avatarStatusShadowInset);
|
||||||
|
filter: var(--avatarStatusShadowFilter)
|
||||||
|
}
|
||||||
|
|
||||||
|
&.animated::before {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.avatar-compact {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: $fallback--avatarAltRadius;
|
||||||
|
border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,5 +1,5 @@
|
||||||
import UserCardContent from '../user_card_content/user_card_content.vue'
|
import UserCardContent from '../user_card_content/user_card_content.vue'
|
||||||
import StillImage from '../still-image/still-image.vue'
|
import UserAvatar from '../user_avatar/user_avatar.vue'
|
||||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||||
|
|
||||||
const UserCard = {
|
const UserCard = {
|
||||||
|
@ -15,7 +15,7 @@ const UserCard = {
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
UserCardContent,
|
UserCardContent,
|
||||||
StillImage
|
UserAvatar
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
currentUser () { return this.$store.state.users.currentUser }
|
currentUser () { return this.$store.state.users.currentUser }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<StillImage @click.prevent.native="toggleUserExpanded" class="avatar" :src="user.profile_image_url"/>
|
<UserAvatar class="avatar" :compact="true" @click.prevent.native="toggleUserExpanded" :src="user.profile_image_url"/>
|
||||||
</a>
|
</a>
|
||||||
<div class="usercard" v-if="userExpanded">
|
<div class="usercard" v-if="userExpanded">
|
||||||
<user-card-content :user="user" :switcher="false"></user-card-content>
|
<user-card-content :user="user" :switcher="false"></user-card-content>
|
||||||
|
@ -69,11 +69,7 @@
|
||||||
border-bottom-color: var(--border, $fallback--border);
|
border-bottom-color: var(--border, $fallback--border);
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
margin-top: 0.2em;
|
padding: 0;
|
||||||
width:32px;
|
|
||||||
height: 32px;
|
|
||||||
border-radius: $fallback--avatarAltRadius;
|
|
||||||
border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import StillImage from '../still-image/still-image.vue'
|
import UserAvatar from '../user_avatar/user_avatar.vue'
|
||||||
import { hex2rgb } from '../../services/color_convert/color_convert.js'
|
import { hex2rgb } from '../../services/color_convert/color_convert.js'
|
||||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
StillImage
|
UserAvatar
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
followUser () {
|
followUser () {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div class='user-info'>
|
<div class='user-info'>
|
||||||
<div class='container'>
|
<div class='container'>
|
||||||
<router-link :to="userProfileLink(user)">
|
<router-link :to="userProfileLink(user)">
|
||||||
<StillImage class="avatar" :class='{ "better-shadow": betterShadow }' :src="user.profile_image_url_original"/>
|
<UserAvatar :betterShadow="betterShadow" :src="user.profile_image_url_original"/>
|
||||||
</router-link>
|
</router-link>
|
||||||
<div class="name-and-screen-name">
|
<div class="name-and-screen-name">
|
||||||
<div class="top-line">
|
<div class="top-line">
|
||||||
|
@ -169,23 +169,12 @@
|
||||||
max-height: 56px;
|
max-height: 56px;
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
border-radius: $fallback--avatarRadius;
|
|
||||||
border-radius: var(--avatarRadius, $fallback--avatarRadius);
|
|
||||||
flex: 1 0 100%;
|
flex: 1 0 100%;
|
||||||
width: 56px;
|
width: 56px;
|
||||||
height: 56px;
|
height: 56px;
|
||||||
box-shadow: 0px 1px 8px rgba(0,0,0,0.75);
|
box-shadow: 0px 1px 8px rgba(0,0,0,0.75);
|
||||||
box-shadow: var(--avatarShadow);
|
box-shadow: var(--avatarShadow);
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
|
|
||||||
&.better-shadow {
|
|
||||||
box-shadow: var(--avatarShadowInset);
|
|
||||||
filter: var(--avatarShadowFilter)
|
|
||||||
}
|
|
||||||
|
|
||||||
&.animated::before {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,7 @@ const UserSettings = {
|
||||||
newLocked: this.$store.state.users.currentUser.locked,
|
newLocked: this.$store.state.users.currentUser.locked,
|
||||||
newNoRichText: this.$store.state.users.currentUser.no_rich_text,
|
newNoRichText: this.$store.state.users.currentUser.no_rich_text,
|
||||||
newDefaultScope: this.$store.state.users.currentUser.default_scope,
|
newDefaultScope: this.$store.state.users.currentUser.default_scope,
|
||||||
hideFollowings: this.$store.state.users.currentUser.hide_followings,
|
newHideNetwork: this.$store.state.users.currentUser.hide_network,
|
||||||
hideFollowers: this.$store.state.users.currentUser.hide_followers,
|
|
||||||
followList: null,
|
followList: null,
|
||||||
followImportError: false,
|
followImportError: false,
|
||||||
followsImported: false,
|
followsImported: false,
|
||||||
|
@ -67,8 +66,7 @@ const UserSettings = {
|
||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
const default_scope = this.newDefaultScope
|
const default_scope = this.newDefaultScope
|
||||||
const no_rich_text = this.newNoRichText
|
const no_rich_text = this.newNoRichText
|
||||||
const hide_followings = this.hideFollowings
|
const hide_network = this.newHideNetwork
|
||||||
const hide_followers = this.hideFollowers
|
|
||||||
/* eslint-enable camelcase */
|
/* eslint-enable camelcase */
|
||||||
this.$store.state.api.backendInteractor
|
this.$store.state.api.backendInteractor
|
||||||
.updateProfile({
|
.updateProfile({
|
||||||
|
@ -80,8 +78,7 @@ const UserSettings = {
|
||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
default_scope,
|
default_scope,
|
||||||
no_rich_text,
|
no_rich_text,
|
||||||
hide_followings,
|
hide_network
|
||||||
hide_followers
|
|
||||||
/* eslint-enable camelcase */
|
/* eslint-enable camelcase */
|
||||||
}}).then((user) => {
|
}}).then((user) => {
|
||||||
if (!user.error) {
|
if (!user.error) {
|
||||||
|
|
|
@ -30,12 +30,8 @@
|
||||||
<label for="account-no-rich-text">{{$t('settings.no_rich_text_description')}}</label>
|
<label for="account-no-rich-text">{{$t('settings.no_rich_text_description')}}</label>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<input type="checkbox" v-model="hideFollowings" id="account-hide-followings">
|
<input type="checkbox" v-model="newHideNetwork" id="account-hide-network">
|
||||||
<label for="account-hide-followings">{{$t('settings.hide_followings_description')}}</label>
|
<label for="account-hide-network">{{$t('settings.hide_network_description')}}</label>
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<input type="checkbox" v-model="hideFollowers" id="account-hide-followers">
|
|
||||||
<label for="account-hide-followers">{{$t('settings.hide_followers_description')}}</label>
|
|
||||||
</p>
|
</p>
|
||||||
<button :disabled='newName.length <= 0' class="btn btn-default" @click="updateProfile">{{$t('general.submit')}}</button>
|
<button :disabled='newName.length <= 0' class="btn btn-default" @click="updateProfile">{{$t('general.submit')}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -155,8 +155,7 @@
|
||||||
"notification_visibility_mentions": "Erwähnungen",
|
"notification_visibility_mentions": "Erwähnungen",
|
||||||
"notification_visibility_repeats": "Wiederholungen",
|
"notification_visibility_repeats": "Wiederholungen",
|
||||||
"no_rich_text_description": "Rich-Text Formatierungen von allen Beiträgen entfernen",
|
"no_rich_text_description": "Rich-Text Formatierungen von allen Beiträgen entfernen",
|
||||||
"hide_followings_description": "Zeige nicht, wem ich folge",
|
"hide_network_description": "Zeige nicht, wem ich folge und wer mir folgt",
|
||||||
"hide_followers_description": "Zeige nicht, wer mir folgt",
|
|
||||||
"nsfw_clickthrough": "Aktiviere ausblendbares Overlay für Anhänge, die als NSFW markiert sind",
|
"nsfw_clickthrough": "Aktiviere ausblendbares Overlay für Anhänge, die als NSFW markiert sind",
|
||||||
"panelRadius": "Panel",
|
"panelRadius": "Panel",
|
||||||
"pause_on_unfocused": "Streaming pausieren, wenn das Tab nicht fokussiert ist",
|
"pause_on_unfocused": "Streaming pausieren, wenn das Tab nicht fokussiert ist",
|
||||||
|
|
|
@ -164,8 +164,7 @@
|
||||||
"notification_visibility_mentions": "Mentions",
|
"notification_visibility_mentions": "Mentions",
|
||||||
"notification_visibility_repeats": "Repeats",
|
"notification_visibility_repeats": "Repeats",
|
||||||
"no_rich_text_description": "Strip rich text formatting from all posts",
|
"no_rich_text_description": "Strip rich text formatting from all posts",
|
||||||
"hide_followings_description": "Don't show who I'm following",
|
"hide_network_description": "Don't show who I'm following and who's following me",
|
||||||
"hide_followers_description": "Don't show who's following me",
|
|
||||||
"nsfw_clickthrough": "Enable clickthrough NSFW attachment hiding",
|
"nsfw_clickthrough": "Enable clickthrough NSFW attachment hiding",
|
||||||
"panelRadius": "Panels",
|
"panelRadius": "Panels",
|
||||||
"pause_on_unfocused": "Pause streaming when tab is not focused",
|
"pause_on_unfocused": "Pause streaming when tab is not focused",
|
||||||
|
|
|
@ -157,8 +157,7 @@
|
||||||
"notification_visibility_mentions": "メンション",
|
"notification_visibility_mentions": "メンション",
|
||||||
"notification_visibility_repeats": "リピート",
|
"notification_visibility_repeats": "リピート",
|
||||||
"no_rich_text_description": "リッチテキストをつかわない",
|
"no_rich_text_description": "リッチテキストをつかわない",
|
||||||
"hide_followings_description": "フォローしている人を表示しない",
|
"hide_network_description": "わたしがフォローしているひとと、わたしをフォローしているひとを、みせない",
|
||||||
"hide_followers_description": "フォローしている人を表示しない",
|
|
||||||
"nsfw_clickthrough": "NSFWなファイルをかくす",
|
"nsfw_clickthrough": "NSFWなファイルをかくす",
|
||||||
"panelRadius": "パネル",
|
"panelRadius": "パネル",
|
||||||
"pause_on_unfocused": "タブにフォーカスがないときストリーミングをとめる",
|
"pause_on_unfocused": "タブにフォーカスがないときストリーミングをとめる",
|
||||||
|
|
|
@ -156,8 +156,7 @@
|
||||||
"notification_visibility_mentions": "멘션",
|
"notification_visibility_mentions": "멘션",
|
||||||
"notification_visibility_repeats": "반복",
|
"notification_visibility_repeats": "반복",
|
||||||
"no_rich_text_description": "모든 게시물의 서식을 지우기",
|
"no_rich_text_description": "모든 게시물의 서식을 지우기",
|
||||||
"hide_followings_description": "내가 팔로우하는 사람을 표시하지 않음",
|
"hide_network_description": "내 팔로우와 팔로워를 숨기기",
|
||||||
"hide_followers_description": "나를 따르는 사람을 보여주지 마라.",
|
|
||||||
"nsfw_clickthrough": "NSFW 이미지 \"클릭해서 보이기\"를 활성화",
|
"nsfw_clickthrough": "NSFW 이미지 \"클릭해서 보이기\"를 활성화",
|
||||||
"panelRadius": "패널",
|
"panelRadius": "패널",
|
||||||
"pause_on_unfocused": "탭이 활성 상태가 아닐 때 스트리밍 멈추기",
|
"pause_on_unfocused": "탭이 활성 상태가 아닐 때 스트리밍 멈추기",
|
||||||
|
|
|
@ -127,8 +127,7 @@
|
||||||
"notification_visibility_mentions": "Упоминания",
|
"notification_visibility_mentions": "Упоминания",
|
||||||
"notification_visibility_repeats": "Повторы",
|
"notification_visibility_repeats": "Повторы",
|
||||||
"no_rich_text_description": "Убрать форматирование из всех постов",
|
"no_rich_text_description": "Убрать форматирование из всех постов",
|
||||||
"hide_followings_description": "Не показывать кого я читаю",
|
"hide_network_description": "Не показывать кого я читаю и кто меня читает",
|
||||||
"hide_followers_description": "Не показывать кто читает меня",
|
|
||||||
"nsfw_clickthrough": "Включить скрытие NSFW вложений",
|
"nsfw_clickthrough": "Включить скрытие NSFW вложений",
|
||||||
"panelRadius": "Панели",
|
"panelRadius": "Панели",
|
||||||
"pause_on_unfocused": "Приостановить загрузку когда вкладка не в фокусе",
|
"pause_on_unfocused": "Приостановить загрузку когда вкладка не в фокусе",
|
||||||
|
|
|
@ -130,7 +130,7 @@ const updateBanner = ({credentials, params}) => {
|
||||||
// description
|
// description
|
||||||
const updateProfile = ({credentials, params}) => {
|
const updateProfile = ({credentials, params}) => {
|
||||||
// Always include these fields, because they might be empty or false
|
// Always include these fields, because they might be empty or false
|
||||||
const fields = ['description', 'locked', 'no_rich_text', 'hide_followings', 'hide_followers']
|
const fields = ['description', 'locked', 'no_rich_text', 'hide_network']
|
||||||
let url = PROFILE_UPDATE_URL
|
let url = PROFILE_UPDATE_URL
|
||||||
|
|
||||||
const form = new FormData()
|
const form = new FormData()
|
||||||
|
|
|
@ -100,8 +100,7 @@ export const parseUser = (data) => {
|
||||||
output.rights = data.rights
|
output.rights = data.rights
|
||||||
output.no_rich_text = data.no_rich_text
|
output.no_rich_text = data.no_rich_text
|
||||||
output.default_scope = data.default_scope
|
output.default_scope = data.default_scope
|
||||||
output.hide_followings = data.hide_followings
|
output.hide_network = data.hide_network
|
||||||
output.hide_followers = data.hide_followers
|
|
||||||
output.background_image = data.background_image
|
output.background_image = data.background_image
|
||||||
// on mastoapi this info is contained in a "relationship"
|
// on mastoapi this info is contained in a "relationship"
|
||||||
output.following = data.following
|
output.following = data.following
|
||||||
|
|
Loading…
Reference in New Issue