so://phie

verbal

A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal

blob: d2eec7af896a8662b83a79dd48238f3013fd2625 (1463 bytes)[doc][blame][raw]

1import {$lang} from '../utils.js';

2import VButton from '../element/button.js';

3

4export default {

5 props: ['title', 'description', 'actions'],

6 components: {

7 VButton

8 },

9 methods: {

10 $lang,

11 open(info) {

12 const {title, description, actions} = info;

13 this.title = title;

14 this.description = description;

15 this.actions = actions;

16 this.$refs.dialog.show();

17 },

18 close() {

19 this.title = null;

20 this.description = null;

21 this.actions = null;

22 this.$refs.dialog.close();

23 }

24 },

25 mounted() {

26 this.close();

27 },

28 template: `

29 <dialog ref="dialog" class="z-40 fixed w-full h-full bg-black/80">

30 <div class="flex flex-col fixed left-[50%] top-[50%] -translate-y-[50%] -translate-x-[50%] rounded-lg sm:rounded-md bg-zinc-900 w-[500px] max-w-[85vw] p-6 sm:p-8 pt-10 sm:pt-8">

31 <h3 class="text-white text-[24px] font-bold pb-4 text-center sm:text-left">{{title}}</h3>

32 <p class="text-md text-gray-400 text-center sm:text-left">{{description}}</p>

33 <v-button

34 v-for="action in actions"

35 :icon="action.icon"

36 :title="action.title"

37 class="self-end"

38 @click="action.handle"

39 ></v-button>

40 </div>

41 </dialog>

42 `

43}