Browse Source

feat(nc-gui): dark mode icon for powered by

pull/3669/head
braks 2 years ago committed by Raju Udava
parent
commit
b4f4f7de6f
  1. 6
      packages/nc-gui/components/general/NocoIcon.vue
  2. 2
      packages/nc-gui/components/general/PoweredBy.vue
  3. 2
      packages/nc-gui/pages/[projectType]/form/[viewId]/index.vue

6
packages/nc-gui/components/general/NocoIcon.vue

@ -3,15 +3,17 @@ interface Props {
width?: number width?: number
height?: number height?: number
animate?: boolean animate?: boolean
dark?: boolean
} }
const { width = 90, height = 90, animate = false } = defineProps<Props>() const { width = 90, height = 90, animate = false, dark = false } = defineProps<Props>()
</script> </script>
<template> <template>
<div :style="{ left: `calc(50% - ${width / 2}px)`, top: `-${height / 2}px` }" class="absolute rounded-lg pt-1 pl-1 -ml-1"> <div :style="{ left: `calc(50% - ${width / 2}px)`, top: `-${height / 2}px` }" class="absolute rounded-lg pt-1 pl-1 -ml-1">
<div class="relative"> <div class="relative">
<img :width="width" :height="height" alt="NocoDB" src="~/assets/img/icons/512x512.png" /> <img v-show="dark" :width="width" :height="height" alt="NocoDB" src="~/assets/img/icons/512x512-trans.png" />
<img v-show="!dark" :width="width" :height="height" alt="NocoDB" src="~/assets/img/icons/512x512.png" />
<template v-if="animate"> <template v-if="animate">
<div class="animated-bg-gradient opacity-100 rounded-full z-0 absolute bottom-1.45 right-1.45 h-4.5 w-4.5" /> <div class="animated-bg-gradient opacity-100 rounded-full z-0 absolute bottom-1.45 right-1.45 h-4.5 w-4.5" />

2
packages/nc-gui/components/general/PoweredBy.vue

@ -9,7 +9,7 @@ import { openLink } from '#imports'
@click="openLink('https://github.com/nocodb/nocodb')" @click="openLink('https://github.com/nocodb/nocodb')"
> >
<span class="rounded"> <span class="rounded">
<GeneralNocoIcon class="!relative !top-0" :width="32" :height="32" /> <GeneralNocoIcon v-bind="$attrs" class="!relative !top-0" :width="32" :height="32" />
</span> </span>
<span>Powered by NocoDB</span> <span>Powered by NocoDB</span>

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

@ -43,7 +43,7 @@ router.afterEach((to) => shouldRedirect(to.name as string))
<NuxtPage /> <NuxtPage />
<div class="flex w-full items-end mt-12"> <div class="flex w-full items-end mt-12">
<GeneralPoweredBy /> <GeneralPoweredBy :dark="isDark" />
</div> </div>
<div <div

Loading…
Cancel
Save