merge develop in
This commit is contained in:
commit
b614cb94e5
15 changed files with 66 additions and 37 deletions
|
@ -57,9 +57,9 @@ const Attachment = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openModal (event) {
|
openModal (event) {
|
||||||
const modalTypes = this.$store.state.config.playVideosInline
|
const modalTypes = this.$store.state.config.playVideosInModal
|
||||||
? ['image']
|
? ['image', 'video']
|
||||||
: ['image', 'video']
|
: ['image']
|
||||||
if (fileTypeService.fileMatchesSomeType(modalTypes, this.attachment) ||
|
if (fileTypeService.fileMatchesSomeType(modalTypes, this.attachment) ||
|
||||||
this.usePlaceHolder
|
this.usePlaceHolder
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const buildMentionsString = ({user, attentions}, currentUser) => {
|
||||||
return `@${attention.screen_name}`
|
return `@${attention.screen_name}`
|
||||||
})
|
})
|
||||||
|
|
||||||
return mentions.join(' ') + ' '
|
return mentions.length > 0 ? mentions.join(' ') + ' ' : ''
|
||||||
}
|
}
|
||||||
|
|
||||||
const PostStatusForm = {
|
const PostStatusForm = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-env browser */
|
/* eslint-env browser */
|
||||||
import TabSwitcher from '../tab_switcher/tab_switcher.jsx'
|
import TabSwitcher from '../tab_switcher/tab_switcher.js'
|
||||||
import StyleSwitcher from '../style_switcher/style_switcher.vue'
|
import StyleSwitcher from '../style_switcher/style_switcher.vue'
|
||||||
import InterfaceLanguageSwitcher from '../interface_language_switcher/interface_language_switcher.vue'
|
import InterfaceLanguageSwitcher from '../interface_language_switcher/interface_language_switcher.vue'
|
||||||
import { filter, trim } from 'lodash'
|
import { filter, trim } from 'lodash'
|
||||||
|
@ -66,7 +66,7 @@ const settings = {
|
||||||
Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'webkitAudioDecodedByteCount') ||
|
Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'webkitAudioDecodedByteCount') ||
|
||||||
// Future spec, still not supported in Nightly 63 as of 08/2018
|
// Future spec, still not supported in Nightly 63 as of 08/2018
|
||||||
Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'audioTracks'),
|
Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'audioTracks'),
|
||||||
playVideosInline: user.playVideosInline,
|
playVideosInModal: user.playVideosInModal,
|
||||||
useContainFit: user.useContainFit
|
useContainFit: user.useContainFit
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -164,8 +164,8 @@ const settings = {
|
||||||
this.$store.dispatch('setOption', { name: 'webPushNotifications', value })
|
this.$store.dispatch('setOption', { name: 'webPushNotifications', value })
|
||||||
if (value) this.$store.dispatch('registerPushNotifications')
|
if (value) this.$store.dispatch('registerPushNotifications')
|
||||||
},
|
},
|
||||||
playVideosInline (value) {
|
playVideosInModal (value) {
|
||||||
this.$store.dispatch('setOption', { name: 'playVideosInline', value })
|
this.$store.dispatch('setOption', { name: 'playVideosInModal', value })
|
||||||
},
|
},
|
||||||
useContainFit (value) {
|
useContainFit (value) {
|
||||||
this.$store.dispatch('setOption', { name: 'useContainFit', value })
|
this.$store.dispatch('setOption', { name: 'useContainFit', value })
|
||||||
|
|
|
@ -146,8 +146,8 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" id="playVideosInline" v-model="playVideosInline">
|
<input type="checkbox" id="playVideosInModal" v-model="playVideosInModal">
|
||||||
<label for="playVideosInline">{{$t('settings.play_videos_inline')}}</label>
|
<label for="playVideosInModal">{{$t('settings.play_videos_in_modal')}}</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" id="useContainFit" v-model="useContainFit">
|
<input type="checkbox" id="useContainFit" v-model="useContainFit">
|
||||||
|
|
|
@ -87,7 +87,7 @@ const Status = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
retweet () { return !!this.statusoid.retweeted_status },
|
retweet () { return !!this.statusoid.retweeted_status },
|
||||||
retweeter () { return this.statusoid.user.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 },
|
||||||
status () {
|
status () {
|
||||||
if (this.retweet) {
|
if (this.retweet) {
|
||||||
|
@ -222,9 +222,9 @@ const Status = {
|
||||||
if (this.attachmentSize === 'hide') {
|
if (this.attachmentSize === 'hide') {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
return this.$store.state.config.playVideosInline
|
return this.$store.state.config.playVideosInModal
|
||||||
? ['image']
|
? ['image', 'video']
|
||||||
: ['image', 'video']
|
: ['image']
|
||||||
},
|
},
|
||||||
galleryAttachments () {
|
galleryAttachments () {
|
||||||
return this.status.attachments.filter(
|
return this.status.attachments.filter(
|
||||||
|
|
|
@ -7,7 +7,7 @@ import OpacityInput from '../opacity_input/opacity_input.vue'
|
||||||
import ShadowControl from '../shadow_control/shadow_control.vue'
|
import ShadowControl from '../shadow_control/shadow_control.vue'
|
||||||
import FontControl from '../font_control/font_control.vue'
|
import FontControl from '../font_control/font_control.vue'
|
||||||
import ContrastRatio from '../contrast_ratio/contrast_ratio.vue'
|
import ContrastRatio from '../contrast_ratio/contrast_ratio.vue'
|
||||||
import TabSwitcher from '../tab_switcher/tab_switcher.jsx'
|
import TabSwitcher from '../tab_switcher/tab_switcher.js'
|
||||||
import Preview from './preview.vue'
|
import Preview from './preview.vue'
|
||||||
import ExportImport from '../export_import/export_import.vue'
|
import ExportImport from '../export_import/export_import.vue'
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import './tab_switcher.scss'
|
||||||
|
|
||||||
export default Vue.component('tab-switcher', {
|
export default Vue.component('tab-switcher', {
|
||||||
name: 'TabSwitcher',
|
name: 'TabSwitcher',
|
||||||
|
props: ['renderOnlyFocused'],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
active: this.$slots.default.findIndex(_ => _.tag)
|
active: this.$slots.default.findIndex(_ => _.tag)
|
||||||
|
@ -44,11 +45,12 @@ export default Vue.component('tab-switcher', {
|
||||||
const contents = this.$slots.default.map((slot, index) => {
|
const contents = this.$slots.default.map((slot, index) => {
|
||||||
if (!slot.tag) return
|
if (!slot.tag) return
|
||||||
const active = index === this.active
|
const active = index === this.active
|
||||||
return (
|
if (this.renderOnlyFocused) {
|
||||||
<div class={active ? 'active' : 'hidden'}>
|
return active
|
||||||
{slot}
|
? <div class="active">{slot}</div>
|
||||||
</div>
|
: <div class="hidden"></div>
|
||||||
)
|
}
|
||||||
|
return <div class={active ? 'active' : 'hidden' }>{slot}</div>
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
|
@ -110,15 +110,15 @@
|
||||||
<div v-if="!hideUserStatsLocal && switcher" class="user-counts">
|
<div v-if="!hideUserStatsLocal && switcher" class="user-counts">
|
||||||
<div class="user-count" v-on:click.prevent="setProfileView('statuses')">
|
<div class="user-count" v-on:click.prevent="setProfileView('statuses')">
|
||||||
<h5>{{ $t('user_card.statuses') }}</h5>
|
<h5>{{ $t('user_card.statuses') }}</h5>
|
||||||
<span v-if="!hideUserStatsLocal">{{user.statuses_count}} <br></span>
|
<span>{{user.statuses_count}} <br></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-count" v-on:click.prevent="setProfileView('friends')">
|
<div class="user-count" v-on:click.prevent="setProfileView('friends')">
|
||||||
<h5>{{ $t('user_card.followees') }}</h5>
|
<h5>{{ $t('user_card.followees') }}</h5>
|
||||||
<span v-if="!hideUserStatsLocal">{{user.friends_count}}</span>
|
<span>{{user.friends_count}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-count" v-on:click.prevent="setProfileView('followers')">
|
<div class="user-count" v-on:click.prevent="setProfileView('followers')">
|
||||||
<h5>{{ $t('user_card.followers') }}</h5>
|
<h5>{{ $t('user_card.followers') }}</h5>
|
||||||
<span v-if="!hideUserStatsLocal">{{user.followers_count}}</span>
|
<span>{{user.followers_count}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p @click.prevent="linkClicked" v-if="!hideBio && user.description_html" class="profile-bio" v-html="user.description_html"></p>
|
<p @click.prevent="linkClicked" v-if="!hideBio && user.description_html" class="profile-bio" v-html="user.description_html"></p>
|
||||||
|
|
|
@ -1,9 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="user.id" class="user-profile panel panel-default">
|
<div v-if="user.id" class="user-profile panel panel-default">
|
||||||
<user-card-content :user="user" :switcher="true" :selected="timeline.viewing"></user-card-content>
|
<user-card-content
|
||||||
<tab-switcher>
|
:user="user"
|
||||||
<Timeline :label="$t('user_card.statuses')" :embedded="true" :title="$t('user_profile.timeline_title')" :timeline="timeline" :timeline-name="'user'" :user-id="fetchBy"/>
|
:switcher="true"
|
||||||
|
:selected="timeline.viewing"
|
||||||
|
/>
|
||||||
|
<tab-switcher :renderOnlyFocused="true">
|
||||||
|
<Timeline
|
||||||
|
:label="$t('user_card.statuses')"
|
||||||
|
:embedded="true"
|
||||||
|
:title="$t('user_profile.timeline_title')"
|
||||||
|
:timeline="timeline"
|
||||||
|
:timeline-name="'user'"
|
||||||
|
:user-id="fetchBy"
|
||||||
|
/>
|
||||||
<div :label="$t('user_card.followees')">
|
<div :label="$t('user_card.followees')">
|
||||||
<FriendsList v-if="user.friends_count > 0" :userId="userId" />
|
<FriendsList v-if="user.friends_count > 0" :userId="userId" />
|
||||||
<div class="userlist-placeholder" v-else>
|
<div class="userlist-placeholder" v-else>
|
||||||
|
@ -16,8 +27,21 @@
|
||||||
<i class="icon-spin3 animate-spin"></i>
|
<i class="icon-spin3 animate-spin"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Timeline :label="$t('user_card.media')" :embedded="true" :title="$t('user_card.media')" timeline-name="media" :timeline="media" :user-id="fetchBy" />
|
<Timeline
|
||||||
<Timeline v-if="isUs" :label="$t('user_card.favorites')" :embedded="true" :title="$t('user_card.favorites')" timeline-name="favorites" :timeline="favorites"/>
|
:label="$t('user_card.media')"
|
||||||
|
:embedded="true" :title="$t('user_card.media')"
|
||||||
|
timeline-name="media"
|
||||||
|
:timeline="media"
|
||||||
|
:user-id="fetchBy"
|
||||||
|
/>
|
||||||
|
<Timeline
|
||||||
|
v-if="isUs"
|
||||||
|
:label="$t('user_card.favorites')"
|
||||||
|
:embedded="true"
|
||||||
|
:title="$t('user_card.favorites')"
|
||||||
|
timeline-name="favorites"
|
||||||
|
:timeline="favorites"
|
||||||
|
/>
|
||||||
</tab-switcher>
|
</tab-switcher>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="panel user-profile-placeholder">
|
<div v-else class="panel user-profile-placeholder">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import TabSwitcher from '../tab_switcher/tab_switcher.jsx'
|
import TabSwitcher from '../tab_switcher/tab_switcher.js'
|
||||||
import StyleSwitcher from '../style_switcher/style_switcher.vue'
|
import StyleSwitcher from '../style_switcher/style_switcher.vue'
|
||||||
import fileSizeFormatService from '../../services/file_size_format/file_size_format.js'
|
import fileSizeFormatService from '../../services/file_size_format/file_size_format.js'
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-item">
|
<div class="setting-item">
|
||||||
<h2>{{$t('settings.avatar')}}</h2>
|
<h2>{{$t('settings.avatar')}}</h2>
|
||||||
|
<p class="visibility-notice">{{$t('settings.avatar_size_instruction')}}</p>
|
||||||
<p>{{$t('settings.current_avatar')}}</p>
|
<p>{{$t('settings.current_avatar')}}</p>
|
||||||
<img :src="user.profile_image_url_original" class="old-avatar"></img>
|
<img :src="user.profile_image_url_original" class="old-avatar"></img>
|
||||||
<p>{{$t('settings.set_new_avatar')}}</p>
|
<p>{{$t('settings.set_new_avatar')}}</p>
|
||||||
|
@ -130,7 +131,7 @@
|
||||||
<div class="setting-item">
|
<div class="setting-item">
|
||||||
<h2>{{$t('settings.follow_import')}}</h2>
|
<h2>{{$t('settings.follow_import')}}</h2>
|
||||||
<p>{{$t('settings.import_followers_from_a_csv_file')}}</p>
|
<p>{{$t('settings.import_followers_from_a_csv_file')}}</p>
|
||||||
<form v-model="followImportForm">
|
<form>
|
||||||
<input type="file" ref="followlist" v-on:change="followListChange"></input>
|
<input type="file" ref="followlist" v-on:change="followListChange"></input>
|
||||||
</form>
|
</form>
|
||||||
<i class=" icon-spin4 animate-spin uploading" v-if="followListUploading"></i>
|
<i class=" icon-spin4 animate-spin uploading" v-if="followListUploading"></i>
|
||||||
|
@ -179,5 +180,9 @@
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
margin: 0.25em;
|
margin: 0.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.name-changer {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -118,6 +118,7 @@
|
||||||
"delete_account_description": "Permanently delete your account and all your messages.",
|
"delete_account_description": "Permanently delete your account and all your messages.",
|
||||||
"delete_account_error": "There was an issue deleting your account. If this persists please contact your instance administrator.",
|
"delete_account_error": "There was an issue deleting your account. If this persists please contact your instance administrator.",
|
||||||
"delete_account_instructions": "Type your password in the input below to confirm account deletion.",
|
"delete_account_instructions": "Type your password in the input below to confirm account deletion.",
|
||||||
|
"avatar_size_instruction": "The recommended minimum size for avatar images is 150x150 pixels.",
|
||||||
"export_theme": "Save preset",
|
"export_theme": "Save preset",
|
||||||
"filtering": "Filtering",
|
"filtering": "Filtering",
|
||||||
"filtering_explanation": "All statuses containing these words will be muted, one per line",
|
"filtering_explanation": "All statuses containing these words will be muted, one per line",
|
||||||
|
@ -150,7 +151,7 @@
|
||||||
"lock_account_description": "Restrict your account to approved followers only",
|
"lock_account_description": "Restrict your account to approved followers only",
|
||||||
"loop_video": "Loop videos",
|
"loop_video": "Loop videos",
|
||||||
"loop_video_silent_only": "Loop only videos without sound (i.e. Mastodon's \"gifs\")",
|
"loop_video_silent_only": "Loop only videos without sound (i.e. Mastodon's \"gifs\")",
|
||||||
"play_videos_inline": "Play videos directly on timeline",
|
"play_videos_in_modal": "Play videos directly in the media viewer",
|
||||||
"use_contain_fit": "Don't crop the attachment in thumbnails",
|
"use_contain_fit": "Don't crop the attachment in thumbnails",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"name_bio": "Name & Bio",
|
"name_bio": "Name & Bio",
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
"lock_account_description": "Vain erikseen hyväksytyt käyttäjät voivat seurata tiliäsi",
|
"lock_account_description": "Vain erikseen hyväksytyt käyttäjät voivat seurata tiliäsi",
|
||||||
"loop_video": "Uudelleentoista videot",
|
"loop_video": "Uudelleentoista videot",
|
||||||
"loop_video_silent_only": "Uudelleentoista ainoastaan äänettömät videot (Video-\"giffit\")",
|
"loop_video_silent_only": "Uudelleentoista ainoastaan äänettömät videot (Video-\"giffit\")",
|
||||||
"play_videos_inline": "Toista videot suoraan aikajanalla",
|
"play_videos_in_modal": "Toista videot modaalissa",
|
||||||
"use_contain_fit": "Älä rajaa liitteitä esikatselussa",
|
"use_contain_fit": "Älä rajaa liitteitä esikatselussa",
|
||||||
"name": "Nimi",
|
"name": "Nimi",
|
||||||
"name_bio": "Nimi ja kuvaus",
|
"name_bio": "Nimi ja kuvaus",
|
||||||
|
|
|
@ -270,7 +270,7 @@ export const parseNotification = (data) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
output.created_at = new Date(data.created_at)
|
output.created_at = new Date(data.created_at)
|
||||||
output.id = String(data.id)
|
output.id = data.id
|
||||||
|
|
||||||
return output
|
return output
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,5 @@
|
||||||
"loginMethod": "password",
|
"loginMethod": "password",
|
||||||
"webPushNotifications": false,
|
"webPushNotifications": false,
|
||||||
"noAttachmentLinks": false,
|
"noAttachmentLinks": false,
|
||||||
"nsfwCensorImage": "",
|
"nsfwCensorImage": ""
|
||||||
"useOneClickNsfw": true,
|
|
||||||
"playVideosInline": false,
|
|
||||||
"useContainFit": false
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue