Skip to content

Commit

Permalink
fix: remove targetHost from Device in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
MSchmoecker committed Oct 5, 2024
1 parent a0b3382 commit b39c5ac
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/lib/config/ModuleList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<img src={module.icon ?? '/favicon.png'} alt={module.displayName} class="w-6 h-6" />
<P>{module.displayName}</P>
</a>
{#if removeModule && (!('targetHost' in context) || module.type !== 'thymis_controller.modules.thymis.ThymisDevice')}
{#if removeModule && ($globalNavSelectedTargetType !== 'device' || module.type !== 'thymis_controller.modules.thymis.ThymisDevice')}
<button
class="m-1 p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-500"
on:click={() => removeModule(context, module)}
Expand Down
1 change: 0 additions & 1 deletion frontend/src/lib/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export type Tag = {
export type Device = {
displayName: string;
identifier: string;
targetHost: string;
modules: ModuleSettings[];
tags: string[];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
const device: Device = {
displayName,
identifier,
targetHost: '',
tags: selectedTags.map((tag) => tag.value),
modules: [{ type: thymisDeviceModule?.type, settings: thymisDeviceModuleSettings }]
};
Expand Down

0 comments on commit b39c5ac

Please sign in to comment.