Skip to content

Commit

Permalink
few more ui tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
its-a-feature committed Dec 31, 2024
1 parent 6ded9fa commit e222747
Show file tree
Hide file tree
Showing 13 changed files with 230 additions and 130 deletions.
7 changes: 7 additions & 0 deletions MythicReactUI/CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.74] - 2024-12-31

### Changed

- Updated the side bar to have tooltips for the icons
- Updated the tasking bar for callbacks to auto-focus when selecting the tab

## [0.2.73] - 2024-12-31

### Changed
Expand Down
317 changes: 201 additions & 116 deletions MythicReactUI/src/components/TopAppBarVertical.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function CallbacksTablePreMemo(props){
const [updateDescriptionMutation] = useMutation(updateDescriptionCallbackMutation, {
update: (cache, {data}) => {
if(data.updateCallback.status === "success"){
snackActions.success("Updated Callback");
//snackActions.success("Updated Callback");
}else{
snackActions.warning(data.updateCallback.error);
}
Expand Down Expand Up @@ -211,7 +211,7 @@ function CallbacksTablePreMemo(props){
const [hideCallback] = useMutation(hideCallbackMutation, {
update: (cache, {data}) => {
if(data.updateCallback.status === "success"){
snackActions.success("Hiding callback");
//snackActions.success("Hiding callback");
}else{
snackActions.warning(data.updateCallback.error);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ export const CallbacksTabsTaskingPanel = ({tabInfo, index, value, onCloseTab, pa
onSubmitCommandLine={onSubmitCommandLine}
changeSelectedToken={changeSelectedToken}
filterOptions={filterOptions}
focus={index === value}
callback_id={tabInfo.callbackID}
payloadtype_name={tabInfo.payloadtype}
callback_os={tabInfo.os} parentMountedRef={mountedRef} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ export const CallbacksTabsTaskingConsolePanel = ({tabInfo, index, value, onClose

<CallbacksTabsTaskingInput filterTasks={true} me={me} onSubmitFilter={onSubmitFilter} onSubmitCommandLine={onSubmitCommandLine} changeSelectedToken={changeSelectedToken}
filterOptions={filterOptions} callback_id={tabInfo.callbackID}
payloadtype_name={tabInfo.payloadtype}
payloadtype_name={tabInfo.payloadtype} focus={index === value}
callback_os={tabInfo.os} parentMountedRef={mountedRef} />
{openParametersDialog &&
<MythicDialog fullWidth={true} maxWidth="lg" open={openParametersDialog}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ const IsRepeatableCLIParameterType = (parameter_type) => {
}
export function CallbacksTabsTaskingInputPreMemo(props){
const toastId = "tasking-toast-message";
const inputRef = React.useRef(null);
const snackMessageStyles = {position:"bottom-left", autoClose: 1000, style:{marginBottom: "50px"}, toastId: toastId};
const snackReverseSearchMessageStyles = {position:"bottom-left", autoClose: 1000, style:{marginBottom: "100px"}, toastId: toastId};
const [commandPayloadType, setCommandPayloadType] = React.useState("");
Expand Down Expand Up @@ -1520,6 +1521,11 @@ export function CallbacksTabsTaskingInputPreMemo(props){
event.preventDefault();
}
}
React.useEffect( () => {
if(inputRef.current){
inputRef.current.focus();
}
}, [props.focus])
return (
<React.Fragment>
<Backdrop open={backdropOpen} style={{zIndex: 2, position: "absolute"}} invisible={false}>
Expand All @@ -1538,7 +1544,6 @@ export function CallbacksTabsTaskingInputPreMemo(props){
fullWidth={true}
InputProps={{ type: 'search',
startAdornment: <React.Fragment><Typography style={{width: "10%"}}>reverse-i-search:</Typography></React.Fragment>

}}
/>
}
Expand All @@ -1555,10 +1560,12 @@ export function CallbacksTabsTaskingInputPreMemo(props){
value={message}
autoFocus={true}
fullWidth={true}
inputRef={inputRef}
style={{marginBottom: "0px", marginTop: "0px", paddingTop: "0px"}}
InputProps={{
type: 'search',
spellCheck: false,
autoFocus: true,
style: {paddingTop: "0px", paddingBottom: "0px", paddingRight: "5px"},
endAdornment:
<React.Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ export const CallbacksTabsTaskingSplitPanel = ({tabInfo, index, value, onCloseTa
</div>
</Split>
<CallbacksTabsTaskingInput filterTasks={true} me={me} onSubmitFilter={onSubmitFilter}
payloadtype_name={tabInfo.payloadtype}
payloadtype_name={tabInfo.payloadtype} focus={index === value}
onSubmitCommandLine={onSubmitCommandLine} changeSelectedToken={changeSelectedToken}
filterOptions={filterOptions} callback_id={tabInfo.callbackID}
callback_os={tabInfo.os} parentMountedRef={mountedRef} />
Expand Down
2 changes: 1 addition & 1 deletion MythicReactUI/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import jwt_decode from 'jwt-decode';
import {meState} from './cache';
import {getSkewedNow} from "./components/utilities/Time";

export const mythicUIVersion = "0.2.73";
export const mythicUIVersion = "0.2.74";

let fetchingNewToken = false;

Expand Down
6 changes: 3 additions & 3 deletions mythic-react-docker/mythic/public/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"files": {
"main.css": "/new/static/css/main.602591e6.css",
"main.js": "/new/static/js/main.8e994f31.js",
"main.js": "/new/static/js/main.2aeaf893.js",
"static/media/mythic-red.png": "/new/static/media/mythic-red.203468a4e5240d239aa0.png",
"static/media/graphql.png": "/new/static/media/graphql.8f15978b39b0870a9f0e.png",
"static/media/Mythic_Logo.svg": "/new/static/media/Mythic_Logo.6842c911bebe36d6f83fc7ced4a2cd99.svg",
"static/media/mythic_red_small.svg": "/new/static/media/mythic_red_small.793b41cc7135cdede246661ec232976b.svg",
"index.html": "/new/index.html",
"main.602591e6.css.map": "/new/static/css/main.602591e6.css.map",
"main.8e994f31.js.map": "/new/static/js/main.8e994f31.js.map"
"main.2aeaf893.js.map": "/new/static/js/main.2aeaf893.js.map"
},
"entrypoints": [
"static/css/main.602591e6.css",
"static/js/main.8e994f31.js"
"static/js/main.2aeaf893.js"
]
}
2 changes: 1 addition & 1 deletion mythic-react-docker/mythic/public/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/new/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="apple-touch-icon" href="/new/logo192.png"/><link rel="manifest" href="/new/manifest.json"/><title>Mythic</title><script defer="defer" src="/new/static/js/main.8e994f31.js"></script><link href="/new/static/css/main.602591e6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/new/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="apple-touch-icon" href="/new/logo192.png"/><link rel="manifest" href="/new/manifest.json"/><title>Mythic</title><script defer="defer" src="/new/static/js/main.2aeaf893.js"></script><link href="/new/static/css/main.602591e6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit e222747

Please sign in to comment.