mirror of
https://github.com/moghtech/komodo.git
synced 2026-07-24 14:10:02 -05:00
add post image config
This commit is contained in:
@@ -4,6 +4,7 @@ import Image from "./container/Image";
|
||||
import Network from "./container/Network";
|
||||
import Mounts from "./container/Volumes";
|
||||
import Env from "./container/Env";
|
||||
import PostImage from "./container/PostImage";
|
||||
import Ports from "./container/Ports";
|
||||
import { useConfig } from "./Provider";
|
||||
import Flex from "../../../util/layout/Flex";
|
||||
@@ -22,7 +23,7 @@ import { combineClasses, copyToClipboard } from "../../../../util/helpers";
|
||||
import { useAppDimensions } from "../../../../state/DimensionProvider";
|
||||
import { useTheme } from "../../../../state/ThemeProvider";
|
||||
|
||||
const Config: Component<{}> = (p) => {
|
||||
const Config: Component<{}> = () => {
|
||||
const { deployment, reset, save, userCanUpdate } = useConfig();
|
||||
const { isMobile } = useAppDimensions();
|
||||
const listenerUrl = () => `${URL}/api/listener/deployment/${deployment._id}`;
|
||||
@@ -51,6 +52,7 @@ const Config: Component<{}> = (p) => {
|
||||
<Ports />
|
||||
<Mounts />
|
||||
<Env />
|
||||
<PostImage />
|
||||
<Show when={isMobile()}>
|
||||
<div style={{ height: "1rem" }} />
|
||||
</Show>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import { Component } from "solid-js";
|
||||
import { useTheme } from "../../../../../state/ThemeProvider";
|
||||
import { combineClasses } from "../../../../../util/helpers";
|
||||
import Input from "../../../../util/Input";
|
||||
import Flex from "../../../../util/layout/Flex";
|
||||
import { useConfig } from "../Provider";
|
||||
|
||||
const PostImage: Component<{}> = (p) => {
|
||||
const { deployment, setDeployment, userCanUpdate } = useConfig();
|
||||
const { themeClass } = useTheme();
|
||||
return (
|
||||
<Flex
|
||||
class={combineClasses("config-item shadow", themeClass())}
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<h1>post image</h1>
|
||||
<Input
|
||||
placeholder="post image"
|
||||
spellcheck={false}
|
||||
value={deployment.postImage || ""}
|
||||
style={{ width: userCanUpdate() && "16rem" }}
|
||||
onEdit={(value) => setDeployment("postImage", value)}
|
||||
disabled={!userCanUpdate()}
|
||||
/>
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
|
||||
export default PostImage;
|
||||
Reference in New Issue
Block a user