Browse Source

feat(gui): replace icons with light icon

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5343/head
Pranav C 2 years ago
parent
commit
80470076a9
  1. 10
      packages/nc-gui/components/dashboard/TreeView.vue
  2. 2
      packages/nc-gui/components/general/AddBaseButton.vue
  3. 2
      packages/nc-gui/components/general/HelpAndSupport.vue
  4. 2
      packages/nc-gui/components/general/JoinCloud.vue
  5. 2
      packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue
  6. 6
      packages/nc-gui/utils/iconUtils.ts
  7. 15
      packages/nc-gui/utils/viewUtils.ts

10
packages/nc-gui/components/dashboard/TreeView.vue

@ -30,8 +30,8 @@ import {
useUIPermission, useUIPermission,
watchEffect, watchEffect,
} from '#imports' } from '#imports'
import MdiView from '~icons/mdi/eye-circle-outline' import PhEyeThin from '~icons/ph/EyeThin'
import MdiTableLarge from '~icons/mdi/table-large' import PhTableThin from '~icons/ph/TableThin'
const { isMobileMode } = useGlobal() const { isMobileMode } = useGlobal()
@ -152,10 +152,10 @@ watchEffect(() => {
const icon = (table: TableType) => { const icon = (table: TableType) => {
if (table.type === 'table') { if (table.type === 'table') {
return MdiTableLarge return PhTableThin
} }
if (table.type === 'view') { if (table.type === 'view') {
return MdiView return PhEyeThin
} }
} }
@ -1028,7 +1028,7 @@ const setIcon = async (icon: string, table: TableType) => {
<div class="flex items-start flex-col justify-start px-2 py-3 gap-2"> <div class="flex items-start flex-col justify-start px-2 py-3 gap-2">
<LazyGeneralAddBaseButton <LazyGeneralAddBaseButton
class="color-transition py-1.5 px-2 text-primary font-bold cursor-pointer select-none hover:text-accent" class="color-transition py-1.5 px-2 font-bold cursor-pointer select-none hover:text-primary"
/> />
<LazyGeneralHelpAndSupport class="color-transition px-2 text-gray-500 cursor-pointer select-none hover:text-accent" /> <LazyGeneralHelpAndSupport class="color-transition px-2 text-gray-500 cursor-pointer select-none hover:text-accent" />

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

@ -14,7 +14,7 @@ const toggleDialog = inject(ToggleDialogInj, () => {})
> >
<div> <div>
<div class="flex items-center space-x-1"> <div class="flex items-center space-x-1">
<RiTeamFill class="mr-1 nc-new-base" /> <PhUsersThreeThin class="mr-1 nc-new-base" />
<div>{{ t('title.teamAndSettings') }}</div> <div>{{ t('title.teamAndSettings') }}</div>
</div> </div>
</div> </div>

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

@ -19,7 +19,7 @@ const openSwaggerLink = () => {
class="flex items-center space-x-1 w-full cursor-pointer pl-3 py-1.5 hover:(text-primary bg-primary bg-opacity-5)" class="flex items-center space-x-1 w-full cursor-pointer pl-3 py-1.5 hover:(text-primary bg-primary bg-opacity-5)"
@click="showDrawer = true" @click="showDrawer = true"
> >
<MdiCommentTextOutline class="mr-1" /> <PhChatTextThin class="mr-1" />
<!-- APIs & Support --> <!-- APIs & Support -->
<div>{{ $t('title.APIsAndSupport') }}</div> <div>{{ $t('title.APIsAndSupport') }}</div>

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

@ -5,7 +5,7 @@
href="https://docs.google.com/forms/d/e/1FAIpQLSfKLe8Rcrq0uo2_jM5W1kbVBbzDiQ3IvlP8Iov61FTekVAvzA/viewform?usp=pp_url" href="https://docs.google.com/forms/d/e/1FAIpQLSfKLe8Rcrq0uo2_jM5W1kbVBbzDiQ3IvlP8Iov61FTekVAvzA/viewform?usp=pp_url"
target="_blank" target="_blank"
> >
<PhCloudLightningDuotone class="mr-1" /> <PhCloudLightningThin class="mr-1" />
Join NocoDB Cloud Join NocoDB Cloud
</a> </a>
</template> </template>

2
packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue

@ -156,7 +156,7 @@ useMenuCloseOnEsc(open)
<div :class="{ 'nc-active-btn': numberOfHiddenFields }"> <div :class="{ 'nc-active-btn': numberOfHiddenFields }">
<a-button v-e="['c:fields']" class="nc-fields-menu-btn nc-toolbar-btn" :disabled="isLocked"> <a-button v-e="['c:fields']" class="nc-fields-menu-btn nc-toolbar-btn" :disabled="isLocked">
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<MdiEyeOffOutline /> <PhUserPlusThin />
<!-- Fields --> <!-- Fields -->
<span v-if="!isMobileMode" class="text-capitalize !text-xs font-weight-normal">{{ $t('objects.fields') }}</span> <span v-if="!isMobileMode" class="text-capitalize !text-xs font-weight-normal">{{ $t('objects.fields') }}</span>

6
packages/nc-gui/utils/iconUtils.ts

@ -15,6 +15,8 @@ import MdiFlagOutline from '~icons/mdi/flag-outline'
import MdiTableLarge from '~icons/mdi/table-large' import MdiTableLarge from '~icons/mdi/table-large'
import MdiEyeCircleOutline from '~icons/mdi/eye-circle-outline' import MdiEyeCircleOutline from '~icons/mdi/eye-circle-outline'
import MdiAccountGroup from '~icons/mdi/account-group' import MdiAccountGroup from '~icons/mdi/account-group'
import PhEyeThin from '~icons/ph/EyeThin'
import PhTableThin from '~icons/ph/TableThin'
export const iconMap = { export const iconMap = {
'mdi-check-bold': MdiCheckBold, 'mdi-check-bold': MdiCheckBold,
@ -31,8 +33,8 @@ export const iconMap = {
'mdi-thumb-up-outline': MdiThumbUpOutline, 'mdi-thumb-up-outline': MdiThumbUpOutline,
'mdi-flag': MdiFlag, 'mdi-flag': MdiFlag,
'mdi-flag-outline': MdiFlagOutline, 'mdi-flag-outline': MdiFlagOutline,
'mdi-table-large': MdiTableLarge, 'mdi-table-large': PhTableThin,
'mdi-eye-circle-outline': MdiEyeCircleOutline, 'mdi-eye-circle-outline': PhEyeThin,
'mdi-account-group': MdiAccountGroup, 'mdi-account-group': MdiAccountGroup,
} as const } as const

15
packages/nc-gui/utils/viewUtils.ts

@ -9,15 +9,20 @@ import MdiKanbanIcon from '~icons/mdi/tablet-dashboard'
import MdiMapIcon from '~icons/mdi/map-outline' import MdiMapIcon from '~icons/mdi/map-outline'
import MdiEyeIcon from '~icons/mdi/eye-circle-outline' import MdiEyeIcon from '~icons/mdi/eye-circle-outline'
import type { Language } from '~/lib' import type { Language } from '~/lib'
import PhTableThin from '~icons/ph/TableThin'
import PhImageThin from '~icons/ph/ImageThin'
import PhComputerTowerThin from '~icons/ph/ComputerTowerThin'
import PhSquareHalfBottomThin from '~icons/ph/SquareHalfBottomThin'
import PhEyeThin from '~icons/ph/EyeThin'
export const viewIcons: Record<number | string, { icon: any; color: string }> = { export const viewIcons: Record<number | string, { icon: any; color: string }> = {
[ViewTypes.GRID]: { icon: MdiGridIcon, color: '#8f96f2' }, [ViewTypes.GRID]: { icon: PhTableThin, color: '#8f96f2' },
[ViewTypes.FORM]: { icon: MdiFormIcon, color: themeV2Colors.pink['500'] }, [ViewTypes.FORM]: { icon: PhComputerTowerThin, color: themeV2Colors.pink['500'] },
calendar: { icon: MdiCalendarIcon, color: 'purple' }, calendar: { icon: MdiCalendarIcon, color: 'purple' },
[ViewTypes.GALLERY]: { icon: MdiGalleryIcon, color: 'orange' }, [ViewTypes.GALLERY]: { icon: PhImageThin, color: 'orange' },
[ViewTypes.MAP]: { icon: MdiMapIcon, color: 'blue' }, [ViewTypes.MAP]: { icon: MdiMapIcon, color: 'blue' },
[ViewTypes.KANBAN]: { icon: MdiKanbanIcon, color: 'green' }, [ViewTypes.KANBAN]: { icon: PhSquareHalfBottomThin, color: 'green' },
view: { icon: MdiEyeIcon, color: 'blue' }, view: { icon: PhEyeThin, color: 'blue' },
} }
export const viewTypeAlias: Record<number, string> = { export const viewTypeAlias: Record<number, string> = {

Loading…
Cancel
Save