Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: update record template icon

Ramesh Mane215e7de34f1f
diff --git a/packages/nc-gui/assets/nc-icons-v2/clipboard-type.svg b/packages/nc-gui/assets/nc-icons-v2/clipboard-type.svg
new file mode 100644
index 0000000000..8860c1e20e
--- /dev/null
+++ b/packages/nc-gui/assets/nc-icons-v2/clipboard-type.svg
@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor"
+ stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round">
+ <rect width="5.333" height="2.667" x="5.333" y="1.333" rx="0.667" ry="0.667" />
+ <path d="M10.667 2.667h1.333a1.333 1.333 0 0 1 1.333 1.333v9.333a1.333 1.333 0 0 1-1.333 1.333H4a1.333 1.333 0 0 1-1.333-1.333V4a1.333 1.333 0 0 1 1.333-1.333h1.333" />
+ <path d="M6 8v-0.667h4v0.667" />
+ <path d="M7.333 11.333h1.333" />
+ <path d="M8 7.333v4" />
+</svg>
diff --git a/packages/nc-gui/components/smartsheet/grid/canvas/components/AddNewRowMenu.vue b/packages/nc-gui/components/smartsheet/grid/canvas/components/AddNewRowMenu.vue
index 345a82ce0b..af9efb3633 100644
--- a/packages/nc-gui/components/smartsheet/grid/canvas/components/AddNewRowMenu.vue
+++ b/packages/nc-gui/components/smartsheet/grid/canvas/components/AddNewRowMenu.vue
@@ -76,7 +76,7 @@ const handleUseTemplate = async (tmpl: any) => {
{{ $t('activity.newRecord') }} - {{ $t('objects.viewType.grid') }}
</div>
- <GeneralIcon v-if="!selectedTemplate && isAddNewRecordGridMode" icon="check" class="w-4 h-4 text-primary" />
+ <GeneralIcon v-if="!selectedTemplate && isAddNewRecordGridMode" icon="check" class="w-4 h-4 text-nc-content-brand" />
</NcMenuItem>
<NcMenuItem
v-e="['c:row:add:form']"
@@ -93,7 +93,7 @@ const handleUseTemplate = async (tmpl: any) => {
{{ $t('activity.newRecord') }} - {{ $t('objects.viewType.form') }}
</div>
- <GeneralIcon v-if="!selectedTemplate && !isAddNewRecordGridMode" icon="check" class="w-4 h-4 text-primary" />
+ <GeneralIcon v-if="!selectedTemplate && !isAddNewRecordGridMode" icon="check" class="w-4 h-4 text-nc-content-brand" />
</NcMenuItem>
<!-- Record Templates (when available) -->
@@ -112,24 +112,7 @@ const handleUseTemplate = async (tmpl: any) => {
"
>
<div class="flex items-center flex-1 gap-2">
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- stroke-linecap="round"
- stroke-linejoin="round"
- class="flex-none"
- >
- <rect width="8" height="4" x="8" y="2" rx="1" ry="1" />
- <path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" />
- <path d="M9 12v-1h6v1" />
- <path d="M11 17h2" />
- <path d="M12 11v6" />
- </svg>
+ <GeneralIcon icon="ncClipboardType" class="h-4 w-4 flex-none" />
<span class="truncate flex-1">{{ tmpl.title }}</span>
</div>
<GeneralIcon v-if="selectedTemplate?.id === tmpl.id" icon="check" class="w-4 h-4 text-primary" />
diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json
index e930f05130..61994bfc61 100644
--- a/packages/nc-gui/lang/en.json
+++ b/packages/nc-gui/lang/en.json
@@ -214,6 +214,7 @@
"authorization": "Authorization",
"revoke": "Revoke",
"marketplace": "Marketplace",
+ "template": "Template",
"templates": "Templates",
"script": "Script",
"dashboard": "Dashboard",
diff --git a/packages/nc-gui/utils/iconUtils.ts b/packages/nc-gui/utils/iconUtils.ts
index 4b2a606d58..4ab1353e04 100644
--- a/packages/nc-gui/utils/iconUtils.ts
+++ b/packages/nc-gui/utils/iconUtils.ts
@@ -816,6 +816,7 @@ import NcGraduationCap from '~icons/nc-icons-v2/graduation-cap'
import NcSupportAgent from '~icons/nc-icons-v2/support-agent'
import NcBuilding from '~icons/nc-icons-v2/building'
import NcExtUrlPreviewEmptyState from '~icons/nc-icons/extension-url-preview-empty-state'
+import NcClipboardType from '~icons/nc-icons-v2/clipboard-type'
// keep it for reference
// todo: remove it after all icons are migrated
@@ -1843,6 +1844,7 @@ export const iconMap = {
'ncIfElse': NcIfElse,
'ncRecordEntersView': NcRecordEntersView,
'ncExtUrlPreviewEmptyState': h(NcExtUrlPreviewEmptyState, { stroke: 'transparent' }),
+ 'ncClipboardType': NcClipboardType,
}
export const getMdiIcon = (type: string): any => {
@@ -4638,6 +4640,10 @@ export const searchableMap = {
icon: NcBuilding,
keywords: ['building', 'office', 'building-outline'],
},
+ ncClipboardType: {
+ icon: NcClipboardType,
+ keywords: ['clipboard', 'type', 'copy', 'paste'],
+ },
}
export const searchIcons = (searchTerm: string) => {