From b30683972e130f2d8cde4ec3320f004a0a143c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20D=C3=BCnkelmann?= Date: Wed, 22 Mar 2023 14:34:30 +0100 Subject: [PATCH] feat(RTF): add universal popup component and add it to the rtf page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Dünkelmann --- src/components/pages/DPopup.vue | 26 ++++++++++++++++++++ src/models/builder/events/TourBuilder.ts | 11 +++++++-- src/models/entities/events/Tour.ts | 6 +++-- src/pages/events/tours/events/rtfs/index.vue | 2 ++ src/store/events/Tour.ts | 8 +++++- 5 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 src/components/pages/DPopup.vue diff --git a/src/components/pages/DPopup.vue b/src/components/pages/DPopup.vue new file mode 100644 index 000000000..78fc95c18 --- /dev/null +++ b/src/components/pages/DPopup.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/models/builder/events/TourBuilder.ts b/src/models/builder/events/TourBuilder.ts index b5b084c28..9666c6be1 100644 --- a/src/models/builder/events/TourBuilder.ts +++ b/src/models/builder/events/TourBuilder.ts @@ -1,8 +1,9 @@ import ABuilder from '~/models/builder/ABuilder' -import EEvent from '~/models/enums/EEvent' -import GalleryEntry from '~/models/entities/rtc-cologne/gallery/GalleryEntry' +import PopupBuilder from '~/models/builder/PopupBuilder' import Tour from '~/models/entities/events/Tour' import Control from '~/models/entities/events/tours/Control' +import GalleryEntry from '~/models/entities/rtc-cologne/gallery/GalleryEntry' +import EEvent from '~/models/enums/EEvent' export default class TourBuilder extends ABuilder { protected tour = new Tour() @@ -41,6 +42,12 @@ export default class TourBuilder extends ABuilder { return this } + setPopup(text: string, title: string): TourBuilder { + this.tour.popup = new PopupBuilder().setId('04ad6a7c-7fff-4224-bdb6-b52fb64f1785').setText(text).setTitle(title).build() + + return this + } + setText(value: string): TourBuilder { this.tour.text = value diff --git a/src/models/entities/events/Tour.ts b/src/models/entities/events/Tour.ts index 037cb8b0b..568b30c37 100644 --- a/src/models/entities/events/Tour.ts +++ b/src/models/entities/events/Tour.ts @@ -1,7 +1,8 @@ -import EEvent from '~/models/enums/EEvent' -import GalleryEntry from '~/models/entities/rtc-cologne/gallery/GalleryEntry' import AEntity from '~/models/entities/AEntity' import Control from '~/models/entities/events/tours/Control' +import Popup from '~/models/entities/Popup' +import GalleryEntry from '~/models/entities/rtc-cologne/gallery/GalleryEntry' +import EEvent from '~/models/enums/EEvent' export default class Tour extends AEntity { active = true @@ -9,6 +10,7 @@ export default class Tour extends AEntity { controls: Control[] = [] images: GalleryEntry[] = [] lastChange!: Date + popup?: Popup text!: string title!: string urls: Record = {} diff --git a/src/pages/events/tours/events/rtfs/index.vue b/src/pages/events/tours/events/rtfs/index.vue index b2ecb11d1..55361e733 100644 --- a/src/pages/events/tours/events/rtfs/index.vue +++ b/src/pages/events/tours/events/rtfs/index.vue @@ -139,11 +139,13 @@ +