Skip to content

Commit

Permalink
add back tag code lost from merge
Browse files Browse the repository at this point in the history
Signed-off-by: Rudy Flores <[email protected]>
  • Loading branch information
rudyflores committed Sep 28, 2023
1 parent fdd069c commit 0881ac1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/zowe-explorer/src/webviews/src/edit-attributes/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import isEqual from "lodash.isequal";
const vscodeApi = acquireVsCodeApi();

export function App() {
const notSupported = "NOT SUPPORTED";
const [readonly, setReadonly] = useState(false);
const [allowUpdate, setAllowUpdate] = useState(false);
const [attributes, setAttributes] = useState<Record<"current" | "initial", FileAttributes | null>>({
Expand Down Expand Up @@ -111,6 +112,7 @@ export function App() {
};
return all;
}, {}),
tag: attributes.tag ?? notSupported,
};

setAttributes({
Expand Down Expand Up @@ -155,6 +157,17 @@ export function App() {
<pre style={{ fontSize: "1.25em" }}>{attributes.current.name}</pre>
</strong>
<VSCodeDivider />
{attributes.initial?.directory ?? false ? null : (
<div style={{ marginTop: "1em", display: "flex", marginLeft: "1em" }}>
<VSCodeTextField
readonly={attributes.current.tag === notSupported}
value={attributes.current.tag}
onInput={(e: any) => updateFileAttributes("tag", e.target.value)}
>
Tag
</VSCodeTextField>
</div>
)}
<div style={{ marginTop: "1em" }}>
<div style={{ maxWidth: "fit-content" }}>
<div style={{ display: "flex", marginLeft: "1em" }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ export type FileAttributes = {
directory: boolean;
group: string;
perms: FilePermissions;
tag?: string;
};

0 comments on commit 0881ac1

Please sign in to comment.