Merge branch 'markup-fixes-again' into 'develop'

Fix few markup inconsistencies

See merge request pleroma/pleroma-fe!2008
This commit is contained in:
HJ 2025-02-10 21:20:57 +00:00
commit 7d2fd609ef
14 changed files with 365 additions and 324 deletions

View file

@ -0,0 +1 @@
Fix few markup panel inconsistencies; better ToS and registration

View file

@ -129,6 +129,7 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => {
copyInstanceOption('theme') copyInstanceOption('theme')
copyInstanceOption('style') copyInstanceOption('style')
copyInstanceOption('palette') copyInstanceOption('palette')
copyInstanceOption('embeddedToS')
copyInstanceOption('nsfwCensorImage') copyInstanceOption('nsfwCensorImage')
copyInstanceOption('background') copyInstanceOption('background')
copyInstanceOption('hidePostStats') copyInstanceOption('hidePostStats')

View file

@ -34,7 +34,7 @@
</div> </div>
<div <div
v-else v-else
class="emtpy-chat-list-alert" class="empty-chat-list-alert"
> >
<span>{{ $t('chats.empty_chat_list_placeholder') }}</span> <span>{{ $t('chats.empty_chat_list_placeholder') }}</span>
</div> </div>
@ -50,7 +50,7 @@
margin-bottom: 0; margin-bottom: 0;
} }
.emtpy-chat-list-alert { .empty-chat-list-alert {
padding: 3em; padding: 3em;
font-size: 1.2em; font-size: 1.2em;
display: flex; display: flex;

View file

@ -1,15 +1,18 @@
<template> <template>
<div class="Drafts"> <div class="Drafts">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading -sticky">
<div class="title"> <div class="title">
{{ $t('drafts.drafts') }} {{ $t('drafts.drafts') }}
</div> </div>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<p v-if="drafts.length === 0"> <div
v-if="drafts.length === 0"
class="empty-drafs-list-alert"
>
{{ $t('drafts.no_drafts') }} {{ $t('drafts.no_drafts') }}
</p> </div>
<List <List
v-else v-else
:items="drafts" :items="drafts"
@ -33,4 +36,13 @@
.draft { .draft {
margin: 1em 0; margin: 1em 0;
} }
.empty-drafs-list-alert {
padding: 3em;
font-size: 1.2em;
display: flex;
justify-content: center;
color: var(--textFaint);
}
</style> </style>

View file

@ -1,12 +1,12 @@
<template> <template>
<div class="features-panel"> <div class="features-panel">
<div class="panel panel-default base01-background"> <div class="panel panel-default base01-background">
<div class="panel-heading timeline-heading base02-background base04"> <div class="panel-heading timeline-heading base02-background base04 -sticky">
<h1 class="title"> <h1 class="title">
{{ $t('features_panel.title') }} {{ $t('features_panel.title') }}
</h1> </h1>
</div> </div>
<div class="panel-body features-panel"> <div class="panel-body">
<ul> <ul>
<li v-if="shout"> <li v-if="shout">
{{ $t('features_panel.shout') }} {{ $t('features_panel.shout') }}

View file

@ -4,7 +4,7 @@
class="mrf-transparency-panel" class="mrf-transparency-panel"
> >
<div class="panel panel-default base01-background"> <div class="panel panel-default base01-background">
<div class="panel-heading timeline-heading base02-background"> <div class="panel-heading timeline-heading base02-background -sticky">
<div class="title"> <div class="title">
{{ $t("about.mrf.federation") }} {{ $t("about.mrf.federation") }}
</div> </div>

View file

@ -4,6 +4,7 @@ import { mapActions, mapState } from 'vuex'
import InterfaceLanguageSwitcher from '../interface_language_switcher/interface_language_switcher.vue' import InterfaceLanguageSwitcher from '../interface_language_switcher/interface_language_switcher.vue'
import localeService from '../../services/locale/locale.service.js' import localeService from '../../services/locale/locale.service.js'
import { DAY } from 'src/services/date_utils/date_utils.js' import { DAY } from 'src/services/date_utils/date_utils.js'
import TermsOfServicePanel from '../terms_of_service_panel/terms_of_service_panel.vue'
const registration = { const registration = {
setup () { return { v$: useVuelidate() } }, setup () { return { v$: useVuelidate() } },
@ -21,7 +22,8 @@ const registration = {
captcha: {} captcha: {}
}), }),
components: { components: {
InterfaceLanguageSwitcher InterfaceLanguageSwitcher,
TermsOfServicePanel
}, },
validations () { validations () {
return { return {
@ -86,6 +88,7 @@ const registration = {
signUpNotice: (state) => state.users.signUpNotice, signUpNotice: (state) => state.users.signUpNotice,
hasSignUpNotice: (state) => !!state.users.signUpNotice.message, hasSignUpNotice: (state) => !!state.users.signUpNotice.message,
termsOfService: (state) => state.instance.tos, termsOfService: (state) => state.instance.tos,
embeddedToS: (state) => state.instance.embeddedToS,
accountActivationRequired: (state) => state.instance.accountActivationRequired, accountActivationRequired: (state) => state.instance.accountActivationRequired,
accountApprovalRequired: (state) => state.instance.accountApprovalRequired, accountApprovalRequired: (state) => state.instance.accountApprovalRequired,
birthdayRequired: (state) => state.instance.birthdayRequired, birthdayRequired: (state) => state.instance.birthdayRequired,

View file

@ -1,4 +1,6 @@
<template> <template>
<div class="column-inner">
<TermsOfServicePanel v-if="!hasSignUpNotice && !embeddedToS" />
<div class="settings panel panel-default"> <div class="settings panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h1 class="title"> <h1 class="title">
@ -294,6 +296,7 @@
<!-- eslint-disable vue/no-v-html --> <!-- eslint-disable vue/no-v-html -->
<div <div
v-if="embeddedToS"
class="terms-of-service" class="terms-of-service"
v-html="termsOfService" v-html="termsOfService"
/> />
@ -318,6 +321,7 @@
</p> </p>
</div> </div>
</div> </div>
</div>
</template> </template>
<script src="./registration.js"></script> <script src="./registration.js"></script>
@ -325,7 +329,7 @@
.registration-form { .registration-form {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 0.6em; margin: 1em;
.container { .container {
display: flex; display: flex;
@ -338,7 +342,7 @@
.terms-of-service { .terms-of-service {
flex: 0 1 50%; flex: 0 1 50%;
margin: 0.8em; margin: 0.6em 0 0 0.8em;
} }
.text-fields { .text-fields {
@ -417,6 +421,10 @@
@media all and (max-width: 800px) { @media all and (max-width: 800px) {
.registration-form .container { .registration-form .container {
flex-direction: column-reverse; flex-direction: column-reverse;
.terms-of-service {
margin: 0;
}
} }
} }
</style> </style>

View file

@ -1,7 +1,7 @@
<template> <template>
<div class="staff-panel"> <div class="staff-panel">
<div class="panel panel-default base01-background"> <div class="panel panel-default base01-background">
<div class="panel-heading timeline-heading base02-background"> <div class="panel-heading timeline-heading base02-background -sticky">
<div class="title"> <div class="title">
{{ $t("about.staff") }} {{ $t("about.staff") }}
</div> </div>
@ -28,8 +28,7 @@
<style lang="scss"> <style lang="scss">
.staff-group { .staff-group {
padding-left: 1em; padding: 1em;
padding-top: 1em;
.basic-user-card { .basic-user-card {
padding-left: 0; padding-left: 0;

View file

@ -2,6 +2,9 @@ const TermsOfServicePanel = {
computed: { computed: {
content () { content () {
return this.$store.state.instance.tos return this.$store.state.instance.tos
},
embedded () {
return this.$store.state.instance.embeddedToS
} }
} }
} }

View file

@ -1,6 +1,14 @@
<template> <template>
<div> <div class="terms-of-service-panel">
<div class="panel panel-default"> <div class="panel panel-default">
<div
v-if="!embedded"
class="panel-heading -sticky"
>
<div class="title">
{{ $t("about.terms") }}
</div>
</div>
<div class="panel-body"> <div class="panel-body">
<!-- eslint-disable vue/no-v-html --> <!-- eslint-disable vue/no-v-html -->
<div <div
@ -19,4 +27,5 @@
.tos-content { .tos-content {
margin: 1em; margin: 1em;
} }
</style> </style>

View file

@ -275,7 +275,10 @@
/> />
</div> </div>
</div> </div>
<div v-if="!hideBio"> <div
v-if="!hideBio"
class="user-bio"
>
<div <div
v-if="!mergedConfig.hideUserStats && switcher" v-if="!mergedConfig.hideUserStats && switcher"
class="user-counts" class="user-counts"

View file

@ -30,7 +30,8 @@
"media_nsfw_desc": "This instance forces media to be set sensitive in posts on the following instances:" "media_nsfw_desc": "This instance forces media to be set sensitive in posts on the following instances:"
} }
}, },
"staff": "Staff" "staff": "Staff",
"terms": "Terms of Service"
}, },
"announcements": { "announcements": {
"page_header": "Announcements", "page_header": "Announcements",

View file

@ -54,6 +54,7 @@ const defaultState = {
defaultAvatar: '/images/avi.png', defaultAvatar: '/images/avi.png',
defaultBanner: '/images/banner.png', defaultBanner: '/images/banner.png',
background: '/static/aurora_borealis.jpg', background: '/static/aurora_borealis.jpg',
embeddedToS: true,
collapseMessageWithSubject: false, collapseMessageWithSubject: false,
greentext: false, greentext: false,
useAtIcon: false, useAtIcon: false,