diff --git a/packages/ui/src/apps/MobileChangesSurface.tsx b/packages/ui/src/apps/MobileChangesSurface.tsx index 01fa8cba..6818fec3 100644 --- a/packages/ui/src/apps/MobileChangesSurface.tsx +++ b/packages/ui/src/apps/MobileChangesSurface.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { RiArrowLeftLine, RiCloseLine, RiGitBranchLine, RiLoader4Line } from '@remixicon/react'; +import { Icon } from '@/components/icon/Icon'; import { toast } from '@/components/ui'; import { Button } from '@/components/ui/button'; @@ -443,16 +443,41 @@ export const MobileChangesSurface: React.FC = ({ onCl return groups; }, [handleRevertFile, handleViewChangeDiff, moveChangePaths, stagedChangeEntries, t, unstagedChangeEntries]); + const renderListState = (state: React.ReactNode) => ( +
+
+ {onClose ? ( + + ) : null} +
+

{t('mobile.nav.changes')}

+

+ {status?.current || currentDirectory || ''} +

+
+
+
{state}
+
+ ); + if (!currentDirectory) { - return ; + return renderListState(); } if (isLoadingStatus && isGitRepo === null) { - return ; + return renderListState(); } if (isGitRepo === false) { - return ; + return renderListState(); } if (route.type === 'diff') { @@ -479,7 +504,7 @@ export const MobileChangesSurface: React.FC = ({ onCl onClick={onClose} style={{ touchAction: 'manipulation' }} > - + ) : null}
@@ -548,8 +573,8 @@ const MobileChangesState: React.FC<{ }> = ({ message, description, loading = false, icon = false }) => (
- {loading ? : null} - {icon ? : null} + {loading ? : null} + {icon ? : null}

{message}

{description ?

{description}

: null}
@@ -576,7 +601,7 @@ const MobileDiffDetail: React.FC<{ aria-label={t('header.actions.backAria')} onClick={onBack} > - +

{path}