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( watch(
view, view,
async (next, old) => { async (next, old) => {
if (next && next.id !== old?.id) { try {
// whenever tab changes or view changes save any unsaved data if (next && next.id !== old?.id) {
if (old?.id) { // whenever tab changes or view changes save any unsaved data
const oldMeta = await getMeta(old.fk_model_id!) if (old?.id) {
if (oldMeta) { const oldMeta = await getMeta(old.fk_model_id!)
await saveOrUpdateRecords({ if (oldMeta) {
viewMetaValue: old, await saveOrUpdateRecords({
metaValue: oldMeta as TableType, viewMetaValue: old,
data: data.value, metaValue: oldMeta as TableType,
}) data: data.value,
})
}
} }
await loadData()
} }
await loadData() } catch (e) {
console.log(e)
} }
}, },
{ immediate: true }, { immediate: true },

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

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

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

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

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

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

Loading…
Cancel
Save