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

refactor: moved to new vue slots API

This commit is contained in:
2021-12-10 17:34:44 +01:00
parent 8da0224876
commit 1df21da47c
17 changed files with 104 additions and 101 deletions

View File

@ -6,13 +6,13 @@
@confirm="runRoutine" @confirm="runRoutine"
@hide="closeModal" @hide="closeModal"
> >
<template slot="header"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-play mr-1" /> <i class="mdi mdi-24px mdi-play mr-1" />
<span class="cut-text">{{ $t('word.parameters') }}: {{ localRoutine.name }}</span> <span class="cut-text">{{ $t('word.parameters') }}: {{ localRoutine.name }}</span>
</div> </div>
</template> </template>
<div slot="body"> <template #body>
<div class="content"> <div class="content">
<form class="form-horizontal"> <form class="form-horizontal">
<div <div
@ -43,7 +43,7 @@
</div> </div>
</form> </form>
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
</template> </template>

View File

@ -5,16 +5,16 @@
@confirm="$emit('confirm')" @confirm="$emit('confirm')"
@hide="$emit('close')" @hide="$emit('close')"
> >
<template slot="header"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-content-save-alert mr-1" /> {{ $t('message.unsavedChanges') }} <i class="mdi mdi-24px mdi-content-save-alert mr-1" /> {{ $t('message.unsavedChanges') }}
</div> </div>
</template> </template>
<div slot="body"> <template #body>
<div> <div>
{{ $t('message.discardUnsavedChanges') }} {{ $t('message.discardUnsavedChanges') }}
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
</template> </template>

View File

@ -22,12 +22,12 @@
:hide-footer="true" :hide-footer="true"
@hide="hideInfoModal" @hide="hideInfoModal"
> >
<template :slot="'header'"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-information-outline mr-1" /> {{ $t('message.processInfo') }} <i class="mdi mdi-24px mdi-information-outline mr-1" /> {{ $t('message.processInfo') }}
</div> </div>
</template> </template>
<div :slot="'body'"> <template #body>
<div> <div>
<div> <div>
<TextEditor <TextEditor
@ -38,7 +38,7 @@
/> />
</div> </div>
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
</div> </div>
</template> </template>

View File

@ -15,16 +15,16 @@
@confirm="confirmDeleteConnection" @confirm="confirmDeleteConnection"
@hide="hideConfirmModal" @hide="hideConfirmModal"
> >
<template :slot="'header'"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-server-remove mr-1" /> {{ $t('message.deleteConnection') }} <i class="mdi mdi-24px mdi-server-remove mr-1" /> {{ $t('message.deleteConnection') }}
</div> </div>
</template> </template>
<div :slot="'body'"> <template #body>
<div class="mb-2"> <div class="mb-2">
{{ $t('message.deleteCorfirm') }} <b>{{ connectionName }}</b>? {{ $t('message.deleteCorfirm') }} <b>{{ connectionName }}</b>?
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
</BaseContextMenu> </BaseContextMenu>
</template> </template>

View File

@ -6,12 +6,12 @@
:hide-footer="true" :hide-footer="true"
@hide="hideScratchpad" @hide="hideScratchpad"
> >
<template :slot="'header'"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-notebook-edit-outline mr-1" /> {{ $t('word.scratchpad') }} <i class="mdi mdi-24px mdi-notebook-edit-outline mr-1" /> {{ $t('word.scratchpad') }}
</div> </div>
</template> </template>
<div :slot="'body'"> <template #body>
<div> <div>
<div> <div>
<TextEditor <TextEditor
@ -24,7 +24,7 @@
</div> </div>
<small class="text-gray">{{ $t('message.markdownSupported') }}</small> <small class="text-gray">{{ $t('message.markdownSupported') }}</small>
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
</template> </template>

View File

@ -256,56 +256,59 @@
</span> </span>
</a> </a>
</li> </li>
<li <template #header>
v-if="workspace.customizations.processesList" <li
slot="header" v-if="workspace.customizations.processesList"
class="tab-item dropdown tools-dropdown" class="tab-item dropdown tools-dropdown"
>
<a
class="tab-link workspace-tools-link dropdown-toggle"
tabindex="0"
:title="$t('word.tools')"
> >
<i class="mdi mdi-24px mdi-tools" /> <a
</a> class="tab-link workspace-tools-link dropdown-toggle"
<ul v-if="hasTools" class="menu text-left text-uppercase"> tabindex="0"
<li class="menu-item"> :title="$t('word.tools')"
<a class="c-hand p-vcentered" @click="showProcessesModal">
<i class="mdi mdi-memory mr-1 tool-icon" />
<span>{{ $t('message.processesList') }}</span>
</a>
</li>
<li
v-if="workspace.customizations.variables"
class="menu-item"
title="Coming..."
> >
<a class="c-hand p-vcentered disabled"> <i class="mdi mdi-24px mdi-tools" />
<i class="mdi mdi-shape mr-1 tool-icon" /> </a>
<span>{{ $t('word.variables') }}</span> <ul v-if="hasTools" class="menu text-left text-uppercase">
</a> <li class="menu-item">
</li> <a class="c-hand p-vcentered" @click="showProcessesModal">
<li <i class="mdi mdi-memory mr-1 tool-icon" />
v-if="workspace.customizations.usersManagement" <span>{{ $t('message.processesList') }}</span>
class="menu-item" </a>
title="Coming..." </li>
<li
v-if="workspace.customizations.variables"
class="menu-item"
title="Coming..."
>
<a class="c-hand p-vcentered disabled">
<i class="mdi mdi-shape mr-1 tool-icon" />
<span>{{ $t('word.variables') }}</span>
</a>
</li>
<li
v-if="workspace.customizations.usersManagement"
class="menu-item"
title="Coming..."
>
<a class="c-hand p-vcentered disabled">
<i class="mdi mdi-account-group mr-1 tool-icon" />
<span>{{ $t('message.manageUsers') }}</span>
</a>
</li>
</ul>
</li>
</template>
<template #footer>
<li class="tab-item">
<a
class="tab-add"
:title="$t('message.openNewTab')"
@click="addQueryTab"
> >
<a class="c-hand p-vcentered disabled"> <i class="mdi mdi-24px mdi-plus" />
<i class="mdi mdi-account-group mr-1 tool-icon" /> </a>
<span>{{ $t('message.manageUsers') }}</span> </li>
</a> </template>
</li>
</ul>
</li>
<li slot="footer" class="tab-item">
<a
class="tab-add"
:title="$t('message.openNewTab')"
@click="addQueryTab"
>
<i class="mdi mdi-24px mdi-plus" />
</a>
</li>
</Draggable> </Draggable>
<WorkspaceEmptyState v-if="!workspace.tabs.length" @new-tab="addQueryTab" /> <WorkspaceEmptyState v-if="!workspace.tabs.length" @new-tab="addQueryTab" />
<template v-for="tab of workspace.tabs"> <template v-for="tab of workspace.tabs">

View File

@ -42,17 +42,17 @@
@confirm="deleteMisc" @confirm="deleteMisc"
@hide="hideDeleteModal" @hide="hideDeleteModal"
> >
<template slot="header"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-delete mr-1" /> <i class="mdi mdi-24px mdi-delete mr-1" />
<span class="cut-text">{{ deleteMessage }}</span> <span class="cut-text">{{ deleteMessage }}</span>
</div> </div>
</template> </template>
<div slot="body"> <template #body>
<div class="mb-2"> <div class="mb-2">
{{ $t('message.deleteCorfirm') }} "<b>{{ selectedMisc.name }}</b>"? {{ $t('message.deleteCorfirm') }} "<b>{{ selectedMisc.name }}</b>"?
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
<ModalAskParameters <ModalAskParameters
v-if="isAskingParameters" v-if="isAskingParameters"

View File

@ -78,17 +78,17 @@
@confirm="deleteSchema" @confirm="deleteSchema"
@hide="hideDeleteModal" @hide="hideDeleteModal"
> >
<template slot="header"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-database-remove mr-1" /> <i class="mdi mdi-24px mdi-database-remove mr-1" />
<span class="cut-text">{{ $t('message.deleteSchema') }}</span> <span class="cut-text">{{ $t('message.deleteSchema') }}</span>
</div> </div>
</template> </template>
<div slot="body"> <template #body>
<div class="mb-2"> <div class="mb-2">
{{ $t('message.deleteCorfirm') }} "<b>{{ selectedSchema }}</b>"? {{ $t('message.deleteCorfirm') }} "<b>{{ selectedSchema }}</b>"?
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
<ModalEditSchema <ModalEditSchema
v-if="isEditModal" v-if="isEditModal"

View File

@ -40,33 +40,33 @@
@confirm="emptyTable" @confirm="emptyTable"
@hide="hideEmptyModal" @hide="hideEmptyModal"
> >
<template slot="header"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-table-off mr-1" /> <span class="cut-text">{{ $t('message.emptyTable') }}</span> <i class="mdi mdi-24px mdi-table-off mr-1" /> <span class="cut-text">{{ $t('message.emptyTable') }}</span>
</div> </div>
</template> </template>
<div slot="body"> <template #body>
<div class="mb-2"> <div class="mb-2">
{{ $t('message.emptyCorfirm') }} "<b>{{ selectedTable.name }}</b>"? {{ $t('message.emptyCorfirm') }} "<b>{{ selectedTable.name }}</b>"?
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
<ConfirmModal <ConfirmModal
v-if="isDeleteModal" v-if="isDeleteModal"
@confirm="deleteTable" @confirm="deleteTable"
@hide="hideDeleteModal" @hide="hideDeleteModal"
> >
<template slot="header"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-table-remove mr-1" /> <i class="mdi mdi-24px mdi-table-remove mr-1" />
<span class="cut-text">{{ selectedTable.type === 'table' ? $t('message.deleteTable') : $t('message.deleteView') }}</span> <span class="cut-text">{{ selectedTable.type === 'table' ? $t('message.deleteTable') : $t('message.deleteView') }}</span>
</div> </div>
</template> </template>
<div slot="body"> <template #body>
<div class="mb-2"> <div class="mb-2">
{{ $t('message.deleteCorfirm') }} "<b>{{ selectedTable.name }}</b>"? {{ $t('message.deleteCorfirm') }} "<b>{{ selectedTable.name }}</b>"?
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
</BaseContextMenu> </BaseContextMenu>
</template> </template>

View File

@ -6,13 +6,13 @@
@confirm="confirmParametersChange" @confirm="confirmParametersChange"
@hide="$emit('hide')" @hide="$emit('hide')"
> >
<template :slot="'header'"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-dots-horizontal mr-1" /> <i class="mdi mdi-24px mdi-dots-horizontal mr-1" />
<span class="cut-text">{{ $t('word.parameters') }} "{{ func }}"</span> <span class="cut-text">{{ $t('word.parameters') }} "{{ func }}"</span>
</div> </div>
</template> </template>
<div :slot="'body'"> <template #body>
<div class="columns col-gapless"> <div class="columns col-gapless">
<div class="column col-5"> <div class="column col-5">
<div class="panel" :style="{ height: modalInnerHeight + 'px'}"> <div class="panel" :style="{ height: modalInnerHeight + 'px'}">
@ -167,7 +167,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
</template> </template>

View File

@ -6,13 +6,13 @@
@confirm="confirmParametersChange" @confirm="confirmParametersChange"
@hide="$emit('hide')" @hide="$emit('hide')"
> >
<template :slot="'header'"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-dots-horizontal mr-1" /> <i class="mdi mdi-24px mdi-dots-horizontal mr-1" />
<span class="cut-text">{{ $t('word.parameters') }} "{{ routine }}"</span> <span class="cut-text">{{ $t('word.parameters') }} "{{ routine }}"</span>
</div> </div>
</template> </template>
<div :slot="'body'"> <template #body>
<div class="columns col-gapless"> <div class="columns col-gapless">
<div class="column col-5"> <div class="column col-5">
<div class="panel" :style="{ height: modalInnerHeight + 'px'}"> <div class="panel" :style="{ height: modalInnerHeight + 'px'}">
@ -167,7 +167,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
</template> </template>

View File

@ -5,13 +5,13 @@
@confirm="confirmOptionsChange" @confirm="confirmOptionsChange"
@hide="$emit('hide')" @hide="$emit('hide')"
> >
<template :slot="'header'"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-timer mr-1" /> <i class="mdi mdi-24px mdi-timer mr-1" />
<span class="cut-text">{{ $t('word.timing') }} "{{ localOptions.name }}"</span> <span class="cut-text">{{ $t('word.timing') }} "{{ localOptions.name }}"</span>
</div> </div>
</template> </template>
<div :slot="'body'"> <template #body>
<form class="form-horizontal"> <form class="form-horizontal">
<div class="form-group"> <div class="form-group">
<label class="form-label col-4"> <label class="form-label col-4">
@ -133,7 +133,7 @@
</div> </div>
</div> </div>
</form> </form>
</div> </template>
</ConfirmModal> </ConfirmModal>
</template> </template>

View File

@ -6,13 +6,13 @@
@confirm="confirmForeignsChange" @confirm="confirmForeignsChange"
@hide="$emit('hide')" @hide="$emit('hide')"
> >
<template :slot="'header'"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-key-link mr-1" /> <i class="mdi mdi-24px mdi-key-link mr-1" />
<span class="cut-text">{{ $t('word.foreignKeys') }} "{{ table }}"</span> <span class="cut-text">{{ $t('word.foreignKeys') }} "{{ table }}"</span>
</div> </div>
</template> </template>
<div :slot="'body'"> <template #body>
<div class="columns col-gapless"> <div class="columns col-gapless">
<div class="column col-5"> <div class="column col-5">
<div class="panel" :style="{ height: modalInnerHeight + 'px'}"> <div class="panel" :style="{ height: modalInnerHeight + 'px'}">
@ -197,7 +197,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
</template> </template>

View File

@ -6,13 +6,13 @@
@confirm="confirmIndexesChange" @confirm="confirmIndexesChange"
@hide="$emit('hide')" @hide="$emit('hide')"
> >
<template :slot="'header'"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-key mdi-rotate-45 mr-1" /> <i class="mdi mdi-24px mdi-key mdi-rotate-45 mr-1" />
<span class="cut-text">{{ $t('word.indexes') }} "{{ table }}"</span> <span class="cut-text">{{ $t('word.indexes') }} "{{ table }}"</span>
</div> </div>
</template> </template>
<div :slot="'body'"> <template #body>
<div class="columns col-gapless"> <div class="columns col-gapless">
<div class="column col-5"> <div class="column col-5">
<div class="panel" :style="{ height: modalInnerHeight + 'px'}"> <div class="panel" :style="{ height: modalInnerHeight + 'px'}">
@ -133,7 +133,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
</template> </template>

View File

@ -230,13 +230,13 @@
@confirm="editOFF" @confirm="editOFF"
@hide="hideDefaultModal" @hide="hideDefaultModal"
> >
<template :slot="'header'"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-playlist-edit mr-1" /> <i class="mdi mdi-24px mdi-playlist-edit mr-1" />
<span class="cut-text">{{ $t('word.default') }} "{{ row.name }}"</span> <span class="cut-text">{{ $t('word.default') }} "{{ row.name }}"</span>
</div> </div>
</template> </template>
<div :slot="'body'"> <template #body>
<form class="form-horizontal"> <form class="form-horizontal">
<div class="mb-2"> <div class="mb-2">
<label class="form-radio form-inline"> <label class="form-radio form-inline">
@ -324,7 +324,7 @@
</div> </div>
</div> </div>
</form> </form>
</div> </template>
</ConfirmModal> </ConfirmModal>
</div> </div>
</template> </template>

View File

@ -91,17 +91,17 @@
@confirm="deleteSelected" @confirm="deleteSelected"
@hide="hideDeleteConfirmModal" @hide="hideDeleteConfirmModal"
> >
<template :slot="'header'"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-delete mr-1" /> <i class="mdi mdi-24px mdi-delete mr-1" />
<span class="cut-text">{{ $tc('message.deleteRows', selectedRows.length) }}</span> <span class="cut-text">{{ $tc('message.deleteRows', selectedRows.length) }}</span>
</div> </div>
</template> </template>
<div :slot="'body'"> <template #body>
<div class="mb-2"> <div class="mb-2">
{{ $tc('message.confirmToDeleteRows', selectedRows.length) }} {{ $tc('message.confirmToDeleteRows', selectedRows.length) }}
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
</div> </div>
</template> </template>

View File

@ -76,12 +76,12 @@
@confirm="editOFF" @confirm="editOFF"
@hide="hideEditorModal" @hide="hideEditorModal"
> >
<template :slot="'header'"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-playlist-edit mr-1" /> <span class="cut-text">{{ $t('word.edit') }} "{{ editingField }}"</span> <i class="mdi mdi-24px mdi-playlist-edit mr-1" /> <span class="cut-text">{{ $t('word.edit') }} "{{ editingField }}"</span>
</div> </div>
</template> </template>
<div :slot="'body'"> <template #body>
<div class="mb-2"> <div class="mb-2">
<div> <div>
<TextEditor <TextEditor
@ -132,7 +132,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
<ConfirmModal <ConfirmModal
v-if="isBlobEditor" v-if="isBlobEditor"
@ -140,13 +140,13 @@
@confirm="editOFF" @confirm="editOFF"
@hide="hideEditorModal" @hide="hideEditorModal"
> >
<template :slot="'header'"> <template #header>
<div class="d-flex"> <div class="d-flex">
<i class="mdi mdi-24px mdi-playlist-edit mr-1" /> <i class="mdi mdi-24px mdi-playlist-edit mr-1" />
<span class="cut-text">{{ $t('word.edit') }} "{{ editingField }}"</span> <span class="cut-text">{{ $t('word.edit') }} "{{ editingField }}"</span>
</div> </div>
</template> </template>
<div :slot="'body'"> <template #body>
<div class="mb-2"> <div class="mb-2">
<transition name="jump-down"> <transition name="jump-down">
<div v-if="contentInfo.size"> <div v-if="contentInfo.size">
@ -186,7 +186,7 @@
> >
</div> </div>
</div> </div>
</div> </template>
</ConfirmModal> </ConfirmModal>
</div> </div>
</template> </template>