From fcb75b06f199d491fbbfdf4db3d8fd908923dd23 Mon Sep 17 00:00:00 2001 From: Douglas Moura Date: Thu, 10 Jun 2021 15:31:26 -0300 Subject: [PATCH 01/14] chore: Add .idea to ignored files --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 56fe9d0..1c19142 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ packages dist .DS_Store out/ -.webpack \ No newline at end of file +.webpack +.idea From 29d2fe6ed6b13cec04206c60fc179815f360ad1c Mon Sep 17 00:00:00 2001 From: Douglas Moura Date: Thu, 10 Jun 2021 15:51:16 -0300 Subject: [PATCH 02/14] chore: Introduce option to enable/disable border --- electron/store.ts | 4 ++++ public/index.html | 19 +++++++++++++------ src/cam.ts | 38 ++++++++++++++++++++++++-------------- src/config.ts | 1 + 4 files changed, 42 insertions(+), 20 deletions(-) diff --git a/electron/store.ts b/electron/store.ts index eb00e82..77a5cb1 100644 --- a/electron/store.ts +++ b/electron/store.ts @@ -77,6 +77,9 @@ const userPreferencesSchema: Schema = { borderColorCss: { type: JSONSchemaType.String, }, + showBorder: { + type: JSONSchemaType.Boolean, + }, } export const userPreferences = new Store({ @@ -110,6 +113,7 @@ export const userPreferences = new Store({ flipHorizontal: false, zoom: 1.1, borderColorCss: 'linear-gradient(to right, #988BC7, #FF79C6)', + showBorder: true, }, }) diff --git a/public/index.html b/public/index.html index ff72087..41f1562 100644 --- a/public/index.html +++ b/public/index.html @@ -27,7 +27,6 @@ video { height: 100vh; - border-radius: 9999px; pointer-events: none; background: #121214; } @@ -50,8 +49,6 @@ color: #FFF; background: transparent; background-clip: padding-box; - border: solid 5px transparent; - border-radius: 16px; } #wrapper:before { @@ -61,7 +58,6 @@ z-index: -1; margin: -5px; border-radius: inherit; - background: var(--border-color); } .video-wrapper { @@ -69,10 +65,17 @@ display: flex; align-items: center; justify-content: center; - border-radius: 16px; background: transparent; } + #wrapper.has-border { + border: solid 5px transparent; + } + + #wrapper.has-border:before { + background: var(--border-color); + } + #wrapper.rounded { border-radius: 50%; /* fix border-radius on Mac Mojave */ @@ -82,6 +85,10 @@ #wrapper.rounded .video-wrapper { border-radius: 9999px; } + + #wrapper.rounded video { + border-radius: 9999px; + } +
@@ -100,4 +102,5 @@
- + + \ No newline at end of file diff --git a/src/cam.ts b/src/cam.ts index 9eb00f6..edd2423 100644 --- a/src/cam.ts +++ b/src/cam.ts @@ -88,7 +88,6 @@ export class CameraController { if (this.isFlipped) { this.videoElement.style.transform += 'rotateY(180deg)' - this.videoElement.classList.add('flip') } }