|
|
@@ -20,7 +20,6 @@ type PropsType = {
|
|
|
currentChart: ChartType;
|
|
|
refreshChart: () => void;
|
|
|
setShowDeleteOverlay: (x: boolean) => void;
|
|
|
- showSource?: boolean;
|
|
|
saveButtonText?: string | null;
|
|
|
};
|
|
|
|
|
|
@@ -28,7 +27,6 @@ const SettingsSection: React.FC<PropsType> = ({
|
|
|
currentChart,
|
|
|
refreshChart,
|
|
|
setShowDeleteOverlay,
|
|
|
- showSource,
|
|
|
saveButtonText,
|
|
|
}) => {
|
|
|
const [selectedImageUrl, setSelectedImageUrl] = useState<string | null>("");
|
|
|
@@ -201,21 +199,19 @@ const SettingsSection: React.FC<PropsType> = ({
|
|
|
|
|
|
return (
|
|
|
<>
|
|
|
- {showSource && (
|
|
|
- <>
|
|
|
- <Heading>Source Settings</Heading>
|
|
|
- <Helper>Specify an image tag to use.</Helper>
|
|
|
- <ImageSelector
|
|
|
- selectedTag={selectedTag}
|
|
|
- selectedImageUrl={selectedImageUrl}
|
|
|
- setSelectedImageUrl={(x: string) => setSelectedImageUrl(x)}
|
|
|
- setSelectedTag={(x: string) => setSelectedTag(x)}
|
|
|
- forceExpanded={true}
|
|
|
- disableImageSelect={true}
|
|
|
- />
|
|
|
- <Br />
|
|
|
- </>
|
|
|
- )}
|
|
|
+ <>
|
|
|
+ <Heading>Source Settings</Heading>
|
|
|
+ <Helper>Specify an image tag to use.</Helper>
|
|
|
+ <ImageSelector
|
|
|
+ selectedTag={selectedTag}
|
|
|
+ selectedImageUrl={selectedImageUrl}
|
|
|
+ setSelectedImageUrl={(x: string) => setSelectedImageUrl(x)}
|
|
|
+ setSelectedTag={(x: string) => setSelectedTag(x)}
|
|
|
+ forceExpanded={true}
|
|
|
+ disableImageSelect={true}
|
|
|
+ />
|
|
|
+ <Br />
|
|
|
+ </>
|
|
|
|
|
|
<>
|
|
|
<Heading>Redeploy Webhook</Heading>
|
|
|
@@ -257,7 +253,7 @@ const SettingsSection: React.FC<PropsType> = ({
|
|
|
return (
|
|
|
<Wrapper>
|
|
|
{!loadingWebhookToken ? (
|
|
|
- <StyledSettingsSection showSource={showSource}>
|
|
|
+ <StyledSettingsSection>
|
|
|
{renderWebhookSection()}
|
|
|
<NotificationSettingsSection currentChart={currentChart} />
|
|
|
<Heading>Additional Settings</Heading>
|
|
|
@@ -268,7 +264,7 @@ const SettingsSection: React.FC<PropsType> = ({
|
|
|
) : (
|
|
|
<Loading />
|
|
|
)}
|
|
|
- {!loadingWebhookToken && showSource && (
|
|
|
+ {!loadingWebhookToken && (
|
|
|
<SaveButton
|
|
|
text={saveButtonText || "Save Config"}
|
|
|
status={saveValuesStatus}
|
|
|
@@ -372,7 +368,7 @@ const Wrapper = styled.div`
|
|
|
height: 100%;
|
|
|
`;
|
|
|
|
|
|
-const StyledSettingsSection = styled.div<{ showSource: boolean }>`
|
|
|
+const StyledSettingsSection = styled.div`
|
|
|
width: 100%;
|
|
|
background: #ffffff11;
|
|
|
padding: 0 35px;
|
|
|
@@ -380,7 +376,7 @@ const StyledSettingsSection = styled.div<{ showSource: boolean }>`
|
|
|
position: relative;
|
|
|
border-radius: 8px;
|
|
|
overflow: auto;
|
|
|
- height: ${(props) => (props.showSource ? "calc(100% - 55px)" : "100%")};
|
|
|
+ height: calc(100% - 55px);
|
|
|
`;
|
|
|
|
|
|
const Holder = styled.div`
|