Skip to content

Commit 02cc385

Browse files
committed
Add config lang switch button to modal, minor ToC style changes
1 parent 5ba750e commit 02cc385

File tree

4 files changed

+25
-13
lines changed

4 files changed

+25
-13
lines changed

src/components/editor.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
<div class="flex items-center justify-center border-b p-2">
190190
<!-- Edit metadata button -->
191191
<!-- Opens the edit metadata modal -->
192-
<button class="toc-popup-button" @click.stop="$vfm.open('metadata-edit-modal')">
192+
<button class="toc-popup-button border-gray-400" @click.stop="$vfm.open('metadata-edit-modal')">
193193
<span class="align-middle inline-block pr-1"
194194
><svg
195195
clip-rule="evenodd"
@@ -637,7 +637,6 @@ window.addEventListener('resize', () => {
637637
638638
.editor-button {
639639
padding: 5px 12px;
640-
margin: 0px 10px;
641640
font-weight: 600;
642641
transition-duration: 0.2s;
643642
}

src/components/helpers/toc-options.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@
3434
</template>
3535
<a
3636
href="javascript:;"
37-
class="flex items-center space-x-2 leading-snug text-left w-auto"
37+
class="flex items-center leading-tight text-left w-auto"
3838
:class="{
3939
'disabled click-events-none cursor-not-allowed opacity-60': !copyAllowed
4040
}"
4141
@click="copyAllowed && copySlide()"
4242
role="button"
4343
aria-label="copy-contents"
4444
>
45-
<span class="flex items-center gap-1">
45+
<span class="flex items-center gap-0.5">
4646
<svg
4747
xmlns="http://www.w3.org/2000/svg"
4848
height="17"
4949
width="17"
5050
viewBox="0 0 24 24"
51-
class="flex-shrink-0 mx-2 my-1"
51+
class="flex-shrink-0 mr-2"
5252
>
5353
<path
5454
d="M5 22q-.825 0-1.413-.587Q3 20.825 3 20V6h2v14h11v2Zm4-4q-.825 0-1.412-.587Q7 16.825 7 16V4q0-.825.588-1.413Q8.175 2 9 2h9q.825 0 1.413.587Q20 3.175 20 4v12q0 .825-.587 1.413Q18.825 18 18 18Zm0-2h9V4H9v12Zm0 0V4v12Z"
@@ -59,21 +59,21 @@
5959
</a>
6060
<a
6161
href="javascript:;"
62-
class="flex leading-snug items-center text-left w-auto"
62+
class="flex leading-tight items-center text-left w-auto"
6363
:class="{
6464
'disabled click-events-none cursor-not-allowed opacity-60': !deleteAllowed
6565
}"
6666
@click="deleteAllowed && clearSlide()"
6767
role="button"
6868
aria-label="DELETE"
6969
>
70-
<span class="flex items-center gap-1.5">
70+
<span class="flex items-center gap-1">
7171
<svg
7272
xmlns="http://www.w3.org/2000/svg"
7373
viewBox="0 0 110.61 122.88"
7474
width="15"
7575
height="15"
76-
class="mx-2 my-1"
76+
class="mr-2"
7777
>
7878
<path
7979
d="M39.27,58.64a4.74,4.74,0,1,1,9.47,0V93.72a4.74,4.74,0,1,1-9.47,0V58.64Zm63.6-19.86L98,103a22.29,22.29,0,0,1-6.33,14.1,19.41,19.41,0,0,1-13.88,5.78h-45a19.4,19.4,0,0,1-13.86-5.78l0,0A22.31,22.31,0,0,1,12.59,103L7.74,38.78H0V25c0-3.32,1.63-4.58,4.84-4.58H27.58V10.79A10.82,10.82,0,0,1,38.37,0H72.24A10.82,10.82,0,0,1,83,10.79v9.62h23.35a6.19,6.19,0,0,1,1,.06A3.86,3.86,0,0,1,110.59,24c0,.2,0,.38,0,.57V38.78Zm-9.5.17H17.24L22,102.3a12.82,12.82,0,0,0,3.57,8.1l0,0a10,10,0,0,0,7.19,3h45a10.06,10.06,0,0,0,7.19-3,12.8,12.8,0,0,0,3.59-8.1L93.37,39ZM71,20.41V12.05H39.64v8.36ZM61.87,58.64a4.74,4.74,0,1,1,9.47,0V93.72a4.74,4.74,0,1,1-9.47,0V58.64Z"

src/components/metadata-editor.vue

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
/>
101101
<button
102102
@click="renameProduct"
103-
class="editor-button editor-forms-button bg-black text-white mr-0"
103+
class="editor-button editor-forms-button bg-black text-white mr-0 ml-2"
104104
:class="{ 'input-error': error }"
105105
:disabled="changeUuid.length === 0 || checkingUuid || warning === 'rename'"
106106
>
@@ -183,7 +183,7 @@
183183
generateRemoteConfig().then(fetchHistory);
184184
}
185185
"
186-
class="editor-button editor-forms-button bg-black text-white mr-0"
186+
class="editor-button editor-forms-button bg-black text-white mr-0 ml-2"
187187
:class="{ 'input-error': error }"
188188
:disabled="loadStatus === 'loading'"
189189
v-if="editExisting"
@@ -524,7 +524,17 @@
524524
class="flex justify-center items-center"
525525
>
526526
<div @click.stop class="flex flex-col space-y-2">
527-
<h2 slot="header" class="text-2xl font-bold mb-3">{{ $t('editor.editMetadata') }}</h2>
527+
<h2 slot="header" class="text-2xl font-bold">{{ $t('editor.editMetadata') }}</h2>
528+
<!-- ENG/FR config toggle -->
529+
<div class="mb-3">
530+
<button
531+
class="editor-button editor-forms-button border border-gray-300"
532+
@click="swapLang()"
533+
tabindex="0"
534+
>
535+
{{ configLang === 'en' ? $t('editor.frenchConfig') : $t('editor.englishConfig') }}
536+
</button>
537+
</div>
528538
<metadata-content
529539
:metadata="metadata"
530540
@metadata-changed="updateMetadata"
@@ -1805,11 +1815,14 @@ $font-list: 'Segoe UI', system-ui, ui-sans-serif, Tahoma, Geneva, Verdana, sans-
18051815
.vfm__content button {
18061816
border-radius: 3px;
18071817
padding: 5px 12px;
1808-
margin: 0px 10px;
18091818
font-weight: 600;
18101819
transition-duration: 0.2s;
18111820
}
18121821
1822+
.vfm__content button:focus {
1823+
transition-duration: 0.075s;
1824+
}
1825+
18131826
.vfm__content button:hover:enabled {
18141827
background-color: #dbdbdb;
18151828
color: black;

src/components/slide-toc.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<p class="ml-auto"></p>
99
<!-- Add new slide button -->
1010
<!-- New slide will have a blank ENG and FR config, with some exceptions -->
11-
<button class="mx-auto toc-popup-button py-0 px-2" @click="addNewSlide">
11+
<button class="mx-auto toc-popup-button py-0 px-2 border-gray-300 font-semibold" @click="addNewSlide">
1212
<span class="inline-block pr-1"
1313
><svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24">
1414
<path d="M24 10h-10v-10h-4v10h-10v4h10v10h4v-10h10z" />

0 commit comments

Comments
 (0)