Browse Source

fix(nc-gui): update marketplace modal tab icons

pull/9351/head
Ramesh Mane 4 months ago
parent
commit
778f39330c
  1. 3
      packages/nc-gui/assets/nc-icons/placeholder-icon.svg
  2. 3
      packages/nc-gui/assets/nc-icons/spanner.svg
  3. 6
      packages/nc-gui/components/extensions/Market.vue
  4. 4
      packages/nc-gui/utils/iconUtils.ts

3
packages/nc-gui/assets/nc-icons/placeholder-icon.svg

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" viewBox="0 0 17 16" fill="none">
<path d="M13.1667 2H3.83333C3.09695 2 2.5 2.59695 2.5 3.33333V12.6667C2.5 13.403 3.09695 14 3.83333 14H13.1667C13.903 14 14.5 13.403 14.5 12.6667V3.33333C14.5 2.59695 13.903 2 13.1667 2Z" stroke="currentColor" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 386 B

3
packages/nc-gui/assets/nc-icons/spanner.svg

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" viewBox="0 0 17 16" fill="none">
<path d="M9.83427 4.73872C9.71212 4.86334 9.64369 5.03089 9.64369 5.20539C9.64369 5.37989 9.71212 5.54744 9.83427 5.67206L10.9009 6.73872C11.0256 6.86088 11.1931 6.9293 11.3676 6.9293C11.5421 6.9293 11.7096 6.86088 11.8343 6.73872L14.3476 4.22539C14.6828 4.96618 14.7843 5.79155 14.6386 6.59149C14.4928 7.39143 14.1067 8.12795 13.5318 8.70291C12.9568 9.27787 12.2203 9.66394 11.4204 9.8097C10.6204 9.95545 9.79506 9.85395 9.05427 9.51872L4.4476 14.1254C4.18238 14.3906 3.82267 14.5396 3.4476 14.5396C3.07253 14.5396 2.71282 14.3906 2.4476 14.1254C2.18238 13.8602 2.03339 13.5005 2.03339 13.1254C2.03339 12.7503 2.18238 12.3906 2.4476 12.1254L7.05427 7.51872C6.71904 6.77793 6.61754 5.95257 6.76329 5.15263C6.90905 4.35269 7.29512 3.61616 7.87008 3.0412C8.44504 2.46625 9.18156 2.08017 9.9815 1.93442C10.7814 1.78867 11.6068 1.89017 12.3476 2.22539L9.84093 4.73206L9.83427 4.73872Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

6
packages/nc-gui/components/extensions/Market.vue

@ -25,13 +25,13 @@ const tabs = [
{
title: 'Scripts',
tabKey: 'scripts',
icon: 'ncPuzzleOutline',
icon: 'ncPlaceholderIcon',
isDisabled: true,
},
{
title: 'Build an extension',
tabKey: 'build-an-extension',
icon: 'ncSettings2',
icon: 'ncSpanner',
isDisabled: true,
},
] as TabItem[]
@ -99,7 +99,7 @@ const handleSetActiveTab = (tab: TabItem) => {
:class="{
'active-tab bg-white text-nc-gray-emphasis': activeTab === tab.tabKey,
'text-nc-gray-subtle2': activeTab !== tab.tabKey,
'cursor-not-allowed opacity-70': tab.isDisabled,
'cursor-not-allowed opacity-60': tab.isDisabled,
'cursor-pointer': !tab.isDisabled,
}"
@click="handleSetActiveTab(tab)"

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

@ -558,6 +558,8 @@ import NcPuzzleSolid from '~icons/nc-icons/puzzle-solid'
import NcPuzzleOutline from '~icons/nc-icons/puzzle-outline'
import NcInfoSolid from '~icons/nc-icons/info-solid'
import NcPlaceholderIcon from '~icons/nc-icons/placeholder-icon'
import NcSpanner from '~icons/nc-icons/spanner'
// keep it for reference
// todo: remove it after all icons are migrated
@ -1332,6 +1334,8 @@ export const iconMap = {
ncPuzzleSolid: NcPuzzleSolid,
ncPuzzleOutline: NcPuzzleOutline,
ncInfoSolid: NcInfoSolid,
ncPlaceholderIcon: NcPlaceholderIcon,
ncSpanner: NcSpanner,
}
export const getMdiIcon = (type: string): any => {

Loading…
Cancel
Save