Просмотр исходного кода

Merge pull request #7897 from weseek/feat/123475-126853-editor-template-plugin-badge

feat: 123475 126853 editor template plugin badge
Yuki Takei 2 лет назад
Родитель
Сommit
e35da39df2
1 измененных файлов с 8 добавлено и 2 удалено
  1. 8 2
      apps/app/src/components/TemplateModal/TemplateModal.tsx

+ 8 - 2
apps/app/src/components/TemplateModal/TemplateModal.tsx

@@ -68,7 +68,10 @@ const TemplateListGroupItem: React.FC<TemplateSummaryItemProps> = ({
       onClick={onClick}
       onClick={onClick}
       aria-current="true"
       aria-current="true"
     >
     >
-      <h4 className="mb-1">{localizedTemplate.title}</h4>
+      {/* TODO: [テンプレート名が長すぎる場合に省略して表示させる](https://redmine.weseek.co.jp/issues/127116) */}
+      <h4 className="mb-1">{localizedTemplate.title}
+        {localizedTemplate.pluginId != null ? <i className="icon-fw icon-puzzle ml-2 text-muted small"></i> : ''}
+      </h4>
       <p className="mb-2">{localizedTemplate.desc}</p>
       <p className="mb-2">{localizedTemplate.desc}</p>
       { templateLocales != null && Array.from(templateLocales).map(locale => (
       { templateLocales != null && Array.from(templateLocales).map(locale => (
         <span key={locale} className="badge border rounded-pill text-muted mr-1">{locale}</span>
         <span key={locale} className="badge border rounded-pill text-muted mr-1">{locale}</span>
@@ -94,7 +97,10 @@ const TemplateDropdownItem: React.FC<TemplateSummaryItemProps> = ({
       onClick={onClick}
       onClick={onClick}
       className="px-4 py-3"
       className="px-4 py-3"
     >
     >
-      <h4 className="mb-1 text-wrap">{localizedTemplate.title}</h4>
+      {/* TODO: [テンプレート名が長すぎる場合に省略して表示させる](https://redmine.weseek.co.jp/issues/127116) */}
+      <h4 className="mb-1 text-wrap">{localizedTemplate.title}
+        {localizedTemplate.pluginId != null ? <i className="icon-fw icon-puzzle ml-2 text-muted small"></i> : ''}
+      </h4>
       <p className="mb-1 text-wrap">{localizedTemplate.desc}</p>
       <p className="mb-1 text-wrap">{localizedTemplate.desc}</p>
       { templateLocales != null && Array.from(templateLocales).map(locale => (
       { templateLocales != null && Array.from(templateLocales).map(locale => (
         <span key={locale} className="badge border rounded-pill text-muted mr-1">{locale}</span>
         <span key={locale} className="badge border rounded-pill text-muted mr-1">{locale}</span>