Skip to content

Commit

Permalink
disable right only toggle for dynamic slide, remove uuid spellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
IshavSohal committed Nov 29, 2024
1 parent 6ab1b8b commit 1132042
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions src/components/metadata-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
placement: 'top-end',
touch: false
}"
spellcheck="false"
/>
<button
@click="renameProduct"
Expand Down Expand Up @@ -150,6 +151,7 @@
placement: 'top-end',
touch: false
}"
spellcheck="false"
/>
<!-- Previous storylines (?) dropdown -->
<div
Expand Down
18 changes: 9 additions & 9 deletions src/components/slide-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
id="fullSlide"
class="editor-input rounded-none cursor-pointer w-4 h-4"
v-model="rightOnly"
:disabled="rightOnly && determineEditorType(currentSlide.panel[panelIndex]) === 'dynamic'"
:disabled="rightOnly || currentSlide.panel.length === 1"
@change.stop="
if (currentSlide.panel.length > 1 && panelModified(currentSlide.panel[0])) {
$vfm.open(`right-only-${slideIndex}`);
Expand Down Expand Up @@ -661,24 +661,24 @@ export default class SlideEditorV extends Vue {
if (this.centerSlide) {
this.currentSlide.panel[0].customStyles = 'text-align: right;';
} else {
this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0].customStyles || '').replace(
this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0]?.customStyles || '').replace(
'text-align: right;',
''
);
}
} else if (this.rightOnly) {
} else if (this.rightOnly || this.currentSlide.panel.length === 1) {
if (this.centerSlide) {
this.currentSlide.panel[0].customStyles = 'text-align: center;';
} else {
this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0].customStyles || '').replace(
this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0]?.customStyles || '').replace(
'text-align: right;',
''
);
this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0].customStyles || '').replace(
this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0]?.customStyles || '').replace(
'text-align: left;',
''
);
this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0].customStyles || '').replace(
this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0]?.customStyles || '').replace(
'text-align: center;',
''
);
Expand All @@ -688,11 +688,11 @@ export default class SlideEditorV extends Vue {
this.currentSlide.panel[0].customStyles = 'text-align: right;';
this.currentSlide.panel[1].customStyles = 'text-align: left;';
} else {
this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0].customStyles || '').replace(
this.currentSlide.panel[0].customStyles = (this.currentSlide.panel[0]?.customStyles || '').replace(
'text-align: right;',
''
);
this.currentSlide.panel[1].customStyles = (this.currentSlide.panel[1].customStyles || '').replace(
this.currentSlide.panel[1].customStyles = (this.currentSlide.panel[1]?.customStyles || '').replace(
'text-align: left;',
''
);
Expand All @@ -708,7 +708,7 @@ export default class SlideEditorV extends Vue {
}
} else {
for (const p in this.currentSlide.panel) {
this.currentSlide.panel[p].customStyles = (this.currentSlide.panel[p].customStyles || '').replace(
this.currentSlide.panel[p].customStyles = (this.currentSlide.panel[p]?.customStyles || '').replace(
'text-align: center;',
''
);
Expand Down

0 comments on commit 1132042

Please sign in to comment.