feat: add crud for integrations (#11)
* wip: add crud for services and integrations * feat: remove services * feat: move integration definitions to homarr/definitions, add temporary test connection solution without actual request * feat: add integration count badge * feat: add translation for integrations * feat: add notifications and translate them * feat: add notice to integration forms about test connection * chore: fix ci check issues * feat: add confirm modals for integration deletion and secret card cancellation, change ordering for list page, add name property to integrations * refactor: move revalidate path action * chore: fix ci check issues * chore: install missing dependencies * chore: fix ci check issues * chore: address pull request feedback
This commit is contained in:
2
packages/common/src/index.ts
Normal file
2
packages/common/src/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./object";
|
||||
export * from "./string";
|
||||
10
packages/common/src/object.ts
Normal file
10
packages/common/src/object.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export function objectKeys<O extends object>(obj: O): (keyof O)[] {
|
||||
return Object.keys(obj) as (keyof O)[];
|
||||
}
|
||||
|
||||
type Entries<T> = {
|
||||
[K in keyof T]: [K, T[K]];
|
||||
}[keyof T][];
|
||||
|
||||
export const objectEntries = <T extends object>(obj: T) =>
|
||||
Object.entries(obj) as Entries<T>;
|
||||
3
packages/common/src/string.ts
Normal file
3
packages/common/src/string.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export const capitalize = <T extends string>(str: T) => {
|
||||
return (str.charAt(0).toUpperCase() + str.slice(1)) as Capitalize<T>;
|
||||
};
|
||||
Reference in New Issue
Block a user