Various front-end fixes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-10-31 13:03:03 +01:00
parent ecb862f634
commit e0127afd2b
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
8 changed files with 32 additions and 21 deletions

View File

@ -6,7 +6,7 @@
<div class="flex pl-2"> <div class="flex pl-2">
<figure class="w-12 h-12" v-if="actor.avatar"> <figure class="w-12 h-12" v-if="actor.avatar">
<img <img
class="rounded-lg" class="rounded-full object-cover h-full"
:src="actor.avatar.url" :src="actor.avatar.url"
alt="" alt=""
width="48" width="48"

View File

@ -146,7 +146,7 @@ const props = defineProps<{
const emit = defineEmits(["update:modelValue", "deleteComment"]); const emit = defineEmits(["update:modelValue", "deleteComment"]);
const { t } = useI18n({useScope: 'global'}); const { t } = useI18n({ useScope: "global" });
const comment = computed(() => props.modelValue); const comment = computed(() => props.modelValue);

View File

@ -2,7 +2,7 @@
<LinkOrRouterLink <LinkOrRouterLink
:to="to" :to="to"
:isInternal="isInternal" :isInternal="isInternal"
class="mbz-card shrink-0 dark:bg-mbz-purple dark:text-white rounded-lg shadow-lg my-4 flex items-center flex-col" class="mbz-card shrink-0 dark:bg-mbz-purple dark:text-white rounded-lg shadow-lg flex items-center flex-col"
:class="{ :class="{
'sm:flex-row': mode === 'row', 'sm:flex-row': mode === 'row',
'sm:max-w-xs sm:w-[18rem] shrink-0 flex flex-col': mode === 'column', 'sm:max-w-xs sm:w-[18rem] shrink-0 flex flex-col': mode === 'column',

View File

@ -77,9 +77,9 @@
> >
<div class="flex gap-1 items-center"> <div class="flex gap-1 items-center">
<div class="flex-none"> <div class="flex-none">
<figure class="" v-if="identity.avatar"> <figure class="h-8 w-8" v-if="identity.avatar">
<img <img
class="rounded-full h-8 w-8" class="rounded-full object-cover h-full"
loading="lazy" loading="lazy"
:src="identity.avatar.url" :src="identity.avatar.url"
alt="" alt=""

View File

@ -238,7 +238,7 @@ import FormatListNumbered from "vue-material-design-icons/FormatListNumbered.vue
import FormatQuoteClose from "vue-material-design-icons/FormatQuoteClose.vue"; import FormatQuoteClose from "vue-material-design-icons/FormatQuoteClose.vue";
import Undo from "vue-material-design-icons/Undo.vue"; import Undo from "vue-material-design-icons/Undo.vue";
import Redo from "vue-material-design-icons/Redo.vue"; import Redo from "vue-material-design-icons/Redo.vue";
import Placeholder from '@tiptap/extension-placeholder' import Placeholder from "@tiptap/extension-placeholder";
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
@ -332,8 +332,8 @@ const editor = useEditor({
submit: () => emit("submit"), submit: () => emit("submit"),
}), }),
Placeholder.configure({ Placeholder.configure({
placeholder: props.placeholder ?? t('Write something') placeholder: props.placeholder ?? t("Write something"),
}) }),
], ],
injectCSS: false, injectCSS: false,
content: props.modelValue, content: props.modelValue,

View File

@ -66,12 +66,18 @@
</div> </div>
<div class="flex flex-wrap gap-4"> <div class="flex flex-wrap gap-4">
<div> <div>
<h2>{{ t('Last published event')}}</h2> <h2>{{ t("Last published event") }}</h2>
<event-card v-if="dashboard?.lastPublicEventPublished" :event="dashboard?.lastPublicEventPublished" /> <event-card
v-if="dashboard?.lastPublicEventPublished"
:event="dashboard?.lastPublicEventPublished"
/>
</div> </div>
<div> <div>
<h2>{{ t('Last group created')}}</h2> <h2>{{ t("Last group created") }}</h2>
<group-card v-if="dashboard?.lastGroupCreated" :group="dashboard?.lastGroupCreated" /> <group-card
v-if="dashboard?.lastGroupCreated"
:group="dashboard?.lastGroupCreated"
/>
</div> </div>
</div> </div>
</section> </section>

View File

@ -110,9 +110,7 @@
<div <div
class="rounded-lg dark:border-violet-title flex flex-wrap flex-col md:flex-row-reverse gap-4" class="rounded-lg dark:border-violet-title flex flex-wrap flex-col md:flex-row-reverse gap-4"
> >
<aside <aside class="rounded bg-white dark:bg-gray-600 shadow-md h-min">
class="rounded bg-white dark:bg-gray-600 shadow-md h-min"
>
<div class="sticky p-4"> <div class="sticky p-4">
<event-metadata-sidebar <event-metadata-sidebar
v-if="event" v-if="event"
@ -123,7 +121,9 @@
</div> </div>
</aside> </aside>
<div class="flex-1"> <div class="flex-1">
<section class="event-description bg-white dark:bg-zinc-700 px-3 pt-1 pb-3 rounded mb-4"> <section
class="event-description bg-white dark:bg-zinc-700 px-3 pt-1 pb-3 rounded mb-4"
>
<h2 class="text-2xl">{{ t("About this event") }}</h2> <h2 class="text-2xl">{{ t("About this event") }}</h2>
<p v-if="!event?.description"> <p v-if="!event?.description">
{{ t("The event organizer didn't add any description.") }} {{ t("The event organizer didn't add any description.") }}
@ -146,7 +146,10 @@
:metadata="metadata" :metadata="metadata"
/> />
</section> </section>
<section class="bg-white dark:bg-zinc-700 px-3 pt-1 pb-3 rounded my-4" ref="commentsObserver"> <section
class="bg-white dark:bg-zinc-700 px-3 pt-1 pb-3 rounded my-4"
ref="commentsObserver"
>
<a href="#comments"> <a href="#comments">
<h2 class="text-xl" id="comments">{{ t("Comments") }}</h2> <h2 class="text-xl" id="comments">{{ t("Comments") }}</h2>
</a> </a>
@ -155,7 +158,10 @@
</div> </div>
</div> </div>
<section class="bg-white dark:bg-zinc-700 px-3 pt-1 pb-3 rounded my-4" v-if="(event?.relatedEvents ?? []).length > 0"> <section
class="bg-white dark:bg-zinc-700 px-3 pt-1 pb-3 rounded my-4"
v-if="(event?.relatedEvents ?? []).length > 0"
>
<h2 class="text-2xl mb-2"> <h2 class="text-2xl mb-2">
{{ t("These events may interest you") }} {{ t("These events may interest you") }}
</h2> </h2>
@ -493,7 +499,6 @@ useHead({
}); });
</script> </script>
<style> <style>
.event-description a { .event-description a {
@apply inline-block p-1 bg-mbz-yellow-alt-200 text-black; @apply inline-block p-1 bg-mbz-yellow-alt-200 text-black;
} }

View File

@ -112,9 +112,9 @@
v-slot="props" v-slot="props"
> >
<article class="flex"> <article class="flex">
<figure v-if="props.row.actor.avatar"> <figure v-if="props.row.actor.avatar" class="h-10 w-10">
<img <img
class="rounded" class="rounded-full object-cover h-full"
:src="props.row.actor.avatar.url" :src="props.row.actor.avatar.url"
:alt="props.row.actor.avatar.alt || ''" :alt="props.row.actor.avatar.alt || ''"
height="48" height="48"