From b28e323deb8cad4c5ada60fa8728b704d89ea09a Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sun, 15 May 2022 07:20:20 +0300
Subject: [PATCH 0001/2959] Update utils.js
---
utils.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils.js b/utils.js
index e01b8d2fa0..777de4f83b 100644
--- a/utils.js
+++ b/utils.js
@@ -68,7 +68,7 @@ const body = document.body,
// version
-const version = '3.0.2';
+const version = '3.2.0';
versionEl.innerText = version;
let logVersion = () => {
From 76e0e9d694d97919f616e78cadcccc4bdaa18977 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sun, 15 May 2022 07:20:22 +0300
Subject: [PATCH 0002/2959] Update client-channel.js
---
worker/client-channel.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/worker/client-channel.js b/worker/client-channel.js
index 6472017a75..1e86a9cf75 100644
--- a/worker/client-channel.js
+++ b/worker/client-channel.js
@@ -4,7 +4,7 @@
// update worker name when updating worker
-const WORKER_NAME = 'codeit-worker-v534';
+const WORKER_NAME = 'codeit-worker-v535';
// internal paths
From b30f72da65e844ea7fc77ed8428d890b9577322a Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Mon, 16 May 2022 10:22:33 +0300
Subject: [PATCH 0003/2959] Update filebrowser.js
---
filebrowser.js | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/filebrowser.js b/filebrowser.js
index 92e5af7fca..ea28579a2b 100644
--- a/filebrowser.js
+++ b/filebrowser.js
@@ -971,9 +971,22 @@ async function pushFileFromHTML(fileEl, commitMessage) {
fileEl.classList.remove('modified');
bottomFloat.classList.remove('modified');
+
+ // if the current file hasn't been pushed yet,
+ // await file creation
+
+ const newFilePendingPromise = newFilePendingPromises[getAttr(fileEl, 'sha')];
+
+ if (newFilePendingPromise) {
+
+ await newFilePendingPromise;
+
+ }
+
+
// get file selected status
const fileSelected = fileEl.classList.contains('selected');
-
+
// create commit
const commitFile = fileSelected ? selectedFile : modifiedFiles[getAttr(fileEl, 'sha')];
@@ -981,7 +994,7 @@ async function pushFileFromHTML(fileEl, commitMessage) {
message: commitMessage,
file: commitFile
};
-
+
// push file asynchronously
const newSha = await git.push(commit);
@@ -1867,6 +1880,9 @@ function createNewRepoInHTML() {
// create new file
// on click of button
+
+const newFilePendingPromises = {};
+
function createNewFileInHTML() {
// if not already adding new file
@@ -2093,7 +2109,12 @@ function createNewFileInHTML() {
// push file asynchronously
- const newSHA = await git.push(commit);
+
+ newFilePendingPromises[tempSHA] = git.push(commit);
+
+ const newSHA = await newFilePendingPromises[tempSHA];
+
+ delete newFilePendingPromises[tempSHA];
// update file sha in HTML with new sha from git
From da7788bc0019440b38db783cbf1febe122a450a7 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Mon, 16 May 2022 10:35:27 +0300
Subject: [PATCH 0004/2959] Update files.js
---
files.js | 3 ---
1 file changed, 3 deletions(-)
diff --git a/files.js b/files.js
index 3f59d8fa20..d4cc37b0a1 100644
--- a/files.js
+++ b/files.js
@@ -125,9 +125,6 @@ function onFileEclipsedInCache(oldSha, newSha, newFile) {
// update old file to new sha
fileToUpdate.sha = newSha;
- // update old file caret pos
- fileToUpdate.caretPos = [0, 0];
-
// set old file to eclipsed mode
fileToUpdate.eclipsed = true;
From 11a54b24eecf8e30b86039dca34aac5ebbf5694e Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Mon, 16 May 2022 10:37:24 +0300
Subject: [PATCH 0005/2959] Update filebrowser.js
---
filebrowser.js | 7 -------
1 file changed, 7 deletions(-)
diff --git a/filebrowser.js b/filebrowser.js
index ea28579a2b..78cf6ae11f 100644
--- a/filebrowser.js
+++ b/filebrowser.js
@@ -2116,14 +2116,7 @@ function createNewFileInHTML() {
delete newFilePendingPromises[tempSHA];
-
- // update file sha in HTML with new sha from git
- setAttr(fileEl, 'sha', newSHA);
- // change selected file
- changeSelectedFile(treeLoc.join(), newSHA, fileName, encodeUnicode('\r\n'), getFileLang(fileName),
- [0, 0], [0, 0], true);
-
// Git file is eclipsed (not updated) in browser private cache,
// so store the updated file in modifiedFiles object for 1 minute after commit
if (modifiedFiles[tempSHA]) {
From 8ab5420b53d76ce65caf3bb22f90f54f9c1a6176 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Mon, 16 May 2022 10:58:30 +0300
Subject: [PATCH 0006/2959] Update filebrowser.js
---
filebrowser.js | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/filebrowser.js b/filebrowser.js
index 78cf6ae11f..61c8851f6a 100644
--- a/filebrowser.js
+++ b/filebrowser.js
@@ -2119,15 +2119,7 @@ function createNewFileInHTML() {
// Git file is eclipsed (not updated) in browser private cache,
// so store the updated file in modifiedFiles object for 1 minute after commit
- if (modifiedFiles[tempSHA]) {
-
- onFileEclipsedInCache(tempSHA, newSHA, selectedFile);
-
- } else {
-
- onFileEclipsedInCache(false, newSHA, selectedFile);
-
- }
+ onFileEclipsedInCache(tempSHA, newSHA, selectedFile);
// remove push listener
From 3e8f004d51891e0716a3e79e63ed1742cbb392fc Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Mon, 16 May 2022 11:03:39 +0300
Subject: [PATCH 0007/2959] Update files.js
---
files.js | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/files.js b/files.js
index d4cc37b0a1..c914679565 100644
--- a/files.js
+++ b/files.js
@@ -112,30 +112,29 @@ function onFileEclipsedInCache(oldSha, newSha, newFile) {
let fileToUpdate;
- // if old sha exists
- if (oldSha) {
-
- // store the updated file under old sha as key
+ // if old sha and old sha eclipsed file exist
+ if (oldSha && modifiedFiles[oldSha]) {
// find the eclipsed file
fileToUpdate = modifiedFiles[oldSha];
-
+
+ // update the eclipsed file to point to updated file
if (fileToUpdate) {
- // update old file to new sha
+ // update old file sha to point to new file sha
fileToUpdate.sha = newSha;
// set old file to eclipsed mode
fileToUpdate.eclipsed = true;
- // if file to update is selected
+ // if eclipsed file is selected
if (selectedFile.sha === oldSha) {
- // update its content
- // to the selected file contents
+ // update old file content
+ // to the current file content
fileToUpdate.content = selectedFile.content;
- // update selected file to new sha
+ // change selected file sha to new file sha
selectedFile.sha = newSha;
// set selected file to eclipsed mode
@@ -169,8 +168,8 @@ function onFileEclipsedInCache(oldSha, newSha, newFile) {
// set 1 minute timeout to remove updated files
window.setTimeout(() => {
- // if old sha exists
- if (oldSha) {
+ // if old sha and old sha eclipsed file exist
+ if (oldSha && eclipsedFiles[oldSha]) {
// remove the updated file under old sha as key
// from modifiedFiles
From b86670c339f792046b5ab3a3f929b0ddd640dc5f Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Mon, 16 May 2022 11:09:01 +0300
Subject: [PATCH 0008/2959] Update files.js
---
files.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/files.js b/files.js
index c914679565..39f723d0e0 100644
--- a/files.js
+++ b/files.js
@@ -169,7 +169,7 @@ function onFileEclipsedInCache(oldSha, newSha, newFile) {
window.setTimeout(() => {
// if old sha and old sha eclipsed file exist
- if (oldSha && eclipsedFiles[oldSha]) {
+ if (oldSha && modifiedFiles[oldSha]) {
// remove the updated file under old sha as key
// from modifiedFiles
From f2bbd9ffa2375023ff8af3a2cb3370ebf897f0a9 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Tue, 17 May 2022 09:14:07 +0300
Subject: [PATCH 0009/2959] Update files.js
---
files.js | 83 +++++++++++++++++++++++++++++++-------------------------
1 file changed, 46 insertions(+), 37 deletions(-)
diff --git a/files.js b/files.js
index 39f723d0e0..c8f587886a 100644
--- a/files.js
+++ b/files.js
@@ -110,57 +110,66 @@ function onFileEclipsedInCache(oldSha, newSha, newFile) {
if (fileEl) setAttr(fileEl, 'sha', newSha);
- let fileToUpdate;
+ // search for old eclipsed file
+ // in modifiedFiles
+ const oldEclipsedFile = modifiedFiles[oldSha];
- // if old sha and old sha eclipsed file exist
- if (oldSha && modifiedFiles[oldSha]) {
-
- // find the eclipsed file
- fileToUpdate = modifiedFiles[oldSha];
-
- // update the eclipsed file to point to updated file
- if (fileToUpdate) {
-
- // update old file sha to point to new file sha
- fileToUpdate.sha = newSha;
-
- // set old file to eclipsed mode
- fileToUpdate.eclipsed = true;
+ // if old eclipsed file
+ // is modified
+ if (oldEclipsedFile) {
- // if eclipsed file is selected
- if (selectedFile.sha === oldSha) {
+ // update old eclipsed file sha
+ // to point to new file sha
+ updateOldEclipsedFile(oldEclipsedFile, newSha);
+
+ }
- // update old file content
- // to the current file content
- fileToUpdate.content = selectedFile.content;
- // change selected file sha to new file sha
- selectedFile.sha = newSha;
-
- // set selected file to eclipsed mode
- selectedFile.eclipsed = true;
+ // if old eclipsed file
+ // is selected
+ if (selectedFile.sha === oldSha) {
+
+ // update old eclipsed file sha
+ // to point to new file sha
+ updateOldEclipsedFile(selectedFile, newSha);
+
+ updateSelectedFileLS();
+
+
+ // if old eclipsed file
+ // is modified
+ if (oldEclipsedFile) {
+
+ // update old file content
+ // to selected file content
+ oldEclipsedFile.content = selectedFile.content;
- updateSelectedFileLS();
-
- }
-
}
-
- } else {
-
- fileToUpdate = newFile;
-
+
}
- if (fileToUpdate) {
+
+ function updateOldEclipsedFile(oldEclipsedFile, newSha) {
- // store the updated file under new sha as key
- modifiedFiles[newSha] = fileToUpdate;
+ // update old eclipsed file sha to point to new file sha
+ oldEclipsedFile.sha = newSha;
+
+ // set old file to eclipsed mode
+ oldEclipsedFile.eclipsed = true;
}
+ // if old eclipsed file is in modified files
+ if (oldEclipsedFile) {
+
+ // store the file under new sha as key
+ modifiedFiles[newSha] = oldEclipsedFile;
+
+ }
+
+
// update modified files in local storage
updateModFilesLS();
From 1112166bfced62cdd768eef50b951afbc98bb26c Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Tue, 17 May 2022 09:19:36 +0300
Subject: [PATCH 0010/2959] Update files.js
---
files.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/files.js b/files.js
index c8f587886a..63da165c0f 100644
--- a/files.js
+++ b/files.js
@@ -174,24 +174,24 @@ function onFileEclipsedInCache(oldSha, newSha, newFile) {
updateModFilesLS();
- // set 1 minute timeout to remove updated files
+ // set 1 minute timeout to remove eclipsed files
window.setTimeout(() => {
- // if old sha and old sha eclipsed file exist
- if (oldSha && modifiedFiles[oldSha]) {
+ // if old eclipsed file exists
+ if (modifiedFiles[oldSha]) {
- // remove the updated file under old sha as key
+ // delete the old eclipsed file
// from modifiedFiles
deleteModFile(oldSha);
}
- // if not edited updated file under new sha as key
+ // if not edited eclipsed file under new sha as key
// while in timeout (file is still eclipsed)
if (modifiedFiles[newSha] &&
modifiedFiles[newSha].eclipsed) {
- // remove the updated file under new sha as key
+ // remove the eclipsed file under new sha as key
// from modifiedFiles
deleteModFile(newSha);
From 10e82da3d3651b8902efd96b906722353798a46b Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Tue, 17 May 2022 09:23:17 +0300
Subject: [PATCH 0011/2959] Update files.js
From 0face71d58ca771774e5e853f0df097be5540c57 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Tue, 17 May 2022 09:25:17 +0300
Subject: [PATCH 0012/2959] Update files.js
---
files.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/files.js b/files.js
index 63da165c0f..fe69d6ae40 100644
--- a/files.js
+++ b/files.js
@@ -149,7 +149,6 @@ function onFileEclipsedInCache(oldSha, newSha, newFile) {
}
-
function updateOldEclipsedFile(oldEclipsedFile, newSha) {
// update old eclipsed file sha to point to new file sha
From 5dcf51d5e20332843cb803653ca3f79382f5dd35 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Tue, 17 May 2022 09:40:01 +0300
Subject: [PATCH 0013/2959] Update client-channel.js
---
worker/client-channel.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/worker/client-channel.js b/worker/client-channel.js
index 1e86a9cf75..db740d8287 100644
--- a/worker/client-channel.js
+++ b/worker/client-channel.js
@@ -4,7 +4,7 @@
// update worker name when updating worker
-const WORKER_NAME = 'codeit-worker-v535';
+const WORKER_NAME = 'codeit-worker-v536';
// internal paths
From c25938074c6985578150b07a514b4aeb64084367 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 15:59:36 +0300
Subject: [PATCH 0014/2959] Update client-channel.js
---
worker/client-channel.js | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/worker/client-channel.js b/worker/client-channel.js
index db740d8287..a2bf9608c1 100644
--- a/worker/client-channel.js
+++ b/worker/client-channel.js
@@ -68,11 +68,20 @@ const workerChannel = new BroadcastChannel('worker-channel');
// create Response from data
-function createResponse(data, type, status) {
+function createResponse(data, type, status, noCache) {
+
+ let headers = {'Content-Type': type};
+
+ if (noCache) {
+
+ headers['Cache-Control'] = 'public, max-age=0, must-revalidate';
+
+ }
+
// create Response from data
const response = new Response(data, {
- headers: {'Content-Type': type},
+ headers: headers,
status: status
});
@@ -142,7 +151,7 @@ function sendRequestToClient(request, clientId) {
// create Response from data
- const response = createResponse(event.data.resp, mimeType, event.data.respStatus);
+ const response = createResponse(event.data.resp, mimeType, event.data.respStatus, true);
if (enableDevLogs) {
console.debug('[ServiceWorker] Resolved live view request with client response', response, event.data.resp, event.data.respStatus);
@@ -251,7 +260,7 @@ function handleFetchRequest(request, event) {
const clientId = event.clientId;
resolve(createResponse(
- JSON.stringify({ clientId }), 'application/json', 200
+ JSON.stringify({ clientId }), 'application/json', 200, true
));
} else { // if fetch is external
From 4bd7f4426a7b00894c6f13fc0960b913083aae94 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 16:02:32 +0300
Subject: [PATCH 0015/2959] Restore client-channel.js
---
worker/client-channel.js | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/worker/client-channel.js b/worker/client-channel.js
index a2bf9608c1..1e86a9cf75 100644
--- a/worker/client-channel.js
+++ b/worker/client-channel.js
@@ -4,7 +4,7 @@
// update worker name when updating worker
-const WORKER_NAME = 'codeit-worker-v536';
+const WORKER_NAME = 'codeit-worker-v535';
// internal paths
@@ -68,20 +68,11 @@ const workerChannel = new BroadcastChannel('worker-channel');
// create Response from data
-function createResponse(data, type, status, noCache) {
-
- let headers = {'Content-Type': type};
-
- if (noCache) {
-
- headers['Cache-Control'] = 'public, max-age=0, must-revalidate';
-
- }
-
+function createResponse(data, type, status) {
// create Response from data
const response = new Response(data, {
- headers: headers,
+ headers: {'Content-Type': type},
status: status
});
@@ -151,7 +142,7 @@ function sendRequestToClient(request, clientId) {
// create Response from data
- const response = createResponse(event.data.resp, mimeType, event.data.respStatus, true);
+ const response = createResponse(event.data.resp, mimeType, event.data.respStatus);
if (enableDevLogs) {
console.debug('[ServiceWorker] Resolved live view request with client response', response, event.data.resp, event.data.respStatus);
@@ -260,7 +251,7 @@ function handleFetchRequest(request, event) {
const clientId = event.clientId;
resolve(createResponse(
- JSON.stringify({ clientId }), 'application/json', 200, true
+ JSON.stringify({ clientId }), 'application/json', 200
));
} else { // if fetch is external
From 484f881fabc924b90141d955c37348dc57d787b6 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 16:20:11 +0300
Subject: [PATCH 0016/2959] Update filebrowser.js
---
filebrowser.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/filebrowser.js b/filebrowser.js
index 61c8851f6a..7e86afdea7 100644
--- a/filebrowser.js
+++ b/filebrowser.js
@@ -2775,7 +2775,7 @@ function setupSidebar() {
} else if (isMobile) {
- // update bottom floater
+ // update bottom float
updateFloat();
}
From 30bb63d478c76d6b7b9e18b69f28797c72717849 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 16:21:58 +0300
Subject: [PATCH 0017/2959] Update gitauth.js
---
git/gitauth.js | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/git/gitauth.js b/git/gitauth.js
index 873593241b..132baed57e 100644
--- a/git/gitauth.js
+++ b/git/gitauth.js
@@ -80,6 +80,9 @@ window.onload = async () => {
// hide intro screen
sidebar.classList.remove('intro');
+
+ // change sidebar title
+ sidebarLogo.innerText = 'Repositories';
// if on safari, refresh header color
if (isSafari) {
@@ -105,14 +108,14 @@ window.onload = async () => {
})
- loadLS();
-
-
// if git code exists in link
if (linkData.gitCode) {
// hide intro screen
sidebar.classList.remove('intro');
+
+ // change sidebar title
+ sidebarLogo.innerText = 'Repositories';
// if on safari, refresh header color
if (isSafari) {
@@ -133,9 +136,12 @@ window.onload = async () => {
const gitCode = linkData.gitCode;
// get git token from Github
- getGithubToken(gitCode);
+ await getGithubToken(gitCode);
}
+
+
+ loadLS();
}
@@ -160,9 +166,5 @@ async function getGithubToken(gitCode) {
// save logged user in local storage
setStorage('loggedUser', loggedUser);
-
- // render sidebar
- renderSidebarHTML();
-
}
From c6796b6f35d20ba13fd4ca35c10149dd178de34f Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 16:25:53 +0300
Subject: [PATCH 0018/2959] Update gitauth.js
---
git/gitauth.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/git/gitauth.js b/git/gitauth.js
index 132baed57e..cf4baca3d9 100644
--- a/git/gitauth.js
+++ b/git/gitauth.js
@@ -116,6 +116,18 @@ window.onload = async () => {
// change sidebar title
sidebarLogo.innerText = 'Repositories';
+
+ // don't transition
+ body.classList.add('notransition');
+
+ toggleSidebar(true);
+
+ onNextFrame(() => {
+
+ body.classList.remove('notransition');
+
+ });
+
// if on safari, refresh header color
if (isSafari) {
From 3fbc25dab7d5499469f5d8036f2245cb4add6c2a Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 16:48:19 +0300
Subject: [PATCH 0019/2959] Update gitauth.js
---
git/gitauth.js | 33 ++++++++++++++++++++++++---------
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/git/gitauth.js b/git/gitauth.js
index cf4baca3d9..f4b380a103 100644
--- a/git/gitauth.js
+++ b/git/gitauth.js
@@ -81,8 +81,13 @@ window.onload = async () => {
// hide intro screen
sidebar.classList.remove('intro');
- // change sidebar title
- sidebarLogo.innerText = 'Repositories';
+ // if on Repositories page
+ if (treeLoc[1] === '') {
+
+ // show sidebar title
+ sidebarLogo.innerText = 'Repositories';
+
+ }
// if on safari, refresh header color
if (isSafari) {
@@ -114,8 +119,13 @@ window.onload = async () => {
// hide intro screen
sidebar.classList.remove('intro');
- // change sidebar title
- sidebarLogo.innerText = 'Repositories';
+ // if on Repositories page
+ if (treeLoc[1] === '') {
+
+ // show sidebar title
+ sidebarLogo.innerText = 'Repositories';
+
+ }
// don't transition
body.classList.add('notransition');
@@ -171,12 +181,17 @@ async function getGithubToken(gitCode) {
saveGitTokenLS(gitToken);
- // get logged user
- loggedUser = await axios.get('https://api.github.com/user', gitToken);
- loggedUser = loggedUser.login;
+ // if logged user dosen't exist
+ if (getStorage('loggedUser') === null) {
+
+ // get logged user
+ loggedUser = await axios.get('https://api.github.com/user', gitToken);
+ loggedUser = loggedUser.login;
- // save logged user in local storage
- setStorage('loggedUser', loggedUser);
+ // save logged user in local storage
+ setStorage('loggedUser', loggedUser);
+
+ }
}
From b29519a37a56ec05408482026a15cc3ed00038d2 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 16:57:17 +0300
Subject: [PATCH 0020/2959] Update gitauth.js
---
git/gitauth.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/git/gitauth.js b/git/gitauth.js
index f4b380a103..1d7ba88cd5 100644
--- a/git/gitauth.js
+++ b/git/gitauth.js
@@ -76,7 +76,7 @@ window.onload = async () => {
})
- window.addEventListener('message', (event) => {
+ window.addEventListener('message', async (event) => {
// hide intro screen
sidebar.classList.remove('intro');
@@ -108,7 +108,10 @@ window.onload = async () => {
const gitCode = event.data;
// get git token from Github
- getGithubToken(gitCode);
+ await getGithubToken(gitCode);
+
+ // render sidebar
+ renderSidebarHTML();
})
From db963cf2162be66b8c4b52be6b532aa375c42c1c Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 17:00:26 +0300
Subject: [PATCH 0021/2959] 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 1d7ba88cd5..f662c55606 100644
--- a/git/gitauth.js
+++ b/git/gitauth.js
@@ -77,7 +77,7 @@ window.onload = async () => {
window.addEventListener('message', async (event) => {
-
+
// hide intro screen
sidebar.classList.remove('intro');
From b15cac3871cf1c226da2b0d95eb6214fa6fdfd92 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 17:11:42 +0300
Subject: [PATCH 0022/2959] Update files.js
---
files.js | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/files.js b/files.js
index fe69d6ae40..935185e25c 100644
--- a/files.js
+++ b/files.js
@@ -160,13 +160,8 @@ function onFileEclipsedInCache(oldSha, newSha, newFile) {
}
- // if old eclipsed file is in modified files
- if (oldEclipsedFile) {
-
- // store the file under new sha as key
- modifiedFiles[newSha] = oldEclipsedFile;
-
- }
+ // store the file under new sha as key
+ modifiedFiles[newSha] = oldEclipsedFile;
// update modified files in local storage
From a428f972478a4c382410fd119f5c30eaa210fc46 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 17:14:55 +0300
Subject: [PATCH 0023/2959] Update files.js
---
files.js | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/files.js b/files.js
index 935185e25c..af561e5232 100644
--- a/files.js
+++ b/files.js
@@ -160,8 +160,20 @@ function onFileEclipsedInCache(oldSha, newSha, newFile) {
}
- // store the file under new sha as key
- modifiedFiles[newSha] = oldEclipsedFile;
+ // if old eclipsed file is modified
+ if (oldEclipsedFile) {
+
+ // store the modified file under new sha as key
+ modifiedFiles[newSha] = oldEclipsedFile;
+
+ } else if (selectedFile.sha === oldSha) {
+
+ // if old eclipsed file is selected
+
+ // store the selected file under new sha as key
+ modifiedFiles[newSha] = selectedFile;
+
+ }
// update modified files in local storage
From 1b73aa7bebd294b18c8f504af405a881da794fa4 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 17:37:28 +0300
Subject: [PATCH 0024/2959] Update client-channel.js
---
worker/client-channel.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/worker/client-channel.js b/worker/client-channel.js
index 1e86a9cf75..db740d8287 100644
--- a/worker/client-channel.js
+++ b/worker/client-channel.js
@@ -4,7 +4,7 @@
// update worker name when updating worker
-const WORKER_NAME = 'codeit-worker-v535';
+const WORKER_NAME = 'codeit-worker-v536';
// internal paths
From 9002af3bd85cfb747a6c181da8e3fc1a6f0523e4 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 18:07:13 +0300
Subject: [PATCH 0025/2959] Update full.css
---
full.css | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/full.css b/full.css
index ee2fb2b763..449840704d 100644
--- a/full.css
+++ b/full.css
@@ -1238,7 +1238,7 @@ body:not(.mobile) .sidebar .header .title .branch-icon:active {
}
.sidebar .item .name {
- max-width: calc(var(--sidebar-width) - 51px - 20px - 24px - 20px);
+ max-width: calc(var(--sidebar-width) - 40px - 24px - 7px - 38px - 7px);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@@ -1258,6 +1258,10 @@ body:not(.mobile) .sidebar .header .title .branch-icon:active {
transition-property: background, box-shadow;
}
+.sidebar .repo.focused .name {
+ max-width: calc(var(--sidebar-width) - 40px - 24px - 7px - 38px - 38px - 7px);
+}
+
.sidebar .item.focused.hidden .name {
background: transparent;
box-shadow: 0 0 0 2px hsl(220deg 86% 64% / 0%);
@@ -1325,10 +1329,10 @@ body:not(.mobile) .sidebar .header .title .branch-icon:active {
}
.sidebar .item .push-wrapper {
- width: 53px;
- position: absolute;
- right: -2px;
display: none;
+ position: absolute;
+ right: calc(20px - var(--spacing-1));
+ z-index: 1000;
}
.sidebar .item.modified .push-wrapper {
From 6376013e8ae044316ac56ba1522f3ebdd36c5af6 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 18:08:03 +0300
Subject: [PATCH 0026/2959] Update full.css
---
full.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/full.css b/full.css
index 449840704d..c71926c34d 100644
--- a/full.css
+++ b/full.css
@@ -1329,8 +1329,8 @@ body:not(.mobile) .sidebar .header .title .branch-icon:active {
}
.sidebar .item .push-wrapper {
- display: none;
position: absolute;
+ display: none;
right: calc(20px - var(--spacing-1));
z-index: 1000;
}
From 347ccf3eefee6288d0ce92474be28fda6618bd89 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 18:10:54 +0300
Subject: [PATCH 0027/2959] Update full.css
---
full.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/full.css b/full.css
index c71926c34d..6f28a37ecf 100644
--- a/full.css
+++ b/full.css
@@ -1104,7 +1104,7 @@ body:not(.mobile) .sidebar .header .title .branch-icon:active {
}
.sidebar .header .search-screen .search-input {
- width: calc(var(--sidebar-width) - 103px);
+ width: calc(var(--sidebar-width) - 103px - 7px);
white-space: nowrap;
line-height: 20px;
color: #d4d5d7;
From b9f667aa6f7eebda6cc2c81da7d28afe225804ea Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 18:15:32 +0300
Subject: [PATCH 0028/2959] Update full.css
---
full.css | 1 -
1 file changed, 1 deletion(-)
diff --git a/full.css b/full.css
index 6f28a37ecf..f390ac6382 100644
--- a/full.css
+++ b/full.css
@@ -1332,7 +1332,6 @@ body:not(.mobile) .sidebar .header .title .branch-icon:active {
position: absolute;
display: none;
right: calc(20px - var(--spacing-1));
- z-index: 1000;
}
.sidebar .item.modified .push-wrapper {
From 3991743a5927ddccfe9dcd59e8b00e9138606791 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 18:15:52 +0300
Subject: [PATCH 0029/2959] Update full.css
---
full.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/full.css b/full.css
index f390ac6382..1cd77c1c1d 100644
--- a/full.css
+++ b/full.css
@@ -1330,8 +1330,8 @@ body:not(.mobile) .sidebar .header .title .branch-icon:active {
.sidebar .item .push-wrapper {
position: absolute;
- display: none;
right: calc(20px - var(--spacing-1));
+ display: none;
}
.sidebar .item.modified .push-wrapper {
From 56b6b3ab72a8c7267055d70ee2b8882206147691 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 18:19:09 +0300
Subject: [PATCH 0030/2959] Update full.css
---
full.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/full.css b/full.css
index 1cd77c1c1d..add5df88ef 100644
--- a/full.css
+++ b/full.css
@@ -1104,7 +1104,7 @@ body:not(.mobile) .sidebar .header .title .branch-icon:active {
}
.sidebar .header .search-screen .search-input {
- width: calc(var(--sidebar-width) - 103px - 7px);
+ width: calc(var(--sidebar-width) - 103px);
white-space: nowrap;
line-height: 20px;
color: #d4d5d7;
From b1e5e4e51e016b176e3730d5d30d28234d869507 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 18:22:12 +0300
Subject: [PATCH 0031/2959] Update files.js
---
files.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/files.js b/files.js
index af561e5232..a0812e3b35 100644
--- a/files.js
+++ b/files.js
@@ -166,7 +166,7 @@ function onFileEclipsedInCache(oldSha, newSha, newFile) {
// store the modified file under new sha as key
modifiedFiles[newSha] = oldEclipsedFile;
- } else if (selectedFile.sha === oldSha) {
+ } else if (selectedFile.sha === newSha) {
// if old eclipsed file is selected
From 36659819675ecdbb538b77c7abdd594286c24449 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 18:22:24 +0300
Subject: [PATCH 0032/2959] Update client-channel.js
---
worker/client-channel.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/worker/client-channel.js b/worker/client-channel.js
index db740d8287..d8395d310d 100644
--- a/worker/client-channel.js
+++ b/worker/client-channel.js
@@ -4,7 +4,7 @@
// update worker name when updating worker
-const WORKER_NAME = 'codeit-worker-v536';
+const WORKER_NAME = 'codeit-worker-v537';
// internal paths
From 681b3f92bc7792e1f85dfc534d30fb21a9cc7695 Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 21:26:12 +0300
Subject: [PATCH 0033/2959] Update live-view.js
From 8abd90627513f29796527e416ee2d47513ca116b Mon Sep 17 00:00:00 2001
From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com>
Date: Sat, 28 May 2022 21:27:16 +0300
Subject: [PATCH 0034/2959] Update full.html
---
full.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/full.html b/full.html
index 271e39a7b5..97212bcc5d 100644
--- a/full.html
+++ b/full.html
@@ -191,7 +191,7 @@
-
+