From c89ab1ec7eb796ebf50bf034a7eeece78c1883f2 Mon Sep 17 00:00:00 2001 From: lianahus Date: Mon, 29 Nov 2021 12:26:35 +0100 Subject: [PATCH] -fixed some colors in themes -fixed udapp and solidity activation --- apps/remix-ide/src/app.js | 5 ++--- .../assets/css/themes/remix-black_undtds.css | 2 +- .../assets/css/themes/remix-candy_ikhg4m.css | 2 +- .../assets/css/themes/remix-dark_tvx1s2.css | 4 ++-- .../assets/css/themes/remix-light_powaqg.css | 2 +- .../src/lib/vm-debugger/assembly-items.tsx | 1 - .../editor/src/lib/remix-ui-editor.tsx | 20 +++++++++++++++---- libs/remix-ui/editor/src/lib/syntax.ts | 2 -- 8 files changed, 23 insertions(+), 15 deletions(-) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 715297008c..6c2f40fb25 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -505,11 +505,10 @@ class App { } } }).catch(console.error) - } else { - // activate solidity plugin - appManager.activatePlugin(['solidity', 'udapp']) } }) + // activate solidity plugin + appManager.activatePlugin(['solidity', 'udapp']) // Load and start the service who manager layout and frame const framingService = new FramingService(sidePanel, menuicons, mainview, this._components.resizeFeature) diff --git a/apps/remix-ide/src/assets/css/themes/remix-black_undtds.css b/apps/remix-ide/src/assets/css/themes/remix-black_undtds.css index ffee2473c1..e6e1579efb 100644 --- a/apps/remix-ide/src/assets/css/themes/remix-black_undtds.css +++ b/apps/remix-ide/src/assets/css/themes/remix-black_undtds.css @@ -2,7 +2,7 @@ :root { --blue: #28282D; --indigo: #6610f2; - --purple: #6f42c1; + --purple: #9e77f6; --pink: #e83e8c; --red: #823a3a; --orange: #8a5026; diff --git a/apps/remix-ide/src/assets/css/themes/remix-candy_ikhg4m.css b/apps/remix-ide/src/assets/css/themes/remix-candy_ikhg4m.css index 1e4c83a413..602f1f942f 100644 --- a/apps/remix-ide/src/assets/css/themes/remix-candy_ikhg4m.css +++ b/apps/remix-ide/src/assets/css/themes/remix-candy_ikhg4m.css @@ -14,7 +14,7 @@ --gray-dark: #343a40; --primary: #fc58a3; --secondary: #e2f5f2; - --success: #84e5c2; + --success: #24b882; --info: #69c7e9; --warning: #fbdf9f; --danger: #f80b0b; diff --git a/apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css b/apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css index 8c032629a4..d5b3f49b04 100644 --- a/apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css +++ b/apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css @@ -2,7 +2,7 @@ :root { --blue: #007aa6; --indigo: #6610f2; - --purple: #6f42c1; + --purple: #9e77f6; --pink: #e83e8c; --red: #b84040; --orange: #c97539; @@ -5651,7 +5651,7 @@ button.bg-success:hover { background-color: #27926b !important; } .bg-info { - background-color: #355f7d !important; + background-color: #274458 !important; } a.bg-info:focus, a.bg-info:hover, diff --git a/apps/remix-ide/src/assets/css/themes/remix-light_powaqg.css b/apps/remix-ide/src/assets/css/themes/remix-light_powaqg.css index 14257615d8..f88342188e 100644 --- a/apps/remix-ide/src/assets/css/themes/remix-light_powaqg.css +++ b/apps/remix-ide/src/assets/css/themes/remix-light_powaqg.css @@ -1,7 +1,7 @@ :root { --blue: #007bff; --indigo: #6610f2; - --purple: #d145a7; + --purple: #7c47b9; --pink: #e83e8c; --red: #dc3545; --orange: #fd7e14; diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx index 806f826917..eb57159048 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx @@ -98,7 +98,6 @@ export const AssemblyItems = ({ registerEvent }) => { const currentItem = codeView.children[index] if (currentItem) { - currentItem.style.setProperty('border-color', 'var(--warning)') currentItem.style.setProperty('border-style', 'dotted') currentItem.setAttribute('selected', 'selected') } diff --git a/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx b/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx index c0574502f4..8a283e8588 100644 --- a/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx +++ b/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx @@ -104,6 +104,7 @@ export const EditorUI = (props: EditorUIProps) => { const locationColor = '#9e7e08' const purpleColor = formatColor('--purple') const dangerColor = formatColor('--danger') + const greenColor = formatColor('--green') monaco.editor.defineTheme(themeName, { base: themeType, @@ -148,14 +149,14 @@ export const EditorUI = (props: EditorUIProps) => { { token: 'keyword.storage', foreground: locationColor }, { token: 'keyword.calldata', foreground: locationColor }, - // // forf functions and modifiers + // for functions and modifiers { token: 'keyword.virtual', foreground: purpleColor }, - // // for Events + // for Events { token: 'keyword.indexed', foreground: yellowColor }, { token: 'keyword.anonymous', foreground: yellowColor }, - // // for functions + // for functions { token: 'keyword.external', foreground: successColor }, { token: 'keyword.internal', foreground: successColor }, { token: 'keyword.private', foreground: successColor }, @@ -172,7 +173,18 @@ export const EditorUI = (props: EditorUIProps) => { // special functions { token: 'keyword.fallback', foreground: pinkColor }, { token: 'keyword.receive', foreground: pinkColor }, - { token: 'keyword.constructor', foreground: pinkColor } + { token: 'keyword.constructor', foreground: pinkColor }, + + // identifiers + { token: 'keyword.identifier', foreground: purpleColor }, + { token: 'keyword.for', foreground: purpleColor }, + { token: 'keyword.if', foreground: purpleColor }, + { token: 'keyword.else', foreground: purpleColor }, + { token: 'keyword.else', foreground: purpleColor }, + { token: 'keyword.else', foreground: purpleColor }, + + // returns + { token: 'keyword.returns', foreground: greenColor } ], colors: { diff --git a/libs/remix-ui/editor/src/lib/syntax.ts b/libs/remix-ui/editor/src/lib/syntax.ts index bd3cef31fd..02364f045b 100644 --- a/libs/remix-ui/editor/src/lib/syntax.ts +++ b/libs/remix-ui/editor/src/lib/syntax.ts @@ -1269,8 +1269,6 @@ export const language = { 'if', 'else', 'for', - 'else', - 'for', 'while', 'do', 'break',