Merge remote-tracking branch 'Dave/issue-436-mastoapi-notifications' into shigusegubu
* Dave/issue-436-mastoapi-notifications: remove debug message #436 - revert stripe html for notification #436 - notification html to text content #436 - revert notification silience config #469 - update text copy #469 - update behavior of safe_dm #469 - clean up #469 - DM warning text should vary based on BE setting Added moderation menu remove window width copypasta Fix login handling Add Promise.all to send requests when loading #471 - fix timeline fetch with since_id Update Polish translation Update oc.json for !611 and !691
This commit is contained in:
commit
317b658413
30 changed files with 2133 additions and 56 deletions
|
@ -24,12 +24,14 @@
|
|||
"node-sass": "^3.10.1",
|
||||
"object-path": "^0.11.3",
|
||||
"phoenix": "^1.3.0",
|
||||
"popper.js": "^1.14.7",
|
||||
"sanitize-html": "^1.13.0",
|
||||
"sass-loader": "^4.0.2",
|
||||
"vue": "^2.5.13",
|
||||
"vue-chat-scroll": "^1.2.1",
|
||||
"vue-compose": "^0.7.1",
|
||||
"vue-i18n": "^7.3.2",
|
||||
"vue-popperjs": "^2.0.3",
|
||||
"vue-router": "^3.0.1",
|
||||
"vue-template-compiler": "^2.3.4",
|
||||
"vue-timeago": "^3.1.2",
|
||||
|
|
|
@ -10,6 +10,7 @@ import MediaModal from './components/media_modal/media_modal.vue'
|
|||
import SideDrawer from './components/side_drawer/side_drawer.vue'
|
||||
import MobilePostStatusModal from './components/mobile_post_status_modal/mobile_post_status_modal.vue'
|
||||
import MobileNav from './components/mobile_nav/mobile_nav.vue'
|
||||
import { windowWidth } from './services/window_utils/window_utils'
|
||||
|
||||
export default {
|
||||
name: 'app',
|
||||
|
@ -102,10 +103,10 @@ export default {
|
|||
this.finderHidden = hidden
|
||||
},
|
||||
updateMobileState () {
|
||||
const width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth
|
||||
const changed = width <= 800 !== this.isMobileLayout
|
||||
const mobileLayout = windowWidth() <= 800
|
||||
const changed = mobileLayout !== this.isMobileLayout
|
||||
if (changed) {
|
||||
this.$store.dispatch('setMobileLayout', width <= 800)
|
||||
this.$store.dispatch('setMobileLayout', mobileLayout)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,6 +101,14 @@ button {
|
|||
background-color: $fallback--bg;
|
||||
background-color: var(--bg, $fallback--bg)
|
||||
}
|
||||
|
||||
&.danger {
|
||||
// TODO: add better color variable
|
||||
color: $fallback--text;
|
||||
color: var(--alertErrorPanelText, $fallback--text);
|
||||
background-color: $fallback--alertError;
|
||||
background-color: var(--alertError, $fallback--alertError);
|
||||
}
|
||||
}
|
||||
|
||||
label.select {
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import routes from './routes'
|
||||
|
||||
import App from '../App.vue'
|
||||
import { windowWidth } from '../services/window_utils/window_utils'
|
||||
|
||||
const getStatusnetConfig = async ({ store }) => {
|
||||
try {
|
||||
const res = await window.fetch('/api/statusnet/config.json')
|
||||
if (res.ok) {
|
||||
const data = await res.json()
|
||||
const { name, closed: registrationClosed, textlimit, uploadlimit, server, vapidPublicKey } = data.site
|
||||
const { name, closed: registrationClosed, textlimit, uploadlimit, server, vapidPublicKey, safeDMMentionsEnabled } = data.site
|
||||
|
||||
store.dispatch('setInstanceOption', { name: 'name', value: name })
|
||||
store.dispatch('setInstanceOption', { name: 'registrationOpen', value: (registrationClosed === '0') })
|
||||
store.dispatch('setInstanceOption', { name: 'textlimit', value: parseInt(textlimit) })
|
||||
store.dispatch('setInstanceOption', { name: 'server', value: server })
|
||||
store.dispatch('setInstanceOption', { name: 'safeDM', value: safeDMMentionsEnabled !== '0' })
|
||||
|
||||
// TODO: default values for this stuff, added if to not make it break on
|
||||
// my dev config out of the box.
|
||||
|
@ -210,6 +211,7 @@ const getNodeInfo = async ({ store }) => {
|
|||
|
||||
const frontendVersion = window.___pleromafe_commit_hash
|
||||
store.dispatch('setInstanceOption', { name: 'frontendVersion', value: frontendVersion })
|
||||
store.dispatch('setInstanceOption', { name: 'tagPolicyAvailable', value: metadata.federation.mrf_policies.includes('TagPolicy') })
|
||||
} else {
|
||||
throw (res)
|
||||
}
|
||||
|
@ -219,6 +221,28 @@ const getNodeInfo = async ({ store }) => {
|
|||
}
|
||||
}
|
||||
|
||||
const setConfig = async ({ store }) => {
|
||||
// apiConfig, staticConfig
|
||||
const configInfos = await Promise.all([getStatusnetConfig({ store }), getStaticConfig()])
|
||||
const apiConfig = configInfos[0]
|
||||
const staticConfig = configInfos[1]
|
||||
|
||||
await setSettings({ store, apiConfig, staticConfig })
|
||||
}
|
||||
|
||||
const checkOAuthToken = async ({ store }) => {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
if (store.state.oauth.token) {
|
||||
try {
|
||||
await store.dispatch('loginUser', store.state.oauth.token)
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
|
||||
const afterStoreSetup = async ({ store, i18n }) => {
|
||||
if (store.state.config.customTheme) {
|
||||
// This is a hack to deal with async loading of config.json and themes
|
||||
|
@ -230,22 +254,19 @@ const afterStoreSetup = async ({ store, i18n }) => {
|
|||
})
|
||||
}
|
||||
|
||||
const width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth
|
||||
const width = windowWidth()
|
||||
store.dispatch('setMobileLayout', width <= 800)
|
||||
|
||||
const apiConfig = await getStatusnetConfig({ store })
|
||||
const staticConfig = await getStaticConfig()
|
||||
await setSettings({ store, apiConfig, staticConfig })
|
||||
await getTOS({ store })
|
||||
await getInstancePanel({ store })
|
||||
await getStaticEmoji({ store })
|
||||
await getCustomEmoji({ store })
|
||||
await getNodeInfo({ store })
|
||||
|
||||
// Now we have the server settings and can try logging in
|
||||
if (store.state.oauth.token) {
|
||||
await store.dispatch('loginUser', store.state.oauth.token)
|
||||
}
|
||||
// Now we can try getting the server settings and logging in
|
||||
await Promise.all([
|
||||
checkOAuthToken({ store }),
|
||||
setConfig({ store }),
|
||||
getTOS({ store }),
|
||||
getInstancePanel({ store }),
|
||||
getStaticEmoji({ store }),
|
||||
getCustomEmoji({ store }),
|
||||
getNodeInfo({ store })
|
||||
])
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
|
|
|
@ -10,7 +10,11 @@ const DeleteButton = {
|
|||
},
|
||||
computed: {
|
||||
currentUser () { return this.$store.state.users.currentUser },
|
||||
canDelete () { return this.currentUser && this.currentUser.rights.delete_others_notice || this.status.user.id === this.currentUser.id }
|
||||
canDelete () {
|
||||
if (!this.currentUser) { return }
|
||||
const superuser = this.currentUser.rights.moderator || this.currentUser.rights.admin
|
||||
return superuser || this.status.user.id === this.currentUser.id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
14
src/components/dialog_modal/dialog_modal.js
Normal file
14
src/components/dialog_modal/dialog_modal.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
const DialogModal = {
|
||||
props: {
|
||||
darkOverlay: {
|
||||
default: true,
|
||||
type: Boolean
|
||||
},
|
||||
onCancel: {
|
||||
default: () => {},
|
||||
type: Function
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default DialogModal
|
92
src/components/dialog_modal/dialog_modal.vue
Normal file
92
src/components/dialog_modal/dialog_modal.vue
Normal file
|
@ -0,0 +1,92 @@
|
|||
<template>
|
||||
<span v-bind:class="{ 'dark-overlay': darkOverlay }" @click.self.stop='onCancel()'>
|
||||
<div class="dialog-modal panel panel-default" @click.stop=''>
|
||||
<div class="panel-heading dialog-modal-heading">
|
||||
<div class="title">
|
||||
<slot name="header"></slot>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog-modal-content">
|
||||
<slot name="default"></slot>
|
||||
</div>
|
||||
<div class="dialog-modal-footer user-interactions panel-footer">
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script src="./dialog_modal.js"></script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '../../_variables.scss';
|
||||
|
||||
// TODO: unify with other modals.
|
||||
.dark-overlay {
|
||||
&::before {
|
||||
bottom: 0;
|
||||
content: " ";
|
||||
display: block;
|
||||
cursor: default;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
background: rgba(27,31,35,.5);
|
||||
z-index: 99;
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-modal.panel {
|
||||
top: 0;
|
||||
left: 50%;
|
||||
max-height: 80vh;
|
||||
max-width: 90vw;
|
||||
margin: 15vh auto;
|
||||
position: fixed;
|
||||
transform: translateX(-50%);
|
||||
z-index: 999;
|
||||
cursor: default;
|
||||
display: block;
|
||||
background-color: $fallback--bg;
|
||||
background-color: var(--bg, $fallback--bg);
|
||||
|
||||
.dialog-modal-heading {
|
||||
padding: .5em .5em;
|
||||
margin-right: auto;
|
||||
margin-bottom: 0;
|
||||
white-space: nowrap;
|
||||
color: var(--panelText);
|
||||
background-color: $fallback--fg;
|
||||
background-color: var(--panel, $fallback--fg);
|
||||
|
||||
.title {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-modal-content {
|
||||
margin: 0;
|
||||
padding: 1rem 1rem;
|
||||
background-color: $fallback--lightBg;
|
||||
background-color: var(--lightBg, $fallback--lightBg);
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.dialog-modal-footer {
|
||||
margin: 0;
|
||||
padding: .5em .5em;
|
||||
background-color: $fallback--lightBg;
|
||||
background-color: var(--lightBg, $fallback--lightBg);
|
||||
border-top: 1px solid $fallback--bg;
|
||||
border-top: 1px solid var(--bg, $fallback--bg);
|
||||
justify-content: flex-end;
|
||||
|
||||
button {
|
||||
width: auto;
|
||||
margin-left: .5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
106
src/components/moderation_tools/moderation_tools.js
Normal file
106
src/components/moderation_tools/moderation_tools.js
Normal file
|
@ -0,0 +1,106 @@
|
|||
import DialogModal from '../dialog_modal/dialog_modal.vue'
|
||||
import Popper from 'vue-popperjs/src/component/popper.js.vue'
|
||||
|
||||
const FORCE_NSFW = 'mrf_tag:media-force-nsfw'
|
||||
const STRIP_MEDIA = 'mrf_tag:media-strip'
|
||||
const FORCE_UNLISTED = 'mrf_tag:force-unlisted'
|
||||
const DISABLE_REMOTE_SUBSCRIPTION = 'mrf_tag:disable-remote-subscription'
|
||||
const DISABLE_ANY_SUBSCRIPTION = 'mrf_tag:disable-any-subscription'
|
||||
const SANDBOX = 'mrf_tag:sandbox'
|
||||
const QUARANTINE = 'mrf_tag:quarantine'
|
||||
|
||||
const ModerationTools = {
|
||||
props: [
|
||||
'user'
|
||||
],
|
||||
data () {
|
||||
return {
|
||||
showDropDown: false,
|
||||
tags: {
|
||||
FORCE_NSFW,
|
||||
STRIP_MEDIA,
|
||||
FORCE_UNLISTED,
|
||||
DISABLE_REMOTE_SUBSCRIPTION,
|
||||
DISABLE_ANY_SUBSCRIPTION,
|
||||
SANDBOX,
|
||||
QUARANTINE
|
||||
},
|
||||
showDeleteUserDialog: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
DialogModal,
|
||||
Popper
|
||||
},
|
||||
computed: {
|
||||
tagsSet () {
|
||||
return new Set(this.user.tags)
|
||||
},
|
||||
hasTagPolicy () {
|
||||
return this.$store.state.instance.tagPolicyAvailable
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleMenu () {
|
||||
this.showDropDown = !this.showDropDown
|
||||
},
|
||||
hasTag (tagName) {
|
||||
return this.tagsSet.has(tagName)
|
||||
},
|
||||
toggleTag (tag) {
|
||||
const store = this.$store
|
||||
if (this.tagsSet.has(tag)) {
|
||||
store.state.api.backendInteractor.untagUser(this.user, tag).then(response => {
|
||||
if (!response.ok) { return }
|
||||
store.commit('untagUser', {user: this.user, tag})
|
||||
})
|
||||
} else {
|
||||
store.state.api.backendInteractor.tagUser(this.user, tag).then(response => {
|
||||
if (!response.ok) { return }
|
||||
store.commit('tagUser', {user: this.user, tag})
|
||||
})
|
||||
}
|
||||
},
|
||||
toggleRight (right) {
|
||||
const store = this.$store
|
||||
if (this.user.rights[right]) {
|
||||
store.state.api.backendInteractor.deleteRight(this.user, right).then(response => {
|
||||
if (!response.ok) { return }
|
||||
store.commit('updateRight', {user: this.user, right: right, value: false})
|
||||
})
|
||||
} else {
|
||||
store.state.api.backendInteractor.addRight(this.user, right).then(response => {
|
||||
if (!response.ok) { return }
|
||||
store.commit('updateRight', {user: this.user, right: right, value: true})
|
||||
})
|
||||
}
|
||||
},
|
||||
toggleActivationStatus () {
|
||||
const store = this.$store
|
||||
const status = !!this.user.deactivated
|
||||
store.state.api.backendInteractor.setActivationStatus(this.user, status).then(response => {
|
||||
if (!response.ok) { return }
|
||||
store.commit('updateActivationStatus', {user: this.user, status: status})
|
||||
})
|
||||
},
|
||||
deleteUserDialog (show) {
|
||||
this.showDeleteUserDialog = show
|
||||
},
|
||||
deleteUser () {
|
||||
const store = this.$store
|
||||
const user = this.user
|
||||
const {id, name} = user
|
||||
store.state.api.backendInteractor.deleteUser(user)
|
||||
.then(e => {
|
||||
this.$store.dispatch('markStatusesAsDeleted', status => user.id === status.user.id)
|
||||
const isProfile = this.$route.name === 'external-user-profile' || this.$route.name === 'user-profile'
|
||||
const isTargetUser = this.$route.params.name === name || this.$route.params.id === id
|
||||
if (isProfile && isTargetUser) {
|
||||
window.history.back()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default ModerationTools
|
158
src/components/moderation_tools/moderation_tools.vue
Normal file
158
src/components/moderation_tools/moderation_tools.vue
Normal file
|
@ -0,0 +1,158 @@
|
|||
<template>
|
||||
<div class='block' style='position: relative'>
|
||||
<Popper
|
||||
trigger="click"
|
||||
@hide='showDropDown = false'
|
||||
append-to-body
|
||||
:options="{
|
||||
placement: 'bottom-end',
|
||||
modifiers: {
|
||||
arrow: { enabled: true },
|
||||
offset: { offset: '0, 5px' },
|
||||
}
|
||||
}">
|
||||
<div class="popper-wrapper">
|
||||
<div class="dropdown-menu">
|
||||
<span v-if='user.is_local'>
|
||||
<button class="dropdown-item" @click='toggleRight("admin")'>
|
||||
{{ $t(!!user.rights.admin ? 'user_card.admin_menu.revoke_admin' : 'user_card.admin_menu.grant_admin') }}
|
||||
</button>
|
||||
<button class="dropdown-item" @click='toggleRight("moderator")'>
|
||||
{{ $t(!!user.rights.moderator ? 'user_card.admin_menu.revoke_moderator' : 'user_card.admin_menu.grant_moderator') }}
|
||||
</button>
|
||||
<div role="separator" class="dropdown-divider"></div>
|
||||
</span>
|
||||
<button class="dropdown-item" @click='toggleActivationStatus()'>
|
||||
{{ $t(!!user.deactivated ? 'user_card.admin_menu.activate_account' : 'user_card.admin_menu.deactivate_account') }}
|
||||
</button>
|
||||
<button class="dropdown-item" @click='deleteUserDialog(true)'>
|
||||
{{ $t('user_card.admin_menu.delete_account') }}
|
||||
</button>
|
||||
<div role="separator" class="dropdown-divider" v-if='hasTagPolicy'></div>
|
||||
<span v-if='hasTagPolicy'>
|
||||
<button class="dropdown-item" @click='toggleTag(tags.FORCE_NSFW)'>
|
||||
{{ $t('user_card.admin_menu.force_nsfw') }}
|
||||
<span class="menu-checkbox" v-bind:class="{ 'menu-checkbox-checked': hasTag(tags.FORCE_NSFW) }"></span>
|
||||
</button>
|
||||
<button class="dropdown-item" @click='toggleTag(tags.STRIP_MEDIA)'>
|
||||
{{ $t('user_card.admin_menu.strip_media') }}
|
||||
<span class="menu-checkbox" v-bind:class="{ 'menu-checkbox-checked': hasTag(tags.STRIP_MEDIA) }"></span>
|
||||
</button>
|
||||
<button class="dropdown-item" @click='toggleTag(tags.FORCE_UNLISTED)'>
|
||||
{{ $t('user_card.admin_menu.force_unlisted') }}
|
||||
<span class="menu-checkbox" v-bind:class="{ 'menu-checkbox-checked': hasTag(tags.FORCE_UNLISTED) }"></span>
|
||||
</button>
|
||||
<button class="dropdown-item" @click='toggleTag(tags.SANDBOX)'>
|
||||
{{ $t('user_card.admin_menu.sandbox') }}
|
||||
<span class="menu-checkbox" v-bind:class="{ 'menu-checkbox-checked': hasTag(tags.SANDBOX) }"></span>
|
||||
</button>
|
||||
<button class="dropdown-item" v-if='user.is_local' @click='toggleTag(tags.DISABLE_REMOTE_SUBSCRIPTION)'>
|
||||
{{ $t('user_card.admin_menu.disable_remote_subscription') }}
|
||||
<span class="menu-checkbox" v-bind:class="{ 'menu-checkbox-checked': hasTag(tags.DISABLE_REMOTE_SUBSCRIPTION) }"></span>
|
||||
</button>
|
||||
<button class="dropdown-item" v-if='user.is_local' @click='toggleTag(tags.DISABLE_ANY_SUBSCRIPTION)'>
|
||||
{{ $t('user_card.admin_menu.disable_any_subscription') }}
|
||||
<span class="menu-checkbox" v-bind:class="{ 'menu-checkbox-checked': hasTag(tags.DISABLE_ANY_SUBSCRIPTION) }"></span>
|
||||
</button>
|
||||
<button class="dropdown-item" v-if='user.is_local' @click='toggleTag(tags.QUARANTINE)'>
|
||||
{{ $t('user_card.admin_menu.quarantine') }}
|
||||
<span class="menu-checkbox" v-bind:class="{ 'menu-checkbox-checked': hasTag(tags.QUARANTINE) }"></span>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<button slot="reference" v-bind:class="{ pressed: showDropDown }" @click='toggleMenu'>
|
||||
{{ $t('user_card.admin_menu.moderation') }}
|
||||
</button>
|
||||
</Popper>
|
||||
<DialogModal v-if="showDeleteUserDialog" :onCancel='deleteUserDialog.bind(this, false)'>
|
||||
<span slot="header">{{ $t('user_card.admin_menu.delete_user') }}</span>
|
||||
<p>{{ $t('user_card.admin_menu.delete_user_confirmation') }}</p>
|
||||
<span slot="footer">
|
||||
<button @click='deleteUserDialog(false)'>
|
||||
{{ $t('general.cancel') }}
|
||||
</button>
|
||||
<button class="danger" @click='deleteUser()'>
|
||||
{{ $t('user_card.admin_menu.delete_user') }}
|
||||
</button>
|
||||
</span>
|
||||
</DialogModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="./moderation_tools.js"></script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '../../_variables.scss';
|
||||
@import '../popper/popper.scss';
|
||||
|
||||
.dropdown-menu {
|
||||
display: block;
|
||||
padding: .5rem 0;
|
||||
font-size: 1rem;
|
||||
text-align: left;
|
||||
list-style: none;
|
||||
max-width: 100vw;
|
||||
z-index: 10;
|
||||
box-shadow: 1px 1px 4px rgba(0,0,0,.6);
|
||||
box-shadow: var(--panelShadow);
|
||||
border: none;
|
||||
border-radius: $fallback--btnRadius;
|
||||
border-radius: var(--btnRadius, $fallback--btnRadius);
|
||||
background-color: $fallback--bg;
|
||||
background-color: var(--bg, $fallback--bg);
|
||||
|
||||
.dropdown-divider {
|
||||
height: 0;
|
||||
margin: .5rem 0;
|
||||
overflow: hidden;
|
||||
border-top: 1px solid $fallback--border;
|
||||
border-top: 1px solid var(--border, $fallback--border);
|
||||
}
|
||||
|
||||
.dropdown-item {
|
||||
line-height: 21px;
|
||||
margin-right: 5px;
|
||||
overflow: auto;
|
||||
display: block;
|
||||
padding: .25rem 1.0rem .25rem 1.5rem;
|
||||
clear: both;
|
||||
font-weight: 400;
|
||||
text-align: inherit;
|
||||
white-space: normal;
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
&:hover {
|
||||
// TODO: improve the look on breeze themes
|
||||
background-color: $fallback--fg;
|
||||
background-color: var(--btn, $fallback--fg);
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-checkbox {
|
||||
float: right;
|
||||
min-width: 22px;
|
||||
max-width: 22px;
|
||||
min-height: 22px;
|
||||
max-height: 22px;
|
||||
line-height: 22px;
|
||||
text-align: center;
|
||||
border-radius: 0px;
|
||||
background-color: $fallback--fg;
|
||||
background-color: var(--input, $fallback--fg);
|
||||
box-shadow: 0px 0px 2px black inset;
|
||||
box-shadow: var(--inputShadow);
|
||||
|
||||
&.menu-checkbox-checked::after {
|
||||
content: '✔';
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
|
@ -21,6 +21,9 @@ const Notification = {
|
|||
},
|
||||
userProfileLink (user) {
|
||||
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
|
||||
},
|
||||
getUser (notification) {
|
||||
return this.$store.state.users.usersObject[notification.action.user.id]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<UserAvatar :compact="true" :betterShadow="betterShadow" :src="notification.from_profile.profile_image_url_original" />
|
||||
</a>
|
||||
<div class='notification-right'>
|
||||
<UserCard :user="user" :rounded="true" :bordered="true" v-if="userExpanded" />
|
||||
<UserCard :user="getUser(notification)" :rounded="true" :bordered="true" v-if="userExpanded" />
|
||||
<span class="notification-details">
|
||||
<div class="name-and-action">
|
||||
<span class="username" v-if="!!notification.from_profile.name_html" :title="'@'+notification.from_profile.screen_name" v-html="notification.from_profile.name_html"></span>
|
||||
|
|
70
src/components/popper/popper.scss
Normal file
70
src/components/popper/popper.scss
Normal file
|
@ -0,0 +1,70 @@
|
|||
@import '../../_variables.scss';
|
||||
|
||||
.popper-wrapper {
|
||||
z-index: 8;
|
||||
}
|
||||
|
||||
.popper-wrapper .popper__arrow {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-style: solid;
|
||||
position: absolute;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.popper-wrapper[x-placement^="top"] {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.popper-wrapper[x-placement^="top"] .popper__arrow {
|
||||
border-width: 5px 5px 0 5px;
|
||||
border-color: $fallback--bg transparent transparent transparent;
|
||||
border-color: var(--bg, $fallback--bg) transparent transparent transparent;
|
||||
bottom: -5px;
|
||||
left: calc(50% - 5px);
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.popper-wrapper[x-placement^="bottom"] {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.popper-wrapper[x-placement^="bottom"] .popper__arrow {
|
||||
border-width: 0 5px 5px 5px;
|
||||
border-color: transparent transparent $fallback--bg transparent;
|
||||
border-color: transparent transparent var(--bg, $fallback--bg) transparent;
|
||||
top: -5px;
|
||||
left: calc(50% - 5px);
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.popper-wrapper[x-placement^="right"] {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.popper-wrapper[x-placement^="right"] .popper__arrow {
|
||||
border-width: 5px 5px 5px 0;
|
||||
border-color: transparent $fallback--bg transparent transparent;
|
||||
border-color: transparent var(--bg, $fallback--bg) transparent transparent;
|
||||
left: -5px;
|
||||
top: calc(50% - 5px);
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.popper-wrapper[x-placement^="left"] {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.popper-wrapper[x-placement^="left"] .popper__arrow {
|
||||
border-width: 5px 0 5px 5px;
|
||||
border-color: transparent transparent transparent $fallback--bg;
|
||||
border-color: transparent transparent transparent var(--bg, $fallback--bg);
|
||||
right: -5px;
|
||||
top: calc(50% - 5px);
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
|
@ -179,6 +179,9 @@ const PostStatusForm = {
|
|||
},
|
||||
postFormats () {
|
||||
return this.$store.state.instance.postFormats || []
|
||||
},
|
||||
safeDMEnabled () {
|
||||
return this.$store.state.instance.safeDM
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -3,13 +3,16 @@
|
|||
<form @submit.prevent="postStatus(newStatus)">
|
||||
<div class="form-group" >
|
||||
<i18n
|
||||
v-if="!this.$store.state.users.currentUser.locked && this.newStatus.visibility == 'private'"
|
||||
v-if="!$store.state.users.currentUser.locked && newStatus.visibility == 'private'"
|
||||
path="post_status.account_not_locked_warning"
|
||||
tag="p"
|
||||
class="visibility-notice">
|
||||
<router-link :to="{ name: 'user-settings' }">{{ $t('post_status.account_not_locked_warning_link') }}</router-link>
|
||||
</i18n>
|
||||
<p v-if="this.newStatus.visibility == 'direct'" class="visibility-notice">{{ $t('post_status.direct_warning') }}</p>
|
||||
<p v-if="newStatus.visibility === 'direct'" class="visibility-notice">
|
||||
<span v-if="safeDMEnabled">{{ $t('post_status.direct_warning_to_first_only') }}</span>
|
||||
<span v-else>{{ $t('post_status.direct_warning_to_all') }}</span>
|
||||
</p>
|
||||
<EmojiInput
|
||||
v-if="newStatus.spoilerText || alwaysShowSubject"
|
||||
type="text"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import UserAvatar from '../user_avatar/user_avatar.vue'
|
||||
import RemoteFollow from '../remote_follow/remote_follow.vue'
|
||||
import ModerationTools from '../moderation_tools/moderation_tools.vue'
|
||||
import { hex2rgb } from '../../services/color_convert/color_convert.js'
|
||||
import { requestFollow, requestUnfollow } from '../../services/follow_manipulate/follow_manipulate'
|
||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||
|
@ -93,15 +94,17 @@ export default {
|
|||
}
|
||||
},
|
||||
visibleRole () {
|
||||
const validRole = (this.user.role === 'admin' || this.user.role === 'moderator')
|
||||
const showRole = this.isOtherUser || this.user.show_role
|
||||
|
||||
return validRole && showRole && this.user.role
|
||||
const rights = this.user.rights
|
||||
if (!rights) { return }
|
||||
const validRole = rights.admin || rights.moderator
|
||||
const roleTitle = rights.admin ? 'admin' : 'moderator'
|
||||
return validRole && roleTitle
|
||||
}
|
||||
},
|
||||
components: {
|
||||
UserAvatar,
|
||||
RemoteFollow
|
||||
RemoteFollow,
|
||||
ModerationTools
|
||||
},
|
||||
methods: {
|
||||
followUser () {
|
||||
|
|
|
@ -99,6 +99,8 @@
|
|||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<ModerationTools :user='user' v-if='loggedIn.role === "admin"'>
|
||||
</ModerationTools>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,6 +3,7 @@ import get from 'lodash/get'
|
|||
import UserCard from '../user_card/user_card.vue'
|
||||
import FollowCard from '../follow_card/follow_card.vue'
|
||||
import Timeline from '../timeline/timeline.vue'
|
||||
import ModerationTools from '../moderation_tools/moderation_tools.vue'
|
||||
import withLoadMore from '../../hocs/with_load_more/with_load_more'
|
||||
import withList from '../../hocs/with_list/with_list'
|
||||
|
||||
|
@ -155,7 +156,8 @@ const UserProfile = {
|
|||
UserCard,
|
||||
Timeline,
|
||||
FollowerList,
|
||||
FriendList
|
||||
FriendList,
|
||||
ModerationTools
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
"generic_error": "An error occured",
|
||||
"optional": "optional",
|
||||
"show_more": "Show more",
|
||||
"show_less": "Show less"
|
||||
"show_less": "Show less",
|
||||
"cancel": "Cancel"
|
||||
},
|
||||
"image_cropper": {
|
||||
"crop_picture": "Crop picture",
|
||||
|
@ -80,7 +81,8 @@
|
|||
},
|
||||
"content_warning": "Subject (optional)",
|
||||
"default": "Just landed in L.A.",
|
||||
"direct_warning": "This post will only be visible to all the mentioned users.",
|
||||
"direct_warning_to_all": "This post will be visible to all the mentioned users.",
|
||||
"direct_warning_to_first_only": "This post will only be visible to the mentioned users at the beginning of the message.",
|
||||
"posting": "Posting",
|
||||
"scope": {
|
||||
"direct": "Direct - Post to mentioned users only",
|
||||
|
@ -402,7 +404,26 @@
|
|||
"block_progress": "Blocking...",
|
||||
"unmute": "Unmute",
|
||||
"unmute_progress": "Unmuting...",
|
||||
"mute_progress": "Muting..."
|
||||
"mute_progress": "Muting...",
|
||||
"admin_menu": {
|
||||
"moderation": "Moderation",
|
||||
"grant_admin": "Grant Admin",
|
||||
"revoke_admin": "Revoke Admin",
|
||||
"grant_moderator": "Grant Moderator",
|
||||
"revoke_moderator": "Revoke Moderator",
|
||||
"activate_account": "Activate account",
|
||||
"deactivate_account": "Deactivate account",
|
||||
"delete_account": "Delete account",
|
||||
"force_nsfw": "Mark all posts as NSFW",
|
||||
"strip_media": "Remove media from posts",
|
||||
"force_unlisted": "Force posts to be unlisted",
|
||||
"sandbox": "Force posts to be followers-only",
|
||||
"disable_remote_subscription": "Disallow following user from remote instances",
|
||||
"disable_any_subscription": "Disallow following user at all",
|
||||
"quarantine": "Disallow user posts from federating",
|
||||
"delete_user": "Delete user",
|
||||
"delete_user_confirmation": "Are you absolutely sure? This action cannot be undone."
|
||||
}
|
||||
},
|
||||
"user_profile": {
|
||||
"timeline_title": "User Timeline",
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
"image_cropper": {
|
||||
"crop_picture": "Talhar l’imatge",
|
||||
"save": "Salvar",
|
||||
"save_without_cropping": "Salvar sens talhada",
|
||||
"cancel": "Anullar"
|
||||
},
|
||||
"login": {
|
||||
|
@ -152,6 +153,7 @@
|
|||
"general": "General",
|
||||
"hide_attachments_in_convo": "Rescondre las pèças juntas dins las conversacions",
|
||||
"hide_attachments_in_tl": "Rescondre las pèças juntas",
|
||||
"hide_muted_posts": "Rescondre las publicacions del monde rescondut",
|
||||
"max_thumbnails": "Nombre maximum de vinhetas per publicacion",
|
||||
"hide_isp": "Amagar lo panèl especial instància",
|
||||
"preload_images": "Precargar los imatges",
|
||||
|
|
332
src/i18n/pl.json
332
src/i18n/pl.json
|
@ -2,48 +2,114 @@
|
|||
"chat": {
|
||||
"title": "Czat"
|
||||
},
|
||||
"features_panel": {
|
||||
"chat": "Czat",
|
||||
"gopher": "Gopher",
|
||||
"media_proxy": "Proxy mediów",
|
||||
"scope_options": "Ustawienia zakresu",
|
||||
"text_limit": "Limit tekstu",
|
||||
"title": "Funkcje",
|
||||
"who_to_follow": "Propozycje obserwacji"
|
||||
},
|
||||
"finder": {
|
||||
"error_fetching_user": "Błąd przy pobieraniu profilu",
|
||||
"find_user": "Znajdź użytkownika"
|
||||
},
|
||||
"general": {
|
||||
"apply": "Zastosuj",
|
||||
"submit": "Wyślij"
|
||||
"submit": "Wyślij",
|
||||
"more": "Więcej",
|
||||
"generic_error": "Wystąpił błąd",
|
||||
"optional": "nieobowiązkowe"
|
||||
},
|
||||
"image_cropper": {
|
||||
"crop_picture": "Przytnij obrazek",
|
||||
"save": "Zapisz",
|
||||
"save_without_cropping": "Zapisz bez przycinania",
|
||||
"cancel": "Anuluj"
|
||||
},
|
||||
"login": {
|
||||
"login": "Zaloguj",
|
||||
"description": "Zaloguj używając OAuth",
|
||||
"logout": "Wyloguj",
|
||||
"password": "Hasło",
|
||||
"placeholder": "n.p. lain",
|
||||
"register": "Zarejestruj",
|
||||
"username": "Użytkownik"
|
||||
"username": "Użytkownik",
|
||||
"hint": "Zaloguj się, aby dołączyć do dyskusji"
|
||||
},
|
||||
"media_modal": {
|
||||
"previous": "Poprzednie",
|
||||
"next": "Następne"
|
||||
},
|
||||
"nav": {
|
||||
"about": "O nas",
|
||||
"back": "Wróć",
|
||||
"chat": "Lokalny czat",
|
||||
"friend_requests": "Prośby o możliwość obserwacji",
|
||||
"mentions": "Wzmianki",
|
||||
"dms": "Wiadomości prywatne",
|
||||
"public_tl": "Publiczna oś czasu",
|
||||
"timeline": "Oś czasu",
|
||||
"twkn": "Cała znana sieć"
|
||||
"twkn": "Cała znana sieć",
|
||||
"user_search": "Wyszukiwanie użytkowników",
|
||||
"who_to_follow": "Sugestie obserwacji",
|
||||
"preferences": "Preferencje"
|
||||
},
|
||||
"notifications": {
|
||||
"favorited_you": "dodał twój status do ulubionych",
|
||||
"broken_favorite": "Nieznany status, szukam go…",
|
||||
"favorited_you": "dodał(-a) twój status do ulubionych",
|
||||
"followed_you": "obserwuje cię",
|
||||
"load_older": "Załaduj starsze powiadomienia",
|
||||
"notifications": "Powiadomienia",
|
||||
"read": "Przeczytane!",
|
||||
"repeated_you": "powtórzył twój status"
|
||||
"repeated_you": "powtórzył(-a) twój status",
|
||||
"no_more_notifications": "Nie masz więcej powiadomień"
|
||||
},
|
||||
"post_status": {
|
||||
"new_status": "Dodaj nowy status",
|
||||
"account_not_locked_warning": "Twoje konto nie jest {0}. Każdy może cię zaobserwować aby zobaczyć wpisy tylko dla obserwujących.",
|
||||
"account_not_locked_warning_link": "zablokowane",
|
||||
"attachments_sensitive": "Oznacz załączniki jako wrażliwe",
|
||||
"content_type": {
|
||||
"text/plain": "Czysty tekst",
|
||||
"text/html": "HTML",
|
||||
"text/markdown": "Markdown"
|
||||
},
|
||||
"content_warning": "Temat (nieobowiązkowy)",
|
||||
"default": "Właśnie wróciłem z kościoła",
|
||||
"posting": "Wysyłanie"
|
||||
"direct_warning": "Ten wpis zobaczą tylko osoby, o których wspomniałeś(-aś).",
|
||||
"posting": "Wysyłanie",
|
||||
"scope": {
|
||||
"direct": "Bezpośredni – Tylko dla wspomnianych użytkowników",
|
||||
"private": "Tylko dla obserwujących – Umieść dla osób, które cię obserwują",
|
||||
"public": "Publiczny – Umieść na publicznych osiach czasu",
|
||||
"unlisted": "Niewidoczny – Nie umieszczaj na publicznych osiach czasu"
|
||||
}
|
||||
},
|
||||
"registration": {
|
||||
"bio": "Bio",
|
||||
"email": "Email",
|
||||
"email": "E-mail",
|
||||
"fullname": "Wyświetlana nazwa profilu",
|
||||
"password_confirm": "Potwierdzenie hasła",
|
||||
"registration": "Rejestracja"
|
||||
"registration": "Rejestracja",
|
||||
"token": "Token zaproszenia",
|
||||
"captcha": "CAPTCHA",
|
||||
"new_captcha": "Naciśnij na obrazek, aby dostać nowy kod captcha",
|
||||
"username_placeholder": "np. lain",
|
||||
"fullname_placeholder": "np. Lain Iwakura",
|
||||
"bio_placeholder": "e.g.\nCześć, jestem Lain.\nJestem dziewczynką z anime żyjącą na peryferiach Japonii. Możesz znać mnie z Wired.",
|
||||
"validations": {
|
||||
"username_required": "nie może być pusta",
|
||||
"fullname_required": "nie może być pusta",
|
||||
"email_required": "nie może być pusty",
|
||||
"password_required": "nie może być puste",
|
||||
"password_confirmation_required": "nie może być puste",
|
||||
"password_confirmation_match": "musi być takie jak hasło"
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"app_name": "Nazwa aplikacji",
|
||||
"attachmentRadius": "Załączniki",
|
||||
"attachments": "Załączniki",
|
||||
"autoload": "Włącz automatyczne ładowanie po przewinięciu do końca strony",
|
||||
|
@ -52,6 +118,7 @@
|
|||
"avatarRadius": "Awatary",
|
||||
"background": "Tło",
|
||||
"bio": "Bio",
|
||||
"blocks_tab": "Bloki",
|
||||
"btnRadius": "Przyciski",
|
||||
"cBlue": "Niebieski (odpowiedz, obserwuj)",
|
||||
"cGreen": "Zielony (powtórzenia)",
|
||||
|
@ -59,15 +126,21 @@
|
|||
"cRed": "Czerwony (anuluj)",
|
||||
"change_password": "Zmień hasło",
|
||||
"change_password_error": "Podczas zmiany hasła wystąpił problem.",
|
||||
"changed_password": "Hasło zmienione poprawnie!",
|
||||
"changed_password": "Pomyślnie zmieniono hasło!",
|
||||
"collapse_subject": "Zwijaj posty z tematami",
|
||||
"composing": "Pisanie",
|
||||
"confirm_new_password": "Potwierdź nowe hasło",
|
||||
"current_avatar": "Twój obecny awatar",
|
||||
"current_password": "Obecne hasło",
|
||||
"current_profile_banner": "Twój obecny banner profilu",
|
||||
"data_import_export_tab": "Import/eksport danych",
|
||||
"default_vis": "Domyślny zakres widoczności",
|
||||
"delete_account": "Usuń konto",
|
||||
"delete_account_description": "Trwale usuń konto i wszystkie posty.",
|
||||
"delete_account_error": "Wystąpił problem z usuwaniem twojego konta. Jeżeli problem powtarza się, poinformuj administratora swojej instancji.",
|
||||
"delete_account_instructions": "Wprowadź swoje hasło w poniższe pole aby potwierdzić usunięcie konta.",
|
||||
"avatar_size_instruction": "Zalecany minimalny rozmiar awatarów to 150x150 pikseli.",
|
||||
"export_theme": "Zapisz motyw",
|
||||
"filtering": "Filtrowanie",
|
||||
"filtering_explanation": "Wszystkie statusy zawierające te słowa będą wyciszone. Jedno słowo na linijkę.",
|
||||
"follow_export": "Eksport obserwowanych",
|
||||
|
@ -77,14 +150,49 @@
|
|||
"follow_import_error": "Błąd przy importowaniu obserwowanych",
|
||||
"follows_imported": "Obserwowani zaimportowani! Przetwarzanie może trochę potrwać.",
|
||||
"foreground": "Pierwszy plan",
|
||||
"hide_attachments_in_convo": "Ukryj załączniki w rozmowach",
|
||||
"hide_attachments_in_tl": "Ukryj załączniki w osi czasu",
|
||||
"general": "Ogólne",
|
||||
"hide_attachments_in_convo": "Ukrywaj załączniki w rozmowach",
|
||||
"hide_attachments_in_tl": "Ukrywaj załączniki w osi czasu",
|
||||
"hide_muted_posts": "Ukrywaj wpisy wyciszonych użytkowników",
|
||||
"max_thumbnails": "Maksymalna liczba miniatur w poście",
|
||||
"hide_isp": "Ukryj panel informacji o instancji",
|
||||
"preload_images": "Ładuj wstępnie obrazy",
|
||||
"use_one_click_nsfw": "Otwieraj załączniki NSFW jednym kliknięciem",
|
||||
"hide_post_stats": "Ukrywaj statysyki postów (np. liczbę polubień)",
|
||||
"hide_user_stats": "Ukrywaj statysyki użytkowników (np. liczbę obserwujących)",
|
||||
"hide_filtered_statuses": "Ukrywaj filtrowane statusy",
|
||||
"import_followers_from_a_csv_file": "Importuj obserwowanych z pliku CSV",
|
||||
"import_theme": "Załaduj motyw",
|
||||
"inputRadius": "Pola tekstowe",
|
||||
"checkboxRadius": "Pola wyboru",
|
||||
"instance_default": "(domyślny: {value})",
|
||||
"instance_default_simple": "(domyślny)",
|
||||
"interface": "Interfejs",
|
||||
"interfaceLanguage": "Język interfejsu",
|
||||
"invalid_theme_imported": "Wybrany plik nie jest obsługiwanym motywem Pleromy. Nie dokonano zmian w twoim motywie.",
|
||||
"limited_availability": "Niedostępne w twojej przeglądarce",
|
||||
"links": "Łącza",
|
||||
"lock_account_description": "Ogranicz swoje konto dla zatwierdzonych obserwowanych",
|
||||
"loop_video": "Zapętlaj filmy",
|
||||
"loop_video_silent_only": "Zapętlaj tylko filmy bez dźwięku (np. mastodonowe „gify”)",
|
||||
"mutes_tab": "Wyciszenia",
|
||||
"play_videos_in_modal": "Odtwarzaj filmy bezpośrednio w przeglądarce mediów",
|
||||
"use_contain_fit": "Nie przycinaj załączników na miniaturach",
|
||||
"name": "Imię",
|
||||
"name_bio": "Imię i bio",
|
||||
"new_password": "Nowe hasło",
|
||||
"notification_visibility": "Rodzaje powiadomień do wyświetlania",
|
||||
"notification_visibility_follows": "Obserwacje",
|
||||
"notification_visibility_likes": "Ulubione",
|
||||
"notification_visibility_mentions": "Wzmianki",
|
||||
"notification_visibility_repeats": "Powtórzenia",
|
||||
"no_rich_text_description": "Usuwaj formatowanie ze wszystkich postów",
|
||||
"no_blocks": "Bez blokad",
|
||||
"no_mutes": "Bez wyciszeń",
|
||||
"hide_follows_description": "Nie pokazuj kogo obserwuję",
|
||||
"hide_followers_description": "Nie pokazuj kto mnie obserwuje",
|
||||
"show_admin_badge": "Pokazuj odznakę Administrator na moim profilu",
|
||||
"show_moderator_badge": "Pokazuj odznakę Moderator na moim profilu",
|
||||
"nsfw_clickthrough": "Włącz domyślne ukrywanie załączników o treści nieprzyzwoitej (NSFW)",
|
||||
"oauth_tokens": "Tokeny OAuth",
|
||||
"token": "Token",
|
||||
|
@ -92,47 +200,235 @@
|
|||
"valid_until": "Ważne do",
|
||||
"revoke_token": "Odwołać",
|
||||
"panelRadius": "Panele",
|
||||
"pause_on_unfocused": "Wstrzymuj strumieniowanie kiedy karta nie jest aktywna",
|
||||
"presets": "Gotowe motywy",
|
||||
"profile_background": "Tło profilu",
|
||||
"profile_banner": "Banner profilu",
|
||||
"profile_tab": "Profil",
|
||||
"radii_help": "Ustaw zaokrąglenie krawędzi interfejsu (w pikselach)",
|
||||
"replies_in_timeline": "Odpowiedzi na osi czasu",
|
||||
"reply_link_preview": "Włącz dymek z podglądem postu po najechaniu na znak odpowiedzi",
|
||||
"reply_visibility_all": "Pokazuj wszystkie odpowiedzi",
|
||||
"reply_visibility_following": "Pokazuj tylko odpowiedzi skierowane do mnie i osób które obserwuję",
|
||||
"reply_visibility_self": "Pokazuj tylko odpowiedzi skierowane do mnie",
|
||||
"saving_err": "Nie udało się zapisać ustawień",
|
||||
"saving_ok": "Zapisano ustawienia",
|
||||
"security_tab": "Bezpieczeństwo",
|
||||
"scope_copy": "Kopiuj zakres podczas odpowiadania (DM-y zawsze są kopiowane)",
|
||||
"set_new_avatar": "Ustaw nowy awatar",
|
||||
"set_new_profile_background": "Ustaw nowe tło profilu",
|
||||
"set_new_profile_banner": "Ustaw nowy banner profilu",
|
||||
"settings": "Ustawienia",
|
||||
"subject_input_always_show": "Zawsze pokazuj pole tematu",
|
||||
"subject_line_behavior": "Kopiuj temat podczas odpowiedzi",
|
||||
"subject_line_email": "Jak w mailach – „re: temat”",
|
||||
"subject_line_mastodon": "Jak na Mastodonie – po prostu kopiuj",
|
||||
"subject_line_noop": "Nie kopiuj",
|
||||
"post_status_content_type": "Post status content type",
|
||||
"stop_gifs": "Odtwarzaj GIFy po najechaniu kursorem",
|
||||
"streaming": "Włącz automatycznie strumieniowanie nowych postów gdy na początku strony",
|
||||
"streaming": "Włącz automatycznie strumieniowanie nowych postów gdy jesteś na początku strony",
|
||||
"text": "Tekst",
|
||||
"theme": "Motyw",
|
||||
"theme_help": "Użyj kolorów w notacji szesnastkowej (#rrggbb), by stworzyć swój motyw.",
|
||||
"theme_help_v2_1": "Możesz też zastąpić kolory i widoczność poszczególnych komponentów przełączając pola wyboru, użyj „Wyczyść wszystko” aby usunąć wszystkie zastąpienia.",
|
||||
"theme_help_v2_2": "Ikony pod niektórych wpisami są wskaźnikami kontrastu pomiędzy tłem a tekstem, po najechaniu na nie otrzymasz szczegółowe informacje. Zapamiętaj, że jeżeli używasz przezroczystości, wskaźniki pokazują najgorszy możliwy przypadek.",
|
||||
"tooltipRadius": "Etykiety/alerty",
|
||||
"user_settings": "Ustawienia użytkownika"
|
||||
"upload_a_photo": "Wyślij zdjęcie",
|
||||
"user_settings": "Ustawienia użytkownika",
|
||||
"values": {
|
||||
"false": "nie",
|
||||
"true": "tak"
|
||||
},
|
||||
"notifications": "Powiadomienia",
|
||||
"enable_web_push_notifications": "Włącz powiadomienia push",
|
||||
"style": {
|
||||
"switcher": {
|
||||
"keep_color": "Zachowaj kolory",
|
||||
"keep_shadows": "Zachowaj cienie",
|
||||
"keep_opacity": "Zachowaj widoczność",
|
||||
"keep_roundness": "Zachowaj zaokrąglenie",
|
||||
"keep_fonts": "Zachowaj czcionki",
|
||||
"save_load_hint": "Opcje „zachowaj” pozwalają na pozostanie przy obecnych opcjach po wybraniu lub załadowaniu motywu, jak i przechowywanie ich podczas eksportowania motywu. Jeżeli wszystkie są odznaczone, eksportowanie motywu spowoduje zapisanie wszystkiego.",
|
||||
"reset": "Wyzeruj",
|
||||
"clear_all": "Wyczyść wszystko",
|
||||
"clear_opacity": "Wyczyść widoczność"
|
||||
},
|
||||
"common": {
|
||||
"color": "Kolor",
|
||||
"opacity": "Widoczność",
|
||||
"contrast": {
|
||||
"hint": "Współczynnik kontrastu wynosi {ratio}, {level} {context}",
|
||||
"level": {
|
||||
"aa": "spełnia wymogi poziomu AA (minimalne)",
|
||||
"aaa": "spełnia wymogi poziomu AAA (zalecane)",
|
||||
"bad": "nie spełnia żadnych wymogów dostępności"
|
||||
},
|
||||
"context": {
|
||||
"18pt": "dla dużego tekstu (18pt+)",
|
||||
"text": "dla tekstu"
|
||||
}
|
||||
}
|
||||
},
|
||||
"common_colors": {
|
||||
"_tab_label": "Ogólne",
|
||||
"main": "Ogólne kolory",
|
||||
"foreground_hint": "Zajrzyj do karty „Zaawansowane”, aby uzyskać dokładniejszą kontrolę",
|
||||
"rgbo": "Ikony, wyróżnienia, odznaki"
|
||||
},
|
||||
"advanced_colors": {
|
||||
"_tab_label": "Zaawansowane",
|
||||
"alert": "Tło alertu",
|
||||
"alert_error": "Błąd",
|
||||
"badge": "Tło odznaki",
|
||||
"badge_notification": "Powiadomienie",
|
||||
"panel_header": "Nagłówek panelu",
|
||||
"top_bar": "Górny pasek",
|
||||
"borders": "Granice",
|
||||
"buttons": "Przyciski",
|
||||
"inputs": "Pola wejścia",
|
||||
"faint_text": "Zanikający tekst"
|
||||
},
|
||||
"radii": {
|
||||
"_tab_label": "Zaokrąglenie"
|
||||
},
|
||||
"shadows": {
|
||||
"_tab_label": "Cień i podświetlenie",
|
||||
"component": "Komponent",
|
||||
"override": "Zastąp",
|
||||
"shadow_id": "Cień #{value}",
|
||||
"blur": "Rozmycie",
|
||||
"spread": "Szerokość",
|
||||
"inset": "Inset",
|
||||
"hint": "Możesz też używać --zmiennych jako kolorów, aby wykorzystać zmienne CSS3. Pamiętaj, że ustawienie widoczności nie będzie wtedy działać.",
|
||||
"filter_hint": {
|
||||
"always_drop_shadow": "Ostrzeżenie, ten cień zawsze używa {0} jeżeli to obsługiwane przez przeglądarkę.",
|
||||
"drop_shadow_syntax": "{0} nie obsługuje parametru {1} i słowa kluczowego {2}.",
|
||||
"avatar_inset": "Pamiętaj że użycie jednocześnie cieni inset i nie inset na awatarach może daćnieoczekiwane wyniki z przezroczystymi awatarami.",
|
||||
"spread_zero": "Cienie o ujemnej szerokości będą widoczne tak, jakby wynosiła ona zero",
|
||||
"inset_classic": "Cienie inset będą używały {0}"
|
||||
},
|
||||
"components": {
|
||||
"panel": "Panel",
|
||||
"panelHeader": "Nagłówek panelu",
|
||||
"topBar": "Górny pasek",
|
||||
"avatar": "Awatar użytkownika (w widoku profilu)",
|
||||
"avatarStatus": "Awatar użytkownika (w widoku wpisu)",
|
||||
"popup": "Wyskakujące okna i podpowiedzi",
|
||||
"button": "Przycisk",
|
||||
"buttonHover": "Przycisk (po najechaniu)",
|
||||
"buttonPressed": "Przycisk (naciśnięty)",
|
||||
"buttonPressedHover": "Przycisk(naciśnięty+najechany)",
|
||||
"input": "Pole wejścia"
|
||||
}
|
||||
},
|
||||
"fonts": {
|
||||
"_tab_label": "Czcionki",
|
||||
"help": "Wybierz czcionkę używaną przez elementy UI. Jeżeli wybierzesz niestandardową, musisz wpisać dokładnie tę nazwę, pod którą pojawia się w systemie.",
|
||||
"components": {
|
||||
"interface": "Interfejs",
|
||||
"input": "Pola wejścia",
|
||||
"post": "Tekst postu",
|
||||
"postCode": "Tekst o stałej szerokości znaków w sformatowanym poście"
|
||||
},
|
||||
"family": "Nazwa czcionki",
|
||||
"size": "Rozmiar (w pikselach)",
|
||||
"weight": "Grubość",
|
||||
"custom": "Niestandardowa"
|
||||
},
|
||||
"preview": {
|
||||
"header": "Podgląd",
|
||||
"content": "Zawartość",
|
||||
"error": "Przykładowy błąd",
|
||||
"button": "Przycisk",
|
||||
"text": "Trochę więcej {0} i {1}",
|
||||
"mono": "treści",
|
||||
"input": "Właśnie wróciłem z kościoła",
|
||||
"faint_link": "pomocny podręcznik",
|
||||
"fine_print": "Przeczytaj nasz {0}, aby nie nauczyć się niczego przydatnego!",
|
||||
"header_faint": "W porządku",
|
||||
"checkbox": "Przeleciałem przez zasady użytkowania",
|
||||
"link": "i fajny mały odnośnik"
|
||||
}
|
||||
},
|
||||
"version": {
|
||||
"title": "Wersja",
|
||||
"backend_version": "Wersja back-endu",
|
||||
"frontend_version": "Wersja front-endu"
|
||||
}
|
||||
},
|
||||
"timeline": {
|
||||
"collapse": "Zwiń",
|
||||
"conversation": "Rozmowa",
|
||||
"error_fetching": "Błąd pobierania",
|
||||
"load_older": "Załaduj starsze statusy",
|
||||
"no_retweet_hint": "Wpis oznaczony jako tylko dla obserwujących lub bezpośredni nie może zostać powtórzony",
|
||||
"repeated": "powtórzono",
|
||||
"show_new": "Pokaż nowe",
|
||||
"up_to_date": "Na bieżąco"
|
||||
"up_to_date": "Na bieżąco",
|
||||
"no_more_statuses": "Brak kolejnych statusów",
|
||||
"no_statuses": "Brak statusów"
|
||||
},
|
||||
"status": {
|
||||
"reply_to": "Odpowiedź dla",
|
||||
"replies_list": "Odpowiedzi:"
|
||||
},
|
||||
"user_card": {
|
||||
"approve": "Przyjmij",
|
||||
"block": "Zablokuj",
|
||||
"blocked": "Zablokowany!",
|
||||
"deny": "Odrzuć",
|
||||
"favorites": "Ulubione",
|
||||
"follow": "Obserwuj",
|
||||
"follow_sent": "Wysłano prośbę!",
|
||||
"follow_progress": "Wysyłam prośbę…",
|
||||
"follow_again": "Wysłać prośbę ponownie?",
|
||||
"follow_unfollow": "Przestań obserwować",
|
||||
"followees": "Obserwowani",
|
||||
"followers": "Obserwujący",
|
||||
"following": "Obserwowany!",
|
||||
"follows_you": "Obserwuje cię!",
|
||||
"its_you": "To ty!",
|
||||
"media": "Media",
|
||||
"mute": "Wycisz",
|
||||
"muted": "Wyciszony",
|
||||
"muted": "Wyciszony(-a)",
|
||||
"per_day": "dziennie",
|
||||
"remote_follow": "Zdalna obserwacja",
|
||||
"statuses": "Statusy"
|
||||
"statuses": "Statusy",
|
||||
"unblock": "Odblokuj",
|
||||
"unblock_progress": "Odblokowuję…",
|
||||
"block_progress": "Blokuję…",
|
||||
"unmute": "Cofnij wyciszenie",
|
||||
"unmute_progress": "Cofam wyciszenie…",
|
||||
"mute_progress": "Wyciszam…"
|
||||
},
|
||||
"user_profile": {
|
||||
"timeline_title": "Oś czasu użytkownika"
|
||||
"timeline_title": "Oś czasu użytkownika",
|
||||
"profile_does_not_exist": "Przepraszamy, ten profil nie istnieje.",
|
||||
"profile_loading_error": "Przepraszamy, wystąpił błąd podczas ładowania tego profilu."
|
||||
},
|
||||
"who_to_follow": {
|
||||
"more": "Więcej",
|
||||
"who_to_follow": "Propozycje obserwacji"
|
||||
},
|
||||
"tool_tip": {
|
||||
"media_upload": "Wyślij media",
|
||||
"repeat": "Powtórz",
|
||||
"reply": "Odpowiedz",
|
||||
"favorite": "Dodaj do ulubionych",
|
||||
"user_settings": "Ustawienia użytkownika"
|
||||
},
|
||||
"upload":{
|
||||
"error": {
|
||||
"base": "Wysyłanie nie powiodło się.",
|
||||
"file_too_big": "Zbyt duży plik [{filesize}{filesizeunit} / {allowedsize}{allowedsizeunit}]",
|
||||
"default": "Spróbuj ponownie później"
|
||||
},
|
||||
"file_size_units": {
|
||||
"B": "B",
|
||||
"KiB": "KiB",
|
||||
"MiB": "MiB",
|
||||
"GiB": "GiB",
|
||||
"TiB": "TiB"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,7 +8,8 @@
|
|||
},
|
||||
"general": {
|
||||
"apply": "Применить",
|
||||
"submit": "Отправить"
|
||||
"submit": "Отправить",
|
||||
"cancel": "Отмена"
|
||||
},
|
||||
"login": {
|
||||
"login": "Войти",
|
||||
|
@ -311,7 +312,26 @@
|
|||
"muted": "Игнорирую",
|
||||
"per_day": "в день",
|
||||
"remote_follow": "Читать удалённо",
|
||||
"statuses": "Статусы"
|
||||
"statuses": "Статусы",
|
||||
"admin_menu": {
|
||||
"moderation": "Опции модератора",
|
||||
"grant_admin": "Сделать администратором",
|
||||
"revoke_admin": "Забрать права администратора",
|
||||
"grant_moderator": "Сделать модератором",
|
||||
"revoke_moderator": "Забрать права модератора",
|
||||
"activate_account": "Активировать аккаунт",
|
||||
"deactivate_account": "Деактивировать аккаунт",
|
||||
"delete_account": "Удалить аккаунт",
|
||||
"force_nsfw": "Отмечать посты пользователя как NSFW",
|
||||
"strip_media": "Убирать вложения из постов пользователя",
|
||||
"force_unlisted": "Не добавлять посты в публичные ленты",
|
||||
"sandbox": "Посты доступны только для подписчиков",
|
||||
"disable_remote_subscription": "Запретить подписываться с удаленных серверов",
|
||||
"disable_any_subscription": "Запретить подписываться на пользователя",
|
||||
"quarantine": "Не федерировать посты пользователя",
|
||||
"delete_user": "Удалить пользователя",
|
||||
"delete_user_confirmation": "Вы уверены? Это действие нельзя отменить."
|
||||
}
|
||||
},
|
||||
"user_profile": {
|
||||
"timeline_title": "Лента пользователя"
|
||||
|
|
|
@ -5,6 +5,7 @@ const defaultState = {
|
|||
// Stuff from static/config.json and apiConfig
|
||||
name: 'Pleroma FE',
|
||||
registrationOpen: true,
|
||||
safeDM: true,
|
||||
textlimit: 5000,
|
||||
server: 'http://localhost:4040/',
|
||||
theme: 'pleroma-dark',
|
||||
|
|
|
@ -48,7 +48,6 @@ const interfaceMod = {
|
|||
commit('setNotificationPermission', permission)
|
||||
},
|
||||
setMobileLayout ({ commit }, value) {
|
||||
console.log('setMobileLayout called')
|
||||
commit('setMobileLayout', value)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ export const defaultState = () => ({
|
|||
allStatusesObject: {},
|
||||
maxId: 0,
|
||||
notifications: {
|
||||
desktopNotificationSilence: false,
|
||||
desktopNotificationSilence: true,
|
||||
maxId: 0,
|
||||
minId: Number.POSITIVE_INFINITY,
|
||||
data: [],
|
||||
|
@ -123,7 +123,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
|
|||
|
||||
const maxNew = statuses.length > 0 ? maxBy(statuses, 'id').id : 0
|
||||
const minNew = statuses.length > 0 ? minBy(statuses, 'id').id : 0
|
||||
const newer = timeline && maxNew > timelineObject.maxId && statuses.length > 0
|
||||
const newer = timeline && (maxNew > timelineObject.maxId || timelineObject.maxId === 0) && statuses.length > 0
|
||||
const older = timeline && (minNew < timelineObject.minId || timelineObject.minId === 0) && statuses.length > 0
|
||||
|
||||
if (!noIdUpdate && newer) {
|
||||
|
@ -397,6 +397,13 @@ export const mutations = {
|
|||
const newStatus = state.allStatusesObject[status.id]
|
||||
newStatus.deleted = true
|
||||
},
|
||||
setManyDeleted (state, condition) {
|
||||
Object.values(state.allStatusesObject).forEach(status => {
|
||||
if (condition(status)) {
|
||||
status.deleted = true
|
||||
}
|
||||
})
|
||||
},
|
||||
setLoading (state, { timeline, value }) {
|
||||
state.timelines[timeline].loading = value
|
||||
},
|
||||
|
@ -457,6 +464,9 @@ const statuses = {
|
|||
commit('setDeleted', { status })
|
||||
apiService.deleteStatus({ id: status.id, credentials: rootState.users.currentUser.credentials })
|
||||
},
|
||||
markStatusesAsDeleted ({ commit }, condition) {
|
||||
commit('setManyDeleted', condition)
|
||||
},
|
||||
favorite ({ rootState, commit }, status) {
|
||||
// Optimistic favoriting...
|
||||
commit('setFavorited', { status, value: true })
|
||||
|
|
|
@ -37,6 +37,28 @@ export const mutations = {
|
|||
const user = state.usersObject[id]
|
||||
set(user, 'muted', muted)
|
||||
},
|
||||
tagUser (state, { user: { id }, tag }) {
|
||||
const user = state.usersObject[id]
|
||||
const tags = user.tags || []
|
||||
const newTags = tags.concat([tag])
|
||||
set(user, 'tags', newTags)
|
||||
},
|
||||
untagUser (state, { user: { id }, tag }) {
|
||||
const user = state.usersObject[id]
|
||||
const tags = user.tags || []
|
||||
const newTags = tags.filter(t => t !== tag)
|
||||
set(user, 'tags', newTags)
|
||||
},
|
||||
updateRight (state, { user: { id }, right, value }) {
|
||||
const user = state.usersObject[id]
|
||||
let newRights = user.rights
|
||||
newRights[right] = value
|
||||
set(user, 'rights', newRights)
|
||||
},
|
||||
updateActivationStatus (state, { user: { id }, status }) {
|
||||
const user = state.usersObject[id]
|
||||
set(user, 'deactivated', !status)
|
||||
},
|
||||
setCurrentUser (state, user) {
|
||||
state.lastLoginName = user.screen_name
|
||||
state.currentUser = merge(state.currentUser || {}, user)
|
||||
|
|
|
@ -15,6 +15,10 @@ const CHANGE_PASSWORD_URL = '/api/pleroma/change_password'
|
|||
const FOLLOW_REQUESTS_URL = '/api/pleroma/friend_requests'
|
||||
const APPROVE_USER_URL = '/api/pleroma/friendships/approve'
|
||||
const DENY_USER_URL = '/api/pleroma/friendships/deny'
|
||||
const TAG_USER_URL = '/api/pleroma/admin/users/tag'
|
||||
const PERMISSION_GROUP_URL = '/api/pleroma/admin/permission_group'
|
||||
const ACTIVATION_STATUS_URL = '/api/pleroma/admin/activation_status'
|
||||
const ADMIN_USER_URL = '/api/pleroma/admin/user'
|
||||
const SUGGESTIONS_URL = '/api/v1/suggestions'
|
||||
|
||||
const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites'
|
||||
|
@ -352,6 +356,86 @@ const fetchStatus = ({id, credentials}) => {
|
|||
.then((data) => parseStatus(data))
|
||||
}
|
||||
|
||||
const tagUser = ({tag, credentials, ...options}) => {
|
||||
const screenName = options.screen_name
|
||||
const form = {
|
||||
nicknames: [screenName],
|
||||
tags: [tag]
|
||||
}
|
||||
|
||||
const headers = authHeaders(credentials)
|
||||
headers['Content-Type'] = 'application/json'
|
||||
|
||||
return fetch(TAG_USER_URL, {
|
||||
method: 'PUT',
|
||||
headers: headers,
|
||||
body: JSON.stringify(form)
|
||||
})
|
||||
}
|
||||
|
||||
const untagUser = ({tag, credentials, ...options}) => {
|
||||
const screenName = options.screen_name
|
||||
const body = {
|
||||
nicknames: [screenName],
|
||||
tags: [tag]
|
||||
}
|
||||
|
||||
const headers = authHeaders(credentials)
|
||||
headers['Content-Type'] = 'application/json'
|
||||
|
||||
return fetch(TAG_USER_URL, {
|
||||
method: 'DELETE',
|
||||
headers: headers,
|
||||
body: JSON.stringify(body)
|
||||
})
|
||||
}
|
||||
|
||||
const addRight = ({right, credentials, ...user}) => {
|
||||
const screenName = user.screen_name
|
||||
|
||||
return fetch(`${PERMISSION_GROUP_URL}/${screenName}/${right}`, {
|
||||
method: 'POST',
|
||||
headers: authHeaders(credentials),
|
||||
body: {}
|
||||
})
|
||||
}
|
||||
|
||||
const deleteRight = ({right, credentials, ...user}) => {
|
||||
const screenName = user.screen_name
|
||||
|
||||
return fetch(`${PERMISSION_GROUP_URL}/${screenName}/${right}`, {
|
||||
method: 'DELETE',
|
||||
headers: authHeaders(credentials),
|
||||
body: {}
|
||||
})
|
||||
}
|
||||
|
||||
const setActivationStatus = ({status, credentials, ...user}) => {
|
||||
const screenName = user.screen_name
|
||||
const body = {
|
||||
status: status
|
||||
}
|
||||
|
||||
const headers = authHeaders(credentials)
|
||||
headers['Content-Type'] = 'application/json'
|
||||
|
||||
return fetch(`${ACTIVATION_STATUS_URL}/${screenName}.json`, {
|
||||
method: 'PUT',
|
||||
headers: headers,
|
||||
body: JSON.stringify(body)
|
||||
})
|
||||
}
|
||||
|
||||
const deleteUser = ({credentials, ...user}) => {
|
||||
const screenName = user.screen_name
|
||||
const headers = authHeaders(credentials)
|
||||
|
||||
return fetch(`${ADMIN_USER_URL}.json?nickname=${screenName}`, {
|
||||
method: 'DELETE',
|
||||
headers: headers
|
||||
})
|
||||
}
|
||||
|
||||
const fetchTimeline = ({timeline, credentials, since = false, until = false, userId = false, tag = false, withMuted = false}) => {
|
||||
const timelineUrls = {
|
||||
public: MASTODON_PUBLIC_TIMELINE,
|
||||
|
@ -666,6 +750,12 @@ const apiService = {
|
|||
fetchBlocks,
|
||||
fetchOAuthTokens,
|
||||
revokeOAuthToken,
|
||||
tagUser,
|
||||
untagUser,
|
||||
deleteUser,
|
||||
addRight,
|
||||
deleteRight,
|
||||
setActivationStatus,
|
||||
register,
|
||||
getCaptcha,
|
||||
updateAvatar,
|
||||
|
|
|
@ -62,6 +62,30 @@ const backendInteractorService = (credentials) => {
|
|||
return timelineFetcherService.startFetching({timeline, store, credentials, userId, tag})
|
||||
}
|
||||
|
||||
const tagUser = ({screen_name}, tag) => {
|
||||
return apiService.tagUser({screen_name, tag, credentials})
|
||||
}
|
||||
|
||||
const untagUser = ({screen_name}, tag) => {
|
||||
return apiService.untagUser({screen_name, tag, credentials})
|
||||
}
|
||||
|
||||
const addRight = ({screen_name}, right) => {
|
||||
return apiService.addRight({screen_name, right, credentials})
|
||||
}
|
||||
|
||||
const deleteRight = ({screen_name}, right) => {
|
||||
return apiService.deleteRight({screen_name, right, credentials})
|
||||
}
|
||||
|
||||
const setActivationStatus = ({screen_name}, status) => {
|
||||
return apiService.setActivationStatus({screen_name, status, credentials})
|
||||
}
|
||||
|
||||
const deleteUser = ({screen_name}) => {
|
||||
return apiService.deleteUser({screen_name, credentials})
|
||||
}
|
||||
|
||||
const fetchMutes = () => apiService.fetchMutes({credentials})
|
||||
const muteUser = (id) => apiService.muteUser({credentials, id})
|
||||
const unmuteUser = (id) => apiService.unmuteUser({credentials, id})
|
||||
|
@ -104,6 +128,12 @@ const backendInteractorService = (credentials) => {
|
|||
fetchBlocks,
|
||||
fetchOAuthTokens,
|
||||
revokeOAuthToken,
|
||||
tagUser,
|
||||
untagUser,
|
||||
addRight,
|
||||
deleteRight,
|
||||
deleteUser,
|
||||
setActivationStatus,
|
||||
register,
|
||||
getCaptcha,
|
||||
updateAvatar,
|
||||
|
|
|
@ -67,6 +67,11 @@ export const parseUser = (data) => {
|
|||
output.statusnet_blocking = relationship.blocking
|
||||
output.muted = relationship.muting
|
||||
}
|
||||
|
||||
output.rights = {
|
||||
moderator: data.pleroma.is_moderator,
|
||||
admin: data.pleroma.is_admin
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: handle is_local
|
||||
|
@ -103,7 +108,12 @@ export const parseUser = (data) => {
|
|||
|
||||
// QVITTER ONLY FOR NOW
|
||||
// Really only applies to logged in user, really.. I THINK
|
||||
output.rights = data.rights
|
||||
if (data.rights) {
|
||||
output.rights = {
|
||||
moderator: data.rights.delete_others_notice,
|
||||
admin: data.rights.admin
|
||||
}
|
||||
}
|
||||
output.no_rich_text = data.no_rich_text
|
||||
output.default_scope = data.default_scope
|
||||
output.hide_follows = data.hide_follows
|
||||
|
@ -125,6 +135,13 @@ export const parseUser = (data) => {
|
|||
output.follow_request_count = data.pleroma.follow_request_count
|
||||
}
|
||||
|
||||
if (data.pleroma) {
|
||||
output.tags = data.pleroma.tags
|
||||
output.deactivated = data.pleroma.deactivated
|
||||
}
|
||||
|
||||
output.tags = output.tags || []
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
|
|
5
src/services/window_utils/window_utils.js
Normal file
5
src/services/window_utils/window_utils.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
export const windowWidth = () =>
|
||||
window.innerWidth ||
|
||||
document.documentElement.clientWidth ||
|
||||
document.body.clientWidth
|
Loading…
Add table
Reference in a new issue