fix: tab selected when clicking closing cross

This commit is contained in:
Fabio Di Stasio 2021-07-29 16:45:28 +02:00
parent cbe0e2980a
commit 07ee1ae828
3 changed files with 17 additions and 42 deletions

View File

@ -20,9 +20,9 @@
title="F5" title="F5"
@click="getProcessesList" @click="getProcessesList"
> >
<i v-if="!+autorefreshTimer" class="mdi mdi-24px mdi-refresh mr-1" />
<i v-else class="mdi mdi-24px mdi-history mdi-flip-h mr-1" />
<span>{{ $t('word.refresh') }}</span> <span>{{ $t('word.refresh') }}</span>
<i v-if="!+autorefreshTimer" class="mdi mdi-24px mdi-refresh ml-1" />
<i v-else class="mdi mdi-24px mdi-history mdi-flip-h ml-1" />
</button> </button>
<div class="btn btn-dark btn-sm dropdown-toggle pl-0 pr-0" tabindex="0"> <div class="btn btn-dark btn-sm dropdown-toggle pl-0 pr-0" tabindex="0">
<i class="mdi mdi-24px mdi-menu-down" /> <i class="mdi mdi-24px mdi-menu-down" />

View File

@ -31,6 +31,7 @@
<span <span
class="btn btn-clear" class="btn btn-clear"
:title="$t('word.close')" :title="$t('word.close')"
@mousedown.left.stop
@click.stop="closeTab(tab)" @click.stop="closeTab(tab)"
/> />
</span> </span>
@ -42,11 +43,12 @@
@dblclick="openAsPermanentTab(tab)" @dblclick="openAsPermanentTab(tab)"
> >
<i class="mdi mdi-18px mr-1" :class="tab.elementType === 'view' ? 'mdi-table-eye' : 'mdi-table'" /> <i class="mdi mdi-18px mr-1" :class="tab.elementType === 'view' ? 'mdi-table-eye' : 'mdi-table'" />
<span :title="`${$t('word.data').toUpperCase()}: ${tab.elementType}`"> <span :title="`${$t('word.data').toUpperCase()}: ${$tc(`word.${tab.elementType}`)}`">
<span class=" text-italic">{{ tab.elementName }}</span> <span class=" text-italic">{{ tab.elementName }}</span>
<span <span
class="btn btn-clear" class="btn btn-clear"
:title="$t('word.close')" :title="$t('word.close')"
@mousedown.left.stop
@click.stop="closeTab(tab)" @click.stop="closeTab(tab)"
/> />
</span> </span>
@ -54,11 +56,12 @@
<a v-else-if="tab.type === 'data'" class="tab-link"> <a v-else-if="tab.type === 'data'" class="tab-link">
<i class="mdi mdi-18px mr-1" :class="tab.elementType === 'view' ? 'mdi-table-eye' : 'mdi-table'" /> <i class="mdi mdi-18px mr-1" :class="tab.elementType === 'view' ? 'mdi-table-eye' : 'mdi-table'" />
<span :title="`${$t('word.data').toUpperCase()}: ${tab.elementType}`"> <span :title="`${$t('word.data').toUpperCase()}: ${$tc(`word.${tab.elementType}`)}`">
{{ tab.elementName }} {{ tab.elementName }}
<span <span
class="btn btn-clear" class="btn btn-clear"
:title="$t('word.close')" :title="$t('word.close')"
@mousedown.left.stop
@click.stop="closeTab(tab)" @click.stop="closeTab(tab)"
/> />
</span> </span>
@ -70,11 +73,12 @@
:class="{'badge': tab.isChanged}" :class="{'badge': tab.isChanged}"
> >
<i class="mdi mdi-tune-vertical-variant mdi-18px mr-1" /> <i class="mdi mdi-tune-vertical-variant mdi-18px mr-1" />
<span :title="`${$t('word.settings').toUpperCase()}: ${tab.elementType}`"> <span :title="`${$t('word.settings').toUpperCase()}: ${$tc(`word.${tab.elementType}`)}`">
{{ tab.elementName }} {{ tab.elementName }}
<span <span
class="btn btn-clear" class="btn btn-clear"
:title="$t('word.close')" :title="$t('word.close')"
@mousedown.left.stop
@click.stop="closeTab(tab)" @click.stop="closeTab(tab)"
/> />
</span> </span>
@ -86,11 +90,12 @@
:class="{'badge': tab.isChanged}" :class="{'badge': tab.isChanged}"
> >
<i class="mdi mdi-tune-vertical-variant mdi-18px mr-1" /> <i class="mdi mdi-tune-vertical-variant mdi-18px mr-1" />
<span :title="`${$t('word.settings').toUpperCase()}: ${tab.elementType}`"> <span :title="`${$t('word.settings').toUpperCase()}: ${$tc(`word.${tab.elementType}`)}`">
{{ tab.elementName }} {{ tab.elementName }}
<span <span
class="btn btn-clear" class="btn btn-clear"
:title="$t('word.close')" :title="$t('word.close')"
@mousedown.left.stop
@click.stop="closeTab(tab)" @click.stop="closeTab(tab)"
/> />
</span> </span>
@ -103,11 +108,12 @@
@dblclick="openAsPermanentTab(tab)" @dblclick="openAsPermanentTab(tab)"
> >
<i class="mdi mdi-18px mdi-tune-vertical-variant mr-1" /> <i class="mdi mdi-18px mdi-tune-vertical-variant mr-1" />
<span :title="`${$t('word.settings').toUpperCase()}: ${tab.elementType}`"> <span :title="`${$t('word.settings').toUpperCase()}: ${$tc(`word.${tab.elementType}`)}`">
<span class=" text-italic">{{ tab.elementName }}</span> <span class=" text-italic">{{ tab.elementName }}</span>
<span <span
class="btn btn-clear" class="btn btn-clear"
:title="$t('word.close')" :title="$t('word.close')"
@mousedown.left.stop
@click.stop="closeTab(tab)" @click.stop="closeTab(tab)"
/> />
</span> </span>
@ -119,48 +125,16 @@
:class="{'badge': tab.isChanged}" :class="{'badge': tab.isChanged}"
> >
<i class="mdi mdi-18px mdi-tune-vertical-variant mr-1" /> <i class="mdi mdi-18px mdi-tune-vertical-variant mr-1" />
<span :title="`${$t('word.settings').toUpperCase()}: ${tab.elementType}`"> <span :title="`${$t('word.settings').toUpperCase()}: ${$tc(`word.${tab.elementType}`)}`">
{{ tab.elementName }} {{ tab.elementName }}
<span <span
class="btn btn-clear" class="btn btn-clear"
:title="$t('word.close')" :title="$t('word.close')"
@mousedown.left.stop
@click.stop="closeTab(tab)" @click.stop="closeTab(tab)"
/> />
</span> </span>
</a> </a>
<!-- <a
v-else-if="tab.type === 'temp-trigger-function-props'"
class="tab-link"
:class="{'badge': tab.isChanged}"
@dblclick="openAsPermanentTab(tab)"
>
<i class="mdi mdi-18px mdi-tune-vertical-variant mr-1" />
<span :title="`${$t('word.settings').toUpperCase()}: ${tab.elementType}`">
<span class=" text-italic">{{ tab.elementName }}</span>
<span
class="btn btn-clear"
:title="$t('word.close')"
@click.stop="closeTab(tab)"
/>
</span>
</a>
<a
v-else-if="tab.type === 'trigger-function-props'"
class="tab-link"
:class="{'badge': tab.isChanged}"
>
<i class="mdi mdi-18px mdi-tune-vertical-variant mr-1" />
<span :title="`${$t('word.settings').toUpperCase()}: ${tab.elementType}`">
{{ tab.elementName }}
<span
class="btn btn-clear"
:title="$t('word.close')"
@click.stop="closeTab(tab)"
/>
</span>
</a> -->
</li> </li>
<li slot="header" class="tab-item dropdown tools-dropdown"> <li slot="header" class="tab-item dropdown tools-dropdown">
<a <a

View File

@ -115,7 +115,8 @@ module.exports = {
cell: 'Cell | Cells', cell: 'Cell | Cells',
triggerFunction: 'Trigger function | Trigger functions', triggerFunction: 'Trigger function | Trigger functions',
all: 'All', all: 'All',
duplicate: 'Duplicate' duplicate: 'Duplicate',
routine: 'Routine'
}, },
message: { message: {
appWelcome: 'Welcome to Antares SQL Client!', appWelcome: 'Welcome to Antares SQL Client!',