mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-07 09:24:09 +00:00
5d89a10754
Wire ConfirmModal and BusyButton so async confirms lock immediately, show spinner and progressive labels after duration-base, and block dismiss mid-flight. Connect stack delete and take-down to the existing stackAction map so the dialog is not idle until the toast.
13 lines
409 B
TypeScript
13 lines
409 B
TypeScript
/**
|
|
* Map an overlay stack name (bare name or filename) to the key used in
|
|
* `stackActionMap` / stack file lists. The map is filename-keyed (e.g. `web.yml`);
|
|
* overlay state often holds the bare name (`web`).
|
|
*/
|
|
export function resolveStackFileKey(files: string[], name: string): string {
|
|
return (
|
|
files.find(
|
|
(f) => f === name || f.replace(/\.(yml|yaml)$/, '') === name,
|
|
) ?? name
|
|
);
|
|
}
|