show build_build as just build in update menu, and fix build listener url

This commit is contained in:
mbecker20
2023-01-09 05:39:22 +00:00
parent c78c89da37
commit 7c5cd1553d
2 changed files with 6 additions and 3 deletions
@@ -1,6 +1,6 @@
import { Component, Show } from "solid-js";
import { pushNotification, URL } from "../../../..";
import { combineClasses, copyToClipboard } from "../../../../util/helpers";
import { combineClasses, copyToClipboard, getId } from "../../../../util/helpers";
import ConfirmButton from "../../../shared/ConfirmButton";
import Icon from "../../../shared/Icon";
import Flex from "../../../shared/layout/Flex";
@@ -12,7 +12,7 @@ import OnClone from "./OnClone";
const GitConfig: Component<{}> = (p) => {
const { build, reset, save, userCanUpdate } = useConfig();
const listenerUrl = () => `${URL}/api/listener/build/${build._id}`;
const listenerUrl = () => `${URL}/api/listener/build/${getId(build)}`;
return (
<Show when={build.loaded}>
<Grid class="config">
@@ -1,6 +1,6 @@
import { Component, For, Show } from "solid-js";
import { useAppState } from "../../state/StateProvider";
import { Update as UpdateType, UpdateStatus } from "../../types";
import { Operation, Update as UpdateType, UpdateStatus } from "../../types";
import { combineClasses, readableDuration, readableMonitorTimestamp } from "../../util/helpers";
import { useToggle } from "../../util/hooks";
import Icon from "../shared/Icon";
@@ -23,6 +23,9 @@ const UpdateMenu: Component<{ update: UpdateType }> = (p) => {
}
};
const operation = () => {
if (p.update.operation === Operation.BuildBuild) {
return "build"
}
return p.update.operation.replaceAll("_", " ");
};
const [showLog, toggleShowLog] = useToggle();