Skip to content

Commit

Permalink
feat: start and stop orbiter
Browse files Browse the repository at this point in the history
Signed-off-by: David Dal Busco <[email protected]>
  • Loading branch information
peterpeterparker committed Nov 18, 2023
1 parent 84ded2f commit b263f02
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/frontend/src/lib/components/orbiter/Orbiter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<CanisterOverview canisterId={orbiter.orbiter_id} />

<OrbiterActions />
<OrbiterActions {orbiter} />
</div>

<style lang="scss">
Expand Down
19 changes: 19 additions & 0 deletions src/frontend/src/lib/components/orbiter/OrbiterActions.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
<script lang="ts">
import TopUp from '$lib/components/canister/TopUp.svelte';
import Actions from '$lib/components/core/Actions.svelte';
import CanisterStopStart from '$lib/components/canister/CanisterStopStart.svelte';
import type { Orbiter } from '$declarations/mission_control/mission_control.did';
import type { Canister } from '$lib/types/canister';
export let orbiter: Orbiter;
let canister: Canister | undefined = undefined;
const onSyncCanister = (syncCanister: Canister) => {
if (syncCanister.id !== orbiter.orbiter_id.toText()) {
return;
}
canister = syncCanister;
};
let visible: boolean | undefined;
const close = () => (visible = false);
</script>

<svelte:window on:junoSyncCanister={({ detail: { canister } }) => onSyncCanister(canister)} />

<Actions bind:visible>
<TopUp type="topup_orbiter" on:junoTopUp={close} />

<CanisterStopStart {canister} segment="orbiter" on:junoStop={close} on:junoStart={close} />
</Actions>

0 comments on commit b263f02

Please sign in to comment.