@@ -72,6 +72,10 @@ import {
7272 warnPersistFailure ,
7373} from "./settings-persist-utils.js" ;
7474import { withQueuedRetry } from "./settings-write-queue.js" ;
75+ import { reorderStatuslineField } from "./statusline-order.js" ;
76+
77+ const reorderField = reorderStatuslineField ;
78+
7579import { promptStatuslineSettingsPanel } from "./statusline-settings-panel.js" ;
7680import { promptThemeSettingsPanel } from "./theme-settings-panel.js" ;
7781
@@ -609,24 +613,6 @@ async function configureDashboardDisplaySettings(
609613 return merged ;
610614}
611615
612- function reorderField (
613- fields : DashboardStatuslineField [ ] ,
614- key : DashboardStatuslineField ,
615- direction : - 1 | 1 ,
616- ) : DashboardStatuslineField [ ] {
617- const index = fields . indexOf ( key ) ;
618- if ( index < 0 ) return fields ;
619- const target = index + direction ;
620- if ( target < 0 || target >= fields . length ) return fields ;
621- const next = [ ...fields ] ;
622- const current = next [ index ] ;
623- const swap = next [ target ] ;
624- if ( ! current || ! swap ) return fields ;
625- next [ index ] = swap ;
626- next [ target ] = current ;
627- return next ;
628- }
629-
630616async function promptStatuslineSettings (
631617 initial : DashboardDisplaySettings ,
632618) : Promise < DashboardDisplaySettings | null > {
0 commit comments