Browse Source

fix(nc-gui): base home page buttons in old design

pull/9161/head
Ramesh Mane 4 months ago
parent
commit
7489695164
  1. 52
      packages/nc-gui/components/project/AllTables.vue
  2. 2
      packages/nc-gui/components/project/SyncDataModal.vue

52
packages/nc-gui/components/project/AllTables.vue

@ -125,13 +125,13 @@ const onCreateBaseClick = () => {
data-testid="proj-view-btn__add-new-table" data-testid="proj-view-btn__add-new-table"
@click="openTableCreateDialog()" @click="openTableCreateDialog()"
> >
<div class="flex items-center gap-3"> <GeneralIcon icon="addOutlineBox" class="!text-brand-500" />
<GeneralIcon icon="addOutlineBox" class="!text-brand-500 !h-5 !w-5" />
<div class="flex flex-col gap-1">
<div class="label">{{ $t('general.create') }} {{ $t('general.new') }} {{ $t('objects.table') }}</div> <div class="label">{{ $t('general.create') }} {{ $t('general.new') }} {{ $t('objects.table') }}</div>
</div>
<div class="subtext">Start from scratch.</div> <div class="subtext">Start from scratch.</div>
</div> </div>
</div>
<div <div
v-if="isUIAllowed('tableCreate', { source: base?.sources?.[0] })" v-if="isUIAllowed('tableCreate', { source: base?.sources?.[0] })"
@ -141,12 +141,13 @@ const onCreateBaseClick = () => {
data-testid="proj-view-btn__import-data" data-testid="proj-view-btn__import-data"
@click="isImportModalOpen = true" @click="isImportModalOpen = true"
> >
<div class="flex items-center gap-3"> <GeneralIcon icon="download" class="!text-orange-700" />
<GeneralIcon icon="download" class="!text-orange-700 !h-5 !w-5" /> <div class="flex flex-col gap-1">
<div class="label">{{ $t('activity.import') }} {{ $t('general.data') }}</div> <div class="label">{{ $t('activity.import') }} {{ $t('general.data') }}</div>
</div>
<div class="subtext">From files & external sources</div> <div class="subtext">From files & external sources</div>
</div> </div>
</div>
<NcTooltip <NcTooltip
v-if="isUIAllowed('sourceCreate')" v-if="isUIAllowed('sourceCreate')"
placement="bottom" placement="bottom"
@ -166,29 +167,30 @@ const onCreateBaseClick = () => {
}" }"
@click="onCreateBaseClick" @click="onCreateBaseClick"
> >
<div class="flex items-center gap-3"> <GeneralIcon icon="server1" class="!text-green-700" />
<GeneralIcon icon="server1" class="!text-green-700 !h-5 !w-5" /> <div class="flex flex-col gap-1">
<div class="label">{{ $t('labels.connectDataSource') }}</div> <div class="label">{{ $t('labels.connectDataSource') }}</div>
</div>
<div class="subtext">In realtime to external databases.</div> <div class="subtext">In realtime to external databases.</div>
</div> </div>
</div>
</NcTooltip> </NcTooltip>
<!-- <div--> <!--
<!-- v-if="isUIAllowed('tableCreate', { source: base?.sources?.[0] })"--> <div
<!-- v-e="['c:table:create-source']"--> v-if="isUIAllowed('tableCreate', { source: base?.sources?.[0] })"
<!-- role="button"--> v-e="['c:table:create-source']"
<!-- class="nc-base-view-all-table-btn"--> role="button"
<!-- data-testid="proj-view-btn__create-source"--> class="nc-base-view-all-table-btn"
<!-- @click="syncDataModalOpen = true"--> data-testid="proj-view-btn__create-source"
<!-- >--> @click="syncDataModalOpen = true"
<!-- <div class="flex items-center gap-3">--> >
<!-- <GeneralIcon icon="refresh" class="!text-blue-700 !h-5 !w-5" />--> <div class="flex items-center gap-3">
<!-- <div class="label capitalize">{{ $t('labels.syncData') }}</div>--> <GeneralIcon icon="refresh" class="!text-blue-700 !h-5 !w-5" />
<!-- </div>--> <div class="label capitalize">{{ $t('labels.syncData') }}</div>
<!-- <div class="subtext">Keep your data updated and in sync across multiple sources.</div>--> </div>
<!-- </div>--> <div class="subtext">Keep your data updated and in sync across multiple sources.</div>
</div> </div>
--></div>
<div <div
v-if="base?.isLoading" v-if="base?.isLoading"
class="flex items-center justify-center text-center mt-4" class="flex items-center justify-center text-center mt-4"
@ -282,13 +284,13 @@ const onCreateBaseClick = () => {
<style lang="scss" scoped> <style lang="scss" scoped>
.nc-base-view-all-table-btn { .nc-base-view-all-table-btn {
@apply flex-none flex flex-col gap-y-3 px-3 py-5 bg-gray-50 rounded-xl border-1 border-gray-100 min-w-[230px] max-w-[245px] cursor-pointer text-gray-800 hover:(bg-gray-100 border-gray-200) transition-all duration-300; @apply flex-none flex flex-col gap-y-3 p-4 bg-gray-50 rounded-xl border-1 border-gray-100 min-w-[230px] max-w-[245px] cursor-pointer text-gray-800 hover:(bg-gray-100 border-gray-200) transition-all duration-300;
&:hover { &:hover {
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.08); box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.08);
} }
.nc-icon { .nc-icon {
@apply h-6 w-6; @apply h-10 w-10;
} }
.label { .label {

2
packages/nc-gui/components/project/SyncDataModal.vue

@ -22,7 +22,7 @@ const upvotesData = computed(() => {
const handleUpvote = (syncDataType: SyncDataType) => { const handleUpvote = (syncDataType: SyncDataType) => {
if (upvotesData.value.has(syncDataType)) return if (upvotesData.value.has(syncDataType)) return
$e(`a:sync-request:${syncDataType}`) $e(`a:integration-request:${syncDataType}`)
updateSyncDataUpvotes([...syncDataUpvotes.value, syncDataType]) updateSyncDataUpvotes([...syncDataUpvotes.value, syncDataType])
} }

Loading…
Cancel
Save