Skip to content

Commit

Permalink
removing fade transitions to make a snappier UI
Browse files Browse the repository at this point in the history
  • Loading branch information
its-a-feature committed Oct 1, 2024
1 parent 122fe89 commit 4702b6a
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 11 deletions.
6 changes: 6 additions & 0 deletions MythicReactUI/CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ 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.48] - 2024-10-01

### Changed

- Updated the modal transitions to 'none' to help in virtualized environments

## [0.2.47] - 2024-09-29

### Changed
Expand Down
4 changes: 4 additions & 0 deletions MythicReactUI/src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ export function App(props) {
const theme = React.useMemo(
() =>
createTheme(adaptV4Theme({
transitions: {
// So we have `transition: none;` everywhere
create: () => 'none',
},
palette: {
primary: {
main: themeMode === "dark" ? "rgb(70,91,115)" : "rgb(117,133,155)",
Expand Down
6 changes: 4 additions & 2 deletions MythicReactUI/src/components/utilities/Clipboard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export function copyStringToClipboard(str) {
let el = document.createElement('textarea');
try {
// Create new element
let el = document.createElement('textarea');

// Set value (string to be copied)
el.value = str;
if(el.value === ""){
Expand All @@ -22,11 +23,12 @@ export function copyStringToClipboard(str) {
if(!success){
console.log("failed to cut data");
}
navigator.clipboard.writeText(el.value);
navigator?.clipboard?.writeText(el.value);
// Remove temporary element
document.body.removeChild(el);
return true;
} catch (error) {
document.body.removeChild(el);
console.log("warning", "Failed to copy to clipboard: " + error.toString());
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion MythicReactUI/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {snackActions} from './components/utilities/Snackbar';
import jwt_decode from 'jwt-decode';
import {meState} from './cache';

export const mythicUIVersion = "0.2.47";
export const mythicUIVersion = "0.2.48";

let fetchingNewToken = false;

Expand Down
1 change: 1 addition & 0 deletions Mythic_CLI/src/cmd/internal/serviceMetadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ func AddMythicService(service string, removeVolume bool) {
"HASURA_GRAPHQL_ADMIN_SECRET=${HASURA_SECRET}",
"HASURA_GRAPHQL_INSECURE_SKIP_TLS_VERIFY=true",
"HASURA_GRAPHQL_SERVER_PORT=${HASURA_PORT}",
"HASURA_GRAPHQL_MIGRATIONS_SERVER_PORT=${HASURA_PORT}",
"HASURA_GRAPHQL_METADATA_DIR=/metadata",
"HASURA_GRAPHQL_LIVE_QUERIES_MULTIPLEXED_REFETCH_INTERVAL=1000",
"HASURA_GRAPHQL_AUTH_HOOK=http://${MYTHIC_SERVER_HOST}:${MYTHIC_SERVER_PORT}/graphql/webhook",
Expand Down
3 changes: 3 additions & 0 deletions Mythic_CLI/src/cmd/manager/dockerComposeManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ func (d *DockerComposeManager) RemoveContainers(services []string, keepVolume bo
for _, service := range services {
for _, dockerContainer := range allContainers {
if dockerContainer.Labels["name"] == strings.ToLower(service) {
log.Printf("[*] Removing container: %s...\n", service)
err = cli.ContainerRemove(context.Background(),
dockerContainer.ID,
container.RemoveOptions{Force: true, RemoveVolumes: !keepVolume})
Expand Down Expand Up @@ -364,6 +365,7 @@ func (d *DockerComposeManager) StopServices(services []string, deleteImages bool
if dockerContainer.Labels["name"] == strings.ToLower(service) {
found = true
if deleteImages {
log.Printf("[*] Removing container: %s...\n", service)
err = cli.ContainerRemove(context.Background(),
dockerContainer.ID,
container.RemoveOptions{Force: true, RemoveVolumes: !keepVolume})
Expand Down Expand Up @@ -1151,6 +1153,7 @@ func (d *DockerComposeManager) RemoveVolume(volumeName string) error {
for _, m := range c.Mounts {
if m.Name == volumeName {
containerName := c.Labels["name"]
log.Printf("[*] Removing container %s...\n", containerName)
err = cli.ContainerRemove(ctx, c.ID, container.RemoveOptions{Force: true})
if err != nil {
log.Printf(fmt.Sprintf("[!] Failed to remove container that's using the volume: %v\n", err))
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.602591e6.css",
"main.js": "/new/static/js/main.c28ab5a9.js",
"main.js": "/new/static/js/main.e3dc807d.js",
"static/media/mythic-red.png": "/new/static/media/mythic-red.203468a4e5240d239aa0.png",
"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.c28ab5a9.js.map": "/new/static/js/main.c28ab5a9.js.map"
"main.e3dc807d.js.map": "/new/static/js/main.e3dc807d.js.map"
},
"entrypoints": [
"static/css/main.602591e6.css",
"static/js/main.c28ab5a9.js"
"static/js/main.e3dc807d.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.c28ab5a9.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.e3dc807d.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 4702b6a

Please sign in to comment.