File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,24 +93,36 @@ export function PromptWorkspaceSelector(props: {
9393 </ MenuV2 . Content >
9494 </ MenuV2 . Portal >
9595 </ MenuV2 >
96- < Show when = { props . branch } >
97- { ( branch ) => (
98- < >
99- < span class = "hidden select-none opacity-50 sm:inline mx-1" > /</ span >
100- < TooltipV2
101- placement = "top"
102- value = { branch ( ) }
103- class = "min-w-0 max-w-[220px]"
104- contentClass = "max-w-[calc(100vw-32px)] break-all"
105- >
106- < div class = "flex h-7 min-w-0 max-w-[220px] items-center gap-1.5 px-2 text-[13px] font-[440] leading-5 tracking-[-0.04px]" >
107- < Icon name = "branch" size = "small" class = "shrink-0 text-v2-icon-icon-muted" />
108- < span class = "min-w-0 truncate" > { branch ( ) } </ span >
109- </ div >
110- </ TooltipV2 >
111- </ >
112- ) }
113- </ Show >
96+ < PromptGitStatus branch = { props . branch } />
11497 </ >
11598 )
11699}
100+
101+ export function PromptGitStatus ( props : { branch ?: string ; noGit ?: boolean } ) {
102+ const language = useLanguage ( )
103+ const label = ( ) => {
104+ if ( props . noGit ) return language . t ( "session.new.git.none" )
105+ return props . branch
106+ }
107+
108+ return (
109+ < Show when = { label ( ) } >
110+ { ( value ) => (
111+ < >
112+ < span class = "hidden select-none opacity-50 sm:inline mx-1" > /</ span >
113+ < TooltipV2
114+ placement = "top"
115+ value = { value ( ) }
116+ class = "min-w-0 max-w-[220px]"
117+ contentClass = "max-w-[calc(100vw-32px)] break-all"
118+ >
119+ < div class = "flex h-7 min-w-0 max-w-[220px] items-center gap-1.5 px-2 text-[13px] font-[440] leading-5 tracking-[-0.04px]" >
120+ < Icon name = "branch" size = "small" class = "shrink-0 text-v2-icon-icon-muted" />
121+ < span class = "min-w-0 truncate" > { value ( ) } </ span >
122+ </ div >
123+ </ TooltipV2 >
124+ </ >
125+ ) }
126+ </ Show >
127+ )
128+ }
Original file line number Diff line number Diff line change @@ -613,6 +613,7 @@ export const dict = {
613613 "session.new.workspace.triggerLocal" : "محلي" ,
614614 "session.new.workspace.local" : "المستودع المحلي" ,
615615 "session.new.workspace.existing" : "مساحة عمل…" ,
616+ "session.new.git.none" : "لا يوجد Git" ,
616617 "session.new.lastModified" : "آخر تعديل" ,
617618 "session.header.search.placeholder" : "بحث {{project}}" ,
618619 "session.header.searchFiles" : "بحث عن الملفات" ,
Original file line number Diff line number Diff line change @@ -619,6 +619,7 @@ export const dict = {
619619 "session.new.workspace.triggerLocal" : "Local" ,
620620 "session.new.workspace.local" : "Repositório local" ,
621621 "session.new.workspace.existing" : "Espaço de trabalho…" ,
622+ "session.new.git.none" : "Sem Git" ,
622623 "session.new.lastModified" : "Última modificação" ,
623624 "session.header.search.placeholder" : "Buscar {{project}}" ,
624625 "session.header.searchFiles" : "Buscar arquivos" ,
Original file line number Diff line number Diff line change @@ -675,6 +675,7 @@ export const dict = {
675675 "session.new.workspace.triggerLocal" : "Lokalno" ,
676676 "session.new.workspace.local" : "Lokalni repozitorij" ,
677677 "session.new.workspace.existing" : "Radni prostor…" ,
678+ "session.new.git.none" : "Nema Gita" ,
678679 "session.new.lastModified" : "Posljednja izmjena" ,
679680
680681 "session.header.search.placeholder" : "Pretraži {{project}}" ,
Original file line number Diff line number Diff line change @@ -670,6 +670,7 @@ export const dict = {
670670 "session.new.workspace.triggerLocal" : "Lokal" ,
671671 "session.new.workspace.local" : "Lokalt repository" ,
672672 "session.new.workspace.existing" : "Arbejdsområde…" ,
673+ "session.new.git.none" : "Ingen Git" ,
673674 "session.new.lastModified" : "Sidst ændret" ,
674675
675676 "session.header.search.placeholder" : "Søg {{project}}" ,
Original file line number Diff line number Diff line change @@ -628,6 +628,7 @@ export const dict = {
628628 "session.new.workspace.triggerLocal" : "Lokal" ,
629629 "session.new.workspace.local" : "Lokales Repository" ,
630630 "session.new.workspace.existing" : "Arbeitsbereich…" ,
631+ "session.new.git.none" : "Kein Git" ,
631632 "session.new.lastModified" : "Zuletzt geändert" ,
632633 "session.header.search.placeholder" : "{{project}} durchsuchen" ,
633634 "session.header.searchFiles" : "Dateien suchen" ,
Original file line number Diff line number Diff line change @@ -700,6 +700,7 @@ export const dict = {
700700 "session.new.workspace.triggerLocal" : "Local" ,
701701 "session.new.workspace.local" : "Local repository" ,
702702 "session.new.workspace.existing" : "Workspace…" ,
703+ "session.new.git.none" : "No Git" ,
703704 "session.new.lastModified" : "Last modified" ,
704705
705706 "session.header.search.placeholder" : "Search {{project}}" ,
Original file line number Diff line number Diff line change @@ -676,6 +676,7 @@ export const dict = {
676676 "session.new.workspace.triggerLocal" : "Local" ,
677677 "session.new.workspace.local" : "Repositorio local" ,
678678 "session.new.workspace.existing" : "Espacio de trabajo…" ,
679+ "session.new.git.none" : "Sin Git" ,
679680 "session.new.lastModified" : "Última modificación" ,
680681
681682 "session.header.search.placeholder" : "Buscar {{project}}" ,
Original file line number Diff line number Diff line change @@ -624,6 +624,7 @@ export const dict = {
624624 "session.new.workspace.triggerLocal" : "Local" ,
625625 "session.new.workspace.local" : "Dépôt local" ,
626626 "session.new.workspace.existing" : "Espace de travail…" ,
627+ "session.new.git.none" : "Pas de Git" ,
627628 "session.new.lastModified" : "Dernière modification" ,
628629 "session.header.search.placeholder" : "Rechercher {{project}}" ,
629630 "session.header.searchFiles" : "Rechercher des fichiers" ,
Original file line number Diff line number Diff line change @@ -615,6 +615,7 @@ export const dict = {
615615 "session.new.workspace.triggerLocal" : "ローカル" ,
616616 "session.new.workspace.local" : "ローカルリポジトリ" ,
617617 "session.new.workspace.existing" : "ワークスペース…" ,
618+ "session.new.git.none" : "Git なし" ,
618619 "session.new.lastModified" : "最終更新" ,
619620 "session.header.search.placeholder" : "{{project}}を検索" ,
620621 "session.header.searchFiles" : "ファイルを検索" ,
You can’t perform that action at this time.
0 commit comments