2021-01-31 02:43:13 +13:00
|
|
|
<template>
|
|
|
|
|
2021-02-26 14:50:46 +13:00
|
|
|
<span>
|
|
|
|
|
2021-03-03 08:59:56 +13:00
|
|
|
<closeDocumentCheckDialog
|
|
|
|
:dialog-trigger="closeDocumentCheckDialogTrigger"
|
|
|
|
:dialog-document="dialogDoc"
|
|
|
|
@trigger-dialog-close="closeDocumentCheckDialogClose"
|
|
|
|
/>
|
2021-02-26 14:50:46 +13:00
|
|
|
|
2021-04-10 12:22:31 +12:00
|
|
|
<!-- Delele document dialog -->
|
|
|
|
<deleteDocumentCheckDialog
|
|
|
|
:dialog-trigger="deleteObjectDialogTrigger"
|
|
|
|
:document-id="toDeleteID"
|
|
|
|
:document-type="toDeleteType"
|
|
|
|
@trigger-dialog-close="deleteObjectDialogClose"
|
|
|
|
/>
|
|
|
|
|
2021-02-26 14:50:46 +13:00
|
|
|
<q-tabs
|
|
|
|
v-if="localDocuments.length > 0"
|
2021-03-18 10:26:08 +13:00
|
|
|
:class="{'hasTextShadow': textShadow}"
|
2021-02-26 14:50:46 +13:00
|
|
|
align="left"
|
|
|
|
inline-label
|
|
|
|
outside-arrows
|
2021-03-18 10:26:08 +13:00
|
|
|
mobile-arrows
|
2021-02-26 14:50:46 +13:00
|
|
|
class="tabsWrapper"
|
|
|
|
dense
|
|
|
|
no-caps>
|
|
|
|
<transition-group
|
|
|
|
name="list"
|
|
|
|
tag="div"
|
|
|
|
class="headerTransitionWrapper"
|
|
|
|
enter-active-class="animated fadeIn"
|
|
|
|
leave-active-class="animated fadeOut"
|
|
|
|
appear
|
2021-04-03 12:33:49 +13:00
|
|
|
:duration="50">
|
2021-02-26 14:50:46 +13:00
|
|
|
|
|
|
|
<q-route-tab
|
|
|
|
:ripple="false"
|
|
|
|
v-for="document in localDocuments"
|
|
|
|
:to="`/project/display-content/${document.type}/${document._id}`"
|
|
|
|
:key="document.type+document._id"
|
|
|
|
:icon="(retrieveFieldValue(document,'categorySwitch') ? 'fas fa-folder-open' : document.icon)"
|
2021-04-10 12:22:31 +12:00
|
|
|
:style="`
|
|
|
|
color: ${retrieveFieldValue(document,'documentColor')};
|
|
|
|
background-color: ${retrieveFieldValue(document,'documentBackgroundColor')};
|
|
|
|
filter: ${(retrieveFieldValue(document,'minorSwitch') ? 'grayscale(100) brightness(0.7)' : '')}`"
|
2021-04-03 12:33:49 +13:00
|
|
|
:class="[
|
|
|
|
{'isBold':
|
|
|
|
(
|
|
|
|
retrieveFieldValue(document,'documentColor') !== '#ffffff' &&
|
|
|
|
retrieveFieldValue(document,'documentColor') !== '#fff'
|
|
|
|
) &&
|
2021-04-07 02:01:37 +12:00
|
|
|
retrieveFieldValue(document,'documentColor') !== ''
|
|
|
|
}]"
|
2021-02-26 14:50:46 +13:00
|
|
|
:alert="document.hasEdits"
|
|
|
|
alert-icon="mdi-feather"
|
2021-03-03 08:59:56 +13:00
|
|
|
@click.prevent.middle="tryCloseTab(document)"
|
2021-02-26 14:50:46 +13:00
|
|
|
>
|
2021-04-07 02:01:37 +12:00
|
|
|
<span class="isDeadIndicator" v-if="retrieveFieldValue(document,'deadSwitch')">
|
|
|
|
†
|
|
|
|
</span>
|
|
|
|
<div
|
|
|
|
class="q-tab__label"
|
2021-04-10 12:22:31 +12:00
|
|
|
:class="{'isDead': (retrieveFieldValue(document,'deadSwitch') && !hideDeadCrossThrough)}">
|
2021-04-07 02:01:37 +12:00
|
|
|
{{retrieveFieldValue(document,'name')}}
|
|
|
|
</div>
|
2021-02-26 14:50:46 +13:00
|
|
|
<q-tooltip
|
|
|
|
:delay="700"
|
|
|
|
>
|
2021-04-07 02:01:37 +12:00
|
|
|
<span class="isDeadIndicator" v-if="retrieveFieldValue(document,'deadSwitch')">
|
|
|
|
†
|
|
|
|
</span>
|
2021-02-26 14:50:46 +13:00
|
|
|
{{retrieveFieldValue(document,'name')}}
|
2021-04-03 12:33:49 +13:00
|
|
|
<br>
|
|
|
|
<span class="text-caption">Middle mouse button to close</span>
|
2021-02-26 14:50:46 +13:00
|
|
|
</q-tooltip>
|
|
|
|
<q-btn
|
|
|
|
round
|
|
|
|
dense
|
2021-03-05 12:51:41 +13:00
|
|
|
flat
|
2021-02-26 14:50:46 +13:00
|
|
|
class="z-max q-ml-auto"
|
|
|
|
:class="{'q-mr-sm': document.hasEdits}"
|
|
|
|
size="xs"
|
|
|
|
icon="close"
|
|
|
|
style="color: #fff;"
|
2021-03-03 08:59:56 +13:00
|
|
|
@click.stop.prevent="tryCloseTab(document)"
|
2021-02-26 14:50:46 +13:00
|
|
|
/>
|
2021-04-10 12:22:31 +12:00
|
|
|
|
|
|
|
<q-menu
|
|
|
|
touch-position
|
|
|
|
context-menu
|
|
|
|
>
|
|
|
|
|
|
|
|
<q-list class="bg-gunmetal-light">
|
|
|
|
<q-item clickable v-close-popup @click="copyName(document)">
|
|
|
|
<q-item-section>Copy name</q-item-section>
|
|
|
|
<q-item-section avatar>
|
|
|
|
<q-icon name="mdi-text-recognition" />
|
|
|
|
</q-item-section>
|
|
|
|
</q-item>
|
|
|
|
<q-item clickable v-close-popup @click="copyTextColor(document)">
|
|
|
|
<q-item-section>Copy text color</q-item-section>
|
|
|
|
<q-item-section avatar>
|
|
|
|
<q-icon name="mdi-eyedropper" />
|
|
|
|
</q-item-section>
|
|
|
|
</q-item>
|
|
|
|
<q-item clickable v-close-popup @click="copyBackgroundColor(document)">
|
|
|
|
<q-item-section>Copy background color</q-item-section>
|
|
|
|
<q-item-section avatar>
|
|
|
|
<q-icon name="mdi-format-color-fill" />
|
|
|
|
</q-item-section>
|
|
|
|
</q-item>
|
|
|
|
<q-separator />
|
|
|
|
<q-item v-if="!document.isNew" clickable v-close-popup @click="addNewUnderParent(document)">
|
|
|
|
<q-item-section>Create new document with this document as parent</q-item-section>
|
|
|
|
<q-item-section avatar>
|
|
|
|
<q-icon name="mdi-file-tree" />
|
|
|
|
</q-item-section>
|
|
|
|
</q-item>
|
|
|
|
<q-item clickable v-if="!document.isNew" v-close-popup @click="copyTargetDocument(document)">
|
|
|
|
<q-item-section>Copy this document</q-item-section>
|
|
|
|
<q-item-section avatar>
|
|
|
|
<q-icon name="mdi-content-copy" />
|
|
|
|
</q-item-section>
|
|
|
|
</q-item>
|
|
|
|
<q-separator v-if="!document.isNew" />
|
|
|
|
<q-item clickable v-close-popup @click="tryCloseTab(document)">
|
|
|
|
<q-item-section>Close this tab</q-item-section>
|
|
|
|
<q-item-section avatar>
|
|
|
|
<q-icon name="mdi-close" />
|
|
|
|
</q-item-section>
|
|
|
|
</q-item>
|
|
|
|
<q-item clickable v-close-popup @click="SSET_closeAllButCurrentDocuments(document)">
|
|
|
|
<q-item-section>Close all tabs without changes except for this</q-item-section>
|
|
|
|
<q-item-section avatar>
|
|
|
|
<q-icon name="mdi-close-box-outline" />
|
|
|
|
</q-item-section>
|
|
|
|
</q-item>
|
|
|
|
<q-item clickable v-close-popup @click="SSET_closeAllDocuments">
|
|
|
|
<q-item-section>Close all tabs without changes</q-item-section>
|
|
|
|
<q-item-section avatar>
|
|
|
|
<q-icon name="mdi-close-box-multiple-outline" />
|
|
|
|
</q-item-section>
|
|
|
|
</q-item>
|
|
|
|
<q-separator />
|
|
|
|
<q-item clickable v-close-popup @click="SSET_forceCloseAllButCurrentDocuments(document)">
|
|
|
|
<q-item-section>Force close all tabs except for this</q-item-section>
|
|
|
|
<q-item-section avatar class="text-secondary">
|
|
|
|
<q-icon name="mdi-close-box" />
|
|
|
|
</q-item-section>
|
|
|
|
</q-item>
|
|
|
|
<q-item clickable v-close-popup @click="SSET_forceCloseAllDocuments">
|
|
|
|
<q-item-section>Force close all tabs</q-item-section>
|
|
|
|
<q-item-section avatar class="text-secondary">
|
|
|
|
<q-icon name="mdi-close-box-multiple" />
|
|
|
|
</q-item-section>
|
|
|
|
</q-item>
|
|
|
|
<q-separator />
|
|
|
|
<q-item clickable v-close-popup @click="deleteTabDocument(document)">
|
|
|
|
<q-item-section class="text-secondary"><b>Delete this document</b></q-item-section>
|
|
|
|
<q-item-section avatar class="text-secondary">
|
|
|
|
<q-icon name="mdi-text-box-remove-outline" />
|
|
|
|
</q-item-section>
|
|
|
|
</q-item>
|
|
|
|
</q-list>
|
|
|
|
|
|
|
|
</q-menu>
|
2021-02-26 14:50:46 +13:00
|
|
|
</q-route-tab>
|
|
|
|
|
|
|
|
</transition-group>
|
|
|
|
</q-tabs>
|
|
|
|
|
|
|
|
</span>
|
2021-01-31 02:43:13 +13:00
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2021-02-21 01:06:21 +13:00
|
|
|
|
2021-04-03 12:33:49 +13:00
|
|
|
import BaseClass from "src/BaseClass"
|
2021-02-21 01:06:21 +13:00
|
|
|
|
2021-04-03 12:33:49 +13:00
|
|
|
import { Component, Watch } from "vue-property-decorator"
|
2021-04-10 12:22:31 +12:00
|
|
|
import deleteDocumentCheckDialog from "src/components/dialogs/DeleteDocumentCheck.vue"
|
2021-01-31 02:43:13 +13:00
|
|
|
|
|
|
|
import { I_OpenedDocument } from "src/interfaces/I_OpenedDocument"
|
2021-03-03 08:59:56 +13:00
|
|
|
import closeDocumentCheckDialog from "src/components/dialogs/CloseDocumentCheck.vue"
|
2021-04-10 12:22:31 +12:00
|
|
|
import { createNewWithParent } from "src/scripts/documentActions/createNewWithParent"
|
|
|
|
import { copyDocumentName, copyDocumentTextColor, copyDocumentBackgroundColor } from "src/scripts/documentActions/uniqueFieldCopy"
|
|
|
|
import { copyDocument } from "src/scripts/documentActions/copyDocument"
|
|
|
|
import { extend } from "quasar"
|
2021-01-31 02:43:13 +13:00
|
|
|
|
|
|
|
@Component({
|
2021-04-10 12:22:31 +12:00
|
|
|
components: {
|
|
|
|
closeDocumentCheckDialog,
|
|
|
|
deleteDocumentCheckDialog
|
|
|
|
}
|
2021-01-31 02:43:13 +13:00
|
|
|
})
|
2021-02-26 14:50:46 +13:00
|
|
|
export default class TopTabs extends BaseClass {
|
2021-04-03 12:33:49 +13:00
|
|
|
/****************************************************************/
|
|
|
|
// App options
|
|
|
|
/****************************************************************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Determines if the tabs have text shadow or not
|
|
|
|
*/
|
2021-03-18 10:26:08 +13:00
|
|
|
textShadow = false
|
|
|
|
|
2021-04-10 12:22:31 +12:00
|
|
|
/**
|
|
|
|
* Determines if the "dead" document type should have a cross-text decoration or not
|
|
|
|
*/
|
|
|
|
hideDeadCrossThrough = false
|
|
|
|
|
2021-04-03 12:33:49 +13:00
|
|
|
/**
|
|
|
|
* Watch changes on options
|
|
|
|
*/
|
2021-03-18 10:26:08 +13:00
|
|
|
@Watch("SGET_options", { immediate: true, deep: true })
|
|
|
|
onSettingsChange () {
|
|
|
|
const options = this.SGET_options
|
|
|
|
this.textShadow = options.textShadow
|
2021-04-10 12:22:31 +12:00
|
|
|
this.hideDeadCrossThrough = options.hideDeadCrossThrough
|
2021-03-18 10:26:08 +13:00
|
|
|
}
|
|
|
|
|
2021-02-23 11:30:18 +13:00
|
|
|
/****************************************************************/
|
|
|
|
// Keybind handling
|
|
|
|
/****************************************************************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* React to keypresses passed from the parent document
|
|
|
|
*/
|
|
|
|
@Watch("SGET_getCurrentKeyBindData", { deep: true })
|
|
|
|
processKeyPush () {
|
2021-03-18 10:26:08 +13:00
|
|
|
// Close tab dialog
|
|
|
|
if (this.determineKeyBind("closeTab") && this.localDocuments.length > 0 && !this.SGET_getDialogsState) {
|
2021-03-03 08:59:56 +13:00
|
|
|
this.tryCloseTab()
|
2021-02-23 11:30:18 +13:00
|
|
|
}
|
2021-02-21 01:06:21 +13:00
|
|
|
|
2021-02-23 11:30:18 +13:00
|
|
|
// Next tab
|
2021-03-18 10:26:08 +13:00
|
|
|
if (this.determineKeyBind("nextTab") && this.localDocuments.length > 0 && !this.SGET_getDialogsState) {
|
2021-02-23 11:30:18 +13:00
|
|
|
this.goToNextTab()
|
2021-02-21 01:06:21 +13:00
|
|
|
}
|
|
|
|
|
2021-02-23 11:30:18 +13:00
|
|
|
// Previous tab
|
2021-03-18 10:26:08 +13:00
|
|
|
if (this.determineKeyBind("previousTab") && this.localDocuments.length > 0 && !this.SGET_getDialogsState) {
|
2021-02-23 11:30:18 +13:00
|
|
|
this.goToPreviousTab()
|
|
|
|
}
|
2021-04-10 12:22:31 +12:00
|
|
|
|
|
|
|
// Close all tabs without changes except for this - CTRL + ALT + SHIFT + W
|
|
|
|
if (this.determineKeyBind("closeAllTabsWithoutChangesButThis") && this.localDocuments.length > 0 && !this.SGET_getDialogsState) {
|
|
|
|
const currentDoc = this.findRequestedOrActiveDocument() as I_OpenedDocument
|
|
|
|
this.SSET_closeAllButCurrentDocuments(currentDoc)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Close all tabs without changes - CTRL + SHIFT + W
|
|
|
|
if (this.determineKeyBind("closeAllTabsWithoutChanges") && this.localDocuments.length > 0 && !this.SGET_getDialogsState) {
|
|
|
|
this.SSET_closeAllDocuments()
|
|
|
|
}
|
|
|
|
|
|
|
|
// Force close all tabs except for this - NONE
|
|
|
|
if (this.determineKeyBind("forceCloseAllTabsButThis") && this.localDocuments.length > 0 && !this.SGET_getDialogsState) {
|
|
|
|
const currentDoc = this.findRequestedOrActiveDocument() as I_OpenedDocument
|
|
|
|
this.SSET_forceCloseAllButCurrentDocuments(currentDoc)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Force close all tabs - NONE
|
|
|
|
if (this.determineKeyBind("forceCloseAllTabs") && this.localDocuments.length > 0 && !this.SGET_getDialogsState) {
|
|
|
|
this.SSET_forceCloseAllDocuments()
|
|
|
|
}
|
2021-02-23 11:30:18 +13:00
|
|
|
}
|
2021-02-21 01:06:21 +13:00
|
|
|
|
2021-04-03 12:33:49 +13:00
|
|
|
/****************************************************************/
|
|
|
|
// Tab management
|
|
|
|
/****************************************************************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Refresh the local reference whenever something gets changed
|
|
|
|
*/
|
|
|
|
@Watch("SGET_allOpenedDocuments", { deep: true })
|
|
|
|
reactToDocumentListChange (val: {docs: I_OpenedDocument[]}, oldVal: {docs: I_OpenedDocument[]}) {
|
|
|
|
this.localDocuments = []
|
|
|
|
this.localDocuments = val.docs
|
|
|
|
|
|
|
|
// Re-check the route after a change
|
|
|
|
this.refreshRoute()
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Local reference to the opened document list
|
|
|
|
*/
|
|
|
|
localDocuments: I_OpenedDocument[] = []
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Current document to be closed
|
|
|
|
*/
|
2021-03-03 08:59:56 +13:00
|
|
|
dialogDoc = null as unknown as I_OpenedDocument
|
|
|
|
|
2021-04-03 12:33:49 +13:00
|
|
|
/**
|
|
|
|
* Attempts to close the document being closed
|
|
|
|
*/
|
2021-03-03 08:59:56 +13:00
|
|
|
tryCloseTab (doc?: I_OpenedDocument) {
|
2021-03-05 01:51:11 +13:00
|
|
|
const matchingDocument = this.findRequestedOrActiveDocument(doc)
|
2021-02-23 11:30:18 +13:00
|
|
|
|
|
|
|
if (matchingDocument) {
|
2021-03-03 08:59:56 +13:00
|
|
|
this.dialogDoc = matchingDocument
|
|
|
|
this.closeDocumentCheckDialogAssignUID()
|
2021-02-21 01:06:21 +13:00
|
|
|
}
|
2021-02-23 11:30:18 +13:00
|
|
|
}
|
2021-02-21 01:06:21 +13:00
|
|
|
|
2021-04-03 12:33:49 +13:00
|
|
|
/**
|
|
|
|
* Attempt to navigate to next tab
|
|
|
|
*/
|
2021-02-23 11:30:18 +13:00
|
|
|
goToNextTab () {
|
|
|
|
let index = -1
|
|
|
|
const matchingDocument = this.localDocuments.find((e, i) => {
|
|
|
|
index = i
|
|
|
|
return e.url === this.$route.path
|
|
|
|
})
|
|
|
|
|
|
|
|
if (matchingDocument && index !== this.localDocuments.length - 1) {
|
|
|
|
this.$router.push({ path: this.localDocuments[index + 1].url }).catch((e: {name: string}) => {
|
|
|
|
if (e && e.name !== "NavigationDuplicated") {
|
|
|
|
console.log(e)
|
|
|
|
}
|
2021-02-21 01:06:21 +13:00
|
|
|
})
|
2021-02-23 11:30:18 +13:00
|
|
|
}
|
|
|
|
if (matchingDocument && index === this.localDocuments.length - 1) {
|
|
|
|
this.$router.push({ path: this.localDocuments[0].url }).catch((e: {name: string}) => {
|
|
|
|
if (e && e.name !== "NavigationDuplicated") {
|
|
|
|
console.log(e)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
2021-02-21 01:06:21 +13:00
|
|
|
|
2021-04-03 12:33:49 +13:00
|
|
|
/**
|
|
|
|
* Attempt to navigate to previous tab
|
|
|
|
*/
|
2021-02-23 11:30:18 +13:00
|
|
|
goToPreviousTab () {
|
|
|
|
let index = -1
|
|
|
|
const matchingDocument = this.localDocuments.find((e, i) => {
|
|
|
|
index = i
|
|
|
|
return e.url === this.$route.path
|
|
|
|
})
|
|
|
|
|
|
|
|
if (matchingDocument && index !== 0) {
|
|
|
|
this.$router.push({ path: this.localDocuments[index - 1].url }).catch((e: {name: string}) => {
|
|
|
|
if (e && e.name !== "NavigationDuplicated") {
|
|
|
|
console.log(e)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
if (matchingDocument && index === 0) {
|
|
|
|
this.$router.push({ path: this.localDocuments[this.localDocuments.length - 1].url }).catch((e: {name: string}) => {
|
|
|
|
if (e && e.name !== "NavigationDuplicated") {
|
|
|
|
console.log(e)
|
|
|
|
}
|
|
|
|
})
|
2021-02-21 01:06:21 +13:00
|
|
|
}
|
|
|
|
}
|
2021-04-03 12:33:49 +13:00
|
|
|
|
2021-04-10 12:22:31 +12:00
|
|
|
/****************************************************************/
|
|
|
|
// Document field copying
|
|
|
|
/****************************************************************/
|
|
|
|
|
|
|
|
copyName (currentDoc: I_OpenedDocument) {
|
|
|
|
copyDocumentName(currentDoc)
|
|
|
|
}
|
|
|
|
|
|
|
|
copyTextColor (currentDoc: I_OpenedDocument) {
|
|
|
|
copyDocumentTextColor(currentDoc)
|
|
|
|
}
|
|
|
|
|
|
|
|
copyBackgroundColor (currentDoc: I_OpenedDocument) {
|
|
|
|
copyDocumentBackgroundColor(currentDoc)
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************/
|
|
|
|
// Document copy
|
|
|
|
/****************************************************************/
|
|
|
|
|
|
|
|
documentPass = null as unknown as I_OpenedDocument
|
|
|
|
|
|
|
|
copyTargetDocument (currentDoc: I_OpenedDocument) {
|
|
|
|
this.documentPass = extend(true, {}, currentDoc)
|
|
|
|
|
|
|
|
const newDocument = copyDocument(this.documentPass, this.generateUID())
|
|
|
|
|
|
|
|
const dataPass = {
|
|
|
|
doc: newDocument,
|
|
|
|
treeAction: false
|
|
|
|
}
|
|
|
|
|
|
|
|
// @ts-ignore
|
|
|
|
this.SSET_addOpenedDocument(dataPass)
|
|
|
|
this.$router.push({
|
|
|
|
path: newDocument.url
|
|
|
|
}).catch((e: {name: string}) => {
|
|
|
|
const errorName : string = e.name
|
|
|
|
if (errorName === "NavigationDuplicated") {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
console.log(e)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************/
|
|
|
|
// Add new document under parent
|
|
|
|
/****************************************************************/
|
|
|
|
addNewUnderParent (currentDoc: I_OpenedDocument) {
|
|
|
|
createNewWithParent(currentDoc, this)
|
|
|
|
}
|
|
|
|
|
2021-04-03 12:33:49 +13:00
|
|
|
/****************************************************************/
|
|
|
|
// Close document dialog
|
|
|
|
/****************************************************************/
|
|
|
|
|
|
|
|
closeDocumentCheckDialogTrigger: string | false = false
|
|
|
|
closeDocumentCheckDialogClose () {
|
|
|
|
this.closeDocumentCheckDialogTrigger = false
|
|
|
|
}
|
|
|
|
|
|
|
|
closeDocumentCheckDialogAssignUID () {
|
|
|
|
this.closeDocumentCheckDialogTrigger = this.generateUID()
|
|
|
|
}
|
2021-04-10 12:22:31 +12:00
|
|
|
|
|
|
|
/****************************************************************/
|
|
|
|
// Delete dialog
|
|
|
|
/****************************************************************/
|
|
|
|
|
|
|
|
deleteObjectDialogTrigger: string | false = false
|
|
|
|
deleteObjectDialogClose () {
|
|
|
|
this.deleteObjectDialogTrigger = false
|
|
|
|
}
|
|
|
|
|
|
|
|
deleteObjectAssignUID () {
|
|
|
|
this.deleteObjectDialogTrigger = this.generateUID()
|
|
|
|
}
|
|
|
|
|
|
|
|
toDeleteID = ""
|
|
|
|
toDeleteType = ""
|
|
|
|
|
|
|
|
deleteTabDocument (targetDocument: I_OpenedDocument) {
|
|
|
|
this.toDeleteID = targetDocument._id
|
|
|
|
this.toDeleteType = targetDocument.type
|
|
|
|
this.deleteObjectAssignUID()
|
|
|
|
}
|
2021-01-31 02:43:13 +13:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.headerTransitionWrapper {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
2021-02-09 15:21:48 +13:00
|
|
|
.tabsWrapper .fas {
|
2021-02-26 14:50:46 +13:00
|
|
|
font-size: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tabsWrapper .mdi {
|
2021-02-09 15:21:48 +13:00
|
|
|
font-size: 18px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2021-02-26 14:50:46 +13:00
|
|
|
.tabsWrapper {
|
2021-02-28 06:00:57 +13:00
|
|
|
-webkit-app-region: no-drag;
|
|
|
|
|
2021-03-18 10:26:08 +13:00
|
|
|
&.hasTextShadow {
|
|
|
|
.q-tab__label,
|
|
|
|
.q-tab__icon {
|
|
|
|
$shadowColorOutline: #000;
|
|
|
|
$shadowColorSurround: #000;
|
|
|
|
|
|
|
|
filter: drop-shadow(0 0 4px #000);
|
|
|
|
text-shadow:
|
|
|
|
-2px -2px 0 $shadowColorSurround,
|
|
|
|
2px -2px 0 $shadowColorSurround,
|
|
|
|
-2px 2px 0 $shadowColorSurround,
|
|
|
|
2px 2px 0 $shadowColorSurround,
|
|
|
|
-1px -1px 0 $shadowColorOutline,
|
|
|
|
1px -1px 0 $shadowColorOutline,
|
|
|
|
-1px 1px 0 $shadowColorOutline,
|
|
|
|
1px 1px 0 $shadowColorOutline;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-02-26 14:50:46 +13:00
|
|
|
.q-tabs__arrow {
|
|
|
|
text-shadow: none !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.isBold .q-tab__label {
|
|
|
|
font-weight: 500 !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.q-tab {
|
|
|
|
padding: 0 10px;
|
|
|
|
|
|
|
|
&__content {
|
|
|
|
min-width: 170px;
|
|
|
|
width: 170px;
|
|
|
|
justify-content: flex-start;
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__label {
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
padding-top: 2px;
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 13px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.fas {
|
|
|
|
font-size: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mdi {
|
|
|
|
font-size: 18px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.q-tabs--dense .q-tab {
|
|
|
|
min-height: 40px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.q-tab__alert-icon {
|
|
|
|
font-size: 16px;
|
|
|
|
top: 4px;
|
|
|
|
right: -10px;
|
|
|
|
color: $primary;
|
|
|
|
}
|
2021-02-09 15:21:48 +13:00
|
|
|
}
|
2021-03-18 10:26:08 +13:00
|
|
|
|
|
|
|
body.body--dark {
|
|
|
|
.topTabs {
|
|
|
|
.q-tab {
|
|
|
|
color: #dcdcdc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-01-31 02:43:13 +13:00
|
|
|
</style>
|