Turn on edit mode and close, then show banner on hompage when edit mode on

This commit is contained in:
Alicia Sykes 2021-10-17 20:10:59 +01:00
parent ef57a5be1f
commit 31a2d74461
2 changed files with 8 additions and 0 deletions

View File

@ -229,6 +229,8 @@ export default {
/* 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);
},
/* Used for smart-sort when sorting items by most used apps */
incrementMostUsedCount(itemId) {

View File

@ -48,6 +48,7 @@
<div v-if="checkIfResults()" class="no-data">
{{searchValue ? $t('home.no-results') : $t('home.no-data')}}
</div>
<EditModeSaveMenu v-if="isEditMode" />
</div>
</template>
@ -55,6 +56,7 @@
import SettingsContainer from '@/components/Settings/SettingsContainer.vue';
import Section from '@/components/LinkItems/Section.vue';
import EditModeSaveMenu from '@/components/InteractiveEditor/EditModeSaveMenu.vue';
import { searchTiles } from '@/utils/Search';
import Defaults, { localStorageKeys, iconCdns } from '@/utils/defaults';
import ErrorHandler from '@/utils/ErrorHandler';
@ -64,6 +66,7 @@ export default {
name: 'home',
components: {
SettingsContainer,
EditModeSaveMenu,
Section,
BackIcon,
},
@ -88,6 +91,9 @@ export default {
singleSectionView() {
return this.findSingleSection(this.$store.getters.sections, this.$route.params.section);
},
isEditMode() {
return this.$store.state.editMode;
},
/* Get class for num columns, if specified by user */
colCount() {
let { colCount } = this.appConfig;