feat(EventView): added clearer indication that person must log in to create list entry
Build and Push Docker image / build-and-push (push) Successful in 5m5s
Details
Build and Push Docker image / build-and-push (push) Successful in 5m5s
Details
This commit is contained in:
parent
0fa3248aaa
commit
c34fb29308
|
@ -2,13 +2,26 @@ import {Link, useParams, useSearchParams} from "react-router-dom";
|
||||||
import {usePB} from "@/lib/pocketbase.tsx";
|
import {usePB} from "@/lib/pocketbase.tsx";
|
||||||
import {useQuery} from "@tanstack/react-query";
|
import {useQuery} from "@tanstack/react-query";
|
||||||
import NotFound from "../../not-found/index.page.tsx";
|
import NotFound from "../../not-found/index.page.tsx";
|
||||||
import {Accordion, Alert, Anchor, Breadcrumbs, Button, Center, Group, Loader, Title} from "@mantine/core";
|
import {
|
||||||
|
Accordion,
|
||||||
|
ActionIcon,
|
||||||
|
Alert,
|
||||||
|
Anchor,
|
||||||
|
Breadcrumbs,
|
||||||
|
Button,
|
||||||
|
Center,
|
||||||
|
Group,
|
||||||
|
Loader,
|
||||||
|
Text,
|
||||||
|
Title
|
||||||
|
} from "@mantine/core";
|
||||||
import PBAvatar from "@/components/PBAvatar.tsx";
|
import PBAvatar from "@/components/PBAvatar.tsx";
|
||||||
import InnerHtml from "@/components/InnerHtml";
|
import InnerHtml from "@/components/InnerHtml";
|
||||||
import {IconArchive, IconExternalLink, IconEye, IconLogin, IconPencil, IconSectionSign} from "@tabler/icons-react";
|
import {IconArchive, IconExternalLink, IconEye, IconLogin, IconPencil, IconSectionSign} from "@tabler/icons-react";
|
||||||
import EventData from "@/pages/events/e/:eventId/EventComponents/EventData.tsx";
|
import EventData from "@/pages/events/e/:eventId/EventComponents/EventData.tsx";
|
||||||
import EventListView from "@/pages/events/s/EventListView.tsx";
|
import EventListView from "@/pages/events/s/EventListView.tsx";
|
||||||
import {useEventRights} from "@/pages/events/util.ts";
|
import {useEventRights} from "@/pages/events/util.ts";
|
||||||
|
import {useLogin} from "@/components/users/modals/hooks.ts";
|
||||||
|
|
||||||
|
|
||||||
export default function SharedEvent() {
|
export default function SharedEvent() {
|
||||||
|
@ -30,6 +43,9 @@ export default function SharedEvent() {
|
||||||
|
|
||||||
const {canEditEventList, canEditEvent} = useEventRights(eventQuery.data)
|
const {canEditEventList, canEditEvent} = useEventRights(eventQuery.data)
|
||||||
|
|
||||||
|
const {handler: loginHandler} = useLogin()
|
||||||
|
|
||||||
|
|
||||||
if (eventQuery.isLoading) {
|
if (eventQuery.isLoading) {
|
||||||
return <Center h={"100%"}><Loader/></Center>
|
return <Center h={"100%"}><Loader/></Center>
|
||||||
}
|
}
|
||||||
|
@ -66,8 +82,27 @@ export default function SharedEvent() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!user && <div className={"section-transparent"}>
|
{!user && <div className={"section-transparent"}>
|
||||||
<Alert icon={<IconLogin/>} color={"orange"}>
|
<Alert icon={
|
||||||
Um dich in eine Liste einzutragen, musst du dich anmelden
|
<ActionIcon
|
||||||
|
color={"green"}
|
||||||
|
variant={"transparent"}
|
||||||
|
onClick={loginHandler.open}
|
||||||
|
>
|
||||||
|
<IconLogin/>
|
||||||
|
</ActionIcon>
|
||||||
|
} color={"orange"}>
|
||||||
|
Um dich in eine Liste für dieses Event einzutragen, musst du dich
|
||||||
|
{" "}
|
||||||
|
<Text
|
||||||
|
onClick={loginHandler.open}
|
||||||
|
size={"sm"}
|
||||||
|
fw={700}
|
||||||
|
span
|
||||||
|
td={"underline"}
|
||||||
|
style={{cursor: "pointer"}}
|
||||||
|
>
|
||||||
|
anmelden oder einen Gastaccount erstellen
|
||||||
|
</Text>
|
||||||
</Alert>
|
</Alert>
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue