Page MenuHomePhorge

No OneTemporary

Size
82 KB
Referenced Files
None
Subscribers
None
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index b6026e18a4..443e63dd2d 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -1,222 +1,224 @@
import StyleSwitcher from '../style_switcher/style_switcher.vue'
const UserSettings = {
data () {
return {
newname: this.$store.state.users.currentUser.name,
newbio: this.$store.state.users.currentUser.description,
+ newlocked: this.$store.state.users.currentUser.locked,
followList: null,
followImportError: false,
followsImported: false,
enableFollowsExport: true,
uploading: [ false, false, false, false ],
previews: [ null, null, null ],
deletingAccount: false,
deleteAccountConfirmPasswordInput: '',
deleteAccountError: false,
changePasswordInputs: [ '', '', '' ],
changedPassword: false,
changePasswordError: false
}
},
components: {
StyleSwitcher
},
computed: {
user () {
return this.$store.state.users.currentUser
},
pleromaBackend () {
return this.$store.state.config.pleromaBackend
}
},
methods: {
updateProfile () {
const name = this.newname
const description = this.newbio
- this.$store.state.api.backendInteractor.updateProfile({params: {name, description}}).then((user) => {
+ const locked = this.newlocked
+ this.$store.state.api.backendInteractor.updateProfile({params: {name, description, locked}}).then((user) => {
if (!user.error) {
this.$store.commit('addNewUsers', [user])
this.$store.commit('setCurrentUser', user)
}
})
},
uploadFile (slot, e) {
const file = e.target.files[0]
if (!file) { return }
// eslint-disable-next-line no-undef
const reader = new FileReader()
reader.onload = ({target}) => {
const img = target.result
this.previews[slot] = img
this.$forceUpdate() // just changing the array with the index doesn't update the view
}
reader.readAsDataURL(file)
},
submitAvatar () {
if (!this.previews[0]) { return }
let img = this.previews[0]
// eslint-disable-next-line no-undef
let imginfo = new Image()
let cropX, cropY, cropW, cropH
imginfo.src = img
if (imginfo.height > imginfo.width) {
cropX = 0
cropW = imginfo.width
cropY = Math.floor((imginfo.height - imginfo.width) / 2)
cropH = imginfo.width
} else {
cropY = 0
cropH = imginfo.height
cropX = Math.floor((imginfo.width - imginfo.height) / 2)
cropW = imginfo.height
}
this.uploading[0] = true
this.$store.state.api.backendInteractor.updateAvatar({params: {img, cropX, cropY, cropW, cropH}}).then((user) => {
if (!user.error) {
this.$store.commit('addNewUsers', [user])
this.$store.commit('setCurrentUser', user)
this.previews[0] = null
}
this.uploading[0] = false
})
},
submitBanner () {
if (!this.previews[1]) { return }
let banner = this.previews[1]
// eslint-disable-next-line no-undef
let imginfo = new Image()
/* eslint-disable camelcase */
let offset_top, offset_left, width, height
imginfo.src = banner
width = imginfo.width
height = imginfo.height
offset_top = 0
offset_left = 0
this.uploading[1] = true
this.$store.state.api.backendInteractor.updateBanner({params: {banner, offset_top, offset_left, width, height}}).then((data) => {
if (!data.error) {
let clone = JSON.parse(JSON.stringify(this.$store.state.users.currentUser))
clone.cover_photo = data.url
this.$store.commit('addNewUsers', [clone])
this.$store.commit('setCurrentUser', clone)
this.previews[1] = null
}
this.uploading[1] = false
})
/* eslint-enable camelcase */
},
submitBg () {
if (!this.previews[2]) { return }
let img = this.previews[2]
// eslint-disable-next-line no-undef
let imginfo = new Image()
let cropX, cropY, cropW, cropH
imginfo.src = img
cropX = 0
cropY = 0
cropW = imginfo.width
cropH = imginfo.width
this.uploading[2] = true
this.$store.state.api.backendInteractor.updateBg({params: {img, cropX, cropY, cropW, cropH}}).then((data) => {
if (!data.error) {
let clone = JSON.parse(JSON.stringify(this.$store.state.users.currentUser))
clone.background_image = data.url
this.$store.commit('addNewUsers', [clone])
this.$store.commit('setCurrentUser', clone)
this.previews[2] = null
}
this.uploading[2] = false
})
},
importFollows () {
this.uploading[3] = true
const followList = this.followList
this.$store.state.api.backendInteractor.followImport({params: followList})
.then((status) => {
if (status) {
this.followsImported = true
} else {
this.followImportError = true
}
this.uploading[3] = false
})
},
/* This function takes an Array of Users
* and outputs a file with all the addresses for the user to download
*/
exportPeople (users, filename) {
// Get all the friends addresses
var UserAddresses = users.map(function (user) {
// check is it's a local user
if (user && user.is_local) {
// append the instance address
// eslint-disable-next-line no-undef
user.screen_name += '@' + location.hostname
}
return user.screen_name
}).join('\n')
// Make the user download the file
var fileToDownload = document.createElement('a')
fileToDownload.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(UserAddresses))
fileToDownload.setAttribute('download', filename)
fileToDownload.style.display = 'none'
document.body.appendChild(fileToDownload)
fileToDownload.click()
document.body.removeChild(fileToDownload)
},
exportFollows () {
this.enableFollowsExport = false
this.$store.state.api.backendInteractor
.fetchFriends({id: this.$store.state.users.currentUser.id})
.then((friendList) => {
this.exportPeople(friendList, 'friends.csv')
})
},
followListChange () {
// eslint-disable-next-line no-undef
let formData = new FormData()
formData.append('list', this.$refs.followlist.files[0])
this.followList = formData
},
dismissImported () {
this.followsImported = false
this.followImportError = false
},
confirmDelete () {
this.deletingAccount = true
},
deleteAccount () {
this.$store.state.api.backendInteractor.deleteAccount({password: this.deleteAccountConfirmPasswordInput})
.then((res) => {
if (res.status === 'success') {
this.$store.dispatch('logout')
this.$router.push('/main/all')
} else {
this.deleteAccountError = res.error
}
})
},
changePassword () {
const params = {
password: this.changePasswordInputs[0],
newPassword: this.changePasswordInputs[1],
newPasswordConfirmation: this.changePasswordInputs[2]
}
this.$store.state.api.backendInteractor.changePassword(params)
.then((res) => {
if (res.status === 'success') {
this.changedPassword = true
this.changePasswordError = false
} else {
this.changedPassword = false
this.changePasswordError = res.error
}
})
}
}
}
export default UserSettings
diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue
index fbf3f651e7..4abdfc8e85 100644
--- a/src/components/user_settings/user_settings.vue
+++ b/src/components/user_settings/user_settings.vue
@@ -1,135 +1,139 @@
<template>
<div class="settings panel panel-default">
<div class="panel-heading">
{{$t('settings.user_settings')}}
</div>
<div class="panel-body profile-edit">
<div class="setting-item">
<h3>{{$t('settings.name_bio')}}</h3>
<p>{{$t('settings.name')}}</p>
<input class='name-changer' id='username' v-model="newname"></input>
<p>{{$t('settings.bio')}}</p>
<textarea class="bio" v-model="newbio"></textarea>
+ <div class="setting-item">
+ <input type="checkbox" v-model="newlocked" id="account-locked">
+ <label for="account-locked">{{$t('settings.lock_account_description')}}</label>
+ </div>
<button :disabled='newname.length <= 0' class="btn btn-default" @click="updateProfile">{{$t('general.submit')}}</button>
</div>
<div class="setting-item">
<h3>{{$t('settings.avatar')}}</h3>
<p>{{$t('settings.current_avatar')}}</p>
<img :src="user.profile_image_url_original" class="old-avatar"></img>
<p>{{$t('settings.set_new_avatar')}}</p>
<img class="new-avatar" v-bind:src="previews[0]" v-if="previews[0]">
</img>
<div>
<input type="file" @change="uploadFile(0, $event)" ></input>
</div>
<i class="icon-spin4 animate-spin" v-if="uploading[0]"></i>
<button class="btn btn-default" v-else-if="previews[0]" @click="submitAvatar">{{$t('general.submit')}}</button>
</div>
<div class="setting-item">
<h3>{{$t('settings.profile_banner')}}</h3>
<p>{{$t('settings.current_profile_banner')}}</p>
<img :src="user.cover_photo" class="banner"></img>
<p>{{$t('settings.set_new_profile_banner')}}</p>
<img class="banner" v-bind:src="previews[1]" v-if="previews[1]">
</img>
<div>
<input type="file" @change="uploadFile(1, $event)" ></input>
</div>
<i class=" icon-spin4 animate-spin uploading" v-if="uploading[1]"></i>
<button class="btn btn-default" v-else-if="previews[1]" @click="submitBanner">{{$t('general.submit')}}</button>
</div>
<div class="setting-item">
<h3>{{$t('settings.profile_background')}}</h3>
<p>{{$t('settings.set_new_profile_background')}}</p>
<img class="bg" v-bind:src="previews[2]" v-if="previews[2]">
</img>
<div>
<input type="file" @change="uploadFile(2, $event)" ></input>
</div>
<i class=" icon-spin4 animate-spin uploading" v-if="uploading[2]"></i>
<button class="btn btn-default" v-else-if="previews[2]" @click="submitBg">{{$t('general.submit')}}</button>
</div>
<div class="setting-item">
<h3>{{$t('settings.change_password')}}</h3>
<div>
<p>{{$t('settings.current_password')}}</p>
<input type="password" v-model="changePasswordInputs[0]">
</div>
<div>
<p>{{$t('settings.new_password')}}</p>
<input type="password" v-model="changePasswordInputs[1]">
</div>
<div>
<p>{{$t('settings.confirm_new_password')}}</p>
<input type="password" v-model="changePasswordInputs[2]">
</div>
<button class="btn btn-default" @click="changePassword">{{$t('general.submit')}}</button>
<p v-if="changedPassword">{{$t('settings.changed_password')}}</p>
<p v-else-if="changePasswordError !== false">{{$t('settings.change_password_error')}}</p>
<p v-if="changePasswordError">{{changePasswordError}}</p>
</div>
<div class="setting-item" v-if="pleromaBackend">
<h3>{{$t('settings.follow_import')}}</h3>
<p>{{$t('settings.import_followers_from_a_csv_file')}}</p>
<form v-model="followImportForm">
<input type="file" ref="followlist" v-on:change="followListChange"></input>
</form>
<i class=" icon-spin4 animate-spin uploading" v-if="uploading[3]"></i>
<button class="btn btn-default" v-else @click="importFollows">{{$t('general.submit')}}</button>
<div v-if="followsImported">
<i class="icon-cross" @click="dismissImported"></i>
<p>{{$t('settings.follows_imported')}}</p>
</div>
<div v-else-if="followImportError">
<i class="icon-cross" @click="dismissImported"></i>
<p>{{$t('settings.follow_import_error')}}</p>
</div>
</div>
<div class="setting-item" v-if="enableFollowsExport">
<h3>{{$t('settings.follow_export')}}</h3>
<button class="btn btn-default" @click="exportFollows">{{$t('settings.follow_export_button')}}</button>
</div>
<div class="setting-item" v-else>
<h3>{{$t('settings.follow_export_processing')}}</h3>
</div>
<hr>
<div class="setting-item">
<h3>{{$t('settings.delete_account')}}</h3>
<p v-if="!deletingAccount">{{$t('settings.delete_account_description')}}</p>
<div v-if="deletingAccount">
<p>{{$t('settings.delete_account_instructions')}}</p>
<p>{{$t('login.password')}}</p>
<input type="password" v-model="deleteAccountConfirmPasswordInput">
<button class="btn btn-default" @click="deleteAccount">{{$t('settings.delete_account')}}</button>
</div>
<p v-if="deleteAccountError !== false">{{$t('settings.delete_account_error')}}</p>
<p v-if="deleteAccountError">{{deleteAccountError}}</p>
<button class="btn btn-default" v-if="!deletingAccount" @click="confirmDelete">{{$t('general.submit')}}</button>
</div>
</div>
</div>
</template>
<script src="./user_settings.js">
</script>
<style lang="scss">
.profile-edit {
.bio {
margin: 0;
}
input[type=file] {
padding: 5px;
}
.banner {
max-width: 400px;
}
.uploading {
font-size: 1.5em;
margin: 0.25em;
}
}
</style>
diff --git a/src/i18n/messages.js b/src/i18n/messages.js
index 54a99b5ab4..3e842af822 100644
--- a/src/i18n/messages.js
+++ b/src/i18n/messages.js
@@ -1,1703 +1,1704 @@
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',
remote_follow: 'Remote Follow'
},
timeline: {
show_new: 'Zeige Neuere',
error_fetching: 'Fehler beim Laden',
up_to_date: 'Aktuell',
load_older: 'Lade ältere Beiträge',
conversation: 'Unterhaltung',
collapse: 'Einklappen',
repeated: 'wiederholte'
},
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 (#rrggbb) um dein Farbschema anzupassen.',
background: 'Hintergrund',
foreground: 'Vordergrund',
text: 'Text',
links: 'Links',
cBlue: 'Blau (Antworten, Folgt dir)',
cRed: 'Rot (Abbrechen)',
cOrange: 'Orange (Favorisieren)',
cGreen: 'Grün (Retweet)',
btnRadius: 'Buttons',
panelRadius: 'Panel',
avatarRadius: 'Avatare',
avatarAltRadius: 'Avatare (Benachrichtigungen)',
tooltipRadius: 'Tooltips/Warnungen',
attachmentRadius: 'Anhänge',
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 Zeitleiste ausblenden',
hide_attachments_in_convo: 'Anhänge in Unterhaltungen ausblenden',
nsfw_clickthrough: 'Aktiviere ausblendbares Overlay für Anhänge, die als NSFW markiert sind',
stop_gifs: 'Play-on-hover GIFs',
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',
favorited_you: 'favorisierte deine Nachricht',
repeated_you: 'wiederholte deine Nachricht'
},
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'
},
user_profile: {
timeline_title: 'Beiträge'
}
}
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',
collapse: 'Sulje',
repeated: 'toisti'
},
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',
favorited_you: 'tykkäsi viestistäsi',
repeated_you: 'toisti viestisi'
},
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',
collapse: 'Collapse',
repeated: 'repeated'
},
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 (#rrggbb) to customize your color theme.',
radii_help: 'Set up interface edge rounding (in pixels)',
background: 'Background',
foreground: 'Foreground',
text: 'Text',
links: 'Links',
cBlue: 'Blue (Reply, follow)',
cRed: 'Red (Cancel)',
cOrange: 'Orange (Favorite)',
cGreen: 'Green (Retweet)',
btnRadius: 'Buttons',
inputRadius: 'Input fields',
panelRadius: 'Panels',
avatarRadius: 'Avatars',
avatarAltRadius: 'Avatars (Notifications)',
tooltipRadius: 'Tooltips/alerts',
attachmentRadius: 'Attachments',
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',
stop_gifs: 'Play-on-hover GIFs',
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 follows from a csv file',
follows_imported: 'Follows imported! Processing them will take a while.',
follow_import_error: 'Error importing followers',
delete_account: 'Delete Account',
delete_account_description: 'Permanently delete your account and all your messages.',
delete_account_instructions: 'Type your password in the input below to confirm account deletion.',
delete_account_error: 'There was an issue deleting your account. If this persists please contact your instance administrator.',
follow_export: 'Follow export',
follow_export_processing: 'Processing, you\'ll soon be asked to download your file',
follow_export_button: 'Export your follows to a csv file',
change_password: 'Change Password',
current_password: 'Current password',
new_password: 'New password',
confirm_new_password: 'Confirm new password',
changed_password: 'Password changed successfully!',
- change_password_error: 'There was an issue changing your password.'
+ change_password_error: 'There was an issue changing your password.',
+ lock_account_description: 'Restrict your account to approved followers only'
},
notifications: {
notifications: 'Notifications',
read: 'Read!',
followed_you: 'followed you',
favorited_you: 'favorited your status',
repeated_you: 'repeated your status'
},
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'
},
user_profile: {
timeline_title: 'User Timeline'
}
}
const eo = {
chat: {
title: 'Babilo'
},
nav: {
chat: 'Loka babilo',
timeline: 'Tempovido',
mentions: 'Mencioj',
public_tl: 'Publika tempovido',
twkn: 'Tuta konata reto'
},
user_card: {
follows_you: 'Abonas vin!',
following: 'Abonanta!',
follow: 'Aboni',
blocked: 'Barita!',
block: 'Bari',
statuses: 'Statoj',
mute: 'Silentigi',
muted: 'Silentigita',
followers: 'Abonantoj',
followees: 'Abonatoj',
per_day: 'tage',
remote_follow: 'Fora abono'
},
timeline: {
show_new: 'Montri novajn',
error_fetching: 'Eraro ĝisdatigante',
up_to_date: 'Ĝisdata',
load_older: 'Enlegi pli malnovajn statojn',
conversation: 'Interparolo',
collapse: 'Maletendi',
repeated: 'ripetata'
},
settings: {
user_settings: 'Uzulaj agordoj',
name_bio: 'Nomo kaj prio',
name: 'Nomo',
bio: 'Prio',
avatar: 'Profilbildo',
current_avatar: 'Via nuna profilbildo',
set_new_avatar: 'Agordi novan profilbildon',
profile_banner: 'Profila rubando',
current_profile_banner: 'Via nuna profila rubando',
set_new_profile_banner: 'Agordi novan profilan rubandon',
profile_background: 'Profila fono',
set_new_profile_background: 'Agordi novan profilan fonon',
settings: 'Agordoj',
theme: 'Haŭto',
presets: 'Antaŭmetaĵoj',
theme_help: 'Uzu deksesumajn kolorkodojn (#rrvvbb) por adapti vian koloran haŭton.',
radii_help: 'Agordi fasadan rondigon de randoj (rastrumere)',
background: 'Fono',
foreground: 'Malfono',
text: 'Teksto',
links: 'Ligiloj',
cBlue: 'Blua (Respondo, abono)',
cRed: 'Ruĝa (Nuligo)',
cOrange: 'Orange (Ŝato)',
cGreen: 'Verda (Kunhavigo)',
btnRadius: 'Butonoj',
panelRadius: 'Paneloj',
avatarRadius: 'Profilbildoj',
avatarAltRadius: 'Profilbildoj (Sciigoj)',
tooltipRadius: 'Ŝpruchelpiloj/avertoj',
attachmentRadius: 'Kunsendaĵoj',
filtering: 'Filtrado',
filtering_explanation: 'Ĉiuj statoj kun tiuj ĉi vortoj silentiĝos, po unu linie',
attachments: 'Kunsendaĵoj',
hide_attachments_in_tl: 'Kaŝi kunsendaĵojn en tempovido',
hide_attachments_in_convo: 'Kaŝi kunsendaĵojn en interparoloj',
nsfw_clickthrough: 'Ŝalti traklakan kaŝon de konsternaj kunsendaĵoj',
stop_gifs: 'Movi GIF-bildojn dum ŝvebo',
autoload: 'Ŝalti memfaran enlegadon ĉe subo de paĝo',
streaming: 'Ŝalti memfaran fluigon de novaj afiŝoj ĉe supro de paĝo',
reply_link_preview: 'Ŝalti respond-ligilan antaŭvidon dum ŝvebo',
follow_import: 'Abona enporto',
import_followers_from_a_csv_file: 'Enporti abonojn de CSV-dosiero',
follows_imported: 'Abonoj enportiĝis! Traktado daŭros iom.',
follow_import_error: 'Eraro enportante abonojn'
},
notifications: {
notifications: 'Sciigoj',
read: 'Legita!',
followed_you: 'ekabonis vin',
favorited_you: 'ŝatis vian staton',
repeated_you: 'ripetis vian staton'
},
login: {
login: 'Saluti',
username: 'Salutnomo',
password: 'Pasvorto',
register: 'Registriĝi',
logout: 'Adiaŭi'
},
registration: {
registration: 'Registriĝo',
fullname: 'Vidiga nomo',
email: 'Retpoŝtadreso',
bio: 'Prio',
password_confirm: 'Konfirmo de pasvorto'
},
post_status: {
posting: 'Afiŝanta',
default: 'Ĵus alvenis la universalan kongreson!'
},
finder: {
find_user: 'Trovi uzulon',
error_fetching_user: 'Eraro alportante uzulon'
},
general: {
submit: 'Sendi',
apply: 'Apliki'
},
user_profile: {
timeline_title: 'Uzula tempovido'
}
}
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 = {
chat: {
title: 'チャット'
},
nav: {
chat: 'ローカルチャット',
timeline: 'タイムライン',
mentions: 'メンション',
public_tl: '公開タイムライン',
twkn: '接続しているすべてのネットワーク'
},
user_card: {
follows_you: 'フォローされました!',
following: 'フォロー中!',
follow: 'フォロー',
blocked: 'ブロック済み!',
block: 'ブロック',
statuses: '投稿',
mute: 'ミュート',
muted: 'ミュート済み',
followers: 'フォロワー',
followees: 'フォロー',
per_day: '/日',
remote_follow: 'リモートフォロー'
},
timeline: {
show_new: '更新',
error_fetching: '更新の取得中にエラーが発生しました。',
up_to_date: '最新',
load_older: '古い投稿を読み込む',
conversation: '会話',
collapse: '折り畳む',
repeated: 'リピート'
},
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: 'テーマ',
presets: 'プリセット',
theme_help: '16進数カラーコード (#aabbcc) を使用してカラーテーマをカスタマイズ出来ます。',
radii_help: 'インターフェースの縁の丸さを設定する。',
background: '背景',
foreground: '前景',
text: '文字',
links: 'リンク',
cBlue: '青 (返信, フォロー)',
cRed: '赤 (キャンセル)',
cOrange: 'オレンジ (お気に入り)',
cGreen: '緑 (リツイート)',
btnRadius: 'ボタン',
panelRadius: 'パネル',
avatarRadius: 'アバター',
avatarAltRadius: 'アバター (通知)',
tooltipRadius: 'ツールチップ/アラート',
attachmentRadius: 'ファイル',
filtering: 'フィルタリング',
filtering_explanation: 'これらの単語を含むすべてのものがミュートされます。1行に1つの単語を入力してください。',
attachments: 'ファイル',
hide_attachments_in_tl: 'タイムラインのファイルを隠す。',
hide_attachments_in_convo: '会話の中のファイルを隠す。',
nsfw_clickthrough: 'NSFWファイルの非表示を有効にする。',
stop_gifs: 'カーソルを重ねた時にGIFを再生する。',
autoload: '下にスクロールした時に自動で読み込むようにする。',
streaming: '上までスクロールした時に自動でストリーミングされるようにする。',
reply_link_preview: 'マウスカーソルを重ねた時に返信のプレビューを表示するようにする。',
follow_import: 'フォローインポート',
import_followers_from_a_csv_file: 'CSVファイルからフォローをインポートする。',
follows_imported: 'フォローがインポートされました!処理に少し時間がかかるかもしれません。',
follow_import_error: 'フォロワーのインポート中にエラーが発生しました。'
},
notifications: {
notifications: '通知',
read: '読んだ!',
followed_you: 'フォローされました',
favorited_you: 'あなたの投稿がお気に入りされました',
repeated_you: 'あなたの投稿がリピートされました'
},
login: {
login: 'ログイン',
username: 'ユーザー名',
password: 'パスワード',
register: '登録',
logout: 'ログアウト'
},
registration: {
registration: '登録',
fullname: '表示名',
email: 'Eメール',
bio: 'プロフィール',
password_confirm: 'パスワードの確認'
},
post_status: {
posting: '投稿',
default: 'ちょうどL.A.に着陸しました。'
},
finder: {
find_user: 'ユーザー検索',
error_fetching_user: 'ユーザー検索でエラーが発生しました'
},
general: {
submit: '送信',
apply: '適用'
},
user_profile: {
timeline_title: 'ユーザータイムライン'
}
}
const fr = {
nav: {
chat: 'Chat local',
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: 'Masquer',
muted: 'Masqué',
followers: 'Vous suivent',
followees: 'Suivis',
per_day: 'par jour',
remote_follow: 'Suivre d\'une autre instance'
},
timeline: {
show_new: 'Afficher plus',
error_fetching: 'Erreur en cherchant les mises à jour',
up_to_date: 'À jour',
load_older: 'Afficher plus',
conversation: 'Conversation',
collapse: 'Fermer',
repeated: 'a partagé'
},
settings: {
user_settings: 'Paramètres utilisateur',
name_bio: 'Nom & Bio',
name: 'Nom',
bio: 'Biographie',
avatar: 'Avatar',
current_avatar: 'Avatar actuel',
set_new_avatar: 'Changer d\'avatar',
profile_banner: 'Bannière de profil',
current_profile_banner: 'Bannière de profil actuelle',
set_new_profile_banner: 'Changer de bannière',
profile_background: 'Image de fond',
set_new_profile_background: 'Changer d\'image de fond',
settings: 'Paramètres',
theme: 'Thème',
filtering: 'Filtre',
filtering_explanation: 'Tout les statuts contenant ces mots seront masqués. Un mot par ligne.',
attachments: 'Pièces jointes',
hide_attachments_in_tl: 'Masquer les pièces jointes dans le journal',
hide_attachments_in_convo: 'Masquer les pièces jointes dans les conversations',
nsfw_clickthrough: 'Masquer les images marquées comme contenu adulte ou sensible',
autoload: 'Charger la suite automatiquement une fois le bas de la page atteint',
reply_link_preview: 'Afficher un aperçu lors du survol de liens vers une réponse',
presets: 'Thèmes prédéfinis',
theme_help: 'Spécifiez des codes couleur hexadécimaux (#aabbcc) pour personnaliser les couleurs du thème',
background: 'Arrière plan',
foreground: 'Premier plan',
text: 'Texte',
links: 'Liens',
streaming: 'Charger automatiquement les nouveaux statuts lorsque vous êtes au haut de la page',
follow_import: 'Importer ses abonnements',
import_followers_from_a_csv_file: 'Importer ses abonnements depuis un fichier csv',
follows_imported: 'Abonnements importés ! Le traitement peut prendre un moment.',
follow_import_error: 'Erreur lors de l\'importation des abonnements.',
cBlue: 'Bleu (Répondre, suivre)',
cRed: 'Rouge (Annuler)',
cOrange: 'Orange (Aimer)',
cGreen: 'Vert (Partager)',
btnRadius: 'Boutons',
panelRadius: 'Fenêtres',
inputRadius: 'Champs de texte',
avatarRadius: 'Avatars',
avatarAltRadius: 'Avatars (Notifications)',
tooltipRadius: 'Info-bulles/alertes ',
attachmentRadius: 'Pièces jointes',
radii_help: 'Vous pouvez ici choisir le niveau d\'arrondi des angles de l\'interface (en pixels)',
stop_gifs: 'N\'animer les GIFS que lors du survol du curseur de la souris'
},
notifications: {
notifications: 'Notifications',
read: 'Lu !',
followed_you: 'a commencé à vous suivre',
favorited_you: 'a aimé votre statut',
repeated_you: 'a partagé votre statut'
},
login: {
login: 'Connexion',
username: 'Identifiant',
password: 'Mot de passe',
register: 'S\'inscrire',
logout: 'Déconnexion'
},
registration: {
registration: 'Inscription',
fullname: 'Pseudonyme',
email: 'Adresse email',
bio: 'Biographie',
password_confirm: 'Confirmation du mot de passe'
},
post_status: {
posting: 'Envoi en cours',
default: 'Écrivez ici votre prochain statut.'
},
finder: {
find_user: 'Chercher un utilisateur',
error_fetching_user: 'Erreur lors de la recherche de l\'utilisateur'
},
general: {
submit: 'Envoyer',
apply: 'Appliquer'
},
user_profile: {
timeline_title: 'Journal de l\'utilisateur'
}
}
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 oc = {
chat: {
title: 'Messatjariá'
},
nav: {
chat: 'Chat local',
timeline: 'Flux d’actualitat',
mentions: 'Notificacions',
public_tl: 'Estatuts locals',
twkn: 'Lo malhum conegut'
},
user_card: {
follows_you: 'Vos sèc !',
following: 'Seguit !',
follow: 'Seguir',
blocked: 'Blocat',
block: 'Blocar',
statuses: 'Estatuts',
mute: 'Amagar',
muted: 'Amagat',
followers: 'Seguidors',
followees: 'Abonaments',
per_day: 'per jorn',
remote_follow: 'Seguir a distància'
},
timeline: {
show_new: 'Ne veire mai',
error_fetching: 'Error en cercant de mesas a jorn',
up_to_date: 'A jorn',
load_older: 'Ne veire mai',
conversation: 'Conversacion',
collapse: 'Tampar',
repeated: 'repetit'
},
settings: {
user_settings: 'Paramètres utilizaire',
name_bio: 'Nom & Bio',
name: 'Nom',
bio: 'Biografia',
avatar: 'Avatar',
current_avatar: 'Vòstre avatar actual',
set_new_avatar: 'Cambiar l’avatar',
profile_banner: 'Bandièra del perfil',
current_profile_banner: 'Bandièra actuala del perfil',
set_new_profile_banner: 'Cambiar de bandièra',
profile_background: 'Imatge de fons',
set_new_profile_background: 'Cambiar l’imatge de fons',
settings: 'Paramètres',
theme: 'Tèma',
presets: 'Pre-enregistrats',
theme_help: 'Emplegatz los còdis de color hex (#rrggbb) per personalizar vòstre tèma de color.',
radii_help: 'Configurar los caires arredondits de l’interfàcia (en pixèls)',
background: 'Rèire plan',
foreground: 'Endavant',
text: 'Tèxte',
links: 'Ligams',
cBlue: 'Blau (Respondre, seguir)',
cRed: 'Roge (Anullar)',
cOrange: 'Irange (Metre en favorit)',
cGreen: 'Verd (Repartajar)',
inputRadius: 'Camps tèxte',
btnRadius: 'Botons',
panelRadius: 'Panèls',
avatarRadius: 'Avatars',
avatarAltRadius: 'Avatars (Notificacions)',
tooltipRadius: 'Astúcias/Alèrta',
attachmentRadius: 'Pèças juntas',
filtering: 'Filtre',
filtering_explanation: 'Totes los estatuts amb aqueles mots seràn en silenci, un mot per linha.',
attachments: 'Pèças juntas',
hide_attachments_in_tl: 'Rescondre las pèças juntas',
hide_attachments_in_convo: 'Rescondre las pèças juntas dins las conversacions',
nsfw_clickthrough: 'Activar lo clic per mostrar los imatges marcats coma pels adults o sensibles',
stop_gifs: 'Lançar los GIFs al subrevòl',
autoload: 'Activar lo cargament automatic un còp arribat al cap de la pagina',
streaming: 'Activar lo cargament automatic dels novèls estatus en anar amont',
reply_link_preview: 'Activar l’apercebut en passar la mirga',
follow_import: 'Importar los abonaments',
import_followers_from_a_csv_file: 'Importar los seguidors d’un fichièr csv',
follows_imported: 'Seguidors importats. Lo tractament pòt trigar una estona.',
follow_import_error: 'Error en important los seguidors'
},
notifications: {
notifications: 'Notficacions',
read: 'Legit !',
followed_you: 'vos sèc',
favorited_you: 'a aimat vòstre estatut',
repeated_you: 'a repetit your vòstre estatut'
},
login: {
login: 'Connexion',
username: 'Nom d’utilizaire',
password: 'Senhal',
register: 'Se marcar',
logout: 'Desconnexion'
},
registration: {
registration: 'Inscripcion',
fullname: 'Nom complèt',
email: 'Adreça de corrièl',
bio: 'Biografia',
password_confirm: 'Confirmar lo senhal'
},
post_status: {
posting: 'Mandadís',
default: 'Escrivètz aquí vòstre estatut.'
},
finder: {
find_user: 'Cercar un utilizaire',
error_fetching_user: 'Error pendent la recèrca d’un utilizaire'
},
general: {
submit: 'Mandar',
apply: 'Aplicar'
},
user_profile: {
timeline_title: 'Flux utilizaire'
}
}
const pl = {
chat: {
title: 'Czat'
},
nav: {
chat: 'Lokalny czat',
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',
remote_follow: 'Zdalna obserwacja'
},
timeline: {
show_new: 'Pokaż nowe',
error_fetching: 'Błąd pobierania',
up_to_date: 'Na bieżąco',
load_older: 'Załaduj starsze statusy',
conversation: 'Rozmowa',
collapse: 'Zwiń',
repeated: 'powtórzono'
},
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 profilu',
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',
presets: 'Gotowe motywy',
theme_help: 'Użyj kolorów w notacji szesnastkowej (#rrggbb), by stworzyć swój motyw.',
radii_help: 'Ustaw zaokrąglenie krawędzi interfejsu (w pikselach)',
background: 'Tło',
foreground: 'Pierwszy plan',
text: 'Tekst',
links: 'Łącza',
cBlue: 'Niebieski (odpowiedz, obserwuj)',
cRed: 'Czerwony (anuluj)',
cOrange: 'Pomarańczowy (ulubione)',
cGreen: 'Zielony (powtórzenia)',
btnRadius: 'Przyciski',
panelRadius: 'Panele',
avatarRadius: 'Awatary',
avatarAltRadius: 'Awatary (powiadomienia)',
tooltipRadius: 'Etykiety/alerty',
attachmentRadius: 'Załączniki',
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)',
stop_gifs: 'Odtwarzaj GIFy po najechaniu kursorem',
autoload: 'Włącz automatyczne ładowanie po przewinięciu do końca strony',
streaming: 'Włącz automatycznie strumieniowanie nowych postów gdy na początku strony',
reply_link_preview: 'Włącz dymek z podglądem postu po najechaniu na znak odpowiedzi',
follow_import: 'Import obserwowanych',
import_followers_from_a_csv_file: 'Importuj obserwowanych z pliku CSV',
follows_imported: 'Obserwowani zaimportowani! Przetwarzanie może trochę potrwać.',
follow_import_error: 'Błąd przy importowaniu obserwowanych'
},
notifications: {
notifications: 'Powiadomienia',
read: 'Przeczytane!',
followed_you: 'obserwuje cię',
favorited_you: 'dodał twój status do ulubionych',
repeated_you: 'powtórzył twój status'
},
login: {
login: 'Zaloguj',
username: 'Użytkownik',
password: 'Hasło',
register: 'Zarejestruj',
logout: 'Wyloguj'
},
registration: {
registration: 'Rejestracja',
fullname: 'Wyświetlana nazwa profilu',
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',
apply: 'Zastosuj'
},
user_profile: {
timeline_title: 'Oś czasu użytkownika'
}
}
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',
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 (#rrggbb) 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',
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',
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: 'Silenciar',
muted: 'Silenciado',
followers: 'Seguidores',
followees: 'Seguindo',
per_day: 'por dia',
remote_follow: 'Seguidor Remoto'
},
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: 'Alterar avatar',
profile_banner: 'Capa de perfil',
current_profile_banner: 'Sua capa de perfil atual',
set_new_profile_banner: 'Alterar capa de perfil',
profile_background: 'Plano de fundo de perfil',
set_new_profile_background: 'Alterar o plano de fundo de perfil',
settings: 'Configurações',
theme: 'Tema',
presets: 'Predefinições',
theme_help: 'Use cores em código hexadecimal (#rrggbb) 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 seguidores a partir de um arquivo CSV',
follows_imported: 'Seguidores importados! O processamento pode demorar um pouco.',
follow_import_error: 'Erro ao importar seguidores'
},
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 eletrô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 ru = {
chat: {
title: 'Чат'
},
nav: {
chat: 'Локальный чат',
timeline: 'Лента',
mentions: 'Упоминания',
public_tl: 'Публичная лента',
twkn: 'Федеративная лента'
},
user_card: {
follows_you: 'Читает вас',
following: 'Читаю',
follow: 'Читать',
blocked: 'Заблокирован',
block: 'Заблокировать',
statuses: 'Статусы',
mute: 'Игнорировать',
muted: 'Игнорирую',
followers: 'Читатели',
followees: 'Читаемые',
per_day: 'в день',
remote_follow: 'Читать удалённо'
},
timeline: {
show_new: 'Показать новые',
error_fetching: 'Ошибка при обновлении',
up_to_date: 'Обновлено',
load_older: 'Загрузить старые статусы',
conversation: 'Разговор',
collapse: 'Свернуть',
repeated: 'повторил(а)'
},
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: 'Тема',
presets: 'Пресеты',
theme_help: 'Используйте шестнадцатеричные коды цветов (#rrggbb) для настройки темы.',
radii_help: 'Округление краёв элементов интерфейса (в пикселях)',
background: 'Фон',
foreground: 'Передний план',
text: 'Текст',
links: 'Ссылки',
cBlue: 'Ответить, читать',
cRed: 'Отменить',
cOrange: 'Нравится',
cGreen: 'Повторить',
btnRadius: 'Кнопки',
inputRadius: 'Поля ввода',
panelRadius: 'Панели',
avatarRadius: 'Аватары',
avatarAltRadius: 'Аватары в уведомлениях',
tooltipRadius: 'Всплывающие подсказки/уведомления',
attachmentRadius: 'Прикреплённые файлы',
filtering: 'Фильтрация',
filtering_explanation: 'Все статусы, содержащие данные слова, будут игнорироваться, по одному в строке',
attachments: 'Вложения',
hide_attachments_in_tl: 'Прятать вложения в ленте',
hide_attachments_in_convo: 'Прятать вложения в разговорах',
stop_gifs: 'Проигрывать GIF анимации только при наведении',
nsfw_clickthrough: 'Включить скрытие NSFW вложений',
autoload: 'Включить автоматическую загрузку при прокрутке вниз',
streaming: 'Включить автоматическую загрузку новых сообщений при прокрутке вверх',
reply_link_preview: 'Включить предварительный просмотр ответа при наведении мыши',
follow_import: 'Импортировать читаемых',
import_followers_from_a_csv_file: 'Импортировать читаемых из файла .csv',
follows_imported: 'Список читаемых импортирован. Обработка займёт некоторое время..',
follow_import_error: 'Ошибка при импортировании читаемых.'
},
notifications: {
notifications: 'Уведомления',
read: 'Прочесть',
followed_you: 'начал(а) читать вас',
favorited_you: 'нравится ваш статус',
repeated_you: 'повторил(а) ваш статус'
},
login: {
login: 'Войти',
username: 'Имя пользователя',
password: 'Пароль',
register: 'Зарегистрироваться',
logout: 'Выйти'
},
registration: {
registration: 'Регистрация',
fullname: 'Отображаемое имя',
email: 'Email',
bio: 'Описание',
password_confirm: 'Подтверждение пароля'
},
post_status: {
posting: 'Отправляется',
default: 'Что нового?'
},
finder: {
find_user: 'Найти пользователя',
error_fetching_user: 'Пользователь не найден'
},
general: {
submit: 'Отправить',
apply: 'Применить'
},
user_profile: {
timeline_title: 'Лента пользователя'
}
}
const nb = {
chat: {
title: 'Chat'
},
nav: {
chat: 'Lokal Chat',
timeline: 'Tidslinje',
mentions: 'Nevnt',
public_tl: 'Offentlig Tidslinje',
twkn: 'Det hele kjente nettverket'
},
user_card: {
follows_you: 'Følger deg!',
following: 'Følger!',
follow: 'Følg',
blocked: 'Blokkert!',
block: 'Blokker',
statuses: 'Statuser',
mute: 'Demp',
muted: 'Dempet',
followers: 'Følgere',
followees: 'Følger',
per_day: 'per dag',
remote_follow: 'Følg eksternt'
},
timeline: {
show_new: 'Vis nye',
error_fetching: 'Feil ved henting av oppdateringer',
up_to_date: 'Oppdatert',
load_older: 'Last eldre statuser',
conversation: 'Samtale',
collapse: 'Sammenfold',
repeated: 'gjentok'
},
settings: {
user_settings: 'Brukerinstillinger',
name_bio: 'Navn & Biografi',
name: 'Navn',
bio: 'Biografi',
avatar: 'Profilbilde',
current_avatar: 'Ditt nåværende profilbilde',
set_new_avatar: 'Rediger profilbilde',
profile_banner: 'Profil-banner',
current_profile_banner: 'Din nåværende profil-banner',
set_new_profile_banner: 'Sett ny profil-banner',
profile_background: 'Profil-bakgrunn',
set_new_profile_background: 'Rediger profil-bakgrunn',
settings: 'Innstillinger',
theme: 'Tema',
presets: 'Forhåndsdefinerte fargekoder',
theme_help: 'Bruk heksadesimale fargekoder (#rrggbb) til å endre farge-temaet ditt.',
radii_help: 'Bestem hvor runde hjørnene i brukergrensesnittet skal være (i piksler)',
background: 'Bakgrunn',
foreground: 'Framgrunn',
text: 'Tekst',
links: 'Linker',
cBlue: 'Blå (Svar, følg)',
cRed: 'Rød (Avbryt)',
cOrange: 'Oransje (Lik)',
cGreen: 'Grønn (Gjenta)',
btnRadius: 'Knapper',
panelRadius: 'Panel',
avatarRadius: 'Profilbilde',
avatarAltRadius: 'Profilbilde (Varslinger)',
tooltipRadius: 'Verktøytips/advarsler',
attachmentRadius: 'Vedlegg',
filtering: 'Filtrering',
filtering_explanation: 'Alle statuser som inneholder disse ordene vil bli dempet, en kombinasjon av tegn per linje',
attachments: 'Vedlegg',
hide_attachments_in_tl: 'Gjem vedlegg på tidslinje',
hide_attachments_in_convo: 'Gjem vedlegg i samtaler',
nsfw_clickthrough: 'Krev trykk for å vise statuser som kan være upassende',
stop_gifs: 'Spill av GIFs når du holder over dem',
autoload: 'Automatisk lasting når du blar ned til bunnen',
streaming: 'Automatisk strømming av nye statuser når du har bladd til toppen',
reply_link_preview: 'Vis en forhåndsvisning når du holder musen over svar til en status',
follow_import: 'Importer følginger',
import_followers_from_a_csv_file: 'Importer følginger fra en csv fil',
follows_imported: 'Følginger imported! Det vil ta litt tid å behandle de.',
follow_import_error: 'Feil ved importering av følginger.'
},
notifications: {
notifications: 'Varslinger',
read: 'Les!',
followed_you: 'fulgte deg',
favorited_you: 'likte din status',
repeated_you: 'Gjentok din status'
},
login: {
login: 'Logg inn',
username: 'Brukernavn',
password: 'Passord',
register: 'Registrer',
logout: 'Logg ut'
},
registration: {
registration: 'Registrering',
fullname: 'Visningsnavn',
email: 'Epost-adresse',
bio: 'Biografi',
password_confirm: 'Bekreft passord'
},
post_status: {
posting: 'Publiserer',
default: 'Landet akkurat i L.A.'
},
finder: {
find_user: 'Finn bruker',
error_fetching_user: 'Feil ved henting av bruker'
},
general: {
submit: 'Legg ut',
apply: 'Bruk'
},
user_profile: {
timeline_title: 'Bruker-tidslinje'
}
}
const messages = {
de,
fi,
en,
eo,
et,
hu,
ro,
ja,
fr,
it,
oc,
pl,
es,
pt,
ru,
nb
}
export default messages
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index 65761aee97..b50038b371 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -1,446 +1,448 @@
/* eslint-env browser */
const LOGIN_URL = '/api/account/verify_credentials.json'
const FRIENDS_TIMELINE_URL = '/api/statuses/friends_timeline.json'
const ALL_FOLLOWING_URL = '/api/qvitter/allfollowing'
const PUBLIC_TIMELINE_URL = '/api/statuses/public_timeline.json'
const PUBLIC_AND_EXTERNAL_TIMELINE_URL = '/api/statuses/public_and_external_timeline.json'
const TAG_TIMELINE_URL = '/api/statusnet/tags/timeline'
const FAVORITE_URL = '/api/favorites/create'
const UNFAVORITE_URL = '/api/favorites/destroy'
const RETWEET_URL = '/api/statuses/retweet'
const STATUS_UPDATE_URL = '/api/statuses/update.json'
const STATUS_DELETE_URL = '/api/statuses/destroy'
const STATUS_URL = '/api/statuses/show'
const MEDIA_UPLOAD_URL = '/api/statusnet/media/upload'
const CONVERSATION_URL = '/api/statusnet/conversation'
const MENTIONS_URL = '/api/statuses/mentions.json'
const FOLLOWERS_URL = '/api/statuses/followers.json'
const FRIENDS_URL = '/api/statuses/friends.json'
const FOLLOWING_URL = '/api/friendships/create.json'
const UNFOLLOWING_URL = '/api/friendships/destroy.json'
const QVITTER_USER_PREF_URL = '/api/qvitter/set_profile_pref.json'
const REGISTRATION_URL = '/api/account/register.json'
const AVATAR_UPDATE_URL = '/api/qvitter/update_avatar.json'
const BG_UPDATE_URL = '/api/qvitter/update_background_image.json'
const BANNER_UPDATE_URL = '/api/account/update_profile_banner.json'
const PROFILE_UPDATE_URL = '/api/account/update_profile.json'
const EXTERNAL_PROFILE_URL = '/api/externalprofile/show.json'
const QVITTER_USER_TIMELINE_URL = '/api/qvitter/statuses/user_timeline.json'
const BLOCKING_URL = '/api/blocks/create.json'
const UNBLOCKING_URL = '/api/blocks/destroy.json'
const USER_URL = '/api/users/show.json'
const FOLLOW_IMPORT_URL = '/api/pleroma/follow_import'
const DELETE_ACCOUNT_URL = '/api/pleroma/delete_account'
const CHANGE_PASSWORD_URL = '/api/pleroma/change_password'
import { each, map } from 'lodash'
import 'whatwg-fetch'
const oldfetch = window.fetch
let fetch = (url, options) => {
options = options || {}
const baseUrl = ''
const fullUrl = baseUrl + url
options.credentials = 'same-origin'
return oldfetch(fullUrl, options)
}
// from https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
let utoa = (str) => {
// first we use encodeURIComponent to get percent-encoded UTF-8,
// then we convert the percent encodings into raw bytes which
// can be fed into btoa.
return btoa(encodeURIComponent(str)
.replace(/%([0-9A-F]{2})/g,
(match, p1) => { return String.fromCharCode('0x' + p1) }))
}
// Params
// cropH
// cropW
// cropX
// cropY
// img (base 64 encodend data url)
const updateAvatar = ({credentials, params}) => {
let url = AVATAR_UPDATE_URL
const form = new FormData()
each(params, (value, key) => {
if (value) {
form.append(key, value)
}
})
return fetch(url, {
headers: authHeaders(credentials),
method: 'POST',
body: form
}).then((data) => data.json())
}
const updateBg = ({credentials, params}) => {
let url = BG_UPDATE_URL
const form = new FormData()
each(params, (value, key) => {
if (value) {
form.append(key, value)
}
})
return fetch(url, {
headers: authHeaders(credentials),
method: 'POST',
body: form
}).then((data) => data.json())
}
// Params
// height
// width
// offset_left
// offset_top
// banner (base 64 encodend data url)
const updateBanner = ({credentials, params}) => {
let url = BANNER_UPDATE_URL
const form = new FormData()
each(params, (value, key) => {
if (value) {
form.append(key, value)
}
})
return fetch(url, {
headers: authHeaders(credentials),
method: 'POST',
body: form
}).then((data) => data.json())
}
// Params
// name
// url
// location
// description
const updateProfile = ({credentials, params}) => {
let url = PROFILE_UPDATE_URL
+ console.log(params)
+
const form = new FormData()
each(params, (value, key) => {
- if (key === 'description' || /* Always include description, because it might be empty */
- value) {
+ /* Always include description and locked, because it might be empty or false */
+ if (key === 'description' || key === 'locked' || value) {
form.append(key, value)
}
})
return fetch(url, {
headers: authHeaders(credentials),
method: 'POST',
body: form
}).then((data) => data.json())
}
// Params needed:
// nickname
// email
// fullname
// password
// password_confirm
//
// Optional
// bio
// homepage
// location
const register = (params) => {
const form = new FormData()
each(params, (value, key) => {
if (value) {
form.append(key, value)
}
})
return fetch(REGISTRATION_URL, {
method: 'POST',
body: form
})
}
const authHeaders = (user) => {
if (user && user.username && user.password) {
return { 'Authorization': `Basic ${utoa(`${user.username}:${user.password}`)}` }
} else {
return { }
}
}
const externalProfile = ({profileUrl, credentials}) => {
let url = `${EXTERNAL_PROFILE_URL}?profileurl=${profileUrl}`
return fetch(url, {
headers: authHeaders(credentials),
method: 'GET'
}).then((data) => data.json())
}
const followUser = ({id, credentials}) => {
let url = `${FOLLOWING_URL}?user_id=${id}`
return fetch(url, {
headers: authHeaders(credentials),
method: 'POST'
}).then((data) => data.json())
}
const unfollowUser = ({id, credentials}) => {
let url = `${UNFOLLOWING_URL}?user_id=${id}`
return fetch(url, {
headers: authHeaders(credentials),
method: 'POST'
}).then((data) => data.json())
}
const blockUser = ({id, credentials}) => {
let url = `${BLOCKING_URL}?user_id=${id}`
return fetch(url, {
headers: authHeaders(credentials),
method: 'POST'
}).then((data) => data.json())
}
const unblockUser = ({id, credentials}) => {
let url = `${UNBLOCKING_URL}?user_id=${id}`
return fetch(url, {
headers: authHeaders(credentials),
method: 'POST'
}).then((data) => data.json())
}
const fetchUser = ({id, credentials}) => {
let url = `${USER_URL}?user_id=${id}`
return fetch(url, { headers: authHeaders(credentials) })
.then((data) => data.json())
}
const fetchFriends = ({id, credentials}) => {
let url = `${FRIENDS_URL}?user_id=${id}`
return fetch(url, { headers: authHeaders(credentials) })
.then((data) => data.json())
}
const fetchFollowers = ({id, credentials}) => {
let url = `${FOLLOWERS_URL}?user_id=${id}`
return fetch(url, { headers: authHeaders(credentials) })
.then((data) => data.json())
}
const fetchAllFollowing = ({username, credentials}) => {
const url = `${ALL_FOLLOWING_URL}/${username}.json`
return fetch(url, { headers: authHeaders(credentials) })
.then((data) => data.json())
}
const fetchConversation = ({id, credentials}) => {
let url = `${CONVERSATION_URL}/${id}.json?count=100`
return fetch(url, { headers: authHeaders(credentials) })
.then((data) => data.json())
}
const fetchStatus = ({id, credentials}) => {
let url = `${STATUS_URL}/${id}.json`
return fetch(url, { headers: authHeaders(credentials) })
.then((data) => data.json())
}
const setUserMute = ({id, credentials, muted = true}) => {
const form = new FormData()
const muteInteger = muted ? 1 : 0
form.append('namespace', 'qvitter')
form.append('data', muteInteger)
form.append('topic', `mute:${id}`)
return fetch(QVITTER_USER_PREF_URL, {
method: 'POST',
headers: authHeaders(credentials),
body: form
})
}
const fetchTimeline = ({timeline, credentials, since = false, until = false, userId = false, tag = false}) => {
const timelineUrls = {
public: PUBLIC_TIMELINE_URL,
friends: FRIENDS_TIMELINE_URL,
mentions: MENTIONS_URL,
'publicAndExternal': PUBLIC_AND_EXTERNAL_TIMELINE_URL,
user: QVITTER_USER_TIMELINE_URL,
tag: TAG_TIMELINE_URL
}
let url = timelineUrls[timeline]
let params = []
if (since) {
params.push(['since_id', since])
}
if (until) {
params.push(['max_id', until])
}
if (userId) {
params.push(['user_id', userId])
}
if (tag) {
url += `/${tag}.json`
}
params.push(['count', 20])
const queryString = map(params, (param) => `${param[0]}=${param[1]}`).join('&')
url += `?${queryString}`
return fetch(url, { headers: authHeaders(credentials) }).then((data) => data.json())
}
const verifyCredentials = (user) => {
return fetch(LOGIN_URL, {
method: 'POST',
headers: authHeaders(user)
})
}
const favorite = ({ id, credentials }) => {
return fetch(`${FAVORITE_URL}/${id}.json`, {
headers: authHeaders(credentials),
method: 'POST'
})
}
const unfavorite = ({ id, credentials }) => {
return fetch(`${UNFAVORITE_URL}/${id}.json`, {
headers: authHeaders(credentials),
method: 'POST'
})
}
const retweet = ({ id, credentials }) => {
return fetch(`${RETWEET_URL}/${id}.json`, {
headers: authHeaders(credentials),
method: 'POST'
})
}
const postStatus = ({credentials, status, mediaIds, inReplyToStatusId}) => {
const idsText = mediaIds.join(',')
const form = new FormData()
form.append('status', status)
form.append('source', 'Pleroma FE')
form.append('media_ids', idsText)
if (inReplyToStatusId) {
form.append('in_reply_to_status_id', inReplyToStatusId)
}
return fetch(STATUS_UPDATE_URL, {
body: form,
method: 'POST',
headers: authHeaders(credentials)
})
}
const deleteStatus = ({ id, credentials }) => {
return fetch(`${STATUS_DELETE_URL}/${id}.json`, {
headers: authHeaders(credentials),
method: 'POST'
})
}
const uploadMedia = ({formData, credentials}) => {
return fetch(MEDIA_UPLOAD_URL, {
body: formData,
method: 'POST',
headers: authHeaders(credentials)
})
.then((response) => response.text())
.then((text) => (new DOMParser()).parseFromString(text, 'application/xml'))
}
const followImport = ({params, credentials}) => {
return fetch(FOLLOW_IMPORT_URL, {
body: params,
method: 'POST',
headers: authHeaders(credentials)
})
.then((response) => response.ok)
}
const deleteAccount = ({credentials, password}) => {
const form = new FormData()
form.append('password', password)
return fetch(DELETE_ACCOUNT_URL, {
body: form,
method: 'POST',
headers: authHeaders(credentials)
})
.then((response) => response.json())
}
const changePassword = ({credentials, password, newPassword, newPasswordConfirmation}) => {
const form = new FormData()
form.append('password', password)
form.append('new_password', newPassword)
form.append('new_password_confirmation', newPasswordConfirmation)
return fetch(CHANGE_PASSWORD_URL, {
body: form,
method: 'POST',
headers: authHeaders(credentials)
})
.then((response) => response.json())
}
const fetchMutes = ({credentials}) => {
const url = '/api/qvitter/mutes.json'
return fetch(url, {
headers: authHeaders(credentials)
}).then((data) => data.json())
}
const apiService = {
verifyCredentials,
fetchTimeline,
fetchConversation,
fetchStatus,
fetchFriends,
fetchFollowers,
followUser,
unfollowUser,
blockUser,
unblockUser,
fetchUser,
favorite,
unfavorite,
retweet,
postStatus,
deleteStatus,
uploadMedia,
fetchAllFollowing,
setUserMute,
fetchMutes,
register,
updateAvatar,
updateBg,
updateProfile,
updateBanner,
externalProfile,
followImport,
deleteAccount,
changePassword
}
export default apiService

File Metadata

Mime Type
text/x-diff
Expires
Sat, Aug 8, 8:57 PM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1723966
Default Alt Text
(82 KB)

Event Timeline