Browse Source

fix: linting

pull/7490/head
Ramesh Mane 11 months ago
parent
commit
ae22259189
  1. 2
      packages/nc-gui/app.vue
  2. 6
      packages/nc-gui/components/cmd-footer/index.vue
  3. 4
      packages/nc-gui/components/cmd-k/index.vue
  4. 2
      packages/nocodb/src/services/command-palette.service.ts

2
packages/nc-gui/app.vue

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { applyNonSelectable, computed, useCommandPalette, useRouter, useTheme, isEeUI } from '#imports' import { applyNonSelectable, computed, isEeUI, useCommandPalette, useRouter, useTheme } from '#imports'
import type { CommandPaletteType } from '~/lib' import type { CommandPaletteType } from '~/lib'
const router = useRouter() const router = useRouter()

6
packages/nc-gui/components/cmd-footer/index.vue

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import type { CommandPaletteType } from '~/lib' import type { CommandPaletteType } from '~/lib'
const props = defineProps<{ defineProps<{
activeCmd: CommandPaletteType activeCmd: CommandPaletteType
setActiveCmdView: (cmd: CommandPaletteType) => void setActiveCmdView: (cmd: CommandPaletteType) => void
}>() }>()
@ -20,9 +20,7 @@ const renderCmdOrCtrlKey = () => {
@click.stop="activeCmd !== 'cmd-j' ? setActiveCmdView('cmd-j') : () => undefined" @click.stop="activeCmd !== 'cmd-j' ? setActiveCmdView('cmd-j') : () => undefined"
> >
<MdiFileOutline class="h-4 w-4" /> <MdiFileOutline class="h-4 w-4" />
Document Document
<span <span
class="text-sm px-1 rounded-md border-1" class="text-sm px-1 rounded-md border-1"
:class="activeCmd === 'cmd-j' ? 'bg-brand-500 border-brand-500 text-white' : 'bg-gray-100 border-gray-300'" :class="activeCmd === 'cmd-j' ? 'bg-brand-500 border-brand-500 text-white' : 'bg-gray-100 border-gray-300'"
@ -36,7 +34,6 @@ const renderCmdOrCtrlKey = () => {
@click.stop="activeCmd !== 'cmd-k' ? setActiveCmdView('cmd-k') : () => undefined" @click.stop="activeCmd !== 'cmd-k' ? setActiveCmdView('cmd-k') : () => undefined"
> >
<MdiMapMarkerOutline class="h-4 w-4" /> <MdiMapMarkerOutline class="h-4 w-4" />
Quick Navigation Quick Navigation
<span <span
class="text-sm px-1 rounded-md border-1" class="text-sm px-1 rounded-md border-1"
@ -51,7 +48,6 @@ const renderCmdOrCtrlKey = () => {
@click.stop="activeCmd !== 'cmd-l' ? setActiveCmdView('cmd-l') : () => undefined" @click.stop="activeCmd !== 'cmd-l' ? setActiveCmdView('cmd-l') : () => undefined"
> >
<MdiClockOutline class="h-4 w-4" /> <MdiClockOutline class="h-4 w-4" />
Recent Recent
<span <span
class="text-sm px-1 rounded-md border-1" class="text-sm px-1 rounded-md border-1"

4
packages/nc-gui/components/cmd-k/index.vue

@ -45,10 +45,6 @@ const cmdInput = ref('')
const { user } = useGlobal() const { user } = useGlobal()
const renderCmdOrCtrlKey = () => {
return isMac() ? '⌘' : 'Ctrl'
}
const selected = ref<string>() const selected = ref<string>()
const formattedData: ComputedRef<(CmdAction & { weight: number })[]> = computed(() => { const formattedData: ComputedRef<(CmdAction & { weight: number })[]> = computed(() => {

2
packages/nocodb/src/services/command-palette.service.ts

@ -18,7 +18,7 @@ export class CommandPaletteService {
async commandPalette(param: { body: any; user: UserType }) { async commandPalette(param: { body: any; user: UserType }) {
const cmdData = []; const cmdData = [];
try { try {
const { scope, data } = param.body; const { scope } = param.body;
if (scope === 'root') { if (scope === 'root') {
const bases = await Base.list({ user: param.user }); const bases = await Base.list({ user: param.user });

Loading…
Cancel
Save