Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85629052
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
71 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index 1f63de25cc..c1213fa937 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -1,191 +1,203 @@
import statusPoster from '../../services/status_poster/status_poster.service.js'
import MediaUpload from '../media_upload/media_upload.vue'
import fileTypeService from '../../services/file_type/file_type.service.js'
import Completion from '../../services/completion/completion.js'
import { take, filter, reject, map, uniqBy } from 'lodash'
const buildMentionsString = ({user, attentions}, currentUser) => {
let allAttentions = [...attentions]
allAttentions.unshift(user)
allAttentions = uniqBy(allAttentions, 'id')
allAttentions = reject(allAttentions, {id: currentUser.id})
let mentions = map(allAttentions, (attention) => {
return `@${attention.screen_name}`
})
return mentions.join(' ') + ' '
}
const PostStatusForm = {
props: [
'replyTo',
'repliedUser',
'attentions'
],
components: {
MediaUpload
},
data () {
let statusText = ''
if (this.replyTo) {
const currentUser = this.$store.state.users.currentUser
statusText = buildMentionsString({ user: this.repliedUser, attentions: this.attentions }, currentUser)
}
return {
dropFiles: [],
submitDisabled: false,
error: null,
posting: false,
newStatus: {
status: statusText,
files: []
},
caret: 0
}
},
computed: {
candidates () {
const firstchar = this.textAtCaret.charAt(0)
if (firstchar === '@') {
const matchedUsers = filter(this.users, (user) => (String(user.name + user.screen_name)).match(this.textAtCaret.slice(1)))
if (matchedUsers.length <= 0) {
return false
}
// eslint-disable-next-line camelcase
return map(take(matchedUsers, 5), ({screen_name, name, profile_image_url_original}) => ({
// eslint-disable-next-line camelcase
screen_name: `@${screen_name}`,
name: name,
img: profile_image_url_original
}))
} else if (firstchar === ':') {
const matchedEmoji = filter(this.emoji.concat(this.customEmoji), (emoji) => emoji.shortcode.match(this.textAtCaret.slice(1)))
if (matchedEmoji.length <= 0) {
return false
}
return map(take(matchedEmoji, 5), ({shortcode, image_url, utf}) => ({
// eslint-disable-next-line camelcase
screen_name: `:${shortcode}:`,
name: '',
utf: utf || '',
img: image_url
}))
} else {
return false
}
},
textAtCaret () {
return (this.wordAtCaret || {}).word || ''
},
wordAtCaret () {
const word = Completion.wordAtPosition(this.newStatus.status, this.caret - 1) || {}
return word
},
users () {
return this.$store.state.users.users
},
emoji () {
return this.$store.state.config.emoji || []
},
customEmoji () {
return this.$store.state.config.customEmoji || []
+ },
+ statusLength () {
+ return this.newStatus.status.length
+ },
+ statusLengthLimit () {
+ return this.$store.state.config.textlimit
+ },
+ hasStatusLengthLimit () {
+ return this.statusLengthLimit > 0
+ },
+ charactersLeft () {
+ return this.statusLengthLimit - this.statusLength
}
},
methods: {
replace (replacement) {
this.newStatus.status = Completion.replaceWord(this.newStatus.status, this.wordAtCaret, replacement)
const el = this.$el.querySelector('textarea')
el.focus()
this.caret = 0
},
setCaret ({target: {selectionStart}}) {
this.caret = selectionStart
},
postStatus (newStatus) {
if (this.posting) { return }
if (this.submitDisabled) { return }
if (this.newStatus.status === '') {
if (this.newStatus.files.length > 0) {
this.newStatus.status = '\u200b' // hack
} else {
this.error = 'Cannot post an empty status with no files'
return
}
}
this.posting = true
statusPoster.postStatus({
status: newStatus.status,
media: newStatus.files,
store: this.$store,
inReplyToStatusId: this.replyTo
}).then((data) => {
if (!data.error) {
this.newStatus = {
status: '',
files: []
}
this.$emit('posted')
let el = this.$el.querySelector('textarea')
el.style.height = '16px'
this.error = null
} else {
this.error = data.error
}
this.posting = false
})
},
addMediaFile (fileInfo) {
this.newStatus.files.push(fileInfo)
this.enableSubmit()
},
removeMediaFile (fileInfo) {
let index = this.newStatus.files.indexOf(fileInfo)
this.newStatus.files.splice(index, 1)
},
disableSubmit () {
this.submitDisabled = true
},
enableSubmit () {
this.submitDisabled = false
},
type (fileInfo) {
return fileTypeService.fileType(fileInfo.mimetype)
},
paste (e) {
if (e.clipboardData.files.length > 0) {
// Strangely, files property gets emptied after event propagation
// Trying to wrap it in array doesn't work. Plus I doubt it's possible
// to hold more than one file in clipboard.
this.dropFiles = [e.clipboardData.files[0]]
}
},
fileDrop (e) {
if (e.dataTransfer.files.length > 0) {
e.preventDefault() // allow dropping text like before
this.dropFiles = e.dataTransfer.files
}
},
fileDrag (e) {
e.dataTransfer.dropEffect = 'copy'
},
resize (e) {
e.target.style.height = 'auto'
e.target.style.height = `${e.target.scrollHeight - 10}px`
if (e.target.value === '') {
e.target.style.height = '16px'
}
},
clearError () {
this.error = null
}
}
}
export default PostStatusForm
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
index 8e43642866..a759bb53e5 100644
--- a/src/components/post_status_form/post_status_form.vue
+++ b/src/components/post_status_form/post_status_form.vue
@@ -1,181 +1,190 @@
<template>
<div class="post-status-form">
<form @submit.prevent="postStatus(newStatus)">
<div class="form-group base03-border" >
<textarea @click="setCaret" @keyup="setCaret" v-model="newStatus.status" :placeholder="$t('post_status.default')" rows="1" class="form-control" @keydown.meta.enter="postStatus(newStatus)" @keyup.ctrl.enter="postStatus(newStatus)" @drop="fileDrop" @dragover.prevent="fileDrag" @input="resize" @paste="paste"></textarea>
</div>
<div style="position:relative;" v-if="candidates">
<div class="autocomplete-panel base05-background">
<div v-for="candidate in candidates" @click="replace(candidate.utf || (candidate.screen_name + ' '))" class="autocomplete base02">
<span v-if="candidate.img"><img :src="candidate.img"></img></span>
<span v-else>{{candidate.utf}}</span>
<span>
{{candidate.screen_name}}
<small class="base02">{{candidate.name}}</small>
</span>
</div>
</div>
</div>
<div class='form-bottom'>
<media-upload @uploading="disableSubmit" @uploaded="addMediaFile" @upload-failed="enableSubmit" :drop-files="dropFiles"></media-upload>
+
+ <p v-if="hasStatusLengthLimit" class="base04">{{ charactersLeft }}</p>
+
<button v-if="posting" disabled class="btn btn-default base05 base02-background">{{$t('post_status.posting')}}</button>
<button v-else :disabled="submitDisabled" type="submit" class="btn btn-default base05 base02-background">{{$t('general.submit')}}</button>
</div>
<div class='error' v-if="error">
Error: {{ error }}
<i class="icon-cancel" @click="clearError"></i>
</div>
<div class="attachments">
<div class="media-upload-container attachment base03-border" v-for="file in newStatus.files">
<i class="fa icon-cancel" @click="removeMediaFile(file)"></i>
<img class="thumbnail media-upload" :src="file.image" v-if="type(file) === 'image'"></img>
<video v-if="type(file) === 'video'" :src="file.image" controls></video>
<audio v-if="type(file) === 'audio'" :src="file.image" controls></audio>
<a v-if="type(file) === 'unknown'" :href="file.image">{{file.url}}</a>
</div>
</div>
</form>
</div>
</template>
<script src="./post_status_form.js"></script>
<style lang="scss">
.tribute-container {
ul {
padding: 0px;
li {
display: flex;
align-items: center;
}
}
img {
padding: 3px;
width: 16px;
height: 16px;
border-radius: 50%;
}
}
.post-status-form, .login {
.form-bottom {
display: flex;
padding: 0.5em;
height: 32px;
button {
width: 10em;
}
+
+ p {
+ margin: 0.35em;
+ padding: 0.35em;
+ display: flex;
+ }
}
.error {
border-radius: 5px;
text-align: center;
background-color: rgba(255, 48, 16, 0.65);
padding: 0.25em;
margin: 0.35em;
display: flex;
}
.attachments {
padding: 0 0.5em;
.attachment {
position: relative;
margin: 0.5em 0.8em 0.2em 0;
}
i {
position: absolute;
margin: 10px;
padding: 5px;
background: rgba(230,230,230,0.6);
border-radius: 5px;
font-weight: bold;
}
}
.btn {
cursor: pointer;
}
.btn[disabled] {
cursor: not-allowed;
}
.icon-cancel {
cursor: pointer;
}
form {
display: flex;
flex-direction: column;
padding: 0.6em;
}
.form-group {
display: flex;
flex-direction: column;
padding: 0.3em 0.5em 0.6em;
line-height:24px;
}
form textarea {
border: solid;
border-width: 1px;
border-color: inherit;
border-radius: 5px;
line-height:16px;
padding: 5px;
resize: none;
overflow: hidden;
}
form textarea:focus {
min-height: 48px;
}
.btn {
cursor: pointer;
}
.btn[disabled] {
cursor: not-allowed;
}
.icon-cancel {
cursor: pointer;
z-index: 4;
}
.autocomplete-panel {
margin: 0 0.5em 0 0.5em;
border-radius: 5px;
position: absolute;
z-index: 1;
box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
min-width: 75%;
}
.autocomplete {
cursor: pointer;
padding: 0.2em 0.4em 0.2em 0.4em;
border-bottom: 1px solid rgba(0, 0, 0, 0.4);
display: flex;
img {
width: 24px;
height: 24px;
border-radius: 2px;
object-fit: contain;
}
span {
line-height: 24px;
margin: 0 0.1em 0 0.2em;
}
small {
font-style: italic;
}
}
}
</style>
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index f6afaa253a..28272b0b7d 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -1,425 +1,425 @@
<template>
<div class="status-el base00-background" v-if="compact">
<div @click.prevent="linkClicked" class="status-content" v-html="status.statusnet_html"></div>
<div v-if="loggedIn">
<div class='status-actions'>
<div>
<a href="#" v-on:click.prevent="toggleReplying">
<i class="base09 icon-reply" :class="{'icon-reply-active': replying}"></i>
</a>
</div>
<retweet-button :loggedIn="loggedIn" :status=status></retweet-button>
<favorite-button :loggedIn="loggedIn" :status=status></favorite-button>
</div>
</div>
<post-status-form class="reply-body" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying" v-if="replying"/>
</div>
<div class="status-el base00-background base03-border status-fadein" v-else-if="!status.deleted" v-bind:class="[{ 'base01-background': isFocused }, { 'status-conversation': inConversation }]" >
<template v-if="muted">
<div class="media status container muted">
<small><router-link :to="{ name: 'user-profile', params: { id: status.user.id } }">{{status.user.screen_name}}</router-link></small>
<small class="muteWords">{{muteWordHits.join(', ')}}</small>
<a href="#" class="unmute" @click.prevent="toggleMute"><i class="base09 icon-eye-off"></i></a>
</div>
</template>
<template v-if="!muted">
<div v-if="retweet" class="media container retweet-info">
<div class="media-left">
<i class='fa icon-retweet retweeted'></i>
</div>
<div class="media-body">
Repeated by <a :href="statusoid.user.statusnet_profile_url" style="font-weight: bold;" :title="'@'+statusoid.user.screen_name">{{retweeter}}</a>
</div>
</div>
<div class="media status container">
<div class="media-left">
<a :href="status.user.statusnet_profile_url">
<img @click.prevent="toggleUserExpanded" :class="{retweeted: retweet}" class='avatar' :src="status.user.profile_image_url_original">
<img v-if="retweet" class='avatar-retweeter' :src="statusoid.user.profile_image_url_original"></img>
</a>
</div>
<div class="media-body">
<div class="base03-border usercard" v-if="userExpanded">
<user-card-content :user="status.user" :switcher="false"></user-card-content>
</div>
<div class="user-content">
<div class="media-heading">
<div class="name-and-links">
<h4 class="user-name">{{status.user.name}}</h4>
<div class="links">
<h4>
<small><router-link :to="{ name: 'user-profile', params: { id: status.user.id } }">{{status.user.screen_name}}</router-link></small>
<small v-if="status.in_reply_to_screen_name"> >
<router-link :to="{ name: 'user-profile', params: { id: status.in_reply_to_user_id } }">
{{status.in_reply_to_screen_name}}
</router-link>
</small>
<template v-if="isReply">
<small>
<a href="#" @click.prevent="gotoOriginal(status.in_reply_to_status_id)"><i class="icon-reply" @mouseenter="replyEnter(status.in_reply_to_status_id, $event)" @mouseout="replyLeave()"></i></a>
</small>
</template>
-
<small>
<router-link :to="{ name: 'conversation', params: { id: status.id } }">
<timeago :since="status.created_at" :auto-update="60"></timeago>
</router-link>
</small>
</h4>
</div>
<h4 class="replies" v-if="inConversation">
<small v-if="replies.length">Replies:</small>
<small v-for="reply in replies">
<a href="#" @click.prevent="gotoOriginal(reply.id)" @mouseenter="replyEnter(reply.id, $event)" @mouseout="replyLeave()">{{reply.name}} </a>
</small>
</h4>
</div>
<div class="heading-icons">
<a href="#" @click.prevent="toggleMute" v-if="unmuted"><i class="base09 icon-eye-off"></i></a>
<a :href="status.external_url" target="_blank" v-if="!status.is_local" class="source_url"><i class="base09 icon-binoculars"></i></a>
<template v-if="expandable">
<a href="#" @click.prevent="toggleExpanded" class="expand"><i class="base09 icon-plus-squared"></i></a>
</template>
</div>
</div>
<div class="status-preview base00-background base03-border" v-if="showPreview && preview">
<img class="avatar" :src="preview.user.profile_image_url_original">
<div class="text">
<h4>
{{ preview.user.name }}
<small><a>{{ preview.user.screen_name}}</a></small>
</h4>
<div @click.prevent="linkClicked" class="status-content" v-html="preview.statusnet_html"></div>
</div>
</div>
<div class="status-preview status-preview-loading base00-background base03-border" v-else-if="showPreview">
<i class="base09 icon-spin4 animate-spin"></i>
</div>
<div @click.prevent="linkClicked" class="status-content" v-html="status.statusnet_html"></div>
<div v-if='status.attachments' class='attachments'>
- <attachment v-if="!hideAttachments" :status-id="status.id" :nsfw="status.nsfw" :attachment="attachment" v-for="attachment in status.attachments">
+ <attachment v-if="!hideAttachments" :status-id="status.id" :nsfw="status.nsfw" :attachment="attachment" v-for="attachment in status.attachments" :key="attachment.id">
</attachment>
</div>
</div>
<div class='status-actions'>
<div v-if="loggedIn">
<a href="#" v-on:click.prevent="toggleReplying">
<i class="base09 icon-reply" :class="{'icon-reply-active': replying}"></i>
</a>
</div>
<retweet-button :loggedIn="loggedIn" :status=status></retweet-button>
<favorite-button :loggedIn="loggedIn" :status=status></favorite-button>
<delete-button :status=status></delete-button>
</div>
</div>
</div>
<div class="status base00-background container" v-if="replying">
<div class="reply-left"/>
<post-status-form class="reply-body" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying"/>
</div>
</template>
</div>
</template>
<script src="./status.js" ></script>
<style lang="scss">
@import '../../_variables.scss';
status-text-container {
display: block;
}
.status-preview {
position: absolute;
max-width: 34em;
padding: 0.5em;
display: flex;
border-color: inherit;
border-style: solid;
border-width: 1px;
border-radius: 4px;
box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);
margin-top: 0.5em;
margin-left: 1em;
.avatar {
flex-shrink: 0;
width: 32px;
height: 32px;
border-radius: 50%;
}
.text {
h4 {
margin-bottom: 0.4em;
small {
font-weight: lighter;
}
}
padding: 0 0.5em 0.5em 0.5em;
}
}
.status-preview-loading {
display: block;
font-size: 2em;
min-width: 8em;
text-align: center;
}
.status-el {
hyphens: auto;
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
border-left-width: 0px;
line-height: 18px;
.timeline & {
border-bottom-width: 1px;
border-bottom-style: solid;
}
.notify {
.avatar {
border-width: 3px;
border-style: solid;
}
}
.media-body {
flex: 1;
padding-left: 0.5em;
}
.user-content {
min-height: 52px;
padding-top: 1px;
}
.media-heading {
display: flex;
min-height: 1.4em;
margin-bottom: 0.3em;
small {
font-weight: lighter;
}
h4 {
margin-right: 0.4em;
}
.name-and-links {
flex: 1 0;
display: flex;
flex-wrap: wrap;
}
.replies {
flex-basis: 100%;
}
}
.source_url {
}
.expand {
margin-right: -0.3em;
}
a {
display: inline-block;
word-break: break-all;
}
.status-content {
margin: 3px 15px 4px 0;
max-height: 400px;
overflow-y: auto;
overflow-x: hidden;
img, video {
max-width: 100%;
max-height: 400px;
vertical-align: middle;
object-fit: contain;
}
blockquote {
margin: 0.2em 0 0.2em 2em;
font-style: italic;
}
}
p {
margin: 0;
margin-top: 0.2em;
margin-bottom: 0.5em;
}
.media-left {
margin: 0.2em 0.3em 0 0;
img {
float: right;
border-radius: 5px;
}
}
.retweet-info {
padding: 0.7em 0 0 0.6em;
.media-left {
display: flex;
i {
align-self: center;
text-align: right;
flex: 1;
padding-right: 0.3em;
}
}
}
}
.status-fadein {
animation-duration: 0.5s;
animation-name: fadein;
}
@keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.greentext {
color: green;
}
.status-conversation {
border-left-style: solid;
}
.status-actions {
padding-top: 0.15em;
width: 100%;
display: flex;
div, favorite-button {
max-width: 6em;
flex: 1;
}
}
.icon-reply:hover {
color: $blue;
}
.icon-reply.icon-reply-active {
color: $blue;
}
.status .avatar {
width: 48px;
height: 48px;
&.retweeted {
width: 40px;
height: 40px;
margin-right: 8px;
margin-bottom: 8px;
}
}
.status img.avatar-retweeter {
width: 24px;
height: 24px;
position: absolute;
margin-left: 24px;
margin-top: 24px;
}
.status.compact .avatar {
width: 32px;
}
.status {
padding: 0.4em 0.7em 0.45em 0.7em;
border-left: 4px rgba(255, 48, 16, 0.65);
border-left-style: inherit;
}
.status-conversation:last-child {
border-bottom: none;
}
.timeline .panel.timeline {
border-radius: 10px;
overflow: hidden;
}
.muted {
padding: 0.1em 0.4em 0.1em 0.8em;
button {
margin-left: auto;
}
.muteWords {
margin-left: 10px;
}
}
a.unmute {
display: block;
margin-left: auto;
}
.reply-left {
flex: 0;
min-width: 48px;
}
.reply-body {
flex: 1;
}
@media all and (max-width: 960px) {
.status-el {
.name-and-links {
margin-left: -0.25em;
}
}
.status {
max-width: 100%;
}
.status .avatar {
width: 40px;
height: 40px;
&.retweeted {
width: 34px;
height: 34px;
margin-right: 8px;
margin-bottom: 8px;
}
}
.status img.avatar-retweeter {
width: 22px;
height: 22px;
position: absolute;
margin-left: 18px;
margin-top: 18px;
}
}
</style>
diff --git a/src/components/style_switcher/style_switcher.vue b/src/components/style_switcher/style_switcher.vue
index f92f7299f4..31bf546db9 100644
--- a/src/components/style_switcher/style_switcher.vue
+++ b/src/components/style_switcher/style_switcher.vue
@@ -1,72 +1,99 @@
<template>
<div>
<p>{{$t('settings.presets')}}</p>
<select v-model="selected" class="style-switcher">
<option v-for="style in availableStyles" :value="style">{{style[0]}}</option>
</select>
<p>{{$t('settings.theme_help')}}</p>
<div class="color-container">
<div class="color-item">
- <label for="bgcolor" class="base04">{{$t('settings.background')}}</label>
- <input id="bgcolor" class="theme-color-in" type="text" v-model="bgColorLocal">
+ <label for="bgcolor" class="base04 theme-color-lb">{{$t('settings.background')}}</label>
+ <input id="bgcolor" class="theme-color-cl" type="color" v-model="bgColorLocal">
+ <input id="bgcolor-t" class="theme-color-in" type="text" v-model="bgColorLocal">
</div>
<div class="color-item">
- <label for="fgcolor" class="base04">{{$t('settings.foreground')}}</label>
- <input id="fgcolor" class="theme-color-in" type="text" v-model="fgColorLocal">
+ <label for="fgcolor" class="base04 theme-color-lb">{{$t('settings.foreground')}}</label>
+ <input id="fgcolor" class="theme-color-cl" type="color" v-model="fgColorLocal">
+ <input id="fgcolor-t" class="theme-color-in" type="text" v-model="fgColorLocal">
</div>
<div class="color-item">
- <label for="textcolor" class="base04">{{$t('settings.text')}}</label>
- <input id="textcolor" class="theme-color-in" type="text" v-model="textColorLocal">
+ <label for="textcolor" class="base04 theme-color-lb">{{$t('settings.text')}}</label>
+ <input id="textcolor" class="theme-color-cl" type="color" v-model="textColorLocal">
+ <input id="textcolor-t" class="theme-color-in" type="text" v-model="textColorLocal">
</div>
<div class="color-item">
- <label for="linkcolor" class="base04">{{$t('settings.links')}}</label>
- <input id="linkcolor" class="theme-color-in" type="text" v-model="linkColorLocal">
+ <label for="linkcolor" class="base04 theme-color-lb">{{$t('settings.links')}}</label>
+ <input id="linkcolor" class="theme-color-cl" type="color" v-model="linkColorLocal">
+ <input id="linkcolor-t" class="theme-color-in" type="text" v-model="linkColorLocal">
</div>
</div>
<div>
<div class="panel">
<div class="panel-heading" :style="{ 'background-color': fgColorLocal, 'color': textColorLocal }">Preview</div>
<div class="panel-body theme-preview-content" :style="{ 'background-color': bgColorLocal, 'color': textColorLocal }">
<h4>Content</h4>
<br>
A bunch of more content and
<a :style="{ 'color': linkColorLocal }">a nice lil' link</a>
<br>
<button class="btn" :style="{ 'background-color': fgColorLocal, 'color': textColorLocal }">Button</button>
</div>
</div>
</div>
<button class="btn base02-background base04" @click="setCustomTheme">{{$t('general.apply')}}</button>
</div>
</template>
<script src="./style_switcher.js"></script>
<style lang="scss">
- .style-switcher {
- margin-right: 1em;
- }
+.style-switcher {
+ margin-right: 1em;
+}
- .color-container {
- display: flex;
- flex-wrap: wrap;
- }
+.color-container {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+}
- .color-item {
- max-width: 9em;
- display:flex;
- flex-wrap:wrap;
- }
+.color-item {
+ min-width: 20em;
+ display:flex;
+ flex: 1 1 0;
+ align-items: baseline;
+ margin: 5px 6px 5px 0;
+}
+.theme-color-cl,
+.theme-color-in {
+ margin-left: 4px;
+ border-radius: 2px;
+ border: 0;
+}
+
+.theme-color-in {
+ padding: 5px;
+ min-width: 4em;
+ max-width: 7em;
+ flex: 1;
+}
+.theme-color-lb {
+ flex: 2;
+ min-width: 7em;
+ max-width: 10em;
+}
- .theme-color-in {
- max-width: 8em;
- border-radius: 2px;
- border: 0;
- padding: 5px;
- margin: 5px 0 5px 0;
+.theme-color-cl {
+ padding: 1px;
+ max-width: 8em;
+ align-self: stretch;
+ height: 100%;
+ flex: 0;
+ min-width: 2em;
+ cursor: pointer;
}
.theme-preview-content {
padding: 20px;
}
</style>
diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue
index 9d2e1ea1fa..d6ecfd2f11 100644
--- a/src/components/timeline/timeline.vue
+++ b/src/components/timeline/timeline.vue
@@ -1,102 +1,102 @@
<template>
<div class="timeline panel panel-default" v-if="viewing == 'statuses'">
<div class="panel-heading timeline-heading base02-background base04">
<div class="title">
{{title}}
</div>
<button @click.prevent="showNewStatuses" class="base05 base02-background loadmore-button" v-if="timeline.newStatusCount > 0 && !timelineError">
{{$t('timeline.show_new')}}{{newStatusCountStr}}
</button>
<div @click.prevent class="base06 error loadmore-text" v-if="timelineError">
{{$t('timeline.error_fetching')}}
</div>
<div @click.prevent class="base04 base02-background loadmore-text" v-if="!timeline.newStatusCount > 0 && !timelineError">
{{$t('timeline.up_to_date')}}
</div>
</div>
<div class="panel-body base01-background">
<div class="timeline">
<status-or-conversation v-for="status in timeline.visibleStatuses" :key="status.id" v-bind:statusoid="status"></status-or-conversation>
<a href="#" v-on:click.prevent='fetchOlderStatuses()' v-if="!timeline.loading">
<div class="base02-background base03-border new-status-notification text-center">{{$t('timeline.load_older')}}</div>
</a>
<div class="base02-background base03-border new-status-notification text-center" v-else>...</div>
</div>
</div>
</div>
<div class="timeline panel panel-default" v-else-if="viewing == 'followers'">
<div class="panel-heading timeline-heading base02-background base04">
<div class="title">
{{$t('user_card.followers')}}
</div>
</div>
<div class="panel-body base01-background">
<div class="timeline">
- <user-card v-for="follower in followers" :user="follower" :showFollows="false"></user-card>
+ <user-card v-for="follower in followers" :key="follower.id" :user="follower" :showFollows="false"></user-card>
</div>
</div>
</div>
<div class="timeline panel panel-default" v-else-if="viewing == 'friends'">
<div class="panel-heading timeline-heading base02-background base04">
<div class="title">
{{$t('user_card.followees')}}
</div>
</div>
<div class="panel-body base01-background">
<div class="timeline">
- <user-card v-for="friend in friends" :user="friend" :showFollows="true"></user-card>
+ <user-card v-for="friend in friends" :key="friend.id" :user="friend" :showFollows="true"></user-card>
</div>
</div>
</div>
</template>
<script src="./timeline.js"></script>
<style lang="scss">
.timeline {
.timeline-heading {
position: relative;
display: flex;
}
.title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 70%;
}
.loadmore-button {
position: absolute;
right: 0.6em;
font-size: 14px;
min-width: 6em;
height: 1.8em;
line-height: 100%;
}
.loadmore-text {
position: absolute;
right: 0.6em;
font-size: 14px;
min-width: 6em;
border-radius: 5px;
font-family: sans-serif;
text-align: center;
padding: 0 0.5em 0 0.5em;
opacity: 0.8;
}
.error {
background-color: rgba(255, 48, 16, 0.65);
}
}
.new-status-notification {
position:relative;
margin-top: -1px;
font-size: 1.1em;
border-width: 1px 0 0 0;
border-style: solid;
border-radius: 0 0 10px 10px;
padding: 10px;
z-index: 1;
}
</style>
diff --git a/src/i18n/messages.js b/src/i18n/messages.js
index f3f1e2d457..6779420d37 100644
--- a/src/i18n/messages.js
+++ b/src/i18n/messages.js
@@ -1,1039 +1,1056 @@
const de = {
chat: {
title: 'Chat'
},
nav: {
chat: 'Lokaler Chat',
timeline: 'Zeitleiste',
mentions: 'Erwähnungen',
public_tl: 'Lokale Zeitleiste',
twkn: 'Das gesamte Netzwerk'
},
user_card: {
follows_you: 'Folgt dir!',
following: 'Folgst du!',
follow: 'Folgen',
blocked: 'Blockiert!',
block: 'Blockieren',
statuses: 'Beiträge',
mute: 'Stummschalten',
muted: 'Stummgeschaltet',
followers: 'Folgende',
followees: 'Folgt',
per_day: 'pro Tag'
},
timeline: {
show_new: 'Zeige Neuere',
error_fetching: 'Fehler beim Laden',
up_to_date: 'Aktuell',
load_older: 'Lade ältere Beiträge',
conversation: 'Unterhaltung'
},
settings: {
user_settings: 'Benutzereinstellungen',
name_bio: 'Name & Bio',
name: 'Name',
bio: 'Bio',
avatar: 'Avatar',
current_avatar: 'Dein derzeitiger Avatar',
set_new_avatar: 'Setze neuen Avatar',
profile_banner: 'Profil Banner',
current_profile_banner: 'Dein derzeitiger Profil Banner',
set_new_profile_banner: 'Setze neuen Profil Banner',
profile_background: 'Profil Hintergrund',
set_new_profile_background: 'Setze neuen Profil Hintergrund',
settings: 'Einstellungen',
theme: 'Farbschema',
presets: 'Voreinstellungen',
theme_help: 'Benutze HTML Farbcodes (#aabbcc) um dein Farbschema anzupassen.',
background: 'Hintergrund',
foreground: 'Vordergrund',
text: 'Text',
links: 'Links',
filtering: 'Filter',
filtering_explanation: 'Alle Beiträge die diese Wörter enthalten werden ausgeblendet. Ein Wort pro Zeile.',
attachments: 'Anhänge',
hide_attachments_in_tl: 'Anhänge in der Timeline ausblenden',
hide_attachments_in_convo: 'Anhänge in Unterhaltungen ausblenden',
nsfw_clickthrough: 'Aktiviere ausblendbares Overlay für als NSFW markierte Anhänge',
autoload: 'Aktiviere automatisches Laden von älteren Beiträgen beim scrollen',
streaming: 'Aktiviere automatisches Laden (Streaming) von neuen Beiträgen',
reply_link_preview: 'Aktiviere reply-link Vorschau bei Maus-Hover',
follow_import: 'Folgeliste importieren',
import_followers_from_a_csv_file: 'Importiere Kontakte, denen du folgen möchtest, aus einer CSV-Datei',
follows_imported: 'Folgeliste importiert! Die Bearbeitung kann eine Zeit lang dauern.',
follow_import_error: 'Fehler beim importieren der Folgeliste'
},
notifications: {
notifications: 'Benachrichtigungen',
read: 'Gelesen!',
followed_you: 'folgt dir'
},
login: {
login: 'Anmelden',
username: 'Benutzername',
password: 'Passwort',
register: 'Registrieren',
logout: 'Abmelden'
},
registration: {
registration: 'Registrierung',
fullname: 'Angezeigter Name',
email: 'Email',
bio: 'Bio',
password_confirm: 'Passwort bestätigen'
},
post_status: {
posting: 'Veröffentlichen',
default: 'Sitze gerade im Hofbräuhaus.'
},
finder: {
find_user: 'Finde Benutzer',
error_fetching_user: 'Fehler beim Suchen des Benutzers'
},
general: {
submit: 'Absenden',
apply: 'Anwenden'
}
}
const fi = {
nav: {
timeline: 'Aikajana',
mentions: 'Maininnat',
public_tl: 'Julkinen Aikajana',
twkn: 'Koko Tunnettu Verkosto'
},
user_card: {
follows_you: 'Seuraa sinua!',
following: 'Seuraat!',
follow: 'Seuraa',
statuses: 'Viestit',
mute: 'Hiljennä',
muted: 'Hiljennetty',
followers: 'Seuraajat',
followees: 'Seuraa',
per_day: 'päivässä'
},
timeline: {
show_new: 'Näytä uudet',
error_fetching: 'Virhe ladatessa viestejä',
up_to_date: 'Ajantasalla',
load_older: 'Lataa vanhempia viestejä',
conversation: 'Keskustelu'
},
settings: {
user_settings: 'Käyttäjän asetukset',
name_bio: 'Nimi ja kuvaus',
name: 'Nimi',
bio: 'Kuvaus',
avatar: 'Profiilikuva',
current_avatar: 'Nykyinen profiilikuvasi',
set_new_avatar: 'Aseta uusi profiilikuva',
profile_banner: 'Juliste',
current_profile_banner: 'Nykyinen julisteesi',
set_new_profile_banner: 'Aseta uusi juliste',
profile_background: 'Taustakuva',
set_new_profile_background: 'Aseta uusi taustakuva',
settings: 'Asetukset',
theme: 'Teema',
presets: 'Valmiit teemat',
theme_help: 'Käytä heksadesimaalivärejä muokataksesi väriteemaasi.',
background: 'Tausta',
foreground: 'Korostus',
text: 'Teksti',
links: 'Linkit',
filtering: 'Suodatus',
filtering_explanation: 'Kaikki viestit, jotka sisältävät näitä sanoja, suodatetaan. Yksi sana per rivi.',
attachments: 'Liitteet',
hide_attachments_in_tl: 'Piilota liitteet aikajanalla',
hide_attachments_in_convo: 'Piilota liitteet keskusteluissa',
nsfw_clickthrough: 'Piilota NSFW liitteet klikkauksen taakse.',
autoload: 'Lataa vanhempia viestejä automaattisesti ruudun pohjalla',
streaming: 'Näytä uudet viestit automaattisesti ollessasi ruudun huipulla',
reply_link_preview: 'Keskusteluiden vastauslinkkien esikatselu'
},
notifications: {
notifications: 'Ilmoitukset',
read: 'Lue!',
followed_you: 'seuraa sinua'
},
login: {
login: 'Kirjaudu sisään',
username: 'Käyttäjänimi',
password: 'Salasana',
register: 'Rekisteröidy',
logout: 'Kirjaudu ulos'
},
registration: {
registration: 'Rekisteröityminen',
fullname: 'Koko nimi',
email: 'Sähköposti',
bio: 'Kuvaus',
password_confirm: 'Salasanan vahvistaminen'
},
post_status: {
posting: 'Lähetetään',
default: 'Tulin juuri saunasta.'
},
finder: {
find_user: 'Hae käyttäjä',
error_fetching_user: 'Virhe hakiessa käyttäjää'
},
general: {
submit: 'Lähetä',
apply: 'Aseta'
}
}
const en = {
chat: {
title: 'Chat'
},
nav: {
chat: 'Local Chat',
timeline: 'Timeline',
mentions: 'Mentions',
public_tl: 'Public Timeline',
twkn: 'The Whole Known Network'
},
user_card: {
follows_you: 'Follows you!',
following: 'Following!',
follow: 'Follow',
blocked: 'Blocked!',
block: 'Block',
statuses: 'Statuses',
mute: 'Mute',
muted: 'Muted',
followers: 'Followers',
followees: 'Following',
per_day: 'per day',
remote_follow: 'Remote follow'
},
timeline: {
show_new: 'Show new',
error_fetching: 'Error fetching updates',
up_to_date: 'Up-to-date',
load_older: 'Load older statuses',
conversation: 'Conversation'
},
settings: {
user_settings: 'User Settings',
name_bio: 'Name & Bio',
name: 'Name',
bio: 'Bio',
avatar: 'Avatar',
current_avatar: 'Your current avatar',
set_new_avatar: 'Set new avatar',
profile_banner: 'Profile Banner',
current_profile_banner: 'Your current profile banner',
set_new_profile_banner: 'Set new profile banner',
profile_background: 'Profile Background',
set_new_profile_background: 'Set new profile background',
settings: 'Settings',
theme: 'Theme',
presets: 'Presets',
theme_help: 'Use hex color codes (#aabbcc) to customize your color theme.',
background: 'Background',
foreground: 'Foreground',
text: 'Text',
links: 'Links',
filtering: 'Filtering',
filtering_explanation: 'All statuses containing these words will be muted, one per line',
attachments: 'Attachments',
hide_attachments_in_tl: 'Hide attachments in timeline',
hide_attachments_in_convo: 'Hide attachments in conversations',
nsfw_clickthrough: 'Enable clickthrough NSFW attachment hiding',
autoload: 'Enable automatic loading when scrolled to the bottom',
streaming: 'Enable automatic streaming of new posts when scrolled to the top',
reply_link_preview: 'Enable reply-link preview on mouse hover',
follow_import: 'Follow import',
import_followers_from_a_csv_file: 'Import followers from a csv file',
follows_imported: 'Follows imported! Processing them will take a while.',
follow_import_error: 'Error importing followers'
},
notifications: {
notifications: 'Notifications',
read: 'Read!',
followed_you: 'followed you'
},
login: {
login: 'Log in',
username: 'Username',
password: 'Password',
register: 'Register',
logout: 'Log out'
},
registration: {
registration: 'Registration',
fullname: 'Display name',
email: 'Email',
bio: 'Bio',
password_confirm: 'Password confirmation'
},
post_status: {
posting: 'Posting',
default: 'Just landed in L.A.'
},
finder: {
find_user: 'Find user',
error_fetching_user: 'Error fetching user'
},
general: {
submit: 'Submit',
apply: 'Apply'
}
}
const et = {
nav: {
timeline: 'Ajajoon',
mentions: 'Mainimised',
public_tl: 'Avalik Ajajoon',
twkn: 'Kogu Teadaolev Võrgustik'
},
user_card: {
follows_you: 'Jälgib sind!',
following: 'Jälgin!',
follow: 'Jälgi',
blocked: 'Blokeeritud!',
block: 'Blokeeri',
statuses: 'Staatuseid',
mute: 'Vaigista',
muted: 'Vaigistatud',
followers: 'Jälgijaid',
followees: 'Jälgitavaid',
per_day: 'päevas'
},
timeline: {
show_new: 'Näita uusi',
error_fetching: 'Viga uuenduste laadimisel',
up_to_date: 'Uuendatud',
load_older: 'Kuva vanemaid staatuseid',
conversation: 'Vestlus'
},
settings: {
user_settings: 'Kasutaja sätted',
name_bio: 'Nimi ja Bio',
name: 'Nimi',
bio: 'Bio',
avatar: 'Profiilipilt',
current_avatar: 'Sinu praegune profiilipilt',
set_new_avatar: 'Vali uus profiilipilt',
profile_banner: 'Profiilibänner',
current_profile_banner: 'Praegune profiilibänner',
set_new_profile_banner: 'Vali uus profiilibänner',
profile_background: 'Profiilitaust',
set_new_profile_background: 'Vali uus profiilitaust',
settings: 'Sätted',
theme: 'Teema',
filtering: 'Sisu filtreerimine',
filtering_explanation: 'Kõiki staatuseid, mis sisaldavad neid sõnu, ei kuvata. Üks sõna reale.',
attachments: 'Manused',
hide_attachments_in_tl: 'Peida manused ajajoonel',
hide_attachments_in_convo: 'Peida manused vastlustes',
nsfw_clickthrough: 'Peida tööks-mittesobivad(NSFW) manuste hiireklõpsu taha',
autoload: 'Luba ajajoone automaatne uuendamine kui ajajoon on põhja keritud',
reply_link_preview: 'Luba algpostituse kuvamine vastustes'
},
notifications: {
notifications: 'Teavitused',
read: 'Loe!',
followed_you: 'alustas sinu jälgimist'
},
login: {
login: 'Logi sisse',
username: 'Kasutajanimi',
password: 'Parool',
register: 'Registreeru',
logout: 'Logi välja'
},
registration: {
registration: 'Registreerimine',
fullname: 'Kuvatav nimi',
email: 'E-post',
bio: 'Bio',
password_confirm: 'Parooli kinnitamine'
},
post_status: {
posting: 'Postitan',
default: 'Just sõitsin elektrirongiga Tallinnast Pääskülla.'
},
finder: {
find_user: 'Otsi kasutajaid',
error_fetching_user: 'Viga kasutaja leidmisel'
},
general: {
submit: 'Postita'
}
}
const hu = {
nav: {
timeline: 'Idővonal',
mentions: 'Említéseim',
public_tl: 'Publikus Idővonal',
twkn: 'Az Egész Ismert Hálózat'
},
user_card: {
follows_you: 'Követ téged!',
following: 'Követve!',
follow: 'Követ',
blocked: 'Letiltva!',
block: 'Letilt',
statuses: 'Állapotok',
mute: 'Némít',
muted: 'Némított',
followers: 'Követők',
followees: 'Követettek',
per_day: 'naponta'
},
timeline: {
show_new: 'Újak mutatása',
error_fetching: 'Hiba a frissítések beszerzésénél',
up_to_date: 'Naprakész',
load_older: 'Régebbi állapotok betöltése',
conversation: 'Társalgás'
},
settings: {
user_settings: 'Felhasználói beállítások',
name_bio: 'Név és Bio',
name: 'Név',
bio: 'Bio',
avatar: 'Avatár',
current_avatar: 'Jelenlegi avatár',
set_new_avatar: 'Új avatár',
profile_banner: 'Profil Banner',
current_profile_banner: 'Jelenlegi profil banner',
set_new_profile_banner: 'Új profil banner',
profile_background: 'Profil háttérkép',
set_new_profile_background: 'Új profil háttér beállítása',
settings: 'Beállítások',
theme: 'Téma',
filtering: 'Szűrés',
filtering_explanation: 'Minden tartalom mely ezen szavakat tartalmazza némítva lesz, soronként egy',
attachments: 'Csatolmányok',
hide_attachments_in_tl: 'Csatolmányok elrejtése az idővonalon',
hide_attachments_in_convo: 'Csatolmányok elrejtése a társalgásokban',
nsfw_clickthrough: 'NSFW átkattintási tartalom elrejtésének engedélyezése',
autoload: 'Autoatikus betöltés engedélyezése lap aljára görgetéskor',
reply_link_preview: 'Válasz-link előzetes mutatása egér rátételkor'
},
notifications: {
notifications: 'Értesítések',
read: 'Olvasva!',
followed_you: 'követ téged'
},
login: {
login: 'Bejelentkezés',
username: 'Felhasználó név',
password: 'Jelszó',
register: 'Feliratkozás',
logout: 'Kijelentkezés'
},
registration: {
registration: 'Feliratkozás',
fullname: 'Teljes név',
email: 'Email',
bio: 'Bio',
password_confirm: 'Jelszó megerősítése'
},
post_status: {
posting: 'Küldés folyamatban',
default: 'Most érkeztem L.A.-be'
},
finder: {
find_user: 'Felhasználó keresése',
error_fetching_user: 'Hiba felhasználó beszerzésével'
},
general: {
submit: 'Elküld'
}
}
const ro = {
nav: {
timeline: 'Cronologie',
mentions: 'Menționări',
public_tl: 'Cronologie Publică',
twkn: 'Toată Reșeaua Cunoscută'
},
user_card: {
follows_you: 'Te urmărește!',
following: 'Urmărit!',
follow: 'Urmărește',
blocked: 'Blocat!',
block: 'Blochează',
statuses: 'Stări',
mute: 'Pune pe mut',
muted: 'Pus pe mut',
followers: 'Următori',
followees: 'Urmărește',
per_day: 'pe zi'
},
timeline: {
show_new: 'Arată cele noi',
error_fetching: 'Erare la preluarea actualizărilor',
up_to_date: 'La zi',
load_older: 'Încarcă stări mai vechi',
conversation: 'Conversație'
},
settings: {
user_settings: 'Setările utilizatorului',
name_bio: 'Nume și Bio',
name: 'Nume',
bio: 'Bio',
avatar: 'Avatar',
current_avatar: 'Avatarul curent',
set_new_avatar: 'Setează avatar nou',
profile_banner: 'Banner de profil',
current_profile_banner: 'Bannerul curent al profilului',
set_new_profile_banner: 'Setează banner nou la profil',
profile_background: 'Fundalul de profil',
set_new_profile_background: 'Setează fundal nou',
settings: 'Setări',
theme: 'Temă',
filtering: 'Filtru',
filtering_explanation: 'Toate stările care conțin aceste cuvinte vor fi puse pe mut, una pe linie',
attachments: 'Atașamente',
hide_attachments_in_tl: 'Ascunde atașamentele în cronologie',
hide_attachments_in_convo: 'Ascunde atașamentele în conversații',
nsfw_clickthrough: 'Permite ascunderea al atașamentelor NSFW',
autoload: 'Permite încărcarea automată când scrolat la capăt',
reply_link_preview: 'Permite previzualizarea linkului de răspuns la planarea de mouse'
},
notifications: {
notifications: 'Notificări',
read: 'Citit!',
followed_you: 'te-a urmărit'
},
login: {
login: 'Loghează',
username: 'Nume utilizator',
password: 'Parolă',
register: 'Înregistrare',
logout: 'Deloghează'
},
registration: {
registration: 'Îregistrare',
fullname: 'Numele întreg',
email: 'Email',
bio: 'Bio',
password_confirm: 'Cofirmă parola'
},
post_status: {
posting: 'Postează',
default: 'Nu de mult am aterizat în L.A.'
},
finder: {
find_user: 'Găsește utilizator',
error_fetching_user: 'Eroare la preluarea utilizatorului'
},
general: {
submit: 'trimite'
}
}
const ja = {
nav: {
timeline: 'タイムライン',
mentions: '通知',
public_tl: '公開タイムライン',
twkn: '接続しているすべてのネットワーク'
},
user_card: {
follows_you: 'フォローされました!',
following: 'フォロー中!',
follow: 'フォロー',
statuses: 'ステータス',
mute: 'ミュート',
muted: 'ミュート済み',
followers: 'フォロワー',
followees: 'フォロー',
per_day: '/日'
},
timeline: {
show_new: '新しいものを表示',
error_fetching: '更新の取得中にエラーが発生しました',
up_to_date: '最新',
load_older: '古いステータスを読み込む'
},
settings: {
user_settings: 'ユーザー設定',
name_bio: '名前 & プロフィール',
name: '名前',
bio: 'プロフィール',
avatar: 'アバター',
current_avatar: 'あなたの現在のアバター',
set_new_avatar: '新しいアバターを設定する',
profile_banner: 'プロフィールバナー',
current_profile_banner: '現在のプロフィールバナー',
set_new_profile_banner: '新しいプロフィールバナーを設定する',
profile_background: 'プロフィールの背景',
set_new_profile_background: '新しいプロフィールの背景を設定する',
settings: '設定',
theme: 'テーマ',
filtering: 'フィルタリング',
filtering_explanation: 'これらの単語を含むすべてのものはミュートされます、1行に1つのワードを入力してください',
attachments: '添付ファイル',
hide_attachments_in_tl: 'タイムラインの添付ファイルを隠す',
hide_attachments_in_convo: '会話の中の添付ファイルを隠す',
nsfw_clickthrough: 'NSFWファイルの非表示を有効にする',
autoload: '下にスクロールした時に自動で読み込むようにする',
reply_link_preview: 'マウスカーソルを重ねたときに返信リンクプレビューを表示するようにする'
},
notifications: {
notifications: '通知',
read: '読んだ!',
followed_you: 'フォローされました'
},
login: {
login: 'ログイン',
username: 'ユーザーネーム',
password: 'パスワード',
register: '登録',
logout: 'ログアウト'
},
registration: {
registration: '登録',
fullname: '表示名',
email: 'Eメール',
bio: 'プロフィール',
password_confirm: 'パスワードの確認'
},
post_status: {
posting: '投稿',
default: 'ちょうど羽田に着陸しました'
},
finder: {
find_user: 'ユーザー検索',
error_fetching_user: 'ユーザー検索でエラーが発生しました'
},
general: {
submit: '送信'
}
}
const fr = {
nav: {
timeline: 'Journal',
mentions: 'Notifications',
public_tl: 'Statuts locaux',
twkn: 'Le réseau connu'
},
user_card: {
follows_you: 'Vous suit!',
following: 'Suivi!',
follow: 'Suivre',
blocked: 'Bloqué',
block: 'Bloquer',
statuses: 'Statuts',
mute: 'En sourdine',
muted: 'Mis en sourdine',
followers: 'Vous suivent',
followees: 'Suivis',
per_day: 'par jour'
},
timeline: {
show_new: 'Afficher plus',
error_fetching: 'Erreur en cherchant des mises à jours',
up_to_date: 'À jour',
load_older: 'Afficher plus',
conversation: 'Conversation'
},
settings: {
user_settings: 'Paramètres utilisateur',
name_bio: 'Nom & Bio',
name: 'Nom',
bio: 'Bioraphie',
avatar: 'Avatar',
current_avatar: 'Votre avatar',
set_new_avatar: 'Changer d\'avatar',
profile_banner: 'Bannière du Profil',
current_profile_banner: 'Bannière du profil',
set_new_profile_banner: 'Changer de bannière',
profile_background: 'Image de fond',
set_new_profile_background: 'Changer l\'image de fond',
settings: 'Paramètres',
theme: 'Thème',
filtering: 'Filtre',
filtering_explanation: 'Tout les statuts contenant ces mots vont être mis sous silence, un mot par ligne.',
attachments: 'Pièces jointes',
hide_attachments_in_tl: 'Cacher les pièces jointes dans le journal',
hide_attachments_in_convo: 'Cacher les pièces jointes dans les conversations',
nsfw_clickthrough: 'Activer le clic pour afficher les images marquées comme contenu adulte ou sensible',
autoload: 'Activer le chargement automatique une fois le bas de la page atteint',
reply_link_preview: 'Activer un aperçu sur passage de la souris'
},
notifications: {
notifications: 'Notfications',
read: 'Lu!',
followed_you: 'vous a suivi'
},
login: {
login: 'Connexion',
username: 'Nom d\'utilisateur',
password: 'Mot de passe',
register: 'S\'inscrire',
logout: 'Déconnexion'
},
registration: {
registration: 'Inscription',
fullname: 'Nom complet',
email: 'Adresse courriel',
bio: 'Biographie',
password_confirm: 'Confirmer le mot de passe'
},
post_status: {
posting: 'Envoi en cours',
default: 'Écrivez ici votre prochain statut.'
},
finder: {
find_user: 'Chercher un utilisateur',
error_fetching_user: 'Une erreur est survenue pendant la recherche d\'un utilisateur'
},
general: {
submit: 'Envoyer'
}
}
const it = {
nav: {
timeline: 'Sequenza temporale',
mentions: 'Menzioni',
public_tl: 'Sequenza temporale pubblica',
twkn: 'L\'intiera rete conosciuta'
},
user_card: {
follows_you: 'Ti segue!',
following: 'Lo stai seguendo!',
follow: 'Segui',
statuses: 'Messaggi',
mute: 'Ammutolisci',
muted: 'Ammutoliti',
followers: 'Chi ti segue',
followees: 'Chi stai seguendo',
per_day: 'al giorno'
},
timeline: {
show_new: 'Mostra nuovi',
error_fetching: 'Errori nel prelievo aggiornamenti',
up_to_date: 'Aggiornato',
load_older: 'Carica messaggi più vecchi'
},
settings: {
user_settings: 'Configurazione dell\'utente',
name_bio: 'Nome & Introduzione',
name: 'Nome',
bio: 'Introduzione',
avatar: 'Avatar',
current_avatar: 'Il tuo attuale avatar',
set_new_avatar: 'Scegli un nuovo avatar',
profile_banner: 'Sfondo del tuo profilo',
current_profile_banner: 'Sfondo attuale',
set_new_profile_banner: 'Scegli un nuovo sfondo per il tuo profilo',
profile_background: 'Sfondo della tua pagina',
set_new_profile_background: 'Scegli un nuovo sfondo per la tua pagina',
settings: 'Settaggi',
theme: 'Tema',
filtering: 'Filtri',
filtering_explanation: 'Filtra via le notifiche che contengono le seguenti parole (inserisci rigo per rigo le parole di innesco)',
attachments: 'Allegati',
hide_attachments_in_tl: 'Nascondi gli allegati presenti nella sequenza temporale',
hide_attachments_in_convo: 'Nascondi gli allegati presenti nelle conversazioni',
nsfw_clickthrough: 'Abilita la trasparenza degli allegati NSFW',
autoload: 'Abilita caricamento automatico quando si raggiunge il fondo schermo',
reply_link_preview: 'Ability il reply-link preview al passaggio del mouse'
},
notifications: {
notifications: 'Notifiche',
read: 'Leggi!',
followed_you: 'ti ha seguito'
},
general: {
submit: 'Invia'
}
}
const pl = {
nav: {
timeline: 'Oś czasu',
mentions: 'Wzmianki',
public_tl: 'Publiczna oś czasu',
twkn: 'Cała znana sieć'
},
user_card: {
follows_you: 'Obserwuje cię!',
following: 'Obserwowany!',
follow: 'Obserwuj',
blocked: 'Zablokowany!',
block: 'Zablokuj',
statuses: 'Statusy',
mute: 'Wycisz',
muted: 'Wyciszony',
followers: 'Obserwujący',
followees: 'Obserwowani',
per_day: 'dziennie'
},
timeline: {
show_new: 'Pokaż nowe',
error_fetching: 'Błąd pobierania',
up_to_date: 'Na bieżąco',
load_older: 'Załaduj starsze statusy',
conversation: 'Rozmowa'
},
settings: {
user_settings: 'Ustawienia użytkownika',
name_bio: 'Imię i bio',
name: 'Imię',
bio: 'Bio',
avatar: 'Awatar',
current_avatar: 'Twój obecny awatar',
set_new_avatar: 'Ustaw nowy awatar',
profile_banner: 'Banner profilui',
current_profile_banner: 'Twój obecny banner profilu',
set_new_profile_banner: 'Ustaw nowy banner profilu',
profile_background: 'Tło profilu',
set_new_profile_background: 'Ustaw nowe tło profilu',
settings: 'Ustawienia',
theme: 'Motyw',
filtering: 'Filtrowanie',
filtering_explanation: 'Wszystkie statusy zawierające te słowa będą wyciszone. Jedno słowo na linijkę',
attachments: 'Załączniki',
hide_attachments_in_tl: 'Ukryj załączniki w osi czasu',
hide_attachments_in_convo: 'Ukryj załączniki w rozmowach',
nsfw_clickthrough: 'Włącz domyślne ukrywanie załączników o treści nieprzyzwoitej (NSFW)',
autoload: 'Włącz automatyczne ładowanie po przewinięciu do końca strony',
reply_link_preview: 'Włącz dymek z podglądem postu po najechaniu na znak odpowiedzi'
},
notifications: {
notifications: 'Powiadomienia',
read: 'Przeczytane!',
followed_you: 'obserwuje cię'
},
login: {
login: 'Zaloguj',
username: 'Użytkownik',
password: 'Hasło',
register: 'Zarejestruj',
logout: 'Wyloguj'
},
registration: {
registration: 'Rejestracja',
fullname: 'Wyświetlane imię',
email: 'Email',
bio: 'Bio',
password_confirm: 'Potwierdzenie hasła'
},
post_status: {
posting: 'Wysyłanie',
default: 'Właśnie wróciłem z kościoła'
},
finder: {
find_user: 'Znajdź użytkownika',
error_fetching_user: 'Błąd przy pobieraniu profilu'
},
general: {
submit: 'Wyślij'
}
}
const es = {
+ chat: {
+ title: 'Chat'
+ },
nav: {
+ chat: 'Chat Local',
timeline: 'Línea Temporal',
mentions: 'Menciones',
public_tl: 'Línea Temporal Pública',
twkn: 'Toda La Red Conocida'
},
user_card: {
follows_you: '¡Te sigue!',
following: '¡Siguiendo!',
follow: 'Seguir',
blocked: '¡Bloqueado!',
block: 'Bloquear',
statuses: 'Estados',
mute: 'Silenciar',
muted: 'Silenciado',
followers: 'Seguidores',
followees: 'Siguiendo',
- per_day: 'por día'
+ per_day: 'por día',
+ remote_follow: 'Seguir'
},
timeline: {
show_new: 'Mostrar lo nuevo',
error_fetching: 'Error al cargar las actualizaciones',
up_to_date: 'Actualizado',
load_older: 'Cargar actualizaciones anteriores',
conversation: 'Conversación'
},
settings: {
user_settings: 'Ajustes de Usuario',
name_bio: 'Nombre y Biografía',
name: 'Nombre',
bio: 'Biografía',
avatar: 'Avatar',
current_avatar: 'Tu avatar actual',
set_new_avatar: 'Cambiar avatar',
profile_banner: 'Cabecera del perfil',
current_profile_banner: 'Cabecera actual',
set_new_profile_banner: 'Cambiar cabecera',
profile_background: 'Fondo del Perfil',
set_new_profile_background: 'Cambiar fondo del perfil',
settings: 'Ajustes',
theme: 'Tema',
+ presets: 'Por defecto',
+ theme_help: 'Use códigos de color hexadecimales (#aabbcc) para personalizar su tema de colores.',
+ background: 'Segundo plano',
+ foreground: 'Primer plano',
+ text: 'Texto',
+ links: 'Links',
filtering: 'Filtros',
filtering_explanation: 'Todos los estados que contengan estas palabras serán silenciados, una por línea',
attachments: 'Adjuntos',
hide_attachments_in_tl: 'Ocultar adjuntos en la línea temporal',
hide_attachments_in_convo: 'Ocultar adjuntos en las conversaciones',
nsfw_clickthrough: 'Activar el clic para ocultar los adjuntos NSFW',
autoload: 'Activar carga automática al llegar al final de la página',
- reply_link_preview: 'Activar la previsualización del enlace de responder al pasar el ratón por encima'
+ streaming: 'Habilite la transmisión automática de nuevas publicaciones cuando se desplaza hacia la parte superior',
+ reply_link_preview: 'Activar la previsualización del enlace de responder al pasar el ratón por encima',
+ follow_import: 'Importar personas que tú sigues',
+ import_followers_from_a_csv_file: 'Importar personas que tú sigues apartir de un archivo csv',
+ follows_imported: '¡Importado! Procesarlos llevará tiempo.',
+ follow_import_error: 'Error al importal el archivo'
},
notifications: {
notifications: 'Notificaciones',
read: '¡Leído!',
followed_you: 'empezó a seguirte'
},
login: {
login: 'Identificación',
username: 'Usuario',
password: 'Contraseña',
register: 'Registrar',
logout: 'Salir'
},
registration: {
registration: 'Registro',
fullname: 'Nombre a mostrar',
email: 'Correo electrónico',
bio: 'Biografía',
password_confirm: 'Confirmación de contraseña'
},
post_status: {
posting: 'Publicando',
default: 'Acabo de aterrizar en L.A.'
},
finder: {
find_user: 'Encontrar usuario',
error_fetching_user: 'Error al buscar usuario'
},
general: {
- submit: 'Enviar'
+ submit: 'Enviar',
+ apply: 'Aplicar'
}
}
const pt = {
chat: {
title: 'Chat'
},
nav: {
chat: 'Chat Local',
timeline: 'Linha do tempo',
mentions: 'Menções',
public_tl: 'Linha do tempo pública',
twkn: 'Toda a rede conhecida'
},
user_card: {
follows_you: 'Segue você!',
following: 'Seguindo!',
follow: 'Seguir',
blocked: 'Bloqueado!',
block: 'Bloquear',
statuses: 'Postagens',
mute: 'Mutar',
muted: 'Mudo',
followers: 'Seguidores',
followees: 'Seguindo',
per_day: 'por dia'
},
timeline: {
show_new: 'Mostrar novas',
error_fetching: 'Erro buscando atualizações',
up_to_date: 'Atualizado',
load_older: 'Carregar postagens antigas',
conversation: 'Conversa'
},
settings: {
user_settings: 'Configurações de Usuário',
name_bio: 'Nome & Biografia',
name: 'Nome',
bio: 'Biografia',
avatar: 'Avatar',
current_avatar: 'Seu avatar atual',
set_new_avatar: 'Mudar avatar',
profile_banner: 'Capa de perfil',
current_profile_banner: 'Sua capa de perfil atual',
set_new_profile_banner: 'Mudar capa de perfil',
profile_background: 'Plano de fundo de perfil',
set_new_profile_background: 'Mudar o plano de fundo de perfil',
settings: 'Configurações',
theme: 'Tema',
presets: 'Predefinições',
theme_help: 'Use cores em códigos hexadecimais (#aabbcc) para personalizar seu esquema de cores.',
background: 'Plano de Fundo',
foreground: 'Primeiro Plano',
text: 'Texto',
links: 'Links',
filtering: 'Filtragem',
filtering_explanation: 'Todas as postagens contendo estas palavras serão silenciadas, uma por linha.',
attachments: 'Anexos',
hide_attachments_in_tl: 'Ocultar anexos na linha do tempo.',
hide_attachments_in_convo: 'Ocultar anexos em conversas',
nsfw_clickthrough: 'Habilitar clique para ocultar anexos NSFW',
autoload: 'Habilitar carregamento automático quando a rolagem chegar ao fim.',
streaming: 'Habilitar o fluxo automático de postagens quando ao topo da página',
reply_link_preview: 'Habilitar a pré-visualização de link de respostas ao passar o mouse.',
follow_import: 'Importar seguidas',
import_followers_from_a_csv_file: 'Importe os perfis que tu segues apartir de um arquivo CSV',
follows_imported: 'Seguidas importadas! O processamento das mesmas pode demorar um pouco.',
follow_import_error: 'Erro ao importar seguidas'
},
notifications: {
notifications: 'Notificações',
read: 'Ler!',
followed_you: 'seguiu você'
},
login: {
login: 'Entrar',
username: 'Usuário',
password: 'Senha',
register: 'Registrar',
logout: 'Sair'
},
registration: {
registration: 'Registro',
fullname: 'Nome para exibição',
email: 'Correio eletônico',
bio: 'Biografia',
password_confirm: 'Confirmação de senha'
},
post_status: {
posting: 'Publicando',
default: 'Acabo de aterrizar em L.A.'
},
finder: {
find_user: 'Buscar usuário',
error_fetching_user: 'Erro procurando usuário'
},
general: {
submit: 'Enviar',
apply: 'Aplicar'
}
}
const messages = {
de,
fi,
en,
et,
hu,
ro,
ja,
fr,
it,
pl,
es,
pt
}
export default messages
diff --git a/src/main.js b/src/main.js
index 9ee089d7dc..ca96853996 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,165 +1,173 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Vuex from 'vuex'
import App from './App.vue'
import PublicTimeline from './components/public_timeline/public_timeline.vue'
import PublicAndExternalTimeline from './components/public_and_external_timeline/public_and_external_timeline.vue'
import FriendsTimeline from './components/friends_timeline/friends_timeline.vue'
import TagTimeline from './components/tag_timeline/tag_timeline.vue'
import ConversationPage from './components/conversation-page/conversation-page.vue'
import Mentions from './components/mentions/mentions.vue'
import UserProfile from './components/user_profile/user_profile.vue'
import Settings from './components/settings/settings.vue'
import Registration from './components/registration/registration.vue'
import UserSettings from './components/user_settings/user_settings.vue'
import statusesModule from './modules/statuses.js'
import usersModule from './modules/users.js'
import apiModule from './modules/api.js'
import configModule from './modules/config.js'
import chatModule from './modules/chat.js'
import VueTimeago from 'vue-timeago'
import VueI18n from 'vue-i18n'
import createPersistedState from './lib/persisted_state.js'
import messages from './i18n/messages.js'
import VueChatScroll from 'vue-chat-scroll'
const currentLocale = (window.navigator.language || 'en').split('-')[0]
Vue.use(Vuex)
Vue.use(VueRouter)
Vue.use(VueTimeago, {
locale: currentLocale === 'ja' ? 'ja' : 'en',
locales: {
'en': require('../static/timeago-en.json'),
'ja': require('../static/timeago-ja.json')
}
})
Vue.use(VueI18n)
Vue.use(VueChatScroll)
const persistedStateOptions = {
paths: [
'config.hideAttachments',
'config.hideAttachmentsInConv',
'config.hideNsfw',
'config.autoLoad',
'config.hoverPreview',
'config.streaming',
'config.muteWords',
'config.customTheme',
'users.lastLoginName'
]
}
const store = new Vuex.Store({
modules: {
statuses: statusesModule,
users: usersModule,
api: apiModule,
config: configModule,
chat: chatModule
},
plugins: [createPersistedState(persistedStateOptions)],
strict: false // Socket modifies itself, let's ignore this for now.
// strict: process.env.NODE_ENV !== 'production'
})
const i18n = new VueI18n({
locale: currentLocale,
fallbackLocale: 'en',
messages
})
-window.fetch('/static/config.json')
+window.fetch('/api/statusnet/config.json')
.then((res) => res.json())
.then((data) => {
- const {name, theme, background, logo, registrationOpen, showInstanceSpecificPanel} = data
+ const {name, closed: registrationClosed, textlimit} = data.site
+
store.dispatch('setOption', { name: 'name', value: name })
+ store.dispatch('setOption', { name: 'registrationOpen', value: (registrationClosed === '0') })
+ store.dispatch('setOption', { name: 'textlimit', value: parseInt(textlimit) })
+ })
+
+window.fetch('/static/config.json')
+ .then((res) => res.json())
+ .then((data) => {
+ const {theme, background, logo} = data
store.dispatch('setOption', { name: 'theme', value: theme })
store.dispatch('setOption', { name: 'background', value: background })
store.dispatch('setOption', { name: 'logo', value: logo })
- store.dispatch('setOption', { name: 'registrationOpen', value: registrationOpen })
store.dispatch('setOption', { name: 'showInstanceSpecificPanel', value: showInstanceSpecificPanel })
if (data['chatDisabled']) {
store.dispatch('disableChat')
}
const routes = [
{ name: 'root', path: '/', redirect: data['defaultPath'] || '/main/all' },
{ path: '/main/all', component: PublicAndExternalTimeline },
{ path: '/main/public', component: PublicTimeline },
{ path: '/main/friends', component: FriendsTimeline },
{ path: '/tag/:tag', component: TagTimeline },
{ name: 'conversation', path: '/notice/:id', component: ConversationPage, meta: { dontScroll: true } },
{ name: 'user-profile', path: '/users/:id', component: UserProfile },
{ name: 'mentions', path: '/:username/mentions', component: Mentions },
{ name: 'settings', path: '/settings', component: Settings },
{ name: 'registration', path: '/registration', component: Registration },
{ name: 'user-settings', path: '/user-settings', component: UserSettings }
]
const router = new VueRouter({
mode: 'history',
routes,
scrollBehavior: (to, from, savedPosition) => {
if (to.matched.some(m => m.meta.dontScroll)) {
return false
}
return savedPosition || { x: 0, y: 0 }
}
})
/* eslint-disable no-new */
new Vue({
router,
store,
i18n,
el: '#app',
render: h => h(App)
})
})
window.fetch('/static/terms-of-service.html')
.then((res) => res.text())
.then((html) => {
store.dispatch('setOption', { name: 'tos', value: html })
})
window.fetch('/api/pleroma/emoji.json')
.then(
(res) => res.json()
.then(
(values) => {
const emoji = Object.keys(values).map((key) => {
return { shortcode: key, image_url: values[key] }
})
store.dispatch('setOption', { name: 'customEmoji', value: emoji })
store.dispatch('setOption', { name: 'pleromaBackend', value: true })
},
(failure) => {
store.dispatch('setOption', { name: 'pleromaBackend', value: false })
}
),
(error) => console.log(error)
)
window.fetch('/static/emoji.json')
.then((res) => res.json())
.then((values) => {
const emoji = Object.keys(values).map((key) => {
return { shortcode: key, image_url: false, 'utf': values[key] }
})
store.dispatch('setOption', { name: 'emoji', value: emoji })
})
window.fetch('/instance/panel.html')
.then((res) => res.text())
.then((html) => {
store.dispatch('setOption', { name: 'instanceSpecificPanelContent', value: html })
})
diff --git a/static/config.json b/static/config.json
index 38b1062d36..6c9c27dab2 100644
--- a/static/config.json
+++ b/static/config.json
@@ -1,10 +1,8 @@
{
- "name": "Pleroma FE",
"theme": "pleroma-dark",
"background": "/static/bg.jpg",
"logo": "/static/logo.png",
- "registrationOpen": true,
"defaultPath": "/main/all",
"chatDisabled": false,
"showInstanceSpecificPanel": false
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Aug 8, 5:12 PM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1723744
Default Alt Text
(71 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment