Merge remote-tracking branch 'upstream/develop' into neckbeard

This commit is contained in:
Your New SJW Waifu 2021-01-22 14:58:56 -06:00
commit 9167882de9
11 changed files with 77 additions and 71 deletions

View File

@ -3,8 +3,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased] ## [Unreleased]
### Fixed
- Button to remove uploaded media in post status form is now properly placed and sized.
## [2.2.3] - 2021-01-18
### Added ### Added
- Added Report button to status ellipsis menu for easier reporting - Added Report button to status ellipsis menu for easier reporting
@ -14,6 +18,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed ### Changed
- Don't filter own posts when they hit your wordfilter - Don't filter own posts when they hit your wordfilter
- Language picker now uses native language names
## [2.2.2] - 2020-12-22 ## [2.2.2] - 2020-12-22
### Added ### Added

View File

@ -188,6 +188,13 @@ a {
&.-fullwidth { &.-fullwidth {
width: 100%; width: 100%;
} }
&.-hover-highlight {
&:hover svg {
color: $fallback--lightText;
color: var(--lightText, $fallback--lightText);
}
}
} }
input, textarea, .select, .input { input, textarea, .select, .input {

View File

@ -12,11 +12,11 @@
v-model="language" v-model="language"
> >
<option <option
v-for="(langCode, i) in languageCodes" v-for="lang in languages"
:key="langCode" :key="lang.code"
:value="langCode" :value="lang.code"
> >
{{ languageNames[i] }} {{ lang.name }}
</option> </option>
</select> </select>
<FAIcon <FAIcon
@ -29,6 +29,7 @@
<script> <script>
import languagesObject from '../../i18n/messages' import languagesObject from '../../i18n/messages'
import localeService from '../../services/locale/locale.service.js'
import ISO6391 from 'iso-639-1' import ISO6391 from 'iso-639-1'
import _ from 'lodash' import _ from 'lodash'
import { library } from '@fortawesome/fontawesome-svg-core' import { library } from '@fortawesome/fontawesome-svg-core'
@ -42,12 +43,8 @@ library.add(
export default { export default {
computed: { computed: {
languageCodes () { languages () {
return languagesObject.languages return _.map(languagesObject.languages, (code) => ({ code: code, name: this.getLanguageName(code) })).sort((a, b) => a.name.localeCompare(b.name))
},
languageNames () {
return _.map(this.languageCodes, this.getLanguageName)
}, },
language: { language: {
@ -61,12 +58,13 @@ export default {
methods: { methods: {
getLanguageName (code) { getLanguageName (code) {
const specialLanguageNames = { const specialLanguageNames = {
'ja': 'Japanese (日本語)', 'ja_easy': 'やさしいにほんご',
'ja_easy': 'Japanese (やさしいにほんご)', 'zh': '简体中文',
'zh': 'Simplified Chinese (简体中文)', 'zh_Hant': '繁體中文'
'zh_Hant': 'Traditional Chinese (繁體中文)'
} }
return specialLanguageNames[code] || ISO6391.getName(code) const languageName = specialLanguageNames[code] || ISO6391.getNativeName(code)
const browserLocale = localeService.internalToBrowserLocale(code)
return languageName.charAt(0).toLocaleUpperCase(browserLocale) + languageName.slice(1)
} }
} }
} }

View File

@ -21,20 +21,17 @@
@keydown.enter.stop.prevent="nextOption(index)" @keydown.enter.stop.prevent="nextOption(index)"
> >
</div> </div>
<div <button
v-if="options.length > 2" v-if="options.length > 2"
class="icon-container" class="delete-option button-unstyled -hover-highlight"
>
<FAIcon
icon="times"
class="delete"
@click="deleteOption(index)" @click="deleteOption(index)"
/> >
<FAIcon icon="times" />
</button>
</div> </div>
</div> <button
<a
v-if="options.length < maxOptions" v-if="options.length < maxOptions"
class="add-option faint" class="add-option faint button-unstyled -hover-highlight"
@click="addOption" @click="addOption"
> >
<FAIcon <FAIcon
@ -43,7 +40,7 @@
/> />
{{ $t("polls.add_option") }} {{ $t("polls.add_option") }}
</a> </button>
<div class="poll-type-expiry"> <div class="poll-type-expiry">
<div <div
class="poll-type" class="poll-type"
@ -116,7 +113,6 @@
align-self: flex-start; align-self: flex-start;
padding-top: 0.25em; padding-top: 0.25em;
padding-left: 0.1em; padding-left: 0.1em;
cursor: pointer;
} }
.poll-option { .poll-option {
@ -135,19 +131,11 @@
} }
} }
.icon-container { .delete-option {
// Hack: Move the icon over the input box // Hack: Move the icon over the input box
width: 1.5em; width: 1.5em;
margin-left: -1.5em; margin-left: -1.5em;
z-index: 1; z-index: 1;
.delete {
cursor: pointer;
&:hover {
color: inherit;
}
}
} }
.poll-type-expiry { .poll-type-expiry {

View File

@ -302,11 +302,12 @@
:key="file.url" :key="file.url"
class="media-upload-wrapper" class="media-upload-wrapper"
> >
<FAIcon <button
class="fa-scale-110 fa-old-padding" class="button-unstyled hider"
icon="times"
@click="removeMediaFile(file)" @click="removeMediaFile(file)"
/> >
<FAIcon icon="times" />
</button>
<attachment <attachment
:attachment="file" :attachment="file"
:set-media="() => $store.dispatch('setMedia', newStatus.files)" :set-media="() => $store.dispatch('setMedia', newStatus.files)"
@ -516,26 +517,11 @@
} }
.attachments .media-upload-wrapper { .attachments .media-upload-wrapper {
padding: 0 0.5em; position: relative;
.attachment { .attachment {
margin: 0; margin: 0;
padding: 0; padding: 0;
position: relative;
}
.fa-scale-110 fa-old-padding {
position: absolute;
margin: 10px;
margin: .75em;
padding: .5em;
background: rgba(230,230,230,0.6);
z-index: 2;
color: black;
border-radius: $fallback--attachmentRadius;
border-radius: var(--attachmentRadius, $fallback--attachmentRadius);
font-weight: bold;
cursor: pointer;
} }
} }

View File

@ -111,16 +111,17 @@
.profile-fields { .profile-fields {
display: flex; display: flex;
&>.emoji-input { & > .emoji-input {
flex: 1 1 auto; flex: 1 1 auto;
margin: 0 .2em .5em; margin: 0 0.2em 0.5em;
min-width: 0; min-width: 0;
} }
&>.icon-container { .delete-field {
width: 20px; width: 20px;
align-self: center; align-self: center;
margin: 0 .2em .5em; margin: 0 0.2em 0.5em;
padding: 0 0.5em;
} }
} }
} }

View File

@ -124,24 +124,24 @@
:placeholder="$t('settings.profile_fields.value')" :placeholder="$t('settings.profile_fields.value')"
> >
</EmojiInput> </EmojiInput>
<div <button
class="icon-container" class="delete-field button-unstyled -hover-highlight"
@click="deleteField(i)"
> >
<FAIcon <FAIcon
v-show="newFields.length > 1" v-show="newFields.length > 1"
icon="times" icon="times"
@click="deleteField(i)"
/> />
</button>
</div> </div>
</div> <button
<a
v-if="newFields.length < maxFields" v-if="newFields.length < maxFields"
class="add-field faint" class="add-field faint button-unstyled -hover-highlight"
@click="addField" @click="addField"
> >
<FAIcon icon="plus" /> <FAIcon icon="plus" />
{{ $t("settings.profile_fields.add_field") }} {{ $t("settings.profile_fields.add_field") }}
</a> </button>
</div> </div>
<p> <p>
<Checkbox v-model="bot"> <Checkbox v-model="bot">

View File

@ -83,7 +83,7 @@
v-if="!!visibleRole" v-if="!!visibleRole"
class="alert user-role" class="alert user-role"
> >
{{ visibleRole }} {{ $t(`user_card.roles.${visibleRole}`) }}
</span> </span>
<span <span
v-if="user.bot" v-if="user.bot"
@ -507,7 +507,6 @@
.user-role { .user-role {
flex: none; flex: none;
text-transform: capitalize;
color: $fallback--text; color: $fallback--text;
color: var(--alertNeutralText, $fallback--text); color: var(--alertNeutralText, $fallback--text);
background-color: $fallback--fg; background-color: $fallback--fg;

View File

@ -729,6 +729,10 @@
"quarantine": "Disallow user posts from federating", "quarantine": "Disallow user posts from federating",
"delete_user": "Delete user", "delete_user": "Delete user",
"delete_user_confirmation": "Are you absolutely sure? This action cannot be undone." "delete_user_confirmation": "Are you absolutely sure? This action cannot be undone."
},
"roles": {
"admin": "Admin",
"moderator": "Moderator"
} }
}, },
"user_profile": { "user_profile": {

View File

@ -188,7 +188,12 @@ export const parseUser = (data) => {
output.follow_request_count = data.pleroma.follow_request_count output.follow_request_count = data.pleroma.follow_request_count
output.tags = data.pleroma.tags output.tags = data.pleroma.tags
output.deactivated = data.pleroma.deactivated
// deactivated was changed to is_active in Pleroma 2.3.0
// so check if is_active is present
output.deactivated = typeof data.pleroma.is_active !== 'undefined'
? !data.pleroma.is_active // new backend
: data.pleroma.deactivated // old backend
output.notification_settings = data.pleroma.notification_settings output.notification_settings = data.pleroma.notification_settings
output.unread_chat_count = data.pleroma.unread_chat_count output.unread_chat_count = data.pleroma.unread_chat_count

View File

@ -0,0 +1,12 @@
const specialLanguageCodes = {
'ja_easy': 'ja',
'zh_Hant': 'zh-HANT'
}
const internalToBrowserLocale = code => specialLanguageCodes[code] || code
const localeService = {
internalToBrowserLocale
}
export default localeService