Spaces:
Running
Running
update model name display
Browse files
frontend/src/components/ControlPanel.tsx
CHANGED
|
@@ -88,6 +88,11 @@ export default function ControlPanel({
|
|
| 88 |
return lang.charAt(0).toUpperCase() + lang.slice(1);
|
| 89 |
};
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
return (
|
| 92 |
<div className="bg-[#000000] h-full flex flex-col">
|
| 93 |
{/* Panel Header */}
|
|
@@ -161,12 +166,10 @@ export default function ControlPanel({
|
|
| 161 |
disabled={isGenerating}
|
| 162 |
className="w-full px-3 py-2 bg-[#1d1d1f] text-[#f5f5f7] text-sm border border-[#424245]/50 rounded-lg focus:outline-none focus:border-[#424245] disabled:opacity-40 flex items-center justify-between hover:bg-[#2d2d2f] transition-colors"
|
| 163 |
>
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
}
|
| 169 |
-
</span>
|
| 170 |
<svg
|
| 171 |
className={`w-3.5 h-3.5 text-[#86868b] flex-shrink-0 ml-2 transition-transform ${showModelDropdown ? 'rotate-180' : ''}`}
|
| 172 |
fill="none"
|
|
@@ -196,7 +199,7 @@ export default function ControlPanel({
|
|
| 196 |
}`}
|
| 197 |
>
|
| 198 |
<div className="flex items-center justify-between gap-2">
|
| 199 |
-
<span className="text-sm text-[#f5f5f7]">{model.name}</span>
|
| 200 |
{['Qwen/Qwen3.5-397B-A17B', 'MiniMaxAI/MiniMax-M2.5'].includes(model.id) && (
|
| 201 |
<span className="px-1.5 py-0.5 bg-gradient-to-r from-purple-500 to-pink-500 text-white text-[9px] font-bold rounded uppercase flex-shrink-0">
|
| 202 |
NEW
|
|
|
|
| 88 |
return lang.charAt(0).toUpperCase() + lang.slice(1);
|
| 89 |
};
|
| 90 |
|
| 91 |
+
const formatModelName = (name: string, id: string) => {
|
| 92 |
+
if (id === 'Qwen/Qwen3.5-397B-A17B') return 'Qwen3.5-397B-A17B 🤖';
|
| 93 |
+
return name;
|
| 94 |
+
};
|
| 95 |
+
|
| 96 |
return (
|
| 97 |
<div className="bg-[#000000] h-full flex flex-col">
|
| 98 |
{/* Panel Header */}
|
|
|
|
| 166 |
disabled={isGenerating}
|
| 167 |
className="w-full px-3 py-2 bg-[#1d1d1f] text-[#f5f5f7] text-sm border border-[#424245]/50 rounded-lg focus:outline-none focus:border-[#424245] disabled:opacity-40 flex items-center justify-between hover:bg-[#2d2d2f] transition-colors"
|
| 168 |
>
|
| 169 |
+
{isLoading
|
| 170 |
+
? 'Loading...'
|
| 171 |
+
: formatModelName(models.find(m => m.id === selectedModel)?.name || '', selectedModel) || selectedModel || 'Select model'
|
| 172 |
+
}
|
|
|
|
|
|
|
| 173 |
<svg
|
| 174 |
className={`w-3.5 h-3.5 text-[#86868b] flex-shrink-0 ml-2 transition-transform ${showModelDropdown ? 'rotate-180' : ''}`}
|
| 175 |
fill="none"
|
|
|
|
| 199 |
}`}
|
| 200 |
>
|
| 201 |
<div className="flex items-center justify-between gap-2">
|
| 202 |
+
<span className="text-sm text-[#f5f5f7]">{formatModelName(model.name, model.id)}</span>
|
| 203 |
{['Qwen/Qwen3.5-397B-A17B', 'MiniMaxAI/MiniMax-M2.5'].includes(model.id) && (
|
| 204 |
<span className="px-1.5 py-0.5 bg-gradient-to-r from-purple-500 to-pink-500 text-white text-[9px] font-bold rounded uppercase flex-shrink-0">
|
| 205 |
NEW
|
frontend/src/components/LandingPage.tsx
CHANGED
|
@@ -281,6 +281,11 @@ export default function LandingPage({
|
|
| 281 |
return lang.charAt(0).toUpperCase() + lang.slice(1);
|
| 282 |
};
|
| 283 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 284 |
// Check if user owns the imported space
|
| 285 |
const checkSpaceOwnership = (url: string) => {
|
| 286 |
if (!url || !userInfo?.preferred_username) {
|
|
@@ -798,7 +803,7 @@ Note: After generating the redesign, I will create a Pull Request on the origina
|
|
| 798 |
<span className="truncate">
|
| 799 |
{isLoading
|
| 800 |
? '...'
|
| 801 |
-
: models.find(m => m.id === selectedModel)?.name || selectedModel || 'Model'
|
| 802 |
}
|
| 803 |
</span>
|
| 804 |
<svg
|
|
@@ -833,7 +838,7 @@ Note: After generating the redesign, I will create a Pull Request on the origina
|
|
| 833 |
}`}
|
| 834 |
>
|
| 835 |
<div className="flex items-center justify-between gap-2">
|
| 836 |
-
<span className="text-xs font-medium text-[#f5f5f7]">{model.name}</span>
|
| 837 |
{model.id === 'MiniMaxAI/MiniMax-M2.5' && (
|
| 838 |
<span className="px-1.5 py-0.5 bg-gradient-to-r from-purple-500 to-pink-500 text-white text-[9px] font-bold rounded uppercase">
|
| 839 |
NEW
|
|
|
|
| 281 |
return lang.charAt(0).toUpperCase() + lang.slice(1);
|
| 282 |
};
|
| 283 |
|
| 284 |
+
const formatModelName = (name: string, id: string) => {
|
| 285 |
+
if (id === 'Qwen/Qwen3.5-397B-A17B') return 'Qwen3.5-397B-A17B 🤖';
|
| 286 |
+
return name;
|
| 287 |
+
};
|
| 288 |
+
|
| 289 |
// Check if user owns the imported space
|
| 290 |
const checkSpaceOwnership = (url: string) => {
|
| 291 |
if (!url || !userInfo?.preferred_username) {
|
|
|
|
| 803 |
<span className="truncate">
|
| 804 |
{isLoading
|
| 805 |
? '...'
|
| 806 |
+
: formatModelName(models.find(m => m.id === selectedModel)?.name || '', selectedModel) || selectedModel || 'Model'
|
| 807 |
}
|
| 808 |
</span>
|
| 809 |
<svg
|
|
|
|
| 838 |
}`}
|
| 839 |
>
|
| 840 |
<div className="flex items-center justify-between gap-2">
|
| 841 |
+
<span className="text-xs font-medium text-[#f5f5f7]">{formatModelName(model.name, model.id)}</span>
|
| 842 |
{model.id === 'MiniMaxAI/MiniMax-M2.5' && (
|
| 843 |
<span className="px-1.5 py-0.5 bg-gradient-to-r from-purple-500 to-pink-500 text-white text-[9px] font-bold rounded uppercase">
|
| 844 |
NEW
|