1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

feat(UI): folders customization

This commit is contained in:
2022-11-26 11:21:47 +01:00
parent 321b387083
commit 72accb7b0e
8 changed files with 215 additions and 7 deletions

View File

@ -17,6 +17,9 @@
>
<span class="d-flex"><i class="mdi mdi-18px mdi-content-duplicate text-light pr-1" /> {{ t('word.duplicate') }}</span>
</div>
<div class="context-element" @click.stop="showAppearenceModal">
<span class="d-flex"><i class="mdi mdi-18px mdi-brush-variant text-light pr-1" /> {{ t('word.appearence') }}</span>
</div>
<div class="context-element" @click="showConfirmModal">
<span class="d-flex"><i class="mdi mdi-18px mdi-delete text-light pr-1" /> {{ t('word.delete') }}</span>
</div>
@ -37,6 +40,11 @@
</div>
</template>
</ConfirmModal>
<ModalFolderAppearence
v-if="isFolderEdit"
:folder="contextConnection"
@close="hideAppearenceModal"
/>
</BaseContextMenu>
</template>
@ -49,6 +57,7 @@ import { SidebarElement, useConnectionsStore } from '@/stores/connections';
import { useWorkspacesStore } from '@/stores/workspaces';
import BaseContextMenu from '@/components/BaseContextMenu.vue';
import ConfirmModal from '@/components/BaseConfirmModal.vue';
import ModalFolderAppearence from '@/components/ModalFolderAppearence.vue';
const { t } = useI18n();
@ -78,6 +87,8 @@ const props = defineProps({
const emit = defineEmits(['close-context']);
const isConfirmModal = ref(false);
const isFolderEdit = ref(false);
const isConnectionEdit = ref(false);
const connectionName = computed(() => props.contextConnection.name || getConnectionName(props.contextConnection.uid) || t('word.folder', 1));
const isConnected = computed(() => getWorkspace(props.contextConnection.uid)?.connectionStatus === 'connected');
@ -101,6 +112,19 @@ const duplicateConnection = () => {
closeContext();
};
const showAppearenceModal = () => {
if (props.contextConnection.isFolder)
isFolderEdit.value = true;
else
isFolderEdit.value = true;
};
const hideAppearenceModal = () => {
isConnectionEdit.value = false;
isFolderEdit.value = false;
closeContext();
};
const showConfirmModal = () => {
isConfirmModal.value = true;
};