Skip to content

Commit

Permalink
v0.0.3.33
Browse files Browse the repository at this point in the history
UI Fixes for files search upload/download/screenshot page
  • Loading branch information
its-a-feature committed Feb 29, 2024
1 parent 84a68d9 commit 43f11e5
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 19 deletions.
5 changes: 4 additions & 1 deletion MythicReactUI/CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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.1.75] - 2024-02-29
## [0.1.75-76] - 2024-02-29

### Changed

Expand All @@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated graph de-selection to be a right-click context menu so that you can't accidentally unselect
- Updated graph selection to allow hiding everything except what's currently selected

### Changed
- Fixed an issue on file search pages where the expand icon wouldn't work and clicking text wouldn't auto-expand

## [0.1.74] - 2024-02-28

### Changed
Expand Down
29 changes: 20 additions & 9 deletions MythicReactUI/src/components/pages/Search/FileMetaTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,13 @@ function FileMetaDownloadTableRow(props){
setOpenPreviewMediaDialog(true);
}
const expandRow = (event) => {
if(event.target.localName === "td"){
if(event.target.localName === "td" || event.target.localName === "p"){
setOpenDetails(!openDetails);
}
}
const expandRowButton = (event) => {
setOpenDetails(!openDetails);
}
const onOpenCloseComment = (event, open) => {
if(event){
event.stopPropagation();
Expand Down Expand Up @@ -406,14 +409,14 @@ function FileMetaDownloadTableRow(props){
<TagsDisplay tags={props.tags} />
</MythicStyledTableCell>
<MythicStyledTableCell>
<IconButton size="small" aria-label="expand row" onClick={expandRow}>
<IconButton size="small" aria-label="expand row" onClick={expandRowButton}>
{openDetails ? <KeyboardArrowUpIcon className="mythicElement"/> : <KeyboardArrowDownIcon className="mythicElement"/>}
</IconButton>
</MythicStyledTableCell>
</TableRow>
{openDetails ? (
<TableRow>
<MythicStyledTableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={6}>
<MythicStyledTableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={7}>
<Collapse in={openDetails}>
<Box margin={1}>
<TableContainer component={Paper} className="mythicElement" elevation={3}>
Expand Down Expand Up @@ -722,7 +725,7 @@ function FileMetaUploadTableRow(props){
if(event.target.nodeName === 'INPUT'){
return
}
if(event.target.localName === "td"){
if(event.target.localName === "td" || event.target.localName === "p"){
setOpenDetails(!openDetails);
}
}
Expand All @@ -732,6 +735,9 @@ function FileMetaUploadTableRow(props){
}
setEditCommentDialogOpen(open);
}
const expandRowButton = (event) => {
setOpenDetails(!openDetails);
}
return (
<React.Fragment>
<TableRow hover onClick={expandRow}>
Expand Down Expand Up @@ -814,14 +820,14 @@ function FileMetaUploadTableRow(props){
<TagsDisplay tags={props.tags} />
</MythicStyledTableCell>
<MythicStyledTableCell>
<IconButton size="small" aria-label="expand row" onClick={expandRow}>
<IconButton size="small" aria-label="expand row" onClick={expandRowButton}>
{openDetails ? <KeyboardArrowUpIcon className="mythicElement"/> : <KeyboardArrowDownIcon className="mythicElement"/>}
</IconButton>
</MythicStyledTableCell>
</TableRow>
{openDetails ? (
<TableRow>
<MythicStyledTableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={7}>
<MythicStyledTableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={8}>
<Collapse in={openDetails}>
<Box margin={1}>
<TableContainer component={Paper} className="mythicElement" elevation={3}>
Expand Down Expand Up @@ -999,10 +1005,15 @@ function FileMetaScreenshotTableRow(props){
const onAcceptDelete = () => {
deleteFile({variables: {file_id: props.id}})
}

const expandRowButton = (event) => {
if(event.target.localName === "td" || event.target.localName === "p"){
setOpenDetails(!openDetails);
}
event.stopPropagation();
}
return (
<React.Fragment>
<TableRow hover>
<TableRow hover onClick={expandRowButton}>
{openDelete && <MythicConfirmDialog onClose={() => {setOpenDelete(false);}} onSubmit={onAcceptDelete} open={openDelete}/>}
<MythicStyledTableCell>
{props.deleted ? null : (
Expand Down Expand Up @@ -1043,7 +1054,7 @@ function FileMetaScreenshotTableRow(props){
</TableRow>
{openDetails ? (
<TableRow>
<MythicStyledTableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={6}>
<MythicStyledTableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={9}>
<Collapse in={openDetails}>
<Box margin={1}>
<TableContainer component={Paper} className="mythicElement">
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';

export const mythicVersion = "3.2.18-rc9";
export const mythicUIVersion = "0.1.75";
export const mythicUIVersion = "0.1.76";

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,15 +1,15 @@
{
"files": {
"main.css": "/new/static/css/main.00d51b79.css",
"main.js": "/new/static/js/main.1124800f.js",
"main.js": "/new/static/js/main.ed595cfc.js",
"static/media/mythic@2x.png": "/new/static/media/mythic@2x.7c5b62b471ac779fd706.png",
"static/media/mythic_red_small.svg": "/new/static/media/mythic_red_small.793b41cc7135cdede246661ec232976b.svg",
"index.html": "/new/index.html",
"main.00d51b79.css.map": "/new/static/css/main.00d51b79.css.map",
"main.1124800f.js.map": "/new/static/js/main.1124800f.js.map"
"main.ed595cfc.js.map": "/new/static/js/main.ed595cfc.js.map"
},
"entrypoints": [
"static/css/main.00d51b79.css",
"static/js/main.1124800f.js"
"static/js/main.ed595cfc.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.1124800f.js"></script><link href="/new/static/css/main.00d51b79.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.ed595cfc.js"></script><link href="/new/static/css/main.00d51b79.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 43f11e5

Please sign in to comment.