Browse Source

Merge pull request #6428 from nocodb/feat/cloud-btn

feat(nc-gui): cloud button ui update
pull/6447/head
Raju Udava 1 year ago committed by GitHub
parent
commit
53fad1916b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nc-gui/components/account/AppStore.vue
  2. 62
      packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue
  3. 21
      packages/nc-gui/components/general/JoinCloud.vue
  4. 17
      packages/nc-gui/components/workspace/Menu.vue

2
packages/nc-gui/components/account/AppStore.vue

@ -1,5 +1,5 @@
<template>
<div class="h-full overflow-y-scroll scrollbar-thin-dull pt-2">
<div class="h-full overflow-y-scroll scrollbar-thin-dull pt-2 px-5">
<div class="text-xl mt-4 mb-8 text-left font-weight-bold">{{ $t('title.appStore') }}</div>
<div>
<LazyDashboardSettingsAppStore />

62
packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue

@ -67,10 +67,8 @@ onMounted(() => {
<template>
<div class="flex w-full flex-col p-1 border-t-1 border-gray-200 gap-y-2">
<NcDropdown v-model:visible="isMenuOpen" placement="topLeft" overlay-class-name="!min-w-64">
<div
class="flex flex-row py-2 px-3 gap-x-2 items-center hover:bg-gray-200 rounded-lg cursor-pointer h-10"
data-testid="nc-sidebar-userinfo"
>
<div class="flex flex-row py-2 px-3 gap-x-2 items-center hover:bg-gray-200 rounded-lg cursor-pointer h-10"
data-testid="nc-sidebar-userinfo">
<GeneralUserIcon />
<div class="flex truncate">
{{ name ? name : user?.email }}
@ -82,28 +80,30 @@ onMounted(() => {
<NcMenuItem data-testid="nc-sidebar-user-logout" @click="logout">
<GeneralLoader v-if="isLoggingOut" class="!ml-0.5 !mr-0.5 !max-h-4.5 !-mt-0.5" />
<GeneralIcon v-else icon="signout" class="menu-icon" />
Log Out</NcMenuItem
>
Log Out
</NcMenuItem>
<NcDivider />
<a href="https://docs.nocodb.com" target="_blank" class="!underline-transparent">
<NcMenuItem>
<GeneralIcon icon="help" class="menu-icon" />
Help Center</NcMenuItem
>
Help Center
</NcMenuItem>
</a>
<NcDivider />
<a href="https://discord.gg/5RgZmkW" target="_blank" class="!underline-transparent">
<NcMenuItem class="social-icon-wrapper"
><GeneralIcon class="social-icon" icon="discord" />Join our Discord</NcMenuItem
>
<NcMenuItem class="social-icon-wrapper">
<GeneralIcon class="social-icon" icon="discord" />Join our Discord
</NcMenuItem>
</a>
<a href="https://www.reddit.com/r/NocoDB" target="_blank" class="!underline-transparent">
<NcMenuItem class="social-icon-wrapper"><GeneralIcon class="social-icon" icon="reddit" />/r/NocoDB</NcMenuItem>
<NcMenuItem class="social-icon-wrapper">
<GeneralIcon class="social-icon" icon="reddit" />/r/NocoDB
</NcMenuItem>
</a>
<a href="https://twitter.com/nocodb" target="_blank" class="!underline-transparent">
<NcMenuItem class="social-icon-wrapper group"
><GeneralIcon class="text-gray-500 group-hover:text-gray-800" icon="twitter" />Twitter</NcMenuItem
>
<NcMenuItem class="social-icon-wrapper group">
<GeneralIcon class="text-gray-500 group-hover:text-gray-800" icon="twitter" />Twitter
</NcMenuItem>
</a>
<template v-if="!appInfo.ee">
<NcDivider />
@ -114,7 +114,8 @@ onMounted(() => {
<div class="flex items-center text-gray-400 text-xs">(Community Translated)</div>
<div class="flex-1" />
<MaterialSymbolsChevronRightRounded class="transform group-hover:(scale-115 text-accent) text-xl text-gray-400" />
<MaterialSymbolsChevronRightRounded
class="transform group-hover:(scale-115 text-accent) text-xl text-gray-400" />
</NcMenuItem>
<template #content>
@ -126,32 +127,31 @@ onMounted(() => {
</template>
<NcDivider />
<NcMenuItem @click="onCopy"
><GeneralIcon v-if="isAuthTokenCopied" icon="check" class="group-hover:text-black menu-icon" /><GeneralIcon
v-else
icon="copy"
class="menu-icon"
/>
<NcMenuItem @click="onCopy">
<GeneralIcon v-if="isAuthTokenCopied" icon="check" class="group-hover:text-black menu-icon" />
<GeneralIcon v-else icon="copy" class="menu-icon" />
<template v-if="isAuthTokenCopied"> Copied Auth Token </template>
<template v-else> Copy Auth Token </template>
</NcMenuItem>
<nuxt-link v-e="['c:navbar:user:email']" class="!no-underline" to="/account/profile">
<NcMenuItem><GeneralIcon icon="settings" class="menu-icon" /> Account Settings</NcMenuItem>
<NcMenuItem>
<GeneralIcon icon="settings" class="menu-icon" /> Account Settings
</NcMenuItem>
</nuxt-link>
</NcMenu>
</template>
</NcDropdown>
<div v-if="appInfo.ee" class="text-gray-500 text-xs pl-3">© 2023 NocoDB. Inc</div>
<div v-else-if="isMounted" class="flex flex-row justify-between flex-wrap pt-1 truncate">
<div class="flex items-start flex-row justify-center px-3 gap-2">
<GithubButton href="https://github.com/nocodb/nocodb" data-icon="octicon-star" data-show-count="true" data-size="large">
<div v-else-if="isMounted" class="flex flex-row justify-between pt-1 truncate">
<div class="flex flex-wrap mb-1">
<GithubButton class="px-2 mb-1" href="https://github.com/nocodb/nocodb" data-icon="octicon-star"
data-show-count="true" data-size="large">
Star
</GithubButton>
</div>
<div class="flex items-start flex-row justify-center gap-2">
<GeneralJoinCloud class="color-transition px-3 text-gray-500 cursor-pointer select-none hover:text-accent" />
<div>
<GeneralJoinCloud class="color-transition px-2 text-gray-500 cursor-pointer select-none hover:text-accent" />
</div>
</div>
</div>
</div>
@ -167,6 +167,7 @@ onMounted(() => {
:deep(.ant-popover-inner-content) {
@apply !p-0 !rounded-md;
}
.social-icon {
// Make icon black and white
filter: grayscale(100%);
@ -181,6 +182,7 @@ onMounted(() => {
.nc-icon {
@apply mr-0.15;
}
&:hover {
.social-icon {
filter: none !important;

21
packages/nc-gui/components/general/JoinCloud.vue

@ -3,13 +3,18 @@ import { iconMap } from '#imports'
</script>
<template>
<a
v-e="['c:navbar:join-cloud']"
class="flex justify-center mx-2 rounded-lg items-center space-x-1 w-full cursor-pointer pl-3 py-1.5 !text-current !no-underline !hover:(text-primary bg-primary bg-opacity-5)"
href="https://docs.google.com/forms/d/e/1FAIpQLSfKLe8Rcrq0uo2_jM5W1kbVBbzDiQ3IvlP8Iov61FTekVAvzA/viewform?usp=pp_url"
target="_blank"
>
<component :is="iconMap.cloud" class="mr-1" />
Join NocoDB Cloud
<a v-e="['c:navbar:join-cloud']" class="flex !no-underline"
href="https://docs.google.com/forms/d/e/1FAIpQLSfKLe8Rcrq0uo2_jM5W1kbVBbzDiQ3IvlP8Iov61FTekVAvzA/viewform?usp=pp_url">
<div
class="flex justify-center items-center rounded-l-[3px] w-full cursor-pointer px-2 py-1 !text-current !no-underline text-primary border-1 border-[#cdd1d6] bg-[#EFF2F6] hover:bg-[#e9ebef] m-0"
target="_blank">
<component :is="iconMap.cloud" class="mt-[1px] text-black font-bold" />
<div class="px-1 text-xs font-bold text-gray-800">Join</div>
</div>
<div
class="group flex justify-center items-center rounded-r-[3px] w-full cursor-pointer px-1 py-1 text-primary border-r-1 border-b-1 border-t-1 border-[#cdd1d6] m-0"
target="_blank">
<div class="px-1 text-xs font-semibold group-hover:text-[#0a69da] text-gray-900">NocoDB Cloud</div>
</div>
</a>
</template>

17
packages/nc-gui/components/workspace/Menu.vue

@ -3,19 +3,12 @@
<template>
<div class="flex flex-row flex-grow pl-0.5 pr-1 py-0.5 rounded-md w-full" style="max-width: calc(100% - 2.5rem)">
<div class="flex-grow min-w-20">
<div
data-testid="nc-workspace-menu"
class="flex items-center nc-workspace-menu overflow-hidden py-1.25 pr-0.25 justify-center w-full"
>
<a
class="w-10 min-w-10 transition-all duration-200 p-1 transform"
href="https://github.com/nocodb/nocodb"
target="_blank"
>
<img width="25" alt="NocoDB" src="~/assets/img/icons/256x256.png" />
<div data-testid="nc-workspace-menu"
class="flex items-center nc-workspace-menu overflow-hidden py-1.25 pr-0.25 justify-center w-full">
<a class="transition-all duration-200 transform" href="https://github.com/nocodb/nocodb"
target="_blank">
<img alt="NocoDB" src="~/assets/img/brand/nocodb-full.png" class="h-10" />
</a>
<div class="font-semibold text-base">Nocodb</div>
<div class="flex flex-grow"></div>
</div>
</div>

Loading…
Cancel
Save