mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
add common app routes to the protocol renderer router
Signed-off-by: Sebastian Malton <sebastian@malton.name> - add the protocol handler links to the docs Signed-off-by: Sebastian Malton <sebastian@malton.name> - add svg loaded to webpack Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
7d14ba5e48
commit
f06ba27d97
15 files changed
+84
-28
No files matched your search
@@ -8,10 +8,21 @@ export interface AppPreferenceComponents {
|
||||
|
||||
export interface AppPreferenceRegistration {
|
||||
title: string;
|
||||
id?: string;
|
||||
components: AppPreferenceComponents;
|
||||
}
|
||||
|
||||
export class AppPreferenceRegistry extends BaseRegistry<AppPreferenceRegistration> {
|
||||
export interface RegisteredAppPreference extends AppPreferenceRegistration {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export class AppPreferenceRegistry extends BaseRegistry<AppPreferenceRegistration, RegisteredAppPreference> {
|
||||
getRegisteredItem(item: AppPreferenceRegistration): RegisteredAppPreference {
|
||||
return {
|
||||
id: item.id || item.title.toLowerCase().replaceAll(/[^0-9a-zA-Z]+/, "-"),
|
||||
...item,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export const appPreferenceRegistry = new AppPreferenceRegistry();
|
||||
Reference in new issue
Block a user