Skip to content

Commit 98a976a

Browse files
Merge pull request #2026 from frankrousseau/main
[ui] Annotation fixes, shortcut modal redesign and locale updates
2 parents c2435b4 + a21f45c commit 98a976a

30 files changed

Lines changed: 5080 additions & 1366 deletions

src/components/modals/AddAttachmentModal.vue

Lines changed: 8 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,13 @@
2727
{{ $t('tasks.comment_image') }}
2828
</h1>
2929

30-
<div class="attachment-upload-zone">
31-
<file-upload
32-
ref="fileField"
33-
:label="$t('main.select_file')"
34-
:accept="extensions"
35-
:multiple="true"
36-
:is-primary="false"
37-
@fileselected="onFileSelected"
38-
hide-file-names
39-
/>
40-
</div>
30+
<file-upload-zone
31+
ref="fileField"
32+
:label="$t('main.select_file')"
33+
:accept="extensions"
34+
:multiple="true"
35+
@fileselected="onFileSelected"
36+
/>
4137

4238
<div class="snapshot-actions" v-if="isMovie || isPicture">
4339
<button
@@ -119,7 +115,7 @@ import { onBeforeUnmount, onMounted, ref, toRef, watch } from 'vue'
119115
import { useModal } from '@/composables/modal'
120116
import files from '@/lib/files'
121117
122-
import FileUpload from '@/components/widgets/FileUpload.vue'
118+
import FileUploadZone from '@/components/widgets/FileUploadZone.vue'
123119
124120
const props = defineProps({
125121
active: { type: Boolean, default: false },
@@ -282,45 +278,6 @@ h3.subtitle {
282278
flex-wrap: wrap;
283279
}
284280
285-
.attachment-upload-zone {
286-
border: 2px dashed var(--border);
287-
border-radius: 10px;
288-
margin: 1em 0;
289-
padding: 1.5em;
290-
text-align: center;
291-
transition:
292-
border-color 0.2s ease,
293-
background 0.2s ease;
294-
295-
&:hover {
296-
background: var(--background-hover, rgba(255, 255, 255, 0.03));
297-
border-color: var(--background-selectable, $purple-strong);
298-
}
299-
300-
// Strip Bulma's button background off the file-upload label so the
301-
// dropzone's outline is the single visual container — the text sits
302-
// directly on the dashed area, no inner button chip.
303-
:deep(.dropbox) {
304-
background: transparent;
305-
border: 0;
306-
justify-content: center;
307-
padding: 0;
308-
}
309-
310-
:deep(.dropbox label.button) {
311-
background: transparent;
312-
border: 0;
313-
color: var(--text);
314-
cursor: pointer;
315-
font-weight: 500;
316-
317-
&:hover {
318-
background: transparent;
319-
color: var(--background-selectable, $purple-strong);
320-
}
321-
}
322-
}
323-
324281
.snapshot-actions {
325282
display: flex;
326283
flex-direction: column;

src/components/modals/AddPreviewModal.vue

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,12 @@
3434
{{ $t('tasks.select_preview_file') }}
3535
</p>
3636

37-
<file-upload
37+
<file-upload-zone
3838
ref="previewField"
39-
class="preview-files-field"
4039
:accept="extensions"
41-
:is-primary="false"
4240
:label="$t('main.select_file')"
4341
:multiple="isMultiple"
4442
@fileselected="onFileSelected"
45-
hide-file-names
4643
/>
4744

4845
<p class="error" v-if="isError">
@@ -129,7 +126,7 @@ import { onBeforeUnmount, onMounted, ref, toRef, watch } from 'vue'
129126
import { useModal } from '@/composables/modal'
130127
import files from '@/lib/files'
131128
132-
import FileUpload from '@/components/widgets/FileUpload.vue'
129+
import FileUploadZone from '@/components/widgets/FileUploadZone.vue'
133130
134131
const props = defineProps({
135132
active: { type: Boolean, default: false },
@@ -301,10 +298,6 @@ h3.subtitle {
301298
border-width: 0 0 0 4px;
302299
}
303300
304-
.preview-files-field {
305-
margin: auto;
306-
}
307-
308301
.box.content {
309302
position: relative;
310303
}
Lines changed: 94 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,60 @@
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
5284
const taskTypeId = ref('')
5385
5486
const runConfirmation = () => {
5587
emit('confirm', taskTypeId.value)
5688
}
5789
90+
const runUpdateLatest = () => {
91+
emit('update-latest')
92+
}
93+
5894
watch(
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

Comments
 (0)