diff --git a/config/config.exs b/config/config.exs index 62899a68b..d6af65dd5 100644 --- a/config/config.exs +++ b/config/config.exs @@ -123,7 +123,7 @@ config :mobilizon, Mobilizon.Web.Email.Mailer, # can be `true` # ssl: false, # can be `:always` or `:never` - tls: :if_available, + tls: :never, allowed_tls_versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"], tls_options: [ verify: :verify_peer, diff --git a/js/src/assets/oruga-tailwindcss.css b/js/src/assets/oruga-tailwindcss.css index 81d623e09..2583e89fc 100644 --- a/js/src/assets/oruga-tailwindcss.css +++ b/js/src/assets/oruga-tailwindcss.css @@ -65,9 +65,15 @@ body { .field-label { @apply block text-gray-700 dark:text-gray-100 text-base font-bold mb-2; } +.o-field--horizontal.field { + @apply items-center; +} .o-field__horizontal-label .field-label { @apply mb-0; } +.o-field__horizontal-body > .field { + @apply mt-0; +} .field-danger { @apply text-red-500; } diff --git a/js/src/composition/apollo/user.ts b/js/src/composition/apollo/user.ts index b1459ff2b..496878402 100644 --- a/js/src/composition/apollo/user.ts +++ b/js/src/composition/apollo/user.ts @@ -80,7 +80,7 @@ export function registerAccount() { ) => { if (context?.userAlreadyActivated) { const currentUserData = store.readQuery<{ - loggedUser: Pick; + loggedUser: Pick; }>({ query: IDENTITIES, }); diff --git a/js/src/utils/html.ts b/js/src/utils/html.ts index ffa2dad41..e1baac0b8 100644 --- a/js/src/utils/html.ts +++ b/js/src/utils/html.ts @@ -10,3 +10,11 @@ export function htmlToText(html: string) { template.remove(); return text; } + +export const getValueFromMeta = (name: string): string | null => { + const element = document.querySelector(`meta[name="${name}"]`); + if (element && element.getAttribute("content")) { + return element.getAttribute("content"); + } + return null; +}; diff --git a/js/src/views/Account/RegisterView.vue b/js/src/views/Account/RegisterView.vue index a4191b27b..d9527246a 100644 --- a/js/src/views/Account/RegisterView.vue +++ b/js/src/views/Account/RegisterView.vue @@ -24,7 +24,7 @@ required v-model="identity.name" id="identityName" - @input="(event) => updateUsername(event.target.value)" + @input="(event: any) => updateUsername(event.target.value)" /> @@ -138,6 +138,7 @@ import { registerAccount } from "@/composition/apollo/user"; import { convertToUsername } from "@/utils/username"; import { useI18n } from "vue-i18n"; import { useHead } from "@vueuse/head"; +import { getValueFromMeta } from "@/utils/html"; const props = withDefaults( defineProps<{ @@ -174,6 +175,14 @@ onBeforeMount(() => { if (!props.email) { router.replace({ name: RouteName.PAGE_NOT_FOUND }); } + const username = getValueFromMeta("auth-user-suggested-actor-username"); + const name = getValueFromMeta("auth-user-suggested-actor-name"); + if (username) { + identity.value.preferredUsername = username; + } + if (name) { + identity.value.name = name; + } }); const updateUsername = (value: string) => { diff --git a/js/src/views/Account/children/EditIdentity.vue b/js/src/views/Account/children/EditIdentity.vue index 2873cd793..65f6123a0 100644 --- a/js/src/views/Account/children/EditIdentity.vue +++ b/js/src/views/Account/children/EditIdentity.vue @@ -2,24 +2,23 @@
-

+

{{ displayName(identity) }} - {{ $t("I create an identity") }} + {{ t("I create an identity") }}

- + {{ error }} - +
- {{ $t("Save") }} + {{ t("Save") }}
- + - {{ $t("Delete this identity") }} + {{ t("Delete this identity") }}
-

{{ $t("Profile feeds") }}

+

{{ t("Profile feeds") }}

{{ - $t( + t( "These feeds contain event data for the events for which this specific profile is a participant or creator. You should keep these private. You can find feeds for all of your profiles into your notification settings." ) }} @@ -116,7 +116,7 @@ :key="feedToken.token" > {{ $t("RSS/Atom Feed") }}{{ t("RSS/Atom Feed") }} {{ $t("ICS/WebCal Feed") }}{{ t("ICS/WebCal Feed") }} {{ $t("Regenerate new links") }}{{ t("Regenerate new links") }}

@@ -166,7 +166,7 @@ icon-left="refresh" variant="text" @click="generateFeedTokens" - >{{ $t("Create new links") }}{{ t("Create new links") }} @@ -176,28 +176,14 @@