From 369c4f08934481c8644073eb4f371cacdf17b09c Mon Sep 17 00:00:00 2001 From: lianahus Date: Tue, 16 Jul 2024 16:23:05 +0200 Subject: [PATCH] adding more info to templates. --- .../templates-selection-plugin.tsx | 21 +++++++++++++++++-- .../app/providers/environment-explorer.tsx | 3 +++ .../grid-view/src/lib/remix-ui-grid-cell.css | 4 ++-- .../grid-view/src/lib/remix-ui-grid-cell.tsx | 10 ++++----- .../src/lib/remix-ui-grid-section.tsx | 2 +- 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx index 42fd80902e..bf61ac3e05 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx @@ -10,6 +10,7 @@ import { RemixUIGridSection } from '@remix-ui/remix-ui-grid-section' import { RemixUIGridCell } from '@remix-ui/remix-ui-grid-cell' import isElectron from 'is-electron' import type { TemplateGroup } from '@remix-ui/workspace' +import './templates-selection-plugin.css' import { templates } from './templates' //@ts-ignore @@ -160,10 +161,26 @@ export class TemplatesSelectionPlugin extends ViewPlugin { return -
- {item.displayName} +
+
+ + {item.displayName} + +
+ {(item.opts && item.opts.upgradeable && item.opts.upgradeable === 'uupds') && Upgradeable-UUPS} + {(item.opts && item.opts.mintable) && mintable} + {(item.opts && item.opts.burnable) && burnable} + {(item.opts && item.opts.pausable) && pausable} +
+
{(!template.IsArtefact || !item.isArtefact) && { @@ -176,6 +178,7 @@ export class EnvironmentExplorer extends ViewPlugin { logos={provider.logos} payload={provider.description} classList='EECellStyle' + hideTitle={true} pinned={this.pinnedProviders.includes(provider.name)} id={provider.name} pinStateCallback={async (pinned: boolean) => { diff --git a/libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.css b/libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.css index d961824276..fe154d3481 100644 --- a/libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.css +++ b/libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.css @@ -41,8 +41,8 @@ .remixui_grid_cell_tags_no_pin { position: relative; - right: 0rem; - top: -6.5rem; + right: 0.45rem; + top: 1px } .remixui_grid_cell_tag { diff --git a/libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.tsx b/libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.tsx index 698646d51a..9734c3d028 100644 --- a/libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.tsx +++ b/libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.tsx @@ -18,7 +18,7 @@ interface RemixUIGridCellProps { logo?: string logos?: string[] title: string - payload?: string + hideTitle?: boolean tagList?: string[] // max 8, others will be ignored classList?: string styleList?: any @@ -70,8 +70,8 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => { { anyEnabled &&
-
-
+
+ { !props.hideTitle &&
{ props.logo && } { props.logos && props.logos.map((logo) => )} { props.title && } -
+
} { props.children }
@@ -111,7 +111,7 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => { )) }
} { !props.tagList && + className={'px-1 remixui_grid_cell_tags'}> }
{ expand &&
diff --git a/libs/remix-ui/grid-view/src/lib/remix-ui-grid-section.tsx b/libs/remix-ui/grid-view/src/lib/remix-ui-grid-section.tsx index 1e93101525..a3cb8b15c0 100644 --- a/libs/remix-ui/grid-view/src/lib/remix-ui-grid-section.tsx +++ b/libs/remix-ui/grid-view/src/lib/remix-ui-grid-section.tsx @@ -32,7 +32,7 @@ const hasChildCell = (children: ReactNode): boolean => { if (found) return if (isElement(child)) { - if (child.props.classList === 'EECellStyle') { + if (child.props.classList === 'remixui_grid_cell_container') { found = true return }