Преглед изворни кода

Merge pull request #30054 from overleaf/mj-workbench-title

[web] Update workbench panel title

GitOrigin-RevId: 14e505bec0d663b84b3d9dbae398f8647a30d90d
Mathias Jakobsen пре 8 месеци
родитељ
комит
d531613c7a

+ 0 - 1
services/web/frontend/extracted-translations.json

@@ -123,7 +123,6 @@
   "ai_feedback_the_suggestion_didnt_fix_the_error": "",
   "ai_feedback_the_suggestion_wasnt_the_best_fix_available": "",
   "ai_feedback_there_was_no_code_fix_suggested": "",
-  "ai_workbench": "",
   "alignment": "",
   "all_borders": "",
   "all_events": "",

+ 1 - 1
services/web/frontend/js/features/ide-redesign/components/rail/rail-panel-header.tsx

@@ -8,7 +8,7 @@ export default function RailPanelHeader({
   title,
   actions,
 }: {
-  title: string
+  title: React.ReactNode
   actions?: React.ReactNode[]
 }) {
   const { t } = useTranslation()

+ 4 - 0
services/web/frontend/js/shared/components/beta-badge-icon.tsx

@@ -14,6 +14,8 @@ const BetaBadgeIcon: FC<{
         α
       </OLBadge>
     )
+  } else if (badgeClass === 'labs-badge') {
+    return <MaterialIcon type="science" className="align-middle labs-badge" />
   } else {
     return (
       <OLBadge className="beta-badge" bg="beta">
@@ -25,6 +27,8 @@ const BetaBadgeIcon: FC<{
 
 function chooseBadgeClass(phase?: string) {
   switch (phase) {
+    case 'labs':
+      return 'labs-badge'
     case 'release':
       return 'info-badge'
     case 'alpha':

+ 7 - 0
services/web/frontend/stylesheets/components/beta-badges.scss

@@ -6,6 +6,13 @@
   font-family: $font-family-monospace;
 }
 
+.labs-badge {
+  background-color: var(--green-50);
+  color: var(--white);
+  border-radius: var(--border-radius-base);
+  padding: var(--spacing-01);
+}
+
 .beta-badge {
   font-family: $font-family-monospace;
   background-color: var(--bg-accent-03);

+ 0 - 1
services/web/locales/en.json

@@ -148,7 +148,6 @@
   "ai_feedback_the_suggestion_didnt_fix_the_error": "The suggestion didn’t fix the error",
   "ai_feedback_the_suggestion_wasnt_the_best_fix_available": "The suggestion wasn’t the best fix available",
   "ai_feedback_there_was_no_code_fix_suggested": "There was no code fix suggested",
-  "ai_workbench": "AI Workbench",
   "alignment": "Alignment",
   "all": "All",
   "all_borders": "All borders",