Browse Source

Merge pull request #3267 from nocodb/feat/hep-n-support

feat(gui-v2): Help and support page
pull/3272/head
navi 2 years ago committed by GitHub
parent
commit
a646db4651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      packages/nc-gui-v2/components.d.ts
  2. 6
      packages/nc-gui-v2/components/dashboard/TreeView.vue
  3. 84
      packages/nc-gui-v2/components/general/HelpAndSupport.vue
  4. 12
      packages/nc-gui-v2/components/general/ShareBaseButton.vue
  5. 55
      packages/nc-gui-v2/components/general/SocialCard.vue
  6. 2
      packages/nocodb/package-lock.json
  7. 2
      packages/nocodb/package.json

7
packages/nc-gui-v2/components.d.ts vendored

@ -83,6 +83,8 @@ declare module '@vue/runtime-core' {
IcRoundKeyboardArrowDown: typeof import('~icons/ic/round-keyboard-arrow-down')['default']
IcRoundSearch: typeof import('~icons/ic/round-search')['default']
LogosGoogleGmail: typeof import('~icons/logos/google-gmail')['default']
LogosRedditIcon: typeof import('~icons/logos/reddit-icon')['default']
LogosSwagger: typeof import('~icons/logos/swagger')['default']
MaterialSymbolsArrowCircleLeftRounded: typeof import('~icons/material-symbols/arrow-circle-left-rounded')['default']
MaterialSymbolsArrowCircleRightRounded: typeof import('~icons/material-symbols/arrow-circle-right-rounded')['default']
MaterialSymbolsAttachFile: typeof import('~icons/material-symbols/attach-file')['default']
@ -100,6 +102,7 @@ declare module '@vue/runtime-core' {
MdiAccountGroupIcon: typeof import('~icons/mdi/account-group-icon')['default']
MdiAccountIcon: typeof import('~icons/mdi/account-icon')['default']
MdiAccountOutline: typeof import('~icons/mdi/account-outline')['default']
MdiAccountPlus: typeof import('~icons/mdi/account-plus')['default']
MdiAccountPlusOutline: typeof import('~icons/mdi/account-plus-outline')['default']
MdiAccountSupervisorOutline: typeof import('~icons/mdi/account-supervisor-outline')['default']
MdiAlphaA: typeof import('~icons/mdi/alpha-a')['default']
@ -108,6 +111,8 @@ declare module '@vue/runtime-core' {
MdiArrowLeftBold: typeof import('~icons/mdi/arrow-left-bold')['default']
MdiAt: typeof import('~icons/mdi/at')['default']
MdiBackburger: typeof import('~icons/mdi/backburger')['default']
MdiBookOpenOutline: typeof import('~icons/mdi/book-open-outline')['default']
MdiBookOpenPageVariantOutline: typeof import('~icons/mdi/book-open-page-variant-outline')['default']
MdiBugOutline: typeof import('~icons/mdi/bug-outline')['default']
MdiCalculator: typeof import('~icons/mdi/calculator')['default']
MdiCalendarMonth: typeof import('~icons/mdi/calendar-month')['default']
@ -124,6 +129,7 @@ declare module '@vue/runtime-core' {
MdiCloseThick: typeof import('~icons/mdi/close-thick')['default']
MdiCodeJson: typeof import('~icons/mdi/code-json')['default']
MdiCog: typeof import('~icons/mdi/cog')['default']
MdiCommentTextOutline: typeof import('~icons/mdi/comment-text-outline')['default']
MdiContentCopy: typeof import('~icons/mdi/content-copy')['default']
MdiContentSave: typeof import('~icons/mdi/content-save')['default']
MdiCurrencyUsd: typeof import('~icons/mdi/currency-usd')['default']
@ -161,6 +167,7 @@ declare module '@vue/runtime-core' {
MdiHeart: typeof import('~icons/mdi/heart')['default']
MdiHook: typeof import('~icons/mdi/hook')['default']
MdiInformation: typeof import('~icons/mdi/information')['default']
MdiJson: typeof import('~icons/mdi/json')['default']
MdiKeyboardReturn: typeof import('~icons/mdi/keyboard-return')['default']
MdiKeyPlus: typeof import('~icons/mdi/key-plus')['default']
MdiKeyStar: typeof import('~icons/mdi/key-star')['default']

6
packages/nc-gui-v2/components/dashboard/TreeView.vue

@ -409,8 +409,10 @@ function openTableCreateDialog() {
<a-divider class="!my-0" />
<div class="flex items-center justify-center p-2">
<GeneralShareBaseButton />
<div class="flex items-start flex-col justify-start px-4 py-5 gap-2">
<GeneralShareBaseButton class="py-1 px-2 text-primary font-bold cursor-pointer select-none" />
<GeneralHelpAndSupport class="py-1 px-2 text-gray-500 cursor-pointer select-none" />
</div>
</div>
</template>

84
packages/nc-gui-v2/components/general/HelpAndSupport.vue

@ -0,0 +1,84 @@
<script lang="ts" setup>
import { useGlobal, useProject } from '#imports'
const showDrawer = ref(false)
const { appInfo } = useGlobal()
const { project } = useProject()
const route = useRoute()
const openSwaggerLink = () => {
openLink(`/api/v1/db/meta/projects/${route.params.projectId}/swagger`, appInfo.value.ncSiteUrl)
}
</script>
<template>
<div>
<div @click="showDrawer = true">
<div class="flex items-center space-x-1">
<MdiCommentTextOutline class="mr-1 nc-share-base" />
<!-- todo: i18n -->
<div>APIs & Support</div>
</div>
</div>
<a-drawer
v-model:visible="showDrawer"
class="h-full relative"
placement="right"
size="small"
:closable="false"
:body-style="{ padding: '12px 24px 0 24px', background: '#fafafa' }"
>
<div class="flex flex-col w-full h-full p-4 pb-0">
<!-- todo: i18n -->
<a-typography-title :level="4" class="!mb-6 !text-gray-500">Help center</a-typography-title>
<GeneralSocialCard show-swagger-link class="!w-full nc-social-card">
<template #before>
<a-list-item v-if="project">
<nuxt-link
v-t="['e:docs']"
class="text-primary !no-underline !text-current py-4 font-weight-medium"
target="_blank"
@click="openSwaggerLink"
>
<div class="ml-3 flex items-center text-sm">
<LogosSwagger />
<!-- todo: i18n -->
<span class="ml-3">{{ project.title }} : Swagger Documentation</span>
</div>
</nuxt-link>
</a-list-item>
</template>
</GeneralSocialCard>
<div class="flex-1 my-2"></div>
<GeneralSponsors class="!w-full" />
<div class="min-h-10 w-full" />
</div>
</a-drawer>
</div>
</template>
<style scoped lang="scss">
/* Social card style */
.nc-social-card {
@apply !shadow-none !border-0 bg-transparent;
:deep(.ant-spin-container) {
@apply !gap-3;
.ant-list-item {
@apply mb-2 border-1 bg-white border-gray-200;
&:last-child {
@apply !border-solid;
}
}
}
}
</style>

12
packages/nc-gui-v2/components/general/ShareBaseButton.vue

@ -10,7 +10,7 @@ const { isUIAllowed } = useUIPermission()
<template>
<div class="flex items-center">
<a-button
<div
v-if="
isUIAllowed('newUser') &&
route.name !== 'index' &&
@ -18,16 +18,14 @@ const { isUIAllowed } = useUIPermission()
route.name !== 'project-index-create-external' &&
route.name !== 'index-user-index'
"
size="middle"
type="primary"
class="rounded"
@click="showUserModal = true"
>
<div class="flex items-center space-x-1">
<mdi-account-supervisor-outline class="mr-1 nc-share-base" />
<div>{{ $t('activity.share') }}</div>
<MdiAccountPlusOutline class="mr-1 nc-share-base" />
<!-- todo: i18n <div>{{ $t('activity.share') }}</div> -->
<div>{{ $t('activity.inviteTeam') }}</div>
</div>
</div>
</a-button>
<TabsAuthUserManagementUsersModal :key="showUserModal" :show="showUserModal" @closed="showUserModal = false" />
</div>
</template>

55
packages/nc-gui-v2/components/general/SocialCard.vue

@ -9,8 +9,38 @@ const isRtlLang = $computed(() => ['fa'].includes(currentLang.value))
<template>
<a-card :body-style="{ padding: '0px' }" class="w-[300px] shadow-sm !rounded-lg">
<a-list class="w-full" dense>
<slot name="before" />
<a-list-item>
<nuxt-link
v-t="['e:docs']"
class="text-primary !no-underline !text-current"
target="_blank"
to="https://docs.nocodb.com/"
>
<div class="ml-3 flex items-center text-sm">
<MdiBookOpenOutline class="text-lg text-accent" />
<!-- todo: i18n -->
<span class="ml-3">Documentation</span>
</div>
</nuxt-link>
</a-list-item>
<a-list-item>
<nuxt-link
v-t="['e:docs']"
class="text-primary !no-underline !text-current"
target="_blank"
to="https://apis.nocodb.com/"
>
<div class="ml-3 flex items-center text-sm">
<MdiJson class="text-lg text-green-500" />
<!-- todo: i18n -->
<span class="ml-3">API Documentation</span>
</div>
</nuxt-link>
</a-list-item>
<a-list-item>
<nuxt-link class="text-primary" to="https://github.com/nocodb/nocodb" target="_blank">
<nuxt-link class="text-primary !no-underline !text-current" to="https://github.com/nocodb/nocodb" target="_blank">
<div class="flex items-center text-sm">
<mdi-github class="mx-3 text-lg" />
<div v-if="isRtlLang">
@ -23,7 +53,7 @@ const isRtlLang = $computed(() => ['fa'].includes(currentLang.value))
<div v-else class="flex items-center">
<!-- Star -->
{{ $t('labels.community.starUs1') }}
<mdi-star-outline class="mx-1" />
{{ ' ' }}
<!-- us on Github -->
{{ $t('labels.community.starUs2') }}
</div>
@ -31,7 +61,7 @@ const isRtlLang = $computed(() => ['fa'].includes(currentLang.value))
</nuxt-link>
</a-list-item>
<a-list-item>
<nuxt-link class="text-primary" to="https://calendly.com/nocodb-meeting" target="_blank">
<nuxt-link class="!no-underline !text-current" to="https://calendly.com/nocodb-meeting" target="_blank">
<div class="flex items-center text-sm">
<mdi-calendar-month class="mx-3 text-lg" :color="colors.dark[3 % colors.dark.length]" />
<!-- Book a Free DEMO -->
@ -42,7 +72,7 @@ const isRtlLang = $computed(() => ['fa'].includes(currentLang.value))
</nuxt-link>
</a-list-item>
<a-list-item>
<nuxt-link class="text-primary" to="https://discord.gg/5RgZmkW" target="_blank">
<nuxt-link class="!no-underline !text-current" to="https://discord.gg/5RgZmkW" target="_blank">
<div class="flex items-center text-sm">
<mdi-discord class="mx-3 text-lg" :color="colors.dark[0 % colors.dark.length]" />
<!-- Get your questions answered -->
@ -53,7 +83,7 @@ const isRtlLang = $computed(() => ['fa'].includes(currentLang.value))
</nuxt-link>
</a-list-item>
<a-list-item>
<nuxt-link class="text-primary" to="https://twitter.com/NocoDB" target="_blank">
<nuxt-link class="!no-underline !text-current" to="https://twitter.com/NocoDB" target="_blank">
<div class="flex items-center text-sm">
<mdi-twitter class="mx-3 text-lg" :color="colors.dark[1 % colors.dark.length]" />
<!-- Follow NocoDB -->
@ -63,10 +93,19 @@ const isRtlLang = $computed(() => ['fa'].includes(currentLang.value))
</div>
</nuxt-link>
</a-list-item>
<a-list-item v-t="['e:hiring']">
<nuxt-link class="text-primary" target="_blank" to="http://careers.nocodb.com">
<a-list-item>
<nuxt-link v-t="['e:hiring']" class="!no-underline !text-current" target="_blank" to="http://careers.nocodb.com">
<div class="flex items-center text-sm">
<div class="ml-3">🚀 <span class="ml-2">We are Hiring!!!</span></div>
<!-- todo: i18n -->
<div class="ml-3">🚀 <span class="ml-3">We are Hiring!!!</span></div>
</div>
</nuxt-link>
</a-list-item>
<a-list-item>
<nuxt-link v-t="['e:reddit']" class="!no-underline !text-current" target="_blank" to="https://www.reddit.com/r/NocoDB/">
<div class="ml-3 flex items-center text-sm">
<LogosRedditIcon />
<span class="ml-4">/r/NocoDB/</span>
</div>
</nuxt-link>
</a-list-item>

2
packages/nocodb/package-lock.json generated

@ -95,7 +95,7 @@
"sha.js": "^2.4.11",
"slash": "^3.0.0",
"socket.io": "^4.4.1",
"sqlite3": "5.0.0",
"sqlite3": "^5.0.0",
"twilio": "^3.55.1",
"unique-names-generator": "^4.3.1",
"uuid": "^8.2.0",

2
packages/nocodb/package.json

@ -181,7 +181,7 @@
"sha.js": "^2.4.11",
"slash": "^3.0.0",
"socket.io": "^4.4.1",
"sqlite3": "5.0.0",
"sqlite3": "^5.0.0",
"twilio": "^3.55.1",
"unique-names-generator": "^4.3.1",
"uuid": "^8.2.0",

Loading…
Cancel
Save