Merge branch 'admin-dashboard-fixes' into shigusegubu-vue3
This commit is contained in:
commit
44087e997e
32 changed files with 181 additions and 36 deletions
25
CHANGELOG.md
25
CHANGELOG.md
|
@ -3,6 +3,31 @@ 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/).
|
||||
|
||||
## 2.6.0
|
||||
### Added
|
||||
- add the initial i18n translation file for Taiwanese (Hokkien), and modify some related files.
|
||||
- Implemented a very basic instance administration screen
|
||||
- Implement quoting
|
||||
|
||||
### Fixed
|
||||
- Keep aspect ratio of custom emoji reaction in notification
|
||||
- Fix openSettingsModalTab so that it correctly opens Settings modal instead of Admin modal
|
||||
- Add alt text to emoji picker buttons
|
||||
- Use export-subst gitattribute to allow tarball builds
|
||||
- fix reports now showing reason/content
|
||||
- Fix HTML attribute parsing, discard attributes not strating with a letter
|
||||
- Make MentionsLine aware of line breaking by non-br elements
|
||||
- Fix a bug where mentioning a user twice will not fill the mention into the textarea
|
||||
- Fix parsing non-ascii tags
|
||||
- Fix OAuth2 token lingering after revocation
|
||||
- fix regex issue in HTML parser/renderer
|
||||
- don't display quoted status twice
|
||||
- fix typo in code that prevented cards from showing at all
|
||||
- Fix react button not working if reaction accounts are not loaded
|
||||
- Fix react button misalignment on safari ios
|
||||
- Fix pinned statuses gone when reloading user timeline
|
||||
- Fix scrolling emoji selector in modal in safari ios
|
||||
|
||||
## 2.5.1
|
||||
### Fixed
|
||||
- Checkboxes in settings can now work with screenreaders
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
add the initial i18n translation file for Taiwanese (Hokkien), and modify some related files.
|
|
@ -1 +0,0 @@
|
|||
Implemented a very basic instance administration screen
|
|
@ -1 +0,0 @@
|
|||
Keep aspect ratio of custom emoji reaction in notification
|
|
@ -1 +0,0 @@
|
|||
Fix openSettingsModalTab so that it correctly opens Settings modal instead of Admin modal
|
|
@ -1 +0,0 @@
|
|||
Add alt text to emoji picker buttons
|
|
@ -1 +0,0 @@
|
|||
Use export-subst gitattribute to allow tarball builds
|
|
@ -1 +0,0 @@
|
|||
Fix HTML attribute parsing, discard attributes not strating with a letter
|
|
@ -1 +0,0 @@
|
|||
Fix a bug where mentioning a user twice will not fill the mention into the textarea
|
|
@ -1 +0,0 @@
|
|||
Make MentionsLine aware of line breaking by non-br elements
|
|
@ -1 +0,0 @@
|
|||
Fix parsing non-ascii tags
|
|
@ -1 +0,0 @@
|
|||
Fix OAuth2 token lingering after revocation
|
|
@ -1 +0,0 @@
|
|||
fix regex issue in HTML parser/renderer
|
|
@ -1 +0,0 @@
|
|||
fix typo in code that prevented cards from showing at all
|
|
@ -1 +0,0 @@
|
|||
don't display quoted status twice
|
|
@ -1 +0,0 @@
|
|||
Implement quoting
|
|
@ -1 +0,0 @@
|
|||
Fix react button misalignment on safari ios
|
|
@ -1 +0,0 @@
|
|||
Fix react button not working if reaction accounts are not loaded
|
|
@ -1 +0,0 @@
|
|||
Fix pinned statuses gone when reloading user timeline
|
|
@ -1 +0,0 @@
|
|||
Fix scrolling emoji selector in modal in safari ios
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "pleroma_fe",
|
||||
"version": "2.5.0",
|
||||
"version": "2.6.0",
|
||||
"description": "Pleroma frontend, the default frontend of Pleroma social network server",
|
||||
"author": "Pleroma contributors <https://git.pleroma.social/pleroma/pleroma-fe/-/blob/develop/CONTRIBUTORS.md>",
|
||||
"private": false,
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
top: calc(var(--navbar-height) + 0.5em);
|
||||
width: 100%;
|
||||
pointer-events: none;
|
||||
z-index: var(--ZI_navbar_popovers);
|
||||
z-index: var(--ZI_modals_popovers);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
|
|
@ -4,6 +4,7 @@ import IntegerSetting from '../helpers/integer_setting.vue'
|
|||
import StringSetting from '../helpers/string_setting.vue'
|
||||
import GroupSetting from '../helpers/group_setting.vue'
|
||||
import Popover from 'src/components/popover/popover.vue'
|
||||
import PanelLoading from 'src/components/panel_loading/panel_loading.vue'
|
||||
|
||||
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
|
@ -22,12 +23,18 @@ const FrontendsTab = {
|
|||
defaultSource: 'admin'
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
working: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
BooleanSetting,
|
||||
ChoiceSetting,
|
||||
IntegerSetting,
|
||||
StringSetting,
|
||||
GroupSetting,
|
||||
PanelLoading,
|
||||
Popover
|
||||
},
|
||||
created () {
|
||||
|
@ -42,18 +49,56 @@ const FrontendsTab = {
|
|||
...SharedComputedObject()
|
||||
},
|
||||
methods: {
|
||||
canInstall (frontend) {
|
||||
const fe = this.frontends.find(f => f.name === frontend.name)
|
||||
if (!fe) return false
|
||||
return fe.refs.includes(frontend.ref)
|
||||
},
|
||||
getSuggestedRef (frontend) {
|
||||
const defaultFe = this.adminDraft[':pleroma'][':frontends'][':primary']
|
||||
if (defaultFe.name === frontend.name && this.canInstall(defaultFe)) {
|
||||
return defaultFe.ref
|
||||
} else {
|
||||
return frontend.refs[0]
|
||||
}
|
||||
},
|
||||
update (frontend, suggestRef) {
|
||||
const ref = suggestRef || frontend.refs[0]
|
||||
const ref = suggestRef || this.getSuggestedRef(frontend)
|
||||
const { name } = frontend
|
||||
const payload = { name, ref }
|
||||
|
||||
this.working = true
|
||||
this.$store.state.api.backendInteractor.installFrontend({ payload })
|
||||
.then((externalUser) => {
|
||||
.finally(() => {
|
||||
this.working = false
|
||||
})
|
||||
.then(async (response) => {
|
||||
this.$store.dispatch('loadFrontendsStuff')
|
||||
if (response.error) {
|
||||
const reason = await response.error.json()
|
||||
this.$store.dispatch('pushGlobalNotice', {
|
||||
level: 'error',
|
||||
messageKey: 'admin_dash.frontend.failure_installing_frontend',
|
||||
messageArgs: {
|
||||
version: name + '/' + ref,
|
||||
reason: reason.error
|
||||
},
|
||||
timeout: 5000
|
||||
})
|
||||
} else {
|
||||
this.$store.dispatch('pushGlobalNotice', {
|
||||
level: 'success',
|
||||
messageKey: 'admin_dash.frontend.success_installing_frontend',
|
||||
messageArgs: {
|
||||
version: name + '/' + ref
|
||||
},
|
||||
timeout: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
setDefault (frontend, suggestRef) {
|
||||
const ref = suggestRef || frontend.refs[0]
|
||||
const ref = suggestRef || this.getSuggestedRef(frontend)
|
||||
const { name } = frontend
|
||||
|
||||
this.$store.commit('updateAdminDraft', { path: [':pleroma', ':frontends', ':primary'], value: { name, ref } })
|
||||
|
|
|
@ -3,6 +3,22 @@
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
.relative {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: absolute;
|
||||
background: var(--bg);
|
||||
// fix buttons showing through
|
||||
z-index: 2;
|
||||
opacity: 0.9;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
dd {
|
||||
text-overflow: ellipsis;
|
||||
word-wrap: nowrap;
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="setting-list">
|
||||
<div class="setting-list relative">
|
||||
<PanelLoading class="overlay" v-if="working"/>
|
||||
<h3>{{ $t('admin_dash.frontend.available_frontends') }}</h3>
|
||||
<ul class="cards-list">
|
||||
<li
|
||||
|
@ -86,6 +87,11 @@
|
|||
? $t('admin_dash.frontend.reinstall')
|
||||
: $t('admin_dash.frontend.install')
|
||||
}}
|
||||
<code>
|
||||
{{
|
||||
getSuggestedRef(frontend)
|
||||
}}
|
||||
</code>
|
||||
</button>
|
||||
<Popover
|
||||
v-if="frontend.refs.length > 1"
|
||||
|
@ -93,13 +99,14 @@
|
|||
class="button-dropdown"
|
||||
placement="bottom"
|
||||
>
|
||||
<template #content>
|
||||
<template #content="{close}">
|
||||
<div class="dropdown-menu">
|
||||
<button
|
||||
v-for="ref in frontend.refs"
|
||||
:key="ref"
|
||||
class="button-default dropdown-item"
|
||||
@click="update(frontend, ref)"
|
||||
@click.prevent="update(frontend, ref)"
|
||||
@click="close"
|
||||
>
|
||||
<i18n-t keypath="admin_dash.frontend.install_version">
|
||||
<template #version>
|
||||
|
@ -136,6 +143,11 @@
|
|||
{{
|
||||
$t('admin_dash.frontend.set_default')
|
||||
}}
|
||||
<code>
|
||||
{{
|
||||
getSuggestedRef(frontend)
|
||||
}}
|
||||
</code>
|
||||
</button>
|
||||
{{ ' ' }}
|
||||
<Popover
|
||||
|
@ -144,13 +156,14 @@
|
|||
class="button-dropdown"
|
||||
placement="bottom"
|
||||
>
|
||||
<template #content>
|
||||
<template #content="{close}">
|
||||
<div class="dropdown-menu">
|
||||
<button
|
||||
v-for="ref in frontend.refs.slice(1)"
|
||||
v-for="ref in frontend.installedRefs || frontend.refs"
|
||||
:key="ref"
|
||||
class="button-default dropdown-item"
|
||||
@click="setDefault(frontend, ref)"
|
||||
@click.prevent="setDefault(frontend, ref)"
|
||||
@click="close"
|
||||
>
|
||||
<i18n-t keypath="admin_dash.frontend.set_default_version">
|
||||
<template #version>
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
<li>
|
||||
<StringSetting path=":pleroma.:instance.:name" />
|
||||
</li>
|
||||
<!-- See https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3963 -->
|
||||
<li v-if="adminDraft[':pleroma'][':instance'][':favicon'] !== undefined">
|
||||
<AttachmentSetting compact path=":pleroma.:instance.:favicon" />
|
||||
</li>
|
||||
<li>
|
||||
<StringSetting path=":pleroma.:instance.:email" />
|
||||
</li>
|
||||
|
@ -16,7 +20,7 @@
|
|||
<StringSetting path=":pleroma.:instance.:short_description" />
|
||||
</li>
|
||||
<li>
|
||||
<AttachmentSetting path=":pleroma.:instance.:instance_thumbnail" />
|
||||
<AttachmentSetting compact path=":pleroma.:instance.:instance_thumbnail" />
|
||||
</li>
|
||||
<li>
|
||||
<AttachmentSetting path=":pleroma.:instance.:background_image" />
|
||||
|
|
|
@ -7,6 +7,7 @@ export default {
|
|||
...Setting,
|
||||
props: {
|
||||
...Setting.props,
|
||||
compact: Boolean,
|
||||
acceptTypes: {
|
||||
type: String,
|
||||
required: false,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<span
|
||||
v-if="matchesExpertLevel"
|
||||
class="AttachmentSetting"
|
||||
:class="{ '-compact': compact }"
|
||||
>
|
||||
<label
|
||||
:for="path"
|
||||
|
@ -24,8 +25,8 @@
|
|||
{{ backendDescriptionDescription + ' ' }}
|
||||
</p>
|
||||
<div class="attachment-input">
|
||||
<div>{{ $t('settings.url') }}</div>
|
||||
<div class="controls">
|
||||
<div class="controls control-field">
|
||||
<label for="path">{{ $t('settings.url') }}</label>
|
||||
<input
|
||||
:id="path"
|
||||
class="string-input"
|
||||
|
@ -40,7 +41,7 @@
|
|||
/>
|
||||
<ProfileSettingIndicator :is-profile="isProfileSetting" />
|
||||
</div>
|
||||
<div>{{ $t('settings.preview') }}</div>
|
||||
<div v-if="!compact">{{ $t('settings.preview') }}</div>
|
||||
<Attachment
|
||||
class="attachment"
|
||||
:compact="compact"
|
||||
|
@ -50,7 +51,7 @@
|
|||
@setMedia="onMedia"
|
||||
@naturalSizeLoad="onNaturalSizeLoad"
|
||||
/>
|
||||
<div class="controls">
|
||||
<div class="controls control-upload">
|
||||
<MediaUpload
|
||||
ref="mediaUpload"
|
||||
class="media-upload-icon"
|
||||
|
@ -84,6 +85,35 @@
|
|||
width: 20em;
|
||||
}
|
||||
|
||||
&.-compact {
|
||||
.attachment-input {
|
||||
flex-direction: row;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.attachment {
|
||||
flex: 0;
|
||||
order: 0;
|
||||
display: block;
|
||||
min-width: 4em;
|
||||
height: 4em;
|
||||
align-self: center;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.control-field {
|
||||
order: 1;
|
||||
min-width: 12em;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
.control-upload {
|
||||
order: 2;
|
||||
min-width: 12em;
|
||||
padding: 0 0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.controls {
|
||||
margin-bottom: 0.5em;
|
||||
|
||||
|
|
|
@ -914,7 +914,9 @@
|
|||
"default_frontend": "Default front-end",
|
||||
"default_frontend_tip": "Default front-end will be shown to all users. Currently there's no way to for a user to select personal front-end. If you switch away from PleromaFE you'll most likely have to use old and buggy AdminFE to do instance configuration until we replace it.",
|
||||
"default_frontend_tip2": "WIP: Since Pleroma backend doesn't properly list all installed frontends you'll have to enter name and reference manually. List below provides shortcuts to fill the values.",
|
||||
"available_frontends": "Available for install"
|
||||
"available_frontends": "Available for install",
|
||||
"failure_installing_frontend": "Failed to install frontend {version}: {reason}",
|
||||
"success_installing_frontend": "Frontend {version} successfully installed"
|
||||
},
|
||||
"temp_overrides": {
|
||||
":pleroma": {
|
||||
|
|
|
@ -26,6 +26,7 @@ const adminSettingsStorage = {
|
|||
},
|
||||
setAvailableFrontends (state, { frontends }) {
|
||||
state.frontends = frontends.map(f => {
|
||||
f.installedRefs = f.installed_refs
|
||||
if (f.name === 'pleroma-fe') {
|
||||
f.refs = ['master', 'develop']
|
||||
} else {
|
||||
|
|
27
tools/collect-changelog
Executable file
27
tools/collect-changelog
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
collectType() {
|
||||
local suffix="$1"
|
||||
local header="$2"
|
||||
local printed=0
|
||||
for file in changelog.d/*."$suffix"; do
|
||||
if [ '!' -f "$file" ]; then
|
||||
continue
|
||||
fi
|
||||
if [ "$printed" = 0 ]; then
|
||||
echo
|
||||
echo "### $header"
|
||||
printed=1
|
||||
fi
|
||||
# Normalize any trailing newlines/spaces, etc.
|
||||
echo "- $(cat "$file")"
|
||||
done
|
||||
}
|
||||
|
||||
collectType security Security
|
||||
collectType change Changed
|
||||
collectType add Added
|
||||
collectType fix Fixed
|
||||
collectType remove Removed
|
||||
|
||||
rm changelog.d/*
|
Loading…
Add table
Reference in a new issue