Browse Source

refactor(api): font size correction and navigation bugs

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4426/head
Pranav C 2 years ago
parent
commit
cb1c2fcd35
  1. 26
      packages/nc-gui/components/smartsheet/Grid.vue
  2. 2
      packages/nc-gui/composables/useTabs.ts
  3. 2
      packages/nc-gui/layouts/default.vue
  4. 2
      packages/nc-gui/pages/[projectType]/[projectId]/index.vue

26
packages/nc-gui/components/smartsheet/Grid.vue

@ -524,19 +524,23 @@ provide(ReloadRowDataHookInj, reloadViewDataHook)
watch(
view,
async (next, old) => {
if (next && next.id !== old?.id) {
// whenever tab changes or view changes save any unsaved data
if (old?.id) {
const oldMeta = await getMeta(old.fk_model_id!)
if (oldMeta) {
await saveOrUpdateRecords({
viewMetaValue: old,
metaValue: oldMeta as TableType,
data: data.value,
})
try {
if (next && next.id !== old?.id) {
// whenever tab changes or view changes save any unsaved data
if (old?.id) {
const oldMeta = await getMeta(old.fk_model_id!)
if (oldMeta) {
await saveOrUpdateRecords({
viewMetaValue: old,
metaValue: oldMeta as TableType,
data: data.value,
})
}
}
await loadData()
}
await loadData()
} catch (e) {
console.log(e)
}
},
{ immediate: true },

2
packages/nc-gui/composables/useTabs.ts

@ -60,7 +60,7 @@ const [setup, use] = useInjectionState(() => {
if (!tab) return
return navigateToTab(tab)
navigateToTab(tab)
}
},
})

2
packages/nc-gui/layouts/default.vue

@ -20,7 +20,7 @@ export default {
<template>
<div class="w-full h-full">
<Teleport :to="hasSidebar ? '#nc-sidebar-left' : null" :disabled="!hasSidebar">
<slot :key="$route.name" name="sidebar" />
<slot name="sidebar" />
</Teleport>
<a-layout-content>

2
packages/nc-gui/pages/[projectType]/[projectId]/index.vue

@ -475,7 +475,7 @@ onBeforeUnmount(reset)
to="/account/users"
>
<MdiAt class="mt-1 group-hover:text-accent" />&nbsp;
<div class="prose group-hover:text-primary">
<div class="prose-sm group-hover:text-primary">
<div>Account</div>
<div class="text-xs text-gray-500">{{ email }}</div>
</div>

Loading…
Cancel
Save