Update drawer actions

This commit is contained in:
rijkvanzanten
2020-10-16 13:46:52 -04:00
parent 298d1c29a4
commit 2b1395b5fc
10 changed files with 53 additions and 36 deletions

View File

@@ -34,13 +34,14 @@
<p>{{ item.item }}</p>
</template>
<template #footer>
<v-button v-if="openItemLink" :to="openItemLink">
<v-icon name="launch" left />
{{ $t('open') }}
<template #actions>
<v-button v-if="openItemLink" :to="openItemLink" icon rounded v-tooltip.bottom="$t('open')">
<v-icon name="launch" />
</v-button>
<v-button to="/activity">{{ $t('done') }}</v-button>
<v-button to="/activity" icon rounded v-tooltip.bottom="$t('done')">
<v-icon name="check" />
</v-button>
</template>
</v-drawer>
</template>

View File

@@ -1,5 +1,5 @@
<template>
<drawer-detail icon="info_outline" :title="$t('file_details')" close>
<sidebar-detail icon="info_outline" :title="$t('file_details')" close>
<dl v-if="file">
<div v-if="file.type">
<dt>{{ $t('type') }}</dt>
@@ -104,7 +104,7 @@
<v-divider />
<div class="page-description" v-html="marked($t('page_help_files_item'))" />
</drawer-detail>
</sidebar-detail>
</template>
<script lang="ts">

View File

@@ -1,14 +1,18 @@
<template>
<div class="actions">
<v-button secondary @click="$emit('cancel')">
{{ $t('cancel') }}
<v-button
v-if="!isExisting && currentTabIndex < tabs.length - 1"
@click="nextTab"
:disabled="nextDisabled"
icon
rounded
v-tooltip.bottom="$t('next')"
>
<v-icon name="arrow_forward" />
</v-button>
<div class="spacer" />
<v-button v-if="!isExisting && currentTabIndex < tabs.length - 1" @click="nextTab" :disabled="nextDisabled">
{{ $t('next') }}
</v-button>
<v-button v-else @click="$emit('save')" :loading="saving">
{{ $t('save') }}
<v-button v-else @click="$emit('save')" :loading="saving" icon rounded v-tooltip.bottom="$t('save')">
<v-icon name="check" />
</v-button>
</div>
</template>

View File

@@ -87,7 +87,7 @@
:type="localType"
/>
<template #footer>
<template #actions>
<setup-actions
:saving="saving"
:collection="collection"

View File

@@ -106,20 +106,26 @@
</v-tab-item>
</v-tabs-items>
<template #footer>
<v-button secondary to="/settings/data-model">
{{ $t('cancel') }}
</v-button>
<div class="spacer" />
<template #actions>
<v-button
:disabled="!collectionName || collectionName.length === 0"
v-if="currentTab[0] === 'collection'"
@click="currentTab = ['system']"
v-tooltip.bottom="$t('next')"
icon
rounded
>
{{ $t('next') }}
<v-icon name="arrow_forward" />
</v-button>
<v-button v-if="currentTab[0] === 'system'" @click="save" :loading="saving">
{{ $t('finish_setup') }}
<v-button
v-if="currentTab[0] === 'system'"
@click="save"
:loading="saving"
v-tooltip.bottom="$t('finish_setup')"
icon
rounded
>
<v-icon name="check" />
</v-button>
</template>
</v-drawer>

View File

@@ -1,6 +1,8 @@
<template>
<div class="actions">
<v-button @click="save" :loading="loading">{{ $t('save') }}</v-button>
<v-button @click="save" :loading="loading" icon rounded v-tooltip.bottom="$t('save')">
<v-icon name="check" />
</v-button>
</div>
</template>

View File

@@ -11,7 +11,7 @@
<presets v-if="currentTab[0] === 'presets'" :permission.sync="permission" :role="role" />
</template>
<template #footer v-if="!loading">
<template #actions v-if="!loading">
<actions :role-key="roleKey" :permission="permission" @refresh="$emit('refresh', +permissionKey)" />
</template>
</v-drawer>