Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions frontend/Instance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Instance: Component<{
if (iframeRef == null) {
return;
}
setDropUpdates(false) // reset our state because inner sim/webxdc state is reset in reload
setDropUpdates(false); // reset our state because inner sim/webxdc state is reset in reload
iframeRef.contentWindow?.postMessage("reload", props.instance.url);

notificationService.show({
Expand All @@ -34,9 +34,12 @@ const Instance: Component<{
if (iframeRef == null) {
return;
}
setDropUpdates(!dropUpdates())
iframeRef.contentWindow?.postMessage({ name: "dropUpdates", value: dropUpdates()}, props.instance.url)
}
setDropUpdates(!dropUpdates());
iframeRef.contentWindow?.postMessage(
{ name: "dropUpdates", value: dropUpdates() },
props.instance.url,
);
};

const getStyle = () => {
return {
Expand Down
10 changes: 8 additions & 2 deletions frontend/InstanceHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from "@hope-ui/solid";
import { IoRefreshOutline, IoStop, IoPlay } from "solid-icons/io";
import { FiExternalLink, FiTrash } from "solid-icons/fi";
import { RiDeviceWifiLine, RiDeviceWifiOffLine } from 'solid-icons/ri'
import { RiDeviceWifiLine, RiDeviceWifiOffLine } from "solid-icons/ri";

import type { Instance as InstanceData } from "../types/instance";
import { sent, received, mutateInstances } from "./store";
Expand Down Expand Up @@ -119,7 +119,13 @@ const InstanceHeader: Component<{
<InstanceButton
label="Drop Updates"
onClick={props.onToggleDropUpdates}
icon={props.dropUpdates ? <RiDeviceWifiOffLine size={22} color={"#FF0000"} /> : <RiDeviceWifiLine size={22} color={"#000000"} /> }
icon={
props.dropUpdates ? (
<RiDeviceWifiOffLine size={22} color={"#FF0000"} />
) : (
<RiDeviceWifiLine size={22} color={"#000000"} />
)
}
/>
</Flex>
</Flex>
Expand Down
Loading
Loading