refactor: standardize frontend

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-02-24 17:38:48 -05:00
parent 20d3a46d7b
commit 0c4c9e52cd
24 changed files with 2448 additions and 1232 deletions
+8 -7
View File
@@ -14,7 +14,7 @@ export class ProviderObject implements ProviderInterface {
constructor() {
this._data = {
'@type': 'people:provider',
id: '',
identifier: '',
label: '',
capabilities: {},
};
@@ -30,9 +30,10 @@ export class ProviderObject implements ProviderInterface {
}
capable(capability: keyof ProviderCapabilitiesInterface): boolean {
return !!(this._data.capabilities && this._data.capabilities[capability]);
}
const value = this._data.capabilities?.[capability];
return value !== undefined && value !== false;
}
capability(capability: keyof ProviderCapabilitiesInterface): any | null {
if (this._data.capabilities) {
return this._data.capabilities[capability];
@@ -46,8 +47,8 @@ export class ProviderObject implements ProviderInterface {
return this._data['@type'];
}
get id(): string {
return this._data.id;
get identifier(): string {
return this._data.identifier;
}
get label(): string {
@@ -58,4 +59,4 @@ export class ProviderObject implements ProviderInterface {
return this._data.capabilities;
}
}
}