mirror of https://github.com/nocodb/nocodb
Pranav C
2 years ago
5 changed files with 49 additions and 11 deletions
@ -0,0 +1,23 @@
|
||||
<script setup lang="ts"> |
||||
import { OpenNewRecordFormHookInj, inject } from '#imports' |
||||
|
||||
const isLocked = inject(IsLockedInj) |
||||
|
||||
const openNewRecordFormHook = inject(OpenNewRecordFormHookInj)! |
||||
|
||||
const onClick = () => { |
||||
if (!isLocked?.value) openNewRecordFormHook.trigger() |
||||
} |
||||
</script> |
||||
|
||||
<template> |
||||
<a-tooltip placement="bottom"> |
||||
<template #title> {{ $t('activity.addRow') }} </template> |
||||
<div :class="{ 'group': !isLocked, 'disabled-ring': isLocked }" class="nc-add-row flex align-center"> |
||||
<MdiPlusOutline |
||||
:class="{ 'cursor-pointer text-gray-500 group-hover:(text-primary)': !isLocked, 'disabled': isLocked }" |
||||
@click="onClick" |
||||
/> |
||||
</div> |
||||
</a-tooltip> |
||||
</template> |
@ -0,0 +1,17 @@
|
||||
<script setup lang="ts"> |
||||
import { ReloadViewDataHookInj, inject } from '#imports' |
||||
|
||||
const reloadHook = inject(ReloadViewDataHookInj)! |
||||
|
||||
const onClick = () => reloadHook.trigger() |
||||
</script> |
||||
|
||||
<template> |
||||
<a-tooltip placement="bottom"> |
||||
<template #title> {{ $t('general.reload') }} </template> |
||||
|
||||
<div class="group flex align-center"> |
||||
<MdiReload class="cursor-pointer text-gray-500 group-hover:(text-primary)" @click="onClick" /> |
||||
</div> |
||||
</a-tooltip> |
||||
</template> |
Loading…
Reference in new issue