11<template >
22 <base-modal
33 :active =" active"
4- :title =" $t('playlists.select_task_type ')"
4+ :title =" $t('playlists.update_versions_title ')"
55 @cancel =" $emit('cancel')"
66 >
7- <form @submit.prevent >
8- <combobox-task-type :task-type-list =" taskTypeList" v-model =" taskTypeId" />
9- </form >
7+ <div class =" version-cards" >
8+ <section class =" version-card" >
9+ <h3 class =" version-card-title" >
10+ {{ $t('playlists.select_task_type') }}
11+ </h3 >
12+ <p class =" version-card-help" >
13+ {{ $t('playlists.apply_task_type_change') }}
14+ </p >
15+ <form @submit.prevent >
16+ <combobox-task-type
17+ :task-type-list =" taskTypeList"
18+ v-model =" taskTypeId"
19+ />
20+ </form >
21+ <p class =" has-text-right version-card-action" >
22+ <a
23+ :class =" {
24+ button: true,
25+ 'is-primary': true,
26+ 'is-loading': isLoading
27+ }"
28+ @click =" runConfirmation"
29+ >
30+ {{ $t('main.apply') }}
31+ </a >
32+ </p >
33+ </section >
1034
11- <p >
12- {{ $t('playlists.apply_task_type_change') }}
13- </p >
35+ <section class =" version-card" >
36+ <h3 class =" version-card-title" >
37+ {{ $t('playlists.update_to_latest_version') }}
38+ </h3 >
39+ <p class =" version-card-help" >
40+ {{ $t('playlists.update_to_latest_version_help') }}
41+ </p >
42+ <p class =" has-text-right version-card-action" >
43+ <a
44+ :class =" {
45+ button: true,
46+ 'is-primary': true,
47+ 'is-loading': isLoading
48+ }"
49+ @click =" runUpdateLatest"
50+ >
51+ {{ $t('main.apply') }}
52+ </a >
53+ </p >
54+ </section >
55+ </div >
1456
1557 <p class =" has-text-right mt2" >
16- <a
17- :class =" {
18- button: true,
19- 'is-primary': true,
20- 'is-loading': isLoading
21- }"
22- @click =" runConfirmation"
23- >
24- {{ $t('main.confirmation') }}
25- </a >
2658 <button @click =" $emit('cancel')" class =" button is-link" >
2759 {{ $t('main.cancel') }}
2860 </button >
@@ -47,18 +79,62 @@ const props = defineProps({
4779 taskTypeList: { type: Array , default : () => [] }
4880})
4981
50- const emit = defineEmits ([' cancel' , ' confirm' ])
82+ const emit = defineEmits ([' cancel' , ' confirm' , ' update-latest ' ])
5183
5284const taskTypeId = ref (' ' )
5385
5486const runConfirmation = () => {
5587 emit (' confirm' , taskTypeId .value )
5688}
5789
90+ const runUpdateLatest = () => {
91+ emit (' update-latest' )
92+ }
93+
5894watch (
5995 () => props .active ,
6096 () => {
6197 taskTypeId .value = props .taskTypeList [0 ]? .id || ' '
6298 }
6399)
64100< / script>
101+
102+ < style lang= " scss" scoped>
103+ .version - cards {
104+ display: flex;
105+ gap: 1em ;
106+ align- items: stretch;
107+ }
108+
109+ .version - card {
110+ flex: 1 ;
111+ display: flex;
112+ flex- direction: column;
113+ padding: 1em ;
114+ border: 1px solid var (-- border);
115+ border- radius: 6px ;
116+ background: var (-- background- alt);
117+ }
118+
119+ .version - card- title {
120+ font- weight: 600 ;
121+ margin- bottom: 0 .5em ;
122+ }
123+
124+ .version - card- help {
125+ margin- bottom: 1em ;
126+ }
127+
128+ // Pin the action to the bottom so both cards' buttons align even though
129+ // the task-type card is taller (it has the combobox).
130+ .version - card- action {
131+ margin- top: auto;
132+ margin- bottom: 0 ;
133+ }
134+
135+ @media screen and (max - width : 768px ) {
136+ .version - cards {
137+ flex- direction: column;
138+ }
139+ }
140+ < / style>
0 commit comments