🩹 Fix warnings from modal opening

This commit is contained in:
Alicia Sykes
2026-04-25 21:44:19 +01:00
parent 747812971c
commit 7166ebd7cd
4 changed files with 2 additions and 25 deletions

View File

@@ -19,7 +19,6 @@
import EditSectionMenu from '@/components/InteractiveEditor/EditSection.vue';
import MasonryItem from '@/mixins/MasonryItem';
import StoreKeys from '@/utils/StoreMutations';
import { modalNames } from '@/utils/config/defaults';
export default {
name: 'add-section-container',
@@ -41,13 +40,10 @@ export default {
methods: {
openAddNewSectionMenu() {
this.addNewSectionOpen = true;
this.$modal.show(modalNames.EDIT_SECTION);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, true);
},
closeEditSection() {
this.addNewSectionOpen = false;
this.$modal.hide(modalNames.EDIT_SECTION);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, false);
},
},
};

View File

@@ -171,14 +171,11 @@ export default {
openItemSettings() {
this.editMenuOpen = true;
this.contextMenuOpen = false;
this.$modal.show(modalNames.EDIT_ITEM);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, true);
},
/* Ensure conditional is updated, once menu closed */
closeEditMenu() {
this.editMenuOpen = false;
this.$modal.hide(modalNames.EDIT_ITEM);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, false);
},
/* Open the modal for moving/ copying item to other section */
openMoveItemMenu() {

View File

@@ -112,7 +112,7 @@ import ErrorHandler from '@/utils/logging/ErrorHandler';
import sortItems from '@/utils/SortItems';
import { makeRoutePath, viewFromPath } from '@/utils/config/ConfigHelpers';
import StoreKeys from '@/utils/StoreMutations';
import { sortOrder as defaultSortOrder, modalNames } from '@/utils/config/defaults';
import { sortOrder as defaultSortOrder } from '@/utils/config/defaults';
export default {
name: 'Section',
@@ -223,20 +223,17 @@ export default {
/* Open the Section Edit Menu */
openEditSection() {
this.editMenuOpen = true;
this.$modal.show(modalNames.EDIT_SECTION);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, true);
this.closeContextMenu();
},
/* Close the section edit menu */
closeEditSection() {
this.editMenuOpen = false;
this.$modal.hide(modalNames.EDIT_SECTION);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, false);
},
/* Deletes current section, in local state */
removeSection() {
const confirmMsg = this.$t('interactive-editor.edit-section.remove-confirm');
const youSure = confirm(confirmMsg);
const youSure = confirm(confirmMsg);
if (youSure) {
const payload = { sectionIndex: this.index, sectionName: this.title };
this.$store.commit(StoreKeys.REMOVE_SECTION, payload);

View File

@@ -54,8 +54,6 @@ import HomeMixin from '@/mixins/HomeMixin';
import SettingsContainer from '@/components/Settings/SettingsContainer.vue';
import Section from '@/components/LinkItems/Section.vue';
import NotificationThing from '@/components/Settings/LocalConfigWarning.vue';
import StoreKeys from '@/utils/StoreMutations';
import { modalNames } from '@/utils/config/defaults';
import {
makePageName, makeRoutePath, resolveRouteIntent, viewFromPath,
} from '@/utils/config/ConfigHelpers';
@@ -79,7 +77,6 @@ export default {
data: () => ({
layout: '',
itemSizeBound: '',
addNewSectionOpen: false,
activeColCount: 1,
}),
computed: {
@@ -138,16 +135,6 @@ export default {
if (this.singleSectionView) displayData.collapsed = false;
return displayData;
},
openAddNewSectionMenu() {
this.addNewSectionOpen = true;
this.$modal.show(modalNames.EDIT_SECTION);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, true);
},
closeEditSection() {
this.addNewSectionOpen = false;
this.$modal.hide(modalNames.EDIT_SECTION);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, false);
},
/* If on sub-route, and section exists, then return only that section */
findSingleSection: (allSections, sectionTitle) => {
if (!sectionTitle) return undefined;