File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
modules/@apostrophecms/i18n/ui/apos/components Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 33 class =" apos-wizard apos-i18n-localize"
44 :class =" { 'apos-wizard-busy': wizard.busy }"
55 :modal =" modal"
6+ :modal-data =" modalData"
67 @esc =" close"
78 @inactive =" modal.active = false"
89 @show-modal =" modal.showModal = true"
@@ -324,6 +325,10 @@ export default {
324325 moduleName: {
325326 required: true ,
326327 type: String
328+ },
329+ modalData: {
330+ type: Object ,
331+ required: true
327332 }
328333 },
329334 emits: [ ' modal-result' ],
@@ -484,13 +489,6 @@ export default {
484489 isBatchMode () {
485490 return this .batchOptions .enabled ;
486491 },
487- currentLocale () {
488- // We need to grab the locale from the modal data, because it can change
489- // while in modal (switch locale in editor modal).
490- // Exposing `modalData` property breaks the internally used AposModal
491- // component for some unknown reason, so we need to use the attrs.
492- return this .$attrs [' modal-data' ]? .locale ?? this .moduleOptions .locale ;
493- },
494492 action () {
495493 return this .doc .slug .startsWith (' /' )
496494 ? apos .page .action
@@ -693,7 +691,7 @@ export default {
693691 return this .wizard .step === name;
694692 },
695693 isCurrentLocale (locale ) {
696- return this .currentLocale === locale .name ;
694+ return this .modalData . locale === locale .name ;
697695 },
698696 canEditLocale (locale ) {
699697 return !! locale ._edit ;
You can’t perform that action at this time.
0 commit comments