diff --git a/packages/nc-gui/assets/nc-icons/plus-square.svg b/packages/nc-gui/assets/nc-icons/plus-square.svg new file mode 100644 index 0000000000..d3750d1bb2 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/plus-square.svg @@ -0,0 +1,7 @@ + diff --git a/packages/nc-gui/assets/style.scss b/packages/nc-gui/assets/style.scss index c403043701..ace7cb0740 100644 --- a/packages/nc-gui/assets/style.scss +++ b/packages/nc-gui/assets/style.scss @@ -3,8 +3,8 @@ @import '@vue-flow/core/dist/theme-default.css'; :root { - --sidebar-top-height: 9.75rem; --topbar-height: 3.1rem; + --sidebar-bottom-height: 8.5rem; --new-header-height: 3.5rem; --tw-text-opacity: 1; --navbar-bg: #FAFAFA; @@ -90,6 +90,29 @@ main { } } +.nc-scrollbar-sm-dark { + overflow-y: scroll; + overflow-x: hidden; + + &::-webkit-scrollbar { + width: 2px; + height: 2px; + } + &::-webkit-scrollbar-track-piece { + width: 0px; + } + &::-webkit-scrollbar { + @apply bg-transparent; + } + &::-webkit-scrollbar-thumb { + width: 4px; + @apply bg-gray-300 ; + } + &::-webkit-scrollbar-thumb:hover { + @apply bg-gray-400; + } +} + .nc-scrollbar-x-md { overflow-x: scroll; @@ -505,7 +528,7 @@ a { padding: 0 !important; } .ant-popover-inner-content { - @apply !px-1.5 !py-1 text-xs text-white bg-black; + @apply !px-1.5 !py-1 text-xs; } .ant-tooltip-inner { @apply !px-1.5 !py-1 text-xs text-white bg-black; @@ -515,4 +538,8 @@ a { .ant-skeleton-input { @apply !h-full; +} + +.nc-toolbar-dropdown { + @apply !rounded-2xl; } \ No newline at end of file diff --git a/packages/nc-gui/components.d.ts b/packages/nc-gui/components.d.ts index 3f0a87fac6..d327aa0029 100644 --- a/packages/nc-gui/components.d.ts +++ b/packages/nc-gui/components.d.ts @@ -50,6 +50,7 @@ declare module '@vue/runtime-core' { AMenuItemGroup: typeof import('ant-design-vue/es')['MenuItemGroup'] AModal: typeof import('ant-design-vue/es')['Modal'] APagination: typeof import('ant-design-vue/es')['Pagination'] + APopover: typeof import('ant-design-vue/es')['Popover'] ARadio: typeof import('ant-design-vue/es')['Radio'] ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup'] ARate: typeof import('ant-design-vue/es')['Rate'] diff --git a/packages/nc-gui/components/api-client/Params.vue b/packages/nc-gui/components/api-client/Params.vue index 49e1eaca74..61aa3f1f2c 100644 --- a/packages/nc-gui/components/api-client/Params.vue +++ b/packages/nc-gui/components/api-client/Params.vue @@ -23,7 +23,6 @@ const deleteParamRow = (i: number) => {
Parameter Name
|
@@ -40,11 +39,6 @@ const deleteParamRow = (i: number) => {
|||
---|---|---|---|
- |
-
+
-
-
-
-
-
-
+
-
+ Team & Settings
-
+
-
+
+
-
-
+
+ {{ $t('objects.projects') }}
-
+ {{ $t('title.newProj') }}
- {{ $t('objects.projects') }}
-
-
+
+
-
+
+
diff --git a/packages/nc-gui/components/dashboard/Sidebar/TopSection.vue b/packages/nc-gui/components/dashboard/Sidebar/TopSection.vue
new file mode 100644
index 0000000000..8c77a4a115
--- /dev/null
+++ b/packages/nc-gui/components/dashboard/Sidebar/TopSection.vue
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/nc-gui/pages/index/[typeOrId]/[projectId]/index/index/[type]/[viewId]/[[viewTitle]]/[...slugs].vue b/packages/nc-gui/components/dashboard/Sidebar/TopSection/Header.vue
similarity index 100%
rename from packages/nc-gui/pages/index/[typeOrId]/[projectId]/index/index/[type]/[viewId]/[[viewTitle]]/[...slugs].vue
rename to packages/nc-gui/components/dashboard/Sidebar/TopSection/Header.vue
diff --git a/packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue b/packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue
new file mode 100644
index 0000000000..ae913e231e
--- /dev/null
+++ b/packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue
@@ -0,0 +1,188 @@
+
+
+
+
+
+ Team & Settings
+
+
+ {{ $t('title.newProj') }}
+
+
+
+
+
diff --git a/packages/nc-gui/components/dashboard/TreeView.vue b/packages/nc-gui/components/dashboard/TreeView.vue
deleted file mode 100644
index 9e7151cba7..0000000000
--- a/packages/nc-gui/components/dashboard/TreeView.vue
+++ /dev/null
@@ -1,1475 +0,0 @@
-
-
-
-
+
+
+
+ {{ name ? name : user?.email }}
+
+ (Community Translated)
+
+
+
+
+
+ © 2023 NocoDB. Inc
+
+
+
+
+
+
+
+
-
-
-
-
diff --git a/packages/nc-gui/components/dashboard/TreeViewNew/AddNewTableNode.vue b/packages/nc-gui/components/dashboard/TreeView/AddNewTableNode.vue
similarity index 100%
rename from packages/nc-gui/components/dashboard/TreeViewNew/AddNewTableNode.vue
rename to packages/nc-gui/components/dashboard/TreeView/AddNewTableNode.vue
diff --git a/packages/nc-gui/components/dashboard/TreeViewNew/BaseOptions.vue b/packages/nc-gui/components/dashboard/TreeView/BaseOptions.vue
similarity index 100%
rename from packages/nc-gui/components/dashboard/TreeViewNew/BaseOptions.vue
rename to packages/nc-gui/components/dashboard/TreeView/BaseOptions.vue
diff --git a/packages/nc-gui/components/dashboard/TreeViewNew/ProjectNode.vue b/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue
similarity index 95%
rename from packages/nc-gui/components/dashboard/TreeViewNew/ProjectNode.vue
rename to packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue
index 8168f11f00..91c699e9f9 100644
--- a/packages/nc-gui/components/dashboard/TreeViewNew/ProjectNode.vue
+++ b/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue
@@ -175,6 +175,8 @@ function openTableCreateDialog(baseIndex?: number | undefined) {
if (!table) return
+ project.value.isExpanded = true
+
if (!activeKey.value || !activeKey.value.includes(`collapse-${baseId}`)) {
activeKey.value.push(`collapse-${baseId}`)
}
@@ -200,10 +202,19 @@ const addNewProjectChildEntity = async () => {
if (isAddNewProjectChildEntityLoading.value) return
isAddNewProjectChildEntityLoading.value = true
+
+ const isProjectPopulated = projectsStore.isProjectPopulated(project.value.id!)
+ if (!isProjectPopulated && project.value.type === NcProjectType.DB) {
+ // We do not wait for tables api, so that add new table is seamless.
+ // Only con would be while saving table duplicate table name FE validation might not work
+ // If the table list api takes time to load before the table name validation
+ loadProjectTables(project.value.id!)
+ }
+
try {
openTableCreateDialog()
- if (!project.value.isExpanded) {
+ if (!project.value.isExpanded && project.value.type !== NcProjectType.DB) {
project.value.isExpanded = true
}
} finally {
@@ -246,7 +257,6 @@ const onProjectClick = async (project: NcProject, ignoreNavigation?: boolean, to
}
if (!isProjectPopulated) {
- await loadProject(project.id!)
await loadProjectTables(project.id!)
}
@@ -375,7 +385,7 @@ const DlgProjectDuplicateOnOk = async (jobData: { id: string; project_id: string
@click="onProjectClick(project, true, true)"
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Noco
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('general.rename') }}
-
-
- {{ $t('general.duplicate') }}
-
-
- {{ $t('general.delete') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Noco
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Noco
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('general.rename') }}
-
-
- {{ $t('general.duplicate') }}
-
-
- {{ $t('general.delete') }}
-
-
- {{ $t('general.rename') }}
-
-
- {{ $t('general.duplicate') }}
-
-
- {{ $t('general.delete') }}
-
-
- {{ $t('general.reload') }}
-
-
-
-
-
-
+
-
diff --git a/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue b/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
index 4ec3d9f95c..6bb55c0941 100644
--- a/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
+++ b/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
@@ -379,6 +379,7 @@ watch(
+
diff --git a/packages/nc-gui/components/dashboard/settings/app-store/AppInstall.vue b/packages/nc-gui/components/dashboard/settings/app-store/AppInstall.vue
index c345d8dca7..510c8f99e0 100644
--- a/packages/nc-gui/components/dashboard/settings/app-store/AppInstall.vue
+++ b/packages/nc-gui/components/dashboard/settings/app-store/AppInstall.vue
@@ -264,16 +264,17 @@ onMounted(async () => {
-
-
-
-
-
-
-
+
-
New Base
+
diff --git a/packages/nc-gui/components/dlg/AirtableImport.vue b/packages/nc-gui/components/dlg/AirtableImport.vue
index d94329e29d..018afccaa5 100644
--- a/packages/nc-gui/components/dlg/AirtableImport.vue
+++ b/packages/nc-gui/components/dlg/AirtableImport.vue
@@ -25,9 +25,9 @@ const { modelValue, baseId } = defineProps<{
const emit = defineEmits(['update:modelValue'])
-const { appInfo } = useGlobal()
+const { $api } = useNuxtApp()
-const baseURL = appInfo.value.ncSiteUrl
+const baseURL = $api.instance.defaults.baseURL;
const { $state, $jobs } = useNuxtApp()
diff --git a/packages/nc-gui/components/dlg/ProjectDuplicate.vue b/packages/nc-gui/components/dlg/ProjectDuplicate.vue
index 21fc1290db..3fba10c99a 100644
--- a/packages/nc-gui/components/dlg/ProjectDuplicate.vue
+++ b/packages/nc-gui/components/dlg/ProjectDuplicate.vue
@@ -33,8 +33,8 @@ const optionsToExclude = computed(() => {
const isLoading = ref(false)
const _duplicate = async () => {
- isLoading.value = true
try {
+ isLoading.value = true
// pick a random color from array and assign to project
const color = projectThemeColors[Math.floor(Math.random() * 1000) % projectThemeColors.length]
const tcolor = tinycolor(color)
@@ -58,18 +58,28 @@ const _duplicate = async () => {
props.onOk(jobData as any)
} catch (e: any) {
message.error(await extractSdkResponseErrorMsg(e))
+ } finally {
+ isLoading.value = false
+ dialogShow.value = false
}
- isLoading.value = false
- dialogShow.value = false
}
+onKeyStroke('Enter', () => {
+ // should only trigger this when our modal is open
+ if (dialogShow.value) {
+ _duplicate()
+ }
+})
+
const isEaster = ref(false)
-
{{ $t('general.duplicate') }}
+
+ {{ $t('general.duplicate') }} {{ $t('objects.project') }}
+
Are you sure you want to duplicate the `{{ project.title }}` project?
@@ -85,9 +95,7 @@ const isEaster = ref(false)
-
- {{ $t('general.duplicate') }} {{ table.title }}
+
+ {{ $t('general.duplicate') }} {{ $t('objects.table') }}
-
-
-
-
-
-
- Are you sure you want to duplicate the `{{ table.title }}` table?
+
+ {{ $t('title.advancedSettings') }}
+
+
+
-
+
-
+
-
-
diff --git a/packages/nc-gui/components/dlg/share-and-collaborate/View.vue b/packages/nc-gui/components/dlg/share-and-collaborate/View.vue
index 905560a185..ba5426fb79 100644
--- a/packages/nc-gui/components/dlg/share-and-collaborate/View.vue
+++ b/packages/nc-gui/components/dlg/share-and-collaborate/View.vue
@@ -155,11 +155,8 @@ watch(showShareModal, (val) => {
- Share Base
{
+const { isLeftSidebarOpen: _isLeftSidebarOpen } = storeToRefs(useSidebarStore())
+const isLeftSidebarOpen = ref(_isLeftSidebarOpen.value)
+
+watch(_isLeftSidebarOpen, (val) => {
+ if (val) {
+ isLeftSidebarOpen.value = true
+ } else {
+ setTimeout(() => {
+ isLeftSidebarOpen.value = false
+ }, 300)
+ }
+})
+
+const onClick = () => {
+ if (_isLeftSidebarOpen.value) return
+
+ _isLeftSidebarOpen.value = !_isLeftSidebarOpen.value
+}
+
+
+
+
+
+
+
{{ $t('activity.upgrade.available') }}
-
diff --git a/packages/nc-gui/components/general/UserIcon.vue b/packages/nc-gui/components/general/UserIcon.vue
new file mode 100644
index 0000000000..e0428d02bf
--- /dev/null
+++ b/packages/nc-gui/components/general/UserIcon.vue
@@ -0,0 +1,51 @@
+
+
+
+
-
+
+ {{ usernameInitials }}
+
+
+
+
+
diff --git a/packages/nc-gui/components/general/ViewIcon.vue b/packages/nc-gui/components/general/ViewIcon.vue
index 0ced0f2f88..32356c84d6 100644
--- a/packages/nc-gui/components/general/ViewIcon.vue
+++ b/packages/nc-gui/components/general/ViewIcon.vue
@@ -23,11 +23,14 @@ const viewMeta = toRef(props, 'meta')
v-else-if="viewMeta?.type"
class="nc-view-icon group-hover"
:style="{
- 'color': !props.ignoreColor ? viewIcons[viewMeta.type]?.color : undefined,
- 'fontWeight': 500,
- '-webkit-text-stroke': !props.ignoreColor ? `0.5px ${viewIcons[viewMeta.type]?.color}` : '0.5px',
+ color: !props.ignoreColor ? viewIcons[viewMeta.type]?.color : undefined,
+ fontWeight: 500,
}"
/>
-
+
diff --git a/packages/nc-gui/components/general/WorkspaceIcon.vue b/packages/nc-gui/components/general/WorkspaceIcon.vue
new file mode 100644
index 0000000000..be32b5c108
--- /dev/null
+++ b/packages/nc-gui/components/general/WorkspaceIcon.vue
@@ -0,0 +1,37 @@
+
+
+
+
+
+ {{ props.workspace?.title?.slice(0, 2) }}
+
+
+
+
+
diff --git a/packages/nc-gui/components/general/language/index.vue b/packages/nc-gui/components/general/language/index.vue
index 6b08c99492..4a3fa748de 100644
--- a/packages/nc-gui/components/general/language/index.vue
+++ b/packages/nc-gui/components/general/language/index.vue
@@ -9,7 +9,7 @@
+
+
+
@@ -95,13 +96,13 @@ vModel.value.au = !!vModel.value.au */
@@ -50,6 +59,7 @@ const { allowCSVDownload } = useSharedView()
v-if="(isGrid || isGallery || isKanban || isMap) && !isPublic && isUIAllowed('dataInsert')"
:show-system-fields="false"
/>
+
diff --git a/packages/nc-gui/components/smartsheet/Topbar.vue b/packages/nc-gui/components/smartsheet/Topbar.vue
index e6bb0d336a..cf502f9fb4 100644
--- a/packages/nc-gui/components/smartsheet/Topbar.vue
+++ b/packages/nc-gui/components/smartsheet/Topbar.vue
@@ -22,13 +22,17 @@ const isSharedBase = computed(() => route.value.params.typeOrId === 'base')
|
-
@@ -1590,7 +1590,7 @@ const expandAndLooseFocus = (row: Row, col: Record |
+
diff --git a/packages/nc-gui/components/smartsheet/sidebar/MenuTop.vue b/packages/nc-gui/components/smartsheet/sidebar/MenuTop.vue
index 30bd040c3f..451577c05f 100644
--- a/packages/nc-gui/components/smartsheet/sidebar/MenuTop.vue
+++ b/packages/nc-gui/components/smartsheet/sidebar/MenuTop.vue
@@ -303,7 +303,7 @@ const setIcon = async (icon: string, view: ViewType) => {
- Views
+
Views
+
+
+
diff --git a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue
index 20005fa33e..1117d3b3f9 100644
--- a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue
+++ b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue
@@ -60,7 +60,7 @@ useMenuCloseOnEsc(open)
-
diff --git a/packages/nc-gui/components/smartsheet/toolbar/Export.vue b/packages/nc-gui/components/smartsheet/toolbar/Export.vue
index 48d00d4be0..944581ea67 100644
--- a/packages/nc-gui/components/smartsheet/toolbar/Export.vue
+++ b/packages/nc-gui/components/smartsheet/toolbar/Export.vue
@@ -6,8 +6,8 @@ import { iconMap } from '#imports'
-
diff --git a/packages/nc-gui/components/smartsheet/toolbar/GroupByMenu.vue b/packages/nc-gui/components/smartsheet/toolbar/GroupByMenu.vue
index 5efc46db2c..ca0cae4ba3 100644
--- a/packages/nc-gui/components/smartsheet/toolbar/GroupByMenu.vue
+++ b/packages/nc-gui/components/smartsheet/toolbar/GroupByMenu.vue
@@ -142,7 +142,13 @@ watch(open, () => {
-
diff --git a/packages/nc-gui/components/smartsheet/toolbar/OpenViewSidebarBtn.vue b/packages/nc-gui/components/smartsheet/toolbar/OpenViewSidebarBtn.vue
new file mode 100644
index 0000000000..a6e5aaa146
--- /dev/null
+++ b/packages/nc-gui/components/smartsheet/toolbar/OpenViewSidebarBtn.vue
@@ -0,0 +1,53 @@
+
+
+
+
+
+
@@ -167,7 +167,12 @@ watch(open, () => {
-
-
diff --git a/packages/nc-gui/components/smartsheet/topbar/SelectMode.vue b/packages/nc-gui/components/smartsheet/topbar/SelectMode.vue
index 9dd8be569f..11c1c1b4e1 100644
--- a/packages/nc-gui/components/smartsheet/topbar/SelectMode.vue
+++ b/packages/nc-gui/components/smartsheet/topbar/SelectMode.vue
@@ -1,9 +1,7 @@
@@ -17,7 +15,8 @@ const { onViewsTabChange } = useViewsStore()
}"
@click="onViewsTabChange('view')"
>
-
- {{ activeTable?.meta?.icon }}
-
- /
-
- {{ selectedView?.meta?.icon }}
-
- Data
Details
@@ -46,7 +45,8 @@ const { onViewsTabChange } = useViewsStore()
}
.tab-icon {
- font-size: 1.1rem;
+ font-size: 1.1rem !important;
+ @apply min-w-4.5;
}
.tab .tab-title {
@apply min-w-0;
diff --git a/packages/nc-gui/components/tabs/Smartsheet.vue b/packages/nc-gui/components/tabs/Smartsheet.vue
index d0714f432e..07a4b8fbe9 100644
--- a/packages/nc-gui/components/tabs/Smartsheet.vue
+++ b/packages/nc-gui/components/tabs/Smartsheet.vue
@@ -163,7 +163,7 @@ const onDrop = async (event: DragEvent) => {
Collaborators
- {{ RoleLabels[role] }}
-
+
-
-
-
-
-
-
diff --git a/packages/nc-gui/components/workspace/EmptyPlaceholder.vue b/packages/nc-gui/components/workspace/EmptyPlaceholder.vue
index d832de840c..8a18fee42c 100644
--- a/packages/nc-gui/components/workspace/EmptyPlaceholder.vue
+++ b/packages/nc-gui/components/workspace/EmptyPlaceholder.vue
@@ -7,25 +7,6 @@ const props = defineProps<{
const projectCreateDlg = ref(false)
const projectType = ref()
-const { projects, projectsList } = storeToRefs(useProjects())
-
-const router = useRouter()
-
-const loading = ref(false)
-
-// if at least one project exists, redirect to first project
-watch(
- projects,
- (projects) => {
- if (projects.size) {
- return router.replace({
- path: `/${router.currentRoute.value.params.typeOrId}/${projectsList.value[0].id}`,
- })
- }
- loading.value = false
- },
- { immediate: true },
-)
const openCreateProjectDlg = (type: NcProjectType) => {
projectType.value = type
@@ -35,7 +16,7 @@ const openCreateProjectDlg = (type: NcProjectType) => {
-
- Delete Workspace
- Delete this workspace and all it’s contents.
-
-
-
-
-
-
- This action is irreversible.
-
- You have 31 days to undo this action by following the steps provided in recover workspace mail sent to your email.
-
-
-
-
- I understand that this action is irreversible
-
-
-
-
+ No Projects
diff --git a/packages/nc-gui/components/workspace/InviteSection.vue b/packages/nc-gui/components/workspace/InviteSection.vue
index c8a97f2736..4121663bf4 100644
--- a/packages/nc-gui/components/workspace/InviteSection.vue
+++ b/packages/nc-gui/components/workspace/InviteSection.vue
@@ -46,7 +46,7 @@ const allowedRoles = computed{{ RoleLabels[role] }}
-
+
diff --git a/packages/nc-gui/components/workspace/Settings.vue b/packages/nc-gui/components/workspace/Settings.vue
new file mode 100644
index 0000000000..c62fa23bb6
--- /dev/null
+++ b/packages/nc-gui/components/workspace/Settings.vue
@@ -0,0 +1,164 @@
+
+
+
+
-
-
-
-
-
- {{ $t('activity.account.authTokenCopied') }}
-
-
- {{ $t('activity.account.authToken') }}
-
-
-
-
-
-
-
-
- {{ $t('labels.customTheme') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (Community Translated)
-
-
-
-
-
-
-
-
-
-
- Account
- {{ email }}
-
-
-
-
-
-
-
+
+
+
+
diff --git a/packages/nc-gui/components/workspace/View.vue b/packages/nc-gui/components/workspace/View.vue
index d2d55c3186..930c133757 100644
--- a/packages/nc-gui/components/workspace/View.vue
+++ b/packages/nc-gui/components/workspace/View.vue
@@ -1,11 +1,14 @@
-
+
+ Change Workspace Name
+ Workspace name
+
+
+
+
+ Delete Workspace
+ Delete this workspace and all it’s contents.
+
+
+
+ I understand that this action is irreversible
+
+
+
+
{{ activeWorkspace?.title?.slice(0, 2) }}
-
@@ -59,7 +75,7 @@ watch(
-
+
+ |