feat(react/ribbon): port view type

This commit is contained in:
Elian Doran
2025-08-23 22:49:32 +03:00
parent 652114c7b5
commit ce1f5c6204
5 changed files with 96 additions and 90 deletions

View File

@@ -808,6 +808,14 @@ export function numberObjectsInPlace<T extends object>(items: T[]): Indexed<T>[]
return items as Indexed<T>[];
}
export function mapToKeyValueArray<K extends string | number | symbol, V>(map: Record<K, V>) {
const values: { key: K, value: V }[] = [];
for (const [ key, value ] of Object.entries(map)) {
values.push({ key: key as K, value: value as V });
}
return values;
}
export default {
reloadFrontendApp,
restartDesktopApp,