From 64b2316478c8096c050674c5097c37205a3f3bbc Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 29 Dec 2022 09:16:22 +0200 Subject: [PATCH 001/118] Update full.css --- full.css | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/full.css b/full.css index efa393df4b..adc750ef42 100644 --- a/full.css +++ b/full.css @@ -1788,25 +1788,15 @@ body.mobile .context-menu { } .live-view-menu { - left: 11px; - top: 41px; - z-index: 1001; - margin-top: 7px; - padding: 0; + left: 7px; + top: 44px; + box-shadow: 0 8px 16px rgb(0 0 0 / 24%), inset 0 0 0 1px hsl(228deg 13% 19%); } body:not(.mobile) .live-view-menu { display: none; } -.live-view-menu:not(.visible) { - padding: 2px 2px 2px 0px; -} - -.live-view-menu:not(.visible) .icon { - padding: 9.5px 13px; -} - .dialog-wrapper { position: fixed; From 5455fc6dade6fbd7a4c36aff9e3c1100a0845f0b Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 29 Dec 2022 09:17:11 +0200 Subject: [PATCH 002/118] Update full.css --- full.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/full.css b/full.css index adc750ef42..1179bbde0a 100644 --- a/full.css +++ b/full.css @@ -1797,6 +1797,10 @@ body:not(.mobile) .live-view-menu { display: none; } +.live-view-menu .icon:active { + background: rgb(39 40 44); +} + .dialog-wrapper { position: fixed; From 76cf3c9da2a1c542ec43cdf5f33b2fda9572405f Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 29 Dec 2022 09:17:39 +0200 Subject: [PATCH 003/118] Update full.css --- full.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/full.css b/full.css index 1179bbde0a..4647d4924b 100644 --- a/full.css +++ b/full.css @@ -1798,7 +1798,7 @@ body:not(.mobile) .live-view-menu { } .live-view-menu .icon:active { - background: rgb(39 40 44); + background: hsl(228deg 6% 16%); } From eb454ee91fc83135ae0050852f32605bce937360 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 08:37:42 +0200 Subject: [PATCH 004/118] Update utils.js --- utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils.js b/utils.js index ab909b9d94..92e12e8c54 100644 --- a/utils.js +++ b/utils.js @@ -927,8 +927,8 @@ axios = { // HTML Icons const repoIcon = ''; -const fileIcon = ' '; -const folderIcon = ' '; +const fileIcon = ' '; +const folderIcon = ' '; const imageIcon = ' '; const videoIcon = ' '; From 0c73887a9fa8bfb3d541e8dea2df20db1a5cee04 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 08:38:46 +0200 Subject: [PATCH 005/118] Update full.html --- full.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/full.html b/full.html index 694d494059..bb4cf3993e 100644 --- a/full.html +++ b/full.html @@ -80,8 +80,8 @@
- - + +
From 8842c5b0376ddae42eb9a850ac48c93627fa1902 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 08:49:37 +0200 Subject: [PATCH 006/118] Update utils.js --- utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils.js b/utils.js index 92e12e8c54..68c5d45c8c 100644 --- a/utils.js +++ b/utils.js @@ -14,6 +14,8 @@ const body = document.body, floatLogo = sidebarOpen.querySelector('.logo'), pushWrapper = bottomFloat.querySelector('.push-wrapper'), floatDownload = bottomFloat.querySelector('.download'), + + liveButtonOptions = bottomWrapper.querySelector('.live-button.options'), sidebarToggle = document.querySelector('.sidebar-toggle'), liveToggle = document.querySelector('.live-toggle'), From 7ba6690759a1998b574a64dc4b09ad184a9edc41 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 08:53:04 +0200 Subject: [PATCH 007/118] Update live-view.js --- live-view/live-view.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/live-view/live-view.js b/live-view/live-view.js index b108cad611..2331fe0464 100644 --- a/live-view/live-view.js +++ b/live-view/live-view.js @@ -396,14 +396,13 @@ function addBottomSwipeListener() { initialY = currentY; - const clickedOnShare = (e.target === - bottomWrapper.querySelector('.live-button.share')); + const clickedOnOptions = (e.target === liveButtonOptions); // if clicked and bottom float is expanded if (click && bottomWrapper.classList.contains('expanded')) { - // if did not click on share button - if (!clickedOnShare) { + // if did not click on options button + if (!clickedOnOptions) { e.preventDefault(); e.stopPropagation(); @@ -413,11 +412,15 @@ function addBottomSwipeListener() { toggleLiveView(selectedFile); - } else if (active) { + } else { - // if clicked on share button, + // if clicked on options button, toggle menu + liveViewMenu.classList.toggle('visible'); + liveButtonOptions.classList.toggle('active'); + + // share live view link - + /* // create a link const link = createLink({ dir: treeLoc, @@ -428,6 +431,7 @@ function addBottomSwipeListener() { title: 'Run ' + treeLoc[0] + '/' + treeLoc[1].split(':')[0] + ' with Codeit', url: link, }); + */ } From 0b7811e79731445efaa12ca11831c7a570b16113 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 08:56:18 +0200 Subject: [PATCH 008/118] Update full.css --- full.css | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/full.css b/full.css index 4647d4924b..3388c36417 100644 --- a/full.css +++ b/full.css @@ -298,14 +298,11 @@ body.notransition .bottom-wrapper { margin: -7px; } -.live-buttons .live-button:active { +.live-buttons .live-button:active, +.live-buttons .live-button.active { opacity: .5; } -.live-buttons .live-button path { - pointer-events: none; -} - .live-buttons .live-button.share path.ios { opacity: 0; } From d7be7c3eb6048fcfbc569b11ea16c4419b2d724b Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 08:57:21 +0200 Subject: [PATCH 009/118] Update utils.js --- utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils.js b/utils.js index 68c5d45c8c..b0bfd7176a 100644 --- a/utils.js +++ b/utils.js @@ -56,6 +56,8 @@ const body = document.body, learnClose = learnWrapper.querySelector('.close'), branchMenu = document.querySelector('.branch-menu'), + + liveViewMenu = document.querySelector('.live-view-menu'), dialogWrapper = document.querySelector('.dialog-wrapper'), dialogTitle = dialogWrapper.querySelector('.title'), From e544f8f7839998967c73fda3330908924c22923b Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 08:59:14 +0200 Subject: [PATCH 010/118] Update full.css --- full.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/full.css b/full.css index 3388c36417..043e1c8fe9 100644 --- a/full.css +++ b/full.css @@ -298,7 +298,7 @@ body.notransition .bottom-wrapper { margin: -7px; } -.live-buttons .live-button:active, +.live-buttons .live-button:not(.active):active, .live-buttons .live-button.active { opacity: .5; } From 12ec525d9d3258d89e565876b50d809c9f652d1d Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:00:15 +0200 Subject: [PATCH 011/118] Update full.html --- full.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/full.html b/full.html index bb4cf3993e..634c08eb84 100644 --- a/full.html +++ b/full.html @@ -295,6 +295,13 @@ +
+
+
Console
+ +
+
+
From 118a6dfa3baf17242ae194a2d5592c0f655e9ab7 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:01:04 +0200 Subject: [PATCH 012/118] Update full.css --- full.css | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/full.css b/full.css index 043e1c8fe9..1a99c36b58 100644 --- a/full.css +++ b/full.css @@ -1799,6 +1799,47 @@ body:not(.mobile) .live-view-menu { } +.sheet { + position: fixed; + bottom: env(safe-area-inset-bottom, 0px); + left: 0; + right: 0; + height: calc(100vh / 2 - 20px); + background: var(--deep-midnight-blue); + box-shadow: 0 -8px 16px rgb(0 0 0 / 24%); + border-radius: 11.5px 11.5px 0 0; + z-index: 1001; +} + +body.mobile .sheet { + display: none; +} + +.sheet .header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 15px 20px; + height: 59px; + box-sizing: border-box; +} + +.sheet .header .close { + color: #828689; + background: rgb(255 255 255 / 8%); + /* box-sizing: border-box; */ + padding: 4px; + width: 20px; + height: 20px; + margin: -4px; +} + +.sheet .header .title { + font-weight: 600; + color: #dcddde; +} + + .dialog-wrapper { position: fixed; pointer-events: none; From 6d1d3d55b6154e7dc247c4fbfc7ac73ecb2683b7 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:04:58 +0200 Subject: [PATCH 013/118] Update full.html --- full.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/full.html b/full.html index 634c08eb84..b845f153b2 100644 --- a/full.html +++ b/full.html @@ -279,19 +279,20 @@
-
+
Console
From f8ca82b50d115ae81c4e3d35aeaab49221ba2102 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:21:59 +0200 Subject: [PATCH 022/118] Update utils.js --- utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.js b/utils.js index 24e8ec9169..8daeae2239 100644 --- a/utils.js +++ b/utils.js @@ -61,7 +61,7 @@ const body = document.body, liveMenuShare = liveViewMenu.querySelector('.share'), liveMenuConsole = liveViewMenu.querySelector('.console'), - liveConsoleSheet = document.querySelector('.sheet .live-console'), + liveConsoleSheet = document.querySelector('.sheet .live-console-sheet'), dialogWrapper = document.querySelector('.dialog-wrapper'), dialogTitle = dialogWrapper.querySelector('.title'), From dc95c99f4bff7d5205ca48f1b6067b378ec6fb7b Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:22:16 +0200 Subject: [PATCH 023/118] Update live-view.js --- live-view/live-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-view/live-view.js b/live-view/live-view.js index 3608d721e5..e143886906 100644 --- a/live-view/live-view.js +++ b/live-view/live-view.js @@ -570,7 +570,7 @@ if (isMobile) { liveMenuConsole.addEventListener('click', () => { - consoleSheet.classList.add('visible'); + liveConsoleSheet.classList.add('visible'); }); From deaf277e929b5c63bd34136a4cd612845551a9e5 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:24:09 +0200 Subject: [PATCH 024/118] Update live-view.js --- live-view/live-view.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/live-view/live-view.js b/live-view/live-view.js index e143886906..44f4d69249 100644 --- a/live-view/live-view.js +++ b/live-view/live-view.js @@ -412,12 +412,6 @@ function addBottomSwipeListener() { toggleLiveView(selectedFile); - } else { - - // if clicked on options button, toggle menu - liveViewMenu.classList.add('visible'); - liveButtonOptions.classList.add('active'); - } } else if (click) { // if clicked and bottom float not expanded @@ -551,6 +545,14 @@ if (isMobile) { // live view mobile menu + liveButtonOptions.addEventListener('click', () => { + + // if clicked on options button, toggle menu + liveViewMenu.classList.toggle('visible'); + liveButtonOptions.classList.toggle('active'); + + }); + liveMenuShare.addEventListener('click', () => { // share live view link From 088a8edacccd8fde50b72ac081a1c70609435550 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:24:52 +0200 Subject: [PATCH 025/118] Update utils.js --- utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.js b/utils.js index 8daeae2239..027af176af 100644 --- a/utils.js +++ b/utils.js @@ -61,7 +61,7 @@ const body = document.body, liveMenuShare = liveViewMenu.querySelector('.share'), liveMenuConsole = liveViewMenu.querySelector('.console'), - liveConsoleSheet = document.querySelector('.sheet .live-console-sheet'), + liveConsoleSheet = document.querySelector('.live-console-sheet'), dialogWrapper = document.querySelector('.dialog-wrapper'), dialogTitle = dialogWrapper.querySelector('.title'), From b52e16faedd5b223e234a3d4deab082414b1eba2 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:45:23 +0200 Subject: [PATCH 026/118] Update full.css --- full.css | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/full.css b/full.css index 73fb4da0c9..58c9c2144d 100644 --- a/full.css +++ b/full.css @@ -1804,18 +1804,22 @@ body.safari .live-view-menu .icon.share path.ios { bottom: env(safe-area-inset-bottom, 0px); left: 0; right: 0; - height: calc(100vh / 2 - 20px); + height: calc(100vh / 2 - 20px + 40px); + bottom: -40px; background: var(--deep-midnight-blue); - box-shadow: 0 -8px 16px rgb(0 0 0 / 24%); border-radius: 11.5px 11.5px 0 0; - transform: translateY(100%); + transform: translateY(calc(100% + 40px)); pointer-events: none; - transition: .18s var(--ease-function); + will-change: transform; + transition: .18s var(--ease-function), + .18s .09s var(--bounce-function) bottom; z-index: 1001; } .sheet.visible { - transform: none; + transform: translateY(40px); + bottom: 0; + box-shadow: 0 -8px 16px rgb(0 0 0 / 24%); pointer-events: auto; } From 1d282e6c37101d3ddf4f72ded0935ce0682e1017 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:48:35 +0200 Subject: [PATCH 027/118] Update full.css --- full.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/full.css b/full.css index 58c9c2144d..947c4c1e41 100644 --- a/full.css +++ b/full.css @@ -1812,7 +1812,8 @@ body.safari .live-view-menu .icon.share path.ios { pointer-events: none; will-change: transform; transition: .18s var(--ease-function), - .18s .09s var(--bounce-function) bottom; + .18s .09s var(--bounce-function) bottom, + .1s box-shadow var(--ease-function); z-index: 1001; } @@ -1821,6 +1822,9 @@ body.safari .live-view-menu .icon.share path.ios { bottom: 0; box-shadow: 0 -8px 16px rgb(0 0 0 / 24%); pointer-events: auto; + transition: .18s var(--ease-function), + .18s .09s var(--bounce-function) bottom, + .1s .17s box-shadow var(--ease-function); } body:not(.mobile) .sheet { From cd47964e49ce22b25daaf88156efeeada0c1a76e Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:49:02 +0200 Subject: [PATCH 028/118] Update full.css --- full.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/full.css b/full.css index 947c4c1e41..c227fd17df 100644 --- a/full.css +++ b/full.css @@ -1813,7 +1813,7 @@ body.safari .live-view-menu .icon.share path.ios { will-change: transform; transition: .18s var(--ease-function), .18s .09s var(--bounce-function) bottom, - .1s box-shadow var(--ease-function); + .1s var(--ease-function) box-shadow; z-index: 1001; } @@ -1824,7 +1824,7 @@ body.safari .live-view-menu .icon.share path.ios { pointer-events: auto; transition: .18s var(--ease-function), .18s .09s var(--bounce-function) bottom, - .1s .17s box-shadow var(--ease-function); + .1s .17s var(--ease-function) box-shadow; } body:not(.mobile) .sheet { From b945c47ea0b441e4ffc0f2cb04d9f5607a904ff4 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:51:40 +0200 Subject: [PATCH 029/118] Update full.css --- full.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/full.css b/full.css index c227fd17df..61957bea60 100644 --- a/full.css +++ b/full.css @@ -1842,7 +1842,7 @@ body:not(.mobile) .sheet { .sheet .header .close { color: #828689; - background: rgb(255 255 255 / 8%); + background: rgb(255 255 255 / 8%) !important; /* box-sizing: border-box; */ padding: 4px; width: 20px; From 7cc288189b8db9c82522673d0d7b530d29d96e30 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:53:16 +0200 Subject: [PATCH 030/118] Update utils.js --- utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils.js b/utils.js index 027af176af..2e0abef45f 100644 --- a/utils.js +++ b/utils.js @@ -61,7 +61,8 @@ const body = document.body, liveMenuShare = liveViewMenu.querySelector('.share'), liveMenuConsole = liveViewMenu.querySelector('.console'), - liveConsoleSheet = document.querySelector('.live-console-sheet'), + consoleSheet = document.querySelector('.console-sheet'), + consoleSheetClose = consoleSheet.querySelector('.header .close'), dialogWrapper = document.querySelector('.dialog-wrapper'), dialogTitle = dialogWrapper.querySelector('.title'), From 2c61a9a2be2834a9179b78a66f315a8bcda0a69e Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:54:25 +0200 Subject: [PATCH 031/118] Update live-view.js --- live-view/live-view.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/live-view/live-view.js b/live-view/live-view.js index 44f4d69249..e46aa1a1fe 100644 --- a/live-view/live-view.js +++ b/live-view/live-view.js @@ -572,7 +572,8 @@ if (isMobile) { liveMenuConsole.addEventListener('click', () => { - liveConsoleSheet.classList.add('visible'); + // show live view console + consoleSheet.classList.add('visible'); }); @@ -599,6 +600,13 @@ if (isMobile) { liveButtonOptions.classList.remove('active'); }); + + consoleSheetClose.addEventListener('click', () => { + + // hide live view console + consoleSheet.classList.remove('visible'); + + }); } else { From 565b42f702e9dfe02a07d9f708050155b6f872a6 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 1 Jan 2023 09:54:41 +0200 Subject: [PATCH 032/118] Update full.html --- full.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/full.html b/full.html index 111edf7de8..afcfb0aa31 100644 --- a/full.html +++ b/full.html @@ -296,7 +296,7 @@
-
+
Console
From 4b42da22b5a8aa41ea54305aec4fb00dd1389cc7 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Wed, 4 Jan 2023 12:29:27 +0200 Subject: [PATCH 033/118] Update bottomfloat.js --- bottomfloat.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/bottomfloat.js b/bottomfloat.js index 1361981934..d5b35471b9 100644 --- a/bottomfloat.js +++ b/bottomfloat.js @@ -121,10 +121,20 @@ if (isMobile) { bottomWrapper.style.setProperty('--window-height', window.innerHeight + 'px'); - const landscape = window.matchMedia('(orientation: landscape)'); - - landscape.addEventListener('change', () => { + window.addEventListener('resize', () => { + + // if the window's height changed + if (window.innerHeight != bottomWrapper.prevWindowHeight) { + + bottomWrapper.prevWindowHeight = window.innerHeight; + + } else { + + return; + + } + // update bottom float bottomWrapper.style.setProperty('--window-height', window.innerHeight + 'px'); window.setTimeout(() => { From bd2cae76311b77922d5565edc9d80795a6761acf Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Wed, 4 Jan 2023 12:32:58 +0200 Subject: [PATCH 034/118] Update full.css --- full.css | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/full.css b/full.css index 61957bea60..8ab08560a2 100644 --- a/full.css +++ b/full.css @@ -572,7 +572,7 @@ body.embed .sidebar-toggle { } body.expanded .sidebar-toggle { - transform: translateX(calc(var(--sidebar-width) - 1px)); + transform: translateX(var(--sidebar-width)); } body.notransition :is(.sidebar-toggle, .sidebar-toggle *) { @@ -698,20 +698,18 @@ body.expanded .sidebar-toggle svg .left { .sidebar { position: fixed; top: 0; - left: calc((var(--sidebar-width) + 1px) * -1); + left: calc(var(--sidebar-width) * -1); height: 100%; background: #1a1c24; color: #d4d5d7; transition: .4s var(--cubic-function) transform; - width: calc(var(--sidebar-width) + 1px); + width: var(--sidebar-width); transform: none; overflow-x: hidden; overflow-y: overlay; overscroll-behavior-y: contain; pointer-events: none; - box-shadow: inset -1px 0 0 0 #ffffff3d; padding-left: env(safe-area-inset-left); - padding-right: 1px; box-sizing: border-box; z-index: 998; } From 25f14ecdf3c0c84d245ffa744891d70c1a481fe1 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Wed, 4 Jan 2023 12:35:17 +0200 Subject: [PATCH 035/118] Update full.css --- full.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/full.css b/full.css index 8ab08560a2..9c5e4ddf7c 100644 --- a/full.css +++ b/full.css @@ -552,7 +552,7 @@ body.scroll-enabled .bookmark { } .sidebar-toggle.visible { - left: -1px; + left: -2px; } .sidebar-toggle.visible::after { From cc7b01c6e0ba451abf9ee62642382fbe8a293519 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Wed, 4 Jan 2023 12:41:22 +0200 Subject: [PATCH 036/118] Update full.css --- full.css | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/full.css b/full.css index 9c5e4ddf7c..cc02d44412 100644 --- a/full.css +++ b/full.css @@ -316,15 +316,13 @@ body.notransition .bottom-wrapper { top: 0; right: 0; bottom: 0; - left: -1px; + left: 0; top: 44px; transform: translateY(calc(100% - 28px - 45px - env(safe-area-inset-bottom, 0px))); padding-bottom: env(safe-area-inset-bottom); background: #1a1c24; background: #0e0e0e; color: #d4d5d7; - box-shadow: inset 1px 0 0 0 #ffffff3d; - padding-left: 1px; pointer-events: none; box-sizing: border-box; will-change: transform; @@ -411,8 +409,6 @@ body.loaded:not(.mobile) .live-view { transform: none !important; pointer-events: auto; left: auto; - box-shadow: none; - padding-left: 0; } body.mobile .live-view.file-open { From 6fb0f92c177cc6c87a0166ab8395d9e684e9da3c Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Wed, 4 Jan 2023 12:41:27 +0200 Subject: [PATCH 037/118] Update full.css --- full.css | 1 - 1 file changed, 1 deletion(-) diff --git a/full.css b/full.css index cc02d44412..0d5e460074 100644 --- a/full.css +++ b/full.css @@ -493,7 +493,6 @@ body.notransition .live-view.file-open { border-radius: 0 500px 500px 0; padding: 7px 10px; border: 3px solid transparent; - border-left-width: 1px; transition: .18s var(--ease-function); transition-property: left, box-shadow; z-index: 999; From ff796f59f433aa1ee29cc301b903ba8b58c64ec1 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Wed, 4 Jan 2023 12:41:49 +0200 Subject: [PATCH 038/118] Update full.css --- full.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/full.css b/full.css index 0d5e460074..f0d2e091a1 100644 --- a/full.css +++ b/full.css @@ -728,7 +728,7 @@ body.expanded .sidebar-toggle svg .left { } body.expanded .sidebar { - transform: translateX(calc(100% - 1px)); + transform: translateX(100%); pointer-events: auto; } From 39045e75314589142d151f3bfea90f4a9d6d0cf3 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Wed, 4 Jan 2023 12:42:19 +0200 Subject: [PATCH 039/118] Update full.css --- full.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/full.css b/full.css index f0d2e091a1..c3cadae773 100644 --- a/full.css +++ b/full.css @@ -1415,7 +1415,7 @@ body.mobile .sidebar .header .title .branch-icon.active { .sidebar .intro { position: absolute; - width: calc(100% - 1px); + width: 100%; height: 100%; display: flex; align-items: center; @@ -1862,7 +1862,7 @@ body:not(.mobile) .sheet { .dialog-anim-wrapper { position: fixed; inset: 0; - width: calc(var(--sidebar-width) - 1px); + width: var(--sidebar-width); display: flex; align-items: center; justify-content: center; @@ -1999,7 +1999,7 @@ body:not(.mobile) .dialog .button:not(:active):hover { position: fixed; inset: 0; background: hsl(227deg 11% 16% / 40%); - width: calc(var(--sidebar-width) - 1px); + width: var(--sidebar-width); opacity: 0; transition: .18s var(--bounce-function); z-index: -1; From 6478b77143bcbcaa04592578a2826e22d706307d Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Wed, 4 Jan 2023 12:44:14 +0200 Subject: [PATCH 040/118] Update full.css --- full.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/full.css b/full.css index c3cadae773..a0ca4faa05 100644 --- a/full.css +++ b/full.css @@ -1106,7 +1106,7 @@ body.mobile .sidebar .header .title .branch-icon.active { } .sidebar .header .search-screen .search-input { - width: calc(var(--sidebar-width) - 103px); + width: calc(var(--sidebar-width) - 104px); white-space: nowrap; line-height: 20px; color: #d4d5d7; From 4494ec0986b66312e367f1650e73f8a129cc3b00 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Wed, 4 Jan 2023 18:15:08 +0200 Subject: [PATCH 041/118] Update full.css --- full.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/full.css b/full.css index a0ca4faa05..a6ecd4004e 100644 --- a/full.css +++ b/full.css @@ -877,7 +877,7 @@ body:not(.mobile) .sidebar .header .title-screen .title:not(.scrolling, :has(> . padding: 7px 0; font-weight: 600; color: rgba(241,241,242,0.92); - max-width: calc(var(--sidebar-width) - 140px - 16px - 7px - 7px); + max-width: calc(var(--sidebar-width) - 139px - 16px - 7px - 7px); overflow-x: overlay; white-space: nowrap; transition: .18s var(--ease-function); @@ -1106,7 +1106,7 @@ body.mobile .sidebar .header .title .branch-icon.active { } .sidebar .header .search-screen .search-input { - width: calc(var(--sidebar-width) - 104px); + width: calc(var(--sidebar-width) - 102px); white-space: nowrap; line-height: 20px; color: #d4d5d7; From 43ef3869302923ae9440400cac2776eb95d99ac4 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 5 Jan 2023 08:52:48 +0200 Subject: [PATCH 042/118] Update gitauth.js --- git/gitauth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/gitauth.js b/git/gitauth.js index 5651af0a80..efd55b6b50 100644 --- a/git/gitauth.js +++ b/git/gitauth.js @@ -59,7 +59,7 @@ window.addEventListener('load', async () => { } - const authURL = 'https://github.com/login/oauth/authorize?client_id=7ede3eed3185e59c042d&scope=repo,user,write:org'; + const authURL = 'https://github.com/login/oauth/authorize?client_id=7ede3eed3185e59c042d&scope=repo,user,write:org,workflow'; loginButton.addEventListener('click', () => { From 8ac174d1e3b42596766831591d0f18efc3c2768d Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:06:11 +0200 Subject: [PATCH 043/118] Update filebrowser.js --- filebrowser.js | 44 +++++++++++--------------------------------- 1 file changed, 11 insertions(+), 33 deletions(-) diff --git a/filebrowser.js b/filebrowser.js index 4e65ff62e0..37f445dd2d 100644 --- a/filebrowser.js +++ b/filebrowser.js @@ -998,39 +998,6 @@ function pushFileWithCommitMessageHTML(fileEl) { } -function openGitHubLogin() { - - const authURL = 'https://github.com/login/oauth/authorize?client_id=7ede3eed3185e59c042d&scope=repo,user,write:org'; - - if (isMobile) { - - window.location.href = authURL; - - } else { - - window.addEventListener('message', (event) => { - - // if received a git code - if (event.origin === window.location.origin && - event.data.startsWith('gitCode=')) { - - // hide dialog - hideDialog(); - - showMessage('Logging in...', -1); - - } - - }); - - // open login window - window.open(authURL, 'Login with GitHub', 'height=575,width=575'); - - } - -} - - async function checkPushDialogs() { // if not logged in to git @@ -1041,6 +1008,17 @@ async function checkPushDialogs() { return 'return'; } + + + // if pushing a git workflow file, + // request additional permissions + if (treeLoc[2] === '/.github/workflows') { + + showDialog(openGitHubLogin, 'To push this file, request\nGit workflow access.', 'Open'); + + return 'return'; + + } // get repo obj from local storage From a85938ac0cc242c5730504743f1192c71494bcd7 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:09:37 +0200 Subject: [PATCH 044/118] Update gitauth.js --- git/gitauth.js | 54 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/git/gitauth.js b/git/gitauth.js index efd55b6b50..1f14f8abbb 100644 --- a/git/gitauth.js +++ b/git/gitauth.js @@ -58,23 +58,7 @@ window.addEventListener('load', async () => { } - - const authURL = 'https://github.com/login/oauth/authorize?client_id=7ede3eed3185e59c042d&scope=repo,user,write:org,workflow'; - - loginButton.addEventListener('click', () => { - - if (isMobile) { - - window.location.href = authURL; - - } else { - - window.open(authURL, 'Login with GitHub', 'height=575,width=575'); - - } - - }) - + loginButton.addEventListener('click', openGitHubLogin); window.addEventListener('message', async (event) => { @@ -108,7 +92,9 @@ window.addEventListener('load', async () => { // start loading startLoading(); - + + showMessage('Logging in...', -1); + const gitCode = event.data.split('gitCode=')[1]; // get git token from Github @@ -213,6 +199,38 @@ window.addEventListener('load', async () => { }); + +function openGitHubLogin() { + + const authURL = 'https://github.com/login/oauth/authorize?client_id=7ede3eed3185e59c042d&scope=repo,user,write:org,workflow'; + + if (isMobile) { + + window.location.href = authURL; + + } else { + + window.addEventListener('message', (event) => { + + // if received a git code + if (event.origin === window.location.origin && + event.data.startsWith('gitCode=')) { + + // hide dialog + //hideDialog();@@ + + } + + }); + + // open login window + window.open(authURL, 'Login with GitHub', 'height=575,width=575'); + + } + +} + + async function getGithubToken(gitCode) { // post through CORS proxy to git with clientId, clientSecret and code From 21547fc34ebdf950d0c5e676c135b695d3cf2d91 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:20:21 +0200 Subject: [PATCH 045/118] Update gitauth.js --- git/gitauth.js | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/git/gitauth.js b/git/gitauth.js index 1f14f8abbb..66bf715eb8 100644 --- a/git/gitauth.js +++ b/git/gitauth.js @@ -202,31 +202,44 @@ window.addEventListener('load', async () => { function openGitHubLogin() { - const authURL = 'https://github.com/login/oauth/authorize?client_id=7ede3eed3185e59c042d&scope=repo,user,write:org,workflow'; + return new Promise(resolve => { - if (isMobile) { + const authURL = 'https://github.com/login/oauth/authorize?client_id=7ede3eed3185e59c042d&scope=repo,user,write:org,workflow'; - window.location.href = authURL; + if (isMobile) { - } else { + window.location.href = authURL; + + } else { - window.addEventListener('message', (event) => { + const listener = window.addEventListener('message', (event) => { - // if received a git code - if (event.origin === window.location.origin && - event.data.startsWith('gitCode=')) { + // if received a git code + if (event.origin === window.location.origin && + event.data.startsWith('gitCode=')) { - // hide dialog - //hideDialog();@@ + window.removeEventListener('message', listener); + + if (loginWindow.closed) { + + resolve(false); + + } else { + + resolve(true); + + } - } + } - }); + }); - // open login window - window.open(authURL, 'Login with GitHub', 'height=575,width=575'); + // open login window + const loginWindow = window.open(authURL, 'Login with GitHub', 'height=575,width=575'); - } + } + + }); } From f9bd6fd77f7bf478298964142bc3a66631b512e3 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:22:24 +0200 Subject: [PATCH 046/118] Update filebrowser.js --- filebrowser.js | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/filebrowser.js b/filebrowser.js index 37f445dd2d..303629f3cb 100644 --- a/filebrowser.js +++ b/filebrowser.js @@ -252,7 +252,16 @@ async function renderSidebarHTML() { // if not logged in if (gitToken == '') { - const dialogResp = await showDialog(openGitHubLogin, 'Hmm... the repo you\'re\nlooking for can\'t be found.\nTry logging in.', 'Login', true); + const dialogResp = await showDialog(async () => { + + const resp = await openGitHubLogin(); + + if (resp) { + // hide dialog + hideDialog(); + } + + }, 'Hmm... the repo you\'re\nlooking for can\'t be found.\nTry logging in.', 'Login', true); // if chosen to log in, return if (dialogResp == true) return; @@ -1003,7 +1012,16 @@ async function checkPushDialogs() { // if not logged in to git if (gitToken == '') { - showDialog(openGitHubLogin, 'Login to save this file.', 'Login'); + showDialog(async () => { + + const resp = await openGitHubLogin(); + + if (resp) { + // hide dialog + hideDialog(); + } + + }, 'Login to save this file.', 'Login'); return 'return'; @@ -1014,7 +1032,16 @@ async function checkPushDialogs() { // request additional permissions if (treeLoc[2] === '/.github/workflows') { - showDialog(openGitHubLogin, 'To push this file, request\nGit workflow access.', 'Open'); + showDialog(async () => { + + const resp = await openGitHubLogin(); + + if (resp) { + // hide dialog + hideDialog(); + } + + }, 'To push this file, request\nGit workflow access.', 'Open'); return 'return'; From 632e2f8eb798d050d8beb3b89761304e0c07c5b9 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:31:46 +0200 Subject: [PATCH 047/118] Update filebrowser.js --- filebrowser.js | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/filebrowser.js b/filebrowser.js index 303629f3cb..1ba9665d33 100644 --- a/filebrowser.js +++ b/filebrowser.js @@ -1026,26 +1026,6 @@ async function checkPushDialogs() { return 'return'; } - - - // if pushing a git workflow file, - // request additional permissions - if (treeLoc[2] === '/.github/workflows') { - - showDialog(async () => { - - const resp = await openGitHubLogin(); - - if (resp) { - // hide dialog - hideDialog(); - } - - }, 'To push this file, request\nGit workflow access.', 'Open'); - - return 'return'; - - } // get repo obj from local storage @@ -1195,6 +1175,28 @@ async function checkPushDialogs() { if (dialogResult === false) return 'return'; + } else { // if user has push access in repo + + // if pushing a git workflow file, + // request additional permissions + if (getStorage('hasWorkflowPermission') === null && + treeLoc[2] === '/.github/workflows') { + + showDialog(async () => { + + const resp = await openGitHubLogin(); + + if (resp) { + // hide dialog + hideDialog(); + } + + }, 'To push this file, request\nGit workflow access.', 'Open'); + + return 'return'; + + } + } } From aa8e665a70899f17661a3421d649aec252511c44 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:34:00 +0200 Subject: [PATCH 048/118] Update gitauth.js --- git/gitauth.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/git/gitauth.js b/git/gitauth.js index 66bf715eb8..581807a0b6 100644 --- a/git/gitauth.js +++ b/git/gitauth.js @@ -93,17 +93,26 @@ window.addEventListener('load', async () => { // start loading startLoading(); + // show message showMessage('Logging in...', -1); + + // update legacy workflow permission + setStorage('hasWorkflowPermission', 'true'); + + const gitCode = event.data.split('gitCode=')[1]; // get git token from Github await getGithubToken(gitCode); + // clear modified repos modifiedRepos = {}; updateModReposLS(); + + // hide message if (messageEl.textContent === 'Logging in...') { hideMessage(); } From 5884ee79d3b8852aeba72ce7189d383fed6b1b46 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:40:54 +0200 Subject: [PATCH 049/118] Update gitauth.js --- git/gitauth.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/git/gitauth.js b/git/gitauth.js index 581807a0b6..517722df9f 100644 --- a/git/gitauth.js +++ b/git/gitauth.js @@ -209,6 +209,9 @@ window.addEventListener('load', async () => { }); +let openGitHubLoginWindow; +let openGitHubLoginListener; + function openGitHubLogin() { return new Promise(resolve => { @@ -221,30 +224,29 @@ function openGitHubLogin() { } else { - const listener = window.addEventListener('message', (event) => { + if (openGitHubLoginWindow) { + + openGitHubLoginWindow.close(); + window.removeEventListener('message', openGitHubLoginListener); + + } + + openGitHubLoginListener = window.addEventListener('message', (event) => { // if received a git code if (event.origin === window.location.origin && event.data.startsWith('gitCode=')) { - window.removeEventListener('message', listener); - - if (loginWindow.closed) { - - resolve(false); - - } else { - - resolve(true); - - } + window.removeEventListener('message', openGitHubLoginListener); + + resolve(); } }); // open login window - const loginWindow = window.open(authURL, 'Login with GitHub', 'height=575,width=575'); + openGitHubLoginWindow = window.open(authURL, 'Login with GitHub', 'height=575,width=575'); } From a52ba0b31928c16907bfcde5c57e38d65a768e23 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:42:04 +0200 Subject: [PATCH 050/118] Update filebrowser.js --- filebrowser.js | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/filebrowser.js b/filebrowser.js index 1ba9665d33..d3ed3a1abf 100644 --- a/filebrowser.js +++ b/filebrowser.js @@ -254,12 +254,10 @@ async function renderSidebarHTML() { const dialogResp = await showDialog(async () => { - const resp = await openGitHubLogin(); + await openGitHubLogin(); - if (resp) { - // hide dialog - hideDialog(); - } + // hide dialog + hideDialog(); }, 'Hmm... the repo you\'re\nlooking for can\'t be found.\nTry logging in.', 'Login', true); @@ -1014,12 +1012,10 @@ async function checkPushDialogs() { showDialog(async () => { - const resp = await openGitHubLogin(); + await openGitHubLogin(); - if (resp) { - // hide dialog - hideDialog(); - } + // hide dialog + hideDialog(); }, 'Login to save this file.', 'Login'); @@ -1184,12 +1180,10 @@ async function checkPushDialogs() { showDialog(async () => { - const resp = await openGitHubLogin(); + await openGitHubLogin(); - if (resp) { - // hide dialog - hideDialog(); - } + // hide dialog + hideDialog(); }, 'To push this file, request\nGit workflow access.', 'Open'); From 865d190413de2c5dc2b62931aba253b612c0a2c4 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:57:22 +0200 Subject: [PATCH 051/118] Update filebrowser.js --- filebrowser.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/filebrowser.js b/filebrowser.js index d3ed3a1abf..1ea8b04c0c 100644 --- a/filebrowser.js +++ b/filebrowser.js @@ -2201,8 +2201,11 @@ function createNewRepoInHTML() { // toggle lock repoPrivate = lockButton.classList.toggle('locked'); - // focus repo name - repoEl.querySelector('.name').focus(); + // focus repo name and move cursor to end + + const repoName = repoEl.querySelector('.name'); + + s.setBaseAndExtent(repoName.childNodes[0], repoName.childNodes[0].length, repoName.childNodes[0], repoName.childNodes[0].length); }); @@ -2364,7 +2367,11 @@ function createNewRepoInHTML() { } else { // if already adding a new repo, focus it - fileWrapper.querySelector('.item.focused .name').focus(); + + const newRepoName = fileWrapper.querySelector('.item.focused .name'); + + // move cursor to end + s.setBaseAndExtent(newRepoName.childNodes[0], newRepoName.childNodes[0].length, newRepoName.childNodes[0], newRepoName.childNodes[0].length); } @@ -2727,7 +2734,11 @@ function createNewFileInHTML() { } else { // if already adding a new file, focus it - fileWrapper.querySelector('.item.focused .name').focus(); + + const newFileName = fileWrapper.querySelector('.item.focused .name'); + + // move cursor to end + s.setBaseAndExtent(newFileName.childNodes[0], newFileName.childNodes[0].length, newFileName.childNodes[0], newFileName.childNodes[0].length); } From 7a451ca70f1840a4db6243c5105b246228e42806 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:58:34 +0200 Subject: [PATCH 052/118] Update filebrowser.js --- filebrowser.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/filebrowser.js b/filebrowser.js index 1ea8b04c0c..aea6ed31f9 100644 --- a/filebrowser.js +++ b/filebrowser.js @@ -2205,6 +2205,7 @@ function createNewRepoInHTML() { const repoName = repoEl.querySelector('.name'); + const s = window.getSelection(); s.setBaseAndExtent(repoName.childNodes[0], repoName.childNodes[0].length, repoName.childNodes[0], repoName.childNodes[0].length); }); @@ -2371,6 +2372,7 @@ function createNewRepoInHTML() { const newRepoName = fileWrapper.querySelector('.item.focused .name'); // move cursor to end + const s = window.getSelection(); s.setBaseAndExtent(newRepoName.childNodes[0], newRepoName.childNodes[0].length, newRepoName.childNodes[0], newRepoName.childNodes[0].length); } @@ -2738,6 +2740,7 @@ function createNewFileInHTML() { const newFileName = fileWrapper.querySelector('.item.focused .name'); // move cursor to end + const s = window.getSelection(); s.setBaseAndExtent(newFileName.childNodes[0], newFileName.childNodes[0].length, newFileName.childNodes[0], newFileName.childNodes[0].length); } From 412c15658c29ed8cbbc53717b5c125bcca3a0a00 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Thu, 5 Jan 2023 19:02:13 +0200 Subject: [PATCH 053/118] Update dark-theme.css --- dark-theme.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dark-theme.css b/dark-theme.css index 03e85395fa..349d535da6 100644 --- a/dark-theme.css +++ b/dark-theme.css @@ -209,6 +209,11 @@ cd-el { color: hsl(218deg 7% 64% / 72%); } +.language-markdown .token.list, +.language-markdown .token.title .token.punctuation { + color: hsl(218deg 7% 64% / 72%); +} + .token.string, .token.string *, .token.attr-value, From bafd778aed6be6ca318301ae5825202d3fc07357 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sat, 7 Jan 2023 18:53:33 +0200 Subject: [PATCH 054/118] Update dark-theme.css --- dark-theme.css | 733 ++++++++++++++++++++++++------------------------- 1 file changed, 363 insertions(+), 370 deletions(-) diff --git a/dark-theme.css b/dark-theme.css index 349d535da6..a4644107a9 100644 --- a/dark-theme.css +++ b/dark-theme.css @@ -1,370 +1,363 @@ -/* - * Syntax highlighting - * Colors based on Base16 Ocean Dark - */ - -body:not(.mobile) ::-webkit-scrollbar { - width: 16px; - height: 16px; -} - -body:not(.mobile) ::-webkit-scrollbar-track { - background-color: #2B303B; - box-shadow: inset 1px 0 0 0 rgba(0,0,0,0.2); -} - -body:not(.mobile) ::-webkit-scrollbar-track:horizontal { - box-shadow: inset 0 1px 0 0 rgba(0,0,0,0.2); -} - -body:not(.mobile) ::-webkit-scrollbar-corner { - background-color: #2B303B; - box-shadow: inset -15px -15px 0 0 #2B303B, - inset 1px 1px 0 0 rgba(0,0,0,0.2); -} - -body:not(.mobile) ::-webkit-scrollbar-thumb { - border: 10px solid transparent; - border-radius: 50px; - background-clip: padding-box; - border: 4px solid transparent; - border-radius: 8px; - box-shadow: none; - min-height: 50px; - min-width: 50px; - background-color: #5f6368; -} - -body:not(.mobile) ::-webkit-scrollbar-thumb:hover { - background-color: #777c83; -} - -body:not(.mobile) ::-webkit-scrollbar-thumb:active { - background-color: #5f6368; -} - - -.cd-wrapper .autocomplete { - background: hsl(218deg 23% 35%); - color: #a6c3d4; - margin-top: 21px; - margin-left: -3px; - font-family: 'Mono Sans', 'Roboto Mono', consolas, lucida console, courier new, monospace; - line-height: 1.5; - padding: 0; - box-shadow: none; - position: fixed; - z-index: 1000; - border-radius: 8px; - border-radius: 7.5px; - border: 1px solid hsl(219deg 22% 38%); - border: 2.5px solid transparent; - pointer-events: none; - overflow-y: overlay; - min-width: 62px; - /* max-width: 190px; - max-height: 224px; - max-height: 129px; */ - max-height: 140px; - /* box-shadow: 0px 3px 6px 1px hsl(221deg 16% 20%); */ - box-shadow: 0px 3px 6px 1px hsl(221deg 16% 21%); - display: none; -} - -.cd-wrapper .autocomplete.visible { - display: block; -} - -.cd-wrapper .autocomplete .icon { - padding: 2px; - border-radius: 5px; - white-space: nowrap; - overflow-x: overlay; -} - -.cd-wrapper .autocomplete .icon.active { - color: #f9f9f9; - background: hsl(218deg 27% 50%); -} - -body:not(.mobile) .autocomplete::-webkit-scrollbar { - width: 10px; -} - -body:not(.mobile) .autocomplete::-webkit-scrollbar-corner, -body:not(.mobile) .autocomplete::-webkit-scrollbar-track { - background: transparent; - box-shadow: none; - border-radius: 0; -} - -body:not(.mobile) .autocomplete::-webkit-scrollbar-thumb { - background-color: rgb(249 249 249 / 15%); - border-top-width: 5px; - border-bottom-width: 5px; - border-left-width: 5px; - border-right-width: 3px; -} - -.cd-wrapper .top-hit { - position: fixed; - color: #a6c3d4; - font-family: 'Mono Sans', 'Roboto Mono', consolas, lucida console, courier new, monospace; - pointer-events: none; - opacity: .5; -} - -.cd-wrapper .top-hit b { - opacity: 0; -} - - -cd-el { - background: #313744; - color: #a6c3d4; - caret-color: #fff; - - font-family: 'Mono Sans', 'Roboto Mono', consolas, lucida console, courier new, monospace; - - font-size: 14px; - line-height: 1.5; - - -webkit-font-smoothing: antialiased; - border-radius: 0; - display: block; -} - -.token.punctuation, -.token.interpolation, -.token.important, -.token.atrule, -.token.url .token.content, -.token.url-reference .token.variable { - color: #a6c3d4; -} - -.token.doctype .token.punctuation { - color: inherit; -} - -.token.namespace { - opacity: 1; -} - -.token.property, -.language-css .token.variable { - color: #35d4c7; -} - -.token.boolean, -.token.number, -.token.unit, -.token.constant, -.token.symbol, -.token.deleted, -.language-css .token.string { - color: #e5b09f; -} - -.token.char, -.token.url, -.token.builtin, -.token.inserted, -.token.template-string, -.token.regex, -.token.string-property, -.token.variable { - color: #c1ffd5cc; -} - -.token.operator, -.token.entity, -.token.atrule .token.rule, -.language-css .token.function, -.token.interpolation .token.punctuation { - color: hsl(286deg 60% 72% / 93%); - color: #ce8de2; -} - -.token.attr-name, -.token.keyword { - color: #e49199; -} - -.token.function, -.token.class-name, -.token.tag, -.token.selector { - color: #75bfff; -} - -.token.comment, -.token.comment * { - color: hsl(218deg 7% 64% / 72%) !important; -} - -.token.prolog, -.token.doctype, -.token.cdata { - color: hsl(218deg 7% 64% / 72%); -} - -.language-markdown .token.list, -.language-markdown .token.title .token.punctuation { - color: hsl(218deg 7% 64% / 72%); -} - -.token.string, -.token.string *, -.token.attr-value, -.token.attr-value *:not(.attr-equals), -.style .token.string { - color: #c1ffd5cc !important; -} - -.token.doctype .token.string, -.token.doctype .token.string * { - color: inherit !important; -} - -.token.italic { - font-style: normal; -} - -.token.entity { - cursor: unset; -} - -.token.url-link, -.token.email-link, -.token.md-link { - color: inherit; - caret-color: #fff; - text-decoration: underline; -} - - -.token.brace.brace-active { - position: relative; - background: rgb(166 195 212 / 12%); - border-radius: 2.5px 2.5px 0 0; - box-shadow: 0 1px 0 0 rgb(166 195 212 / 12%); -} - -.token.brace.brace-active::before, -.token.brace.brace-active::after { - content: ''; - bottom: -2.5px; - left: 0; - width: 50%; - height: 2px; - background: #a6c3d4; - position: absolute; - transform: rotateZ(25deg); - transform-origin: bottom; - pointer-events: none; -} - -.token.brace.brace-active::after { - left: 50%; - transform: rotateZ(-25deg); -} - - -.line-numbers { - position: relative; - padding-left: calc(var(--gutter-length) + env(safe-area-inset-left)); - --gutter-length: calc(1.2em + 30px + env(safe-area-inset-left)); -} - -.line-numbers .line-numbers-rows { - position: sticky; - cursor: default; - left: 0; - user-select: none; - -webkit-user-select: none; - pointer-events: none; - line-height: inherit; - font-size: inherit; - color: #636d83; - background: #313744; - display: block; - text-align: right; - min-width: 1.2em; - white-space: pre; - float: left; - z-index: 1; - margin-right: -100%; - transform: translateX(-100%); - padding-left: calc(13.5px + 0.2px + env(safe-area-inset-left)); - padding-right: 13.5px; -} - -.line-numbers .line-numbers-rows::before { - content: attr(line-numbers); -} - - -span.inline-color-wrapper { - /* - * The background image is the following SVG inline in base 64: - * - * - * - * - * - * - * SVG-inlining explained: - * https://stackoverflow.com/a/21626701/7595472 - */ - background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyIDIiPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0wIDBoMnYySDB6Ii8+PHBhdGggZmlsbD0iI2NjYyIgZD0iTTAgMGgxdjFIMHpNMSAxaDF2MUgxeiIvPjwvc3ZnPg==); - - height: 12px; - width: 12px; - margin-left: 2px; - margin-right: 4px; - display: inline-block; - user-select: none; - -webkit-user-select: none; - line-height: 10px; - border-radius: 50%; - cursor: pointer; - - transition: 0.3s cubic-bezier(0, 0.88, 0.46, 1.36); - transition: 0.6s cubic-bezier(.165,.84,.44,1); - transition: .4s cubic-bezier(.68,-.55,.265,1.55); - transition: .4s cubic-bezier(0.19,1,0.22,1); - transition: .5s cubic-bezier(0.23, 1, 0.32, 1); - transition: .3s cubic-bezier(.175,.885,.32,1.275); - transition: .3s cubic-bezier(.075,.82,.165,1); - transition: 167ms cubic-bezier(0,0,.2,1); - transition: 0.3s cubic-bezier(0.4, 0, 0.25, 1); -} - -body.platform-mac span.inline-color-wrapper { - cursor: default; -} - -span.inline-color { - width: 100%; - height: 100%; - display: inline-block; - box-sizing: border-box; - border-radius: 50%; - position: relative; -} - -span.inline-color::after { - content: ''; - width: 100%; - height: 100%; - position: absolute; - box-shadow: 0 0 0 1px hsl(221deg 9% 50%), inset 0 0 0 1px #313744; - left: 0; - top: 0; - border-radius: 50%; -} - -span.inline-color-wrapper:hover span.inline-color::after { - box-shadow: 0 0 0 1px hsl(221deg 12% 67%), inset 0 0 0 1px #313744; -} +/* + * Syntax highlighting + * Colors based on Base16 Ocean Dark + */ + +body:not(.mobile) ::-webkit-scrollbar { + width: 16px; + height: 16px; +} + +body:not(.mobile) ::-webkit-scrollbar-track { + background-color: #2B303B; +} + +body:not(.mobile) ::-webkit-scrollbar-corner { + background-color: #2B303B; +} + +body:not(.mobile) ::-webkit-scrollbar-thumb { + border: 10px solid transparent; + border-radius: 50px; + background-clip: padding-box; + border: 4px solid transparent; + border-radius: 8px; + box-shadow: none; + min-height: 50px; + min-width: 50px; + background-color: #5f6368; +} + +body:not(.mobile) ::-webkit-scrollbar-thumb:hover { + background-color: #777c83; +} + +body:not(.mobile) ::-webkit-scrollbar-thumb:active { + background-color: #5f6368; +} + + +.cd-wrapper .autocomplete { + background: hsl(218deg 23% 35%); + color: #a6c3d4; + margin-top: 21px; + margin-left: -3px; + font-family: 'Mono Sans', 'Roboto Mono', consolas, lucida console, courier new, monospace; + line-height: 1.5; + padding: 0; + box-shadow: none; + position: fixed; + z-index: 1000; + border-radius: 8px; + border-radius: 7.5px; + border: 1px solid hsl(219deg 22% 38%); + border: 2.5px solid transparent; + pointer-events: none; + overflow-y: overlay; + min-width: 62px; + /* max-width: 190px; + max-height: 224px; + max-height: 129px; */ + max-height: 140px; + /* box-shadow: 0px 3px 6px 1px hsl(221deg 16% 20%); */ + box-shadow: 0px 3px 6px 1px hsl(221deg 16% 21%); + display: none; +} + +.cd-wrapper .autocomplete.visible { + display: block; +} + +.cd-wrapper .autocomplete .icon { + padding: 2px; + border-radius: 5px; + white-space: nowrap; + overflow-x: overlay; +} + +.cd-wrapper .autocomplete .icon.active { + color: #f9f9f9; + background: hsl(218deg 27% 50%); +} + +body:not(.mobile) .autocomplete::-webkit-scrollbar { + width: 10px; +} + +body:not(.mobile) .autocomplete::-webkit-scrollbar-corner, +body:not(.mobile) .autocomplete::-webkit-scrollbar-track { + background: transparent; + box-shadow: none; + border-radius: 0; +} + +body:not(.mobile) .autocomplete::-webkit-scrollbar-thumb { + background-color: rgb(249 249 249 / 15%); + border-top-width: 5px; + border-bottom-width: 5px; + border-left-width: 5px; + border-right-width: 3px; +} + +.cd-wrapper .top-hit { + position: fixed; + color: #a6c3d4; + font-family: 'Mono Sans', 'Roboto Mono', consolas, lucida console, courier new, monospace; + pointer-events: none; + opacity: .5; +} + +.cd-wrapper .top-hit b { + opacity: 0; +} + + +cd-el { + background: #313744; + color: #a6c3d4; + caret-color: #fff; + + font-family: 'Mono Sans', 'Roboto Mono', consolas, lucida console, courier new, monospace; + + font-size: 14px; + line-height: 1.5; + + -webkit-font-smoothing: antialiased; + border-radius: 0; + display: block; +} + +.token.punctuation, +.token.interpolation, +.token.important, +.token.atrule, +.token.url .token.content, +.token.url-reference .token.variable { + color: #a6c3d4; +} + +.token.doctype .token.punctuation { + color: inherit; +} + +.token.namespace { + opacity: 1; +} + +.token.property, +.language-css .token.variable { + color: #35d4c7; +} + +.token.boolean, +.token.number, +.token.unit, +.token.constant, +.token.symbol, +.token.deleted, +.language-css .token.string { + color: #e5b09f; +} + +.token.char, +.token.url, +.token.builtin, +.token.inserted, +.token.template-string, +.token.regex, +.token.string-property, +.token.variable { + color: #c1ffd5cc; +} + +.token.operator, +.token.entity, +.token.atrule .token.rule, +.language-css .token.function, +.token.interpolation .token.punctuation { + color: hsl(286deg 60% 72% / 93%); + color: #ce8de2; +} + +.token.attr-name, +.token.keyword { + color: #e49199; +} + +.token.function, +.token.class-name, +.token.tag, +.token.selector { + color: #75bfff; +} + +.token.comment, +.token.comment * { + color: hsl(218deg 7% 64% / 72%) !important; +} + +.token.prolog, +.token.doctype, +.token.cdata { + color: hsl(218deg 7% 64% / 72%); +} + +.language-markdown .token.list, +.language-markdown .token.title .token.punctuation { + color: hsl(218deg 7% 64% / 72%); +} + +.token.string, +.token.string *, +.token.attr-value, +.token.attr-value *:not(.attr-equals), +.style .token.string { + color: #c1ffd5cc !important; +} + +.token.doctype .token.string, +.token.doctype .token.string * { + color: inherit !important; +} + +.token.italic { + font-style: normal; +} + +.token.entity { + cursor: unset; +} + +.token.url-link, +.token.email-link, +.token.md-link { + color: inherit; + caret-color: #fff; + text-decoration: underline; +} + + +.token.brace.brace-active { + position: relative; + background: rgb(166 195 212 / 12%); + border-radius: 2.5px 2.5px 0 0; + box-shadow: 0 1px 0 0 rgb(166 195 212 / 12%); +} + +.token.brace.brace-active::before, +.token.brace.brace-active::after { + content: ''; + bottom: -2.5px; + left: 0; + width: 50%; + height: 2px; + background: #a6c3d4; + position: absolute; + transform: rotateZ(25deg); + transform-origin: bottom; + pointer-events: none; +} + +.token.brace.brace-active::after { + left: 50%; + transform: rotateZ(-25deg); +} + + +.line-numbers { + position: relative; + padding-left: calc(var(--gutter-length) + env(safe-area-inset-left)); + --gutter-length: calc(1.2em + 30px + env(safe-area-inset-left)); +} + +.line-numbers .line-numbers-rows { + position: sticky; + cursor: default; + left: 0; + user-select: none; + -webkit-user-select: none; + pointer-events: none; + line-height: inherit; + font-size: inherit; + color: #636d83; + background: #313744; + display: block; + text-align: right; + min-width: 1.2em; + white-space: pre; + float: left; + z-index: 1; + margin-right: -100%; + transform: translateX(-100%); + padding-left: calc(13.5px + 0.2px + env(safe-area-inset-left)); + padding-right: 13.5px; +} + +.line-numbers .line-numbers-rows::before { + content: attr(line-numbers); +} + + +span.inline-color-wrapper { + /* + * The background image is the following SVG inline in base 64: + * + * + * + * + * + * + * SVG-inlining explained: + * https://stackoverflow.com/a/21626701/7595472 + */ + background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyIDIiPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0wIDBoMnYySDB6Ii8+PHBhdGggZmlsbD0iI2NjYyIgZD0iTTAgMGgxdjFIMHpNMSAxaDF2MUgxeiIvPjwvc3ZnPg==); + + height: 12px; + width: 12px; + margin-left: 2px; + margin-right: 4px; + display: inline-block; + user-select: none; + -webkit-user-select: none; + line-height: 10px; + border-radius: 50%; + cursor: pointer; + + transition: 0.3s cubic-bezier(0, 0.88, 0.46, 1.36); + transition: 0.6s cubic-bezier(.165,.84,.44,1); + transition: .4s cubic-bezier(.68,-.55,.265,1.55); + transition: .4s cubic-bezier(0.19,1,0.22,1); + transition: .5s cubic-bezier(0.23, 1, 0.32, 1); + transition: .3s cubic-bezier(.175,.885,.32,1.275); + transition: .3s cubic-bezier(.075,.82,.165,1); + transition: 167ms cubic-bezier(0,0,.2,1); + transition: 0.3s cubic-bezier(0.4, 0, 0.25, 1); +} + +body.platform-mac span.inline-color-wrapper { + cursor: default; +} + +span.inline-color { + width: 100%; + height: 100%; + display: inline-block; + box-sizing: border-box; + border-radius: 50%; + position: relative; +} + +span.inline-color::after { + content: ''; + width: 100%; + height: 100%; + position: absolute; + box-shadow: 0 0 0 1px hsl(221deg 9% 50%), inset 0 0 0 1px #313744; + left: 0; + top: 0; + border-radius: 50%; +} + +span.inline-color-wrapper:hover span.inline-color::after { + box-shadow: 0 0 0 1px hsl(221deg 12% 67%), inset 0 0 0 1px #313744; +} From da07e2d22aaf97cd74e8780ade430b57b176239e Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sat, 7 Jan 2023 18:54:08 +0200 Subject: [PATCH 055/118] Update dark-theme.css --- dark-theme.css | 1 - 1 file changed, 1 deletion(-) diff --git a/dark-theme.css b/dark-theme.css index a4644107a9..a75852d775 100644 --- a/dark-theme.css +++ b/dark-theme.css @@ -1,6 +1,5 @@ /* * Syntax highlighting - * Colors based on Base16 Ocean Dark */ body:not(.mobile) ::-webkit-scrollbar { From 4f9643e1fd4c2d6c77dab759fa6fa36511dbd0d8 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 8 Jan 2023 17:20:37 +0200 Subject: [PATCH 056/118] Update full.html --- full.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/full.html b/full.html index afcfb0aa31..1ed5256da7 100644 --- a/full.html +++ b/full.html @@ -229,7 +229,7 @@ - Push + Push with message...
From ef16ceac2624c5cad328261630e3e0a8334abed4 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 8 Jan 2023 17:22:47 +0200 Subject: [PATCH 057/118] Update full.html --- full.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/full.html b/full.html index 1ed5256da7..3f74d400c6 100644 --- a/full.html +++ b/full.html @@ -249,19 +249,19 @@ Share
-
+ -
+
From ae9d7610a5b669e671e470b74e9086470bd0ab59 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 8 Jan 2023 17:43:55 +0200 Subject: [PATCH 058/118] Update full.css --- full.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/full.css b/full.css index a6ecd4004e..1bfd3ab5d8 100644 --- a/full.css +++ b/full.css @@ -1743,6 +1743,12 @@ body.mobile .menu .icon a { transform: scale(1.35) translateX(-0.1px); } +.menu hr { + border: 0; + border-bottom: 1px solid #f1f1f21c; + margin: 7px 14px; +} + .context-menu { margin-top: -7px; margin-left: -6px; From 807c3d928105c44cb8e6267099a5a73f66aabeab Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 8 Jan 2023 20:55:58 +0200 Subject: [PATCH 059/118] Update full.html --- full.html | 99 +++++++++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 51 deletions(-) diff --git a/full.html b/full.html index 3f74d400c6..d4b09cc0e5 100644 --- a/full.html +++ b/full.html @@ -224,57 +224,54 @@