Skip to content

Commit

Permalink
v3.2.16
Browse files Browse the repository at this point in the history
New UI features and bug fixes
  • Loading branch information
its-a-feature committed Jan 28, 2024
1 parent fdcfe27 commit e80fe95
Show file tree
Hide file tree
Showing 48 changed files with 1,975 additions and 1,094 deletions.
7 changes: 7 additions & 0 deletions 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).

## [3.2.16] - 2024-01-28

### Changed

- Added new file view endpoint to not return files as attachments but just as content to render in the browser easier
- Added more checks for processing completion functions

## [3.2.15] - 2024-01-15

### Changed
Expand Down
21 changes: 21 additions & 0 deletions MythicReactUI/CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ 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.59] - 2024-01-28

### Changed

- Added a new `media` type for browser scripting to render pdfs, images, and text inline with tasking
- The following render inline: "png", "jpg", "gif", "jpeg", "pdf"
- The following render as text: "txt", "ps1", "php", "json", "yml", "yaml", "config", "cfg", "go"
- More file extensions will be added over time, please open PRs or issues to add more formats
- Formats must be able to natively render in Google Chrome and Firefox, so something like a docx won't work
- Added a new `media` button on the files page to render pdfs, images, and syntax highlighted text
- Added a new user setting to disable automatic rendering of media types (requires a manual click each time)
- Updated tooltips to not display immediately, to follow the cursor, and go away faster, so they don't interfere with clicking as much
- Added new `experimental` toggle per-operator in their settings page to try out new experimental features
- added a new experimental feature for a different kind of table to be rendered for BrowserScript Tables
- Updated size of top/side icons to make it easier for people to navigate
- Moved the dark/light mode toggle from the size to a dedicated icon on top
- Updated the normal `blue plus` for tasks to a `grey cog` that's on the far right of tasks
- this should clean up the standard output when looking through tasks
- Updated to not show pagination information for task output unless there's more than one page
- Updated rendering for the search page to not implicitly render all other tabs for increased performance

## [0.1.58] - 2024-01-22

### Changed
Expand Down
113 changes: 113 additions & 0 deletions MythicReactUI/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions MythicReactUI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"ip6": "^0.2.10",
"json5": "^2.2.3",
"jwt-decode": "^3.1.2",
"material-react-table": "^2.9.2",
"moment": "^2.29.4",
"moment-timezone": "^0.5.43",
"randexp": "^0.5.3",
Expand Down
1 change: 1 addition & 0 deletions MythicReactUI/src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export function App(props) {
successOnMain: '#1ae302',
errorOnMain: '#ff656b',
infoOnMain: '#67ceff',
materialReactTableHeader: themeMode === 'dark' ? '#484848' : '#d5d5d5',
tableBorder: themeMode === 'dark' ? 'rgba(81,81,81,1)' : 'rgba(224,224,224,1)',
tableHover: themeMode === 'dark' ? 'rgba(85,88,93)' : 'rgba(245, 245, 245)',
pageHeader: {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { useReactiveVar } from '@apollo/client';
import { meState } from '../../cache';
import React from 'react';

/*
setting_name options:
hideUsernames
showIP
showHostname
showCallbackGroups
showMedia
*/
export function useMythicSetting({setting_name, default_value, output="boolean"}){
const me = useReactiveVar(meState);
// get the initial value we have stored
const localStorageSetting = localStorage.getItem(`${me?.user?.user_id || 0}-${setting_name}`);
let initialStorageSetting = localStorageSetting === null ? default_value : localStorageSetting;

switch(output){
case "boolean":
initialStorageSetting = (localStorageSetting.toLowerCase() === "true");
break;
case "number":
initialStorageSetting = Number(localStorageSetting);
break;
default:
console.log("unknown output type", output);
}

const [setting, setSetting] = React.useState(initialStorageSetting);
React.useEffect( () => {
// update the initial value if the user changes
const localStorageSetting = localStorage.getItem(`${me?.user?.user_id || 0}-${setting_name}`);
let initialStorageSetting = localStorageSetting === null ? default_value : localStorageSetting;

switch(output){
case "boolean":
initialStorageSetting = (localStorageSetting.toLowerCase() === "true");
break;
case "number":
initialStorageSetting = Number(localStorageSetting);
break;
default:
console.log("unknown output type", output);
}

setSetting(initialStorageSetting);
}, [me]);
return setting;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function MythicStyledTooltip(props){
const { children, title, style, ...other} = props;
const theme = useTheme();
return (
<Tooltip title={title} arrow componentsProps={{
<Tooltip title={title} arrow followCursor enterDelay={1000} componentsProps={{
tooltip: {
sx: {
backgroundColor: theme.palette.background.contrast,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export function MythicTabLabel(props) {
onDragOver={allowDrop}
onDragEnter={onDragEnter}
onDragLeave={onDragLeave}
draggable={onDragTab ? true : false}
draggable={!!onDragTab}
onDragStart={drag}
label={
<span onContextMenu={handleContextClick} style={{ display: 'inline-block', zIndex: 1}} ref={dropdownAnchorRef}>
Expand Down
Loading

0 comments on commit e80fe95

Please sign in to comment.