diff --git a/.vscode/launch.json b/.vscode/launch.json index 27de8dd5..736e2733 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -47,7 +47,31 @@ ] }, { - "name": "mana", + "name": "build corp", + "type": "node", + "request": "launch", + "cwd": "${workspaceFolder}", + "runtimeExecutable": "${workspaceFolder}/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron", + "windows": { + "runtimeExecutable": "${workspaceFolder}/node_modules/electron/dist/Electron.exe" + }, + "preLaunchTask": "build", + "args": [ + ".", + "--url=https://corporate.symphony.com" + ], + "env": { + "ELECTRON_DEBUGGING": "true", + "ELECTRON_DEV": "true" + }, + "outputCapture": "std", + "sourceMaps": true, + "outFiles": [ + "${workspaceFolder}/lib/**/*.js" + ] + }, + { + "name": "mana local", "type": "node", "request": "launch", "cwd": "${workspaceFolder}", @@ -68,7 +92,31 @@ "outFiles": [ "${workspaceFolder}/lib/**/*.js" ] - } + }, + { + "name": "build mana local", + "type": "node", + "request": "launch", + "cwd": "${workspaceFolder}", + "runtimeExecutable": "${workspaceFolder}/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron", + "windows": { + "runtimeExecutable": "${workspaceFolder}/node_modules/electron/dist/Electron.exe" + }, + "preLaunchTask": "build", + "args": [ + ".", + "--url=https://local-dev.symphony.com:9090" + ], + "env": { + "ELECTRON_DEBUGGING": "true", + "ELECTRON_DEV": "true" + }, + "outputCapture": "std", + "sourceMaps": true, + "outFiles": [ + "${workspaceFolder}/lib/**/*.js" + ] + }, { "name": "demo", "type": "node", diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..62e9bd7d --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,10 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "command": "npx run-s compile browserify" + } + ] + } \ No newline at end of file diff --git a/package.json b/package.json index 31508552..37ff9504 100644 --- a/package.json +++ b/package.json @@ -150,6 +150,7 @@ "typescript": "3.9.7" }, "dependencies": { + "@types/lazy-brush": "^1.0.0", "archiver": "3.1.1", "async.map": "0.5.2", "classnames": "2.2.6", @@ -160,6 +161,7 @@ "ffi-napi": "3.0.0", "filesize": "6.1.0", "image-size": "^0.9.3", + "lazy-brush": "^1.0.1", "react": "16.13.0", "react-dom": "16.13.0", "ref-napi": "1.4.3", diff --git a/spec/__snapshots__/snippingTool.spec.ts.snap b/spec/__snapshots__/snippingTool.spec.ts.snap index ec9ce78a..d31bedbb 100644 --- a/spec/__snapshots__/snippingTool.spec.ts.snap +++ b/spec/__snapshots__/snippingTool.spec.ts.snap @@ -12,6 +12,11 @@ exports[`Snipping Tool should render correctly 1`] = `
-
- + ; + + { + shouldRenderPenColorPicker && ( +
+
+ +
+
+ ) + } + { + shouldRenderHighlightColorPicker && ( +
+
+ +
+
+ ) + }
- {i18n.t('Screen +
+ {i18n.t('Screen +
- + ); }; diff --git a/src/renderer/styles/snipping-tool.less b/src/renderer/styles/snipping-tool.less index 66664507..1681c01f 100644 --- a/src/renderer/styles/snipping-tool.less +++ b/src/renderer/styles/snipping-tool.less @@ -47,40 +47,27 @@ body { max-height: 48px; .ActionButton { - margin-left: 24px; + width: 24px; + height: 24px; + margin-left: 15px; background: white; border-radius: 4px; cursor: pointer; padding: 4px 0; border: none; - - &:first-child { - margin-left: 0; - } - - img { - width: 24px; - height: 24px; - } - } - - .ActionButtonSelected { - margin-left: 24px; - background: white; - border-radius: 4px; - cursor: pointer; - padding: 4px 0; - border: 2px solid #008eff; box-sizing: border-box; border-radius: 4px; + display: flex; + justify-content: center; + align-items: center; + border: 2px solid white; &:first-child { margin-left: 0; } - img { - width: 24px; - height: 24px; + &:focus { + outline: none; } } @@ -180,3 +167,41 @@ body { } } } + +.colorPicker { + display: flex; + flex-direction: row; + margin: 4px; + align-items: center; + justify-content: center; + width: fit-content; + height: 40px; + background: #FFFFFF; + box-shadow: 0px 4px 16px rgba(15, 27, 36, 0.14), 0px 4px 8px rgba(15, 27, 36, 0.26); + border-radius: 24px; + } + +.enclosingCircle { + width: 24px; + height: 24px; + background: #FFFFFF; + border-radius: 50%; + flex: none; + order: 0; + flex-grow: 0; + margin: 8px; + cursor: pointer; + align-items: center; + justify-content: center; + display: flex; +} + +.colorDot { + border-radius: 50%; + flex: none; + order: 0; + flex-grow: 0; + width: 8px; + height: 8px; + background: #000028; +} \ No newline at end of file