|
8 | 8 | @closePanel="onClose" |
9 | 9 | > |
10 | 10 | <template #header> |
11 | | - <h1 style="margin: 0">{{ getPanelTitle() }}</h1> |
| 11 | + <h1 class="side-panel-title">{{ getPanelTitle() }}</h1> |
12 | 12 | </template> |
13 | 13 |
|
14 | 14 | <template #default> |
15 | | - <div class="form-section"> |
| 15 | + <div> |
16 | 16 | <KRadioButtonGroup> |
17 | 17 | <KRadioButton |
18 | 18 | :label="modeLive$()" |
19 | 19 | :buttonValue="PublishModes.LIVE" |
20 | 20 | :currentValue="mode" |
| 21 | + :description="modeLiveDescription$()" |
21 | 22 | @input="mode = PublishModes.LIVE" |
22 | 23 | /> |
23 | | - <div |
24 | | - class="radio-description" |
25 | | - :style="{ color: $themeTokens.annotation }" |
26 | | - > |
27 | | - {{ modeLiveDescription$() }} |
28 | | - </div> |
29 | 24 |
|
30 | 25 | <!-- Live mode content nested under the radio button --> |
31 | 26 | <div |
32 | 27 | v-if="mode === PublishModes.LIVE" |
33 | 28 | class="live-mode-content" |
34 | 29 | style="margin-top: 16px; margin-left: 24px" |
35 | 30 | > |
36 | | - <div |
37 | | - class="info-section" |
38 | | - :style="{ |
39 | | - backgroundColor: $themeTokens.surface, |
40 | | - border: `1px solid ${$themeTokens.outline}`, |
41 | | - }" |
42 | | - > |
| 31 | + <div class="live-publish-info"> |
43 | 32 | <KIcon |
44 | | - icon="info" |
45 | | - :color="$themeTokens.primary" |
| 33 | + class="info-icon" |
| 34 | + icon="infoOutline" |
46 | 35 | /> |
47 | | - <span>{{ |
48 | | - publishingInfo$({ |
49 | | - version: currentChannel.version + 1, |
50 | | - }) |
51 | | - }}</span> |
52 | | - </div> |
| 36 | + <div class="version-notes-wrapper"> |
| 37 | + <div class="version-info"> |
| 38 | + {{ |
| 39 | + publishingInfo$({ |
| 40 | + version: currentChannel.version + 1, |
| 41 | + }) |
| 42 | + }} |
| 43 | + </div> |
53 | 44 |
|
54 | | - <div class="form-section"> |
55 | | - <KTextbox |
56 | | - v-model="version_notes" |
57 | | - :label="versionNotesLabel$()" |
58 | | - :invalid="version_notes.length === 0" |
59 | | - :invalidText="'Version notes are required'" |
60 | | - :showInvalidText="showVersionNotesInvalidText" |
61 | | - textArea |
62 | | - :maxlength="250" |
63 | | - @blur="onVersionNotesBlur" |
64 | | - /> |
65 | | - </div> |
| 45 | + <div class="version-notes-description"> |
| 46 | + {{ versionNotesLabel$() }} |
| 47 | + </div> |
66 | 48 |
|
67 | | - <!-- Language selector --> |
68 | | - <div |
69 | | - v-if="showLanguageDropdown" |
70 | | - class="form-section" |
71 | | - > |
72 | | - <KSelect |
73 | | - v-model="language" |
74 | | - :label="languageLabel$()" |
75 | | - :invalid="showLanguageInvalidText" |
76 | | - :invalidText="languageRequiredMessage$()" |
77 | | - :options="languages" |
78 | | - @change="onLanguageChange" |
79 | | - /> |
| 49 | + <div class="form-section"> |
| 50 | + <KTextbox |
| 51 | + v-model="version_notes" |
| 52 | + :label="versionDescriptionLabel$()" |
| 53 | + :invalid="version_notes.length === 0" |
| 54 | + :invalidText="'Version notes are required'" |
| 55 | + :showInvalidText="showVersionNotesInvalidText" |
| 56 | + textArea |
| 57 | + :maxlength="250" |
| 58 | + :appearanceOverrides="{ maxWidth: 'none' }" |
| 59 | + @blur="onVersionNotesBlur" |
| 60 | + /> |
| 61 | + </div> |
| 62 | + <!-- Language selector --> |
| 63 | + <div |
| 64 | + v-if="showLanguageDropdown" |
| 65 | + class="form-section" |
| 66 | + > |
| 67 | + <KSelect |
| 68 | + v-model="language" |
| 69 | + :label="languageLabel$()" |
| 70 | + :invalid="showLanguageInvalidText" |
| 71 | + :invalidText="languageRequiredMessage$()" |
| 72 | + :options="languages" |
| 73 | + @change="onLanguageChange" |
| 74 | + /> |
| 75 | + </div> |
| 76 | + </div> |
80 | 77 | </div> |
81 | 78 |
|
82 | 79 | <div |
|
92 | 89 | > |
93 | 90 | <KIcon |
94 | 91 | icon="warning" |
| 92 | + style="font-size: 20px" |
95 | 93 | :color="$themePalette.yellow.v_500" |
96 | 94 | /> |
97 | 95 | <div class="warning-text"> |
|
103 | 101 | </div> |
104 | 102 | <div |
105 | 103 | class="warning-description" |
106 | | - :style="{ color: $themeTokens.annotation }" |
| 104 | + :style="{ color: $themePalette.grey.v_800 }" |
107 | 105 | > |
108 | 106 | {{ incompleteResourcesDescription1$() }} |
109 | 107 | </div> |
110 | 108 | <div |
111 | 109 | class="warning-description" |
112 | | - :style="{ color: $themeTokens.annotation }" |
| 110 | + :style="{ |
| 111 | + color: $themePalette.grey.v_800, |
| 112 | + marginTop: '16px', |
| 113 | + }" |
113 | 114 | > |
114 | 115 | {{ incompleteResourcesDescription2$() }} |
115 | 116 | </div> |
|
122 | 123 | :label="modeDraft$()" |
123 | 124 | :buttonValue="PublishModes.DRAFT" |
124 | 125 | :currentValue="mode" |
| 126 | + :description="modeDraftDescription$()" |
125 | 127 | @input="mode = PublishModes.DRAFT" |
126 | 128 | /> |
127 | | - <div |
128 | | - class="radio-description" |
129 | | - :style="{ color: $themeTokens.annotation }" |
130 | | - > |
131 | | - {{ modeDraftDescription$() }} |
132 | | - </div> |
133 | 129 | </KRadioButtonGroup> |
134 | 130 | </div> |
135 | 131 | </template> |
136 | 132 |
|
137 | 133 | <template #bottomNavigation> |
138 | 134 | <div class="footer"> |
139 | | - <KButton |
140 | | - appearance="flat-button" |
141 | | - @click="onClose" |
142 | | - > |
| 135 | + <KButton @click="onClose"> |
143 | 136 | {{ cancelAction$() }} |
144 | 137 | </KButton> |
145 | 138 | <KButton |
|
196 | 189 |
|
197 | 190 | const { |
198 | 191 | publishChannel$, |
199 | | - publishLive$, |
| 192 | + publishAction$, |
200 | 193 | saveDraft$, |
201 | 194 | modeLive$, |
202 | 195 | modeDraft$, |
203 | 196 | versionNotesLabel$, |
204 | 197 | modeLiveDescription$, |
205 | 198 | modeDraftDescription$, |
206 | 199 | publishingInfo$, |
| 200 | + versionDescriptionLabel$, |
207 | 201 | incompleteResourcesWarning$, |
208 | 202 | incompleteResourcesDescription1$, |
209 | 203 | incompleteResourcesDescription2$, |
|
263 | 257 | }); |
264 | 258 |
|
265 | 259 | const submitText = computed(() => { |
266 | | - return mode.value === PublishModes.DRAFT ? saveDraft$() : publishLive$(); |
| 260 | + return mode.value === PublishModes.DRAFT ? saveDraft$() : publishAction$(); |
267 | 261 | }); |
268 | 262 |
|
269 | 263 | const filterLanguages = filterFn => { |
|
392 | 386 | modeLiveDescription$, |
393 | 387 | modeDraftDescription$, |
394 | 388 | publishingInfo$, |
| 389 | + versionDescriptionLabel$, |
395 | 390 | incompleteResourcesWarning$, |
396 | 391 | incompleteResourcesDescription1$, |
397 | 392 | incompleteResourcesDescription2$, |
|
413 | 408 | </script> |
414 | 409 |
|
415 | 410 |
|
416 | | -<style scoped> |
| 411 | +<style scoped lang="scss"> |
| 412 | +
|
| 413 | + .side-panel-title { |
| 414 | + margin: 0; |
| 415 | + font-size: 20px; |
| 416 | + } |
| 417 | +
|
| 418 | + .live-publish-info { |
| 419 | + display: flex; |
| 420 | + gap: 8px; |
| 421 | +
|
| 422 | + .info-icon { |
| 423 | + font-size: 20px; |
| 424 | + } |
| 425 | +
|
| 426 | + .version-notes-wrapper { |
| 427 | + width: 100%; |
| 428 | +
|
| 429 | + .version-info { |
| 430 | + margin-top: 2px; |
| 431 | + } |
| 432 | +
|
| 433 | + .version-notes-description { |
| 434 | + margin-top: 8px; |
| 435 | + } |
| 436 | + } |
| 437 | + } |
417 | 438 |
|
418 | 439 | .form-section { |
419 | 440 | margin: 16px 0; |
|
427 | 448 |
|
428 | 449 | .footer { |
429 | 450 | display: flex; |
430 | | - gap: 8px; |
| 451 | + gap: 16px; |
431 | 452 | justify-content: flex-end; |
432 | 453 | width: 100%; |
433 | | - padding: 12px 0; |
434 | | - } |
435 | | -
|
436 | | - .radio-description { |
437 | | - margin-bottom: 16px; |
438 | | - margin-left: 24px; |
439 | 454 | } |
440 | 455 |
|
441 | 456 | .info-section { |
|
0 commit comments