From c32733c61362bab8052ba5a7a40db3bce14bb112 Mon Sep 17 00:00:00 2001 From: KyerHarris <101298443+KyerHarris@users.noreply.github.com> Date: Mon, 18 Mar 2024 11:06:10 -0600 Subject: [PATCH 01/10] Update pod.html --- samples/pod.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/pod.html b/samples/pod.html index 68c2389..0b3e10b 100644 --- a/samples/pod.html +++ b/samples/pod.html @@ -8,16 +8,16 @@

Welcome to your pod!

- +
- sample + sample
- + - \ No newline at end of file + From 28abf0a039cf6c30d4bfd02ae2850e387441d55b Mon Sep 17 00:00:00 2001 From: KyerHarris <101298443+KyerHarris@users.noreply.github.com> Date: Mon, 18 Mar 2024 11:06:33 -0600 Subject: [PATCH 02/10] Delete samples/pod_script.js --- samples/pod_script.js | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 samples/pod_script.js diff --git a/samples/pod_script.js b/samples/pod_script.js deleted file mode 100644 index 0b80ede..0000000 --- a/samples/pod_script.js +++ /dev/null @@ -1,20 +0,0 @@ -document.addEventListener('DOMContentLoaded', function() { - var button = document.getElementById('detachPod'); - - button.addEventListener('click', function(event) { - event.preventDefault(); - - // change the ECI to make it work on your pico - const detachURL = "http://localhost:3001/sky/event/cltqlszq00012ycu4dtvt55l9/1556/test/disconnect_storage"; - - fetch(detachURL, { - method: 'POST', - }) - .then(response => response.json()) - .then(data => { - console.log(data); - window.location.href = 'index.html'; - }) - .catch(error => console.error('Error:', error)); - }); -}); \ No newline at end of file From 6dd836e05eb6b030e292216526b51a7640f51082 Mon Sep 17 00:00:00 2001 From: KyerHarris <101298443+KyerHarris@users.noreply.github.com> Date: Mon, 18 Mar 2024 11:06:55 -0600 Subject: [PATCH 03/10] Update and rename index_script.js to index.js --- samples/index.js | 14 ++++++++++++++ samples/index_script.js | 35 ----------------------------------- 2 files changed, 14 insertions(+), 35 deletions(-) create mode 100644 samples/index.js delete mode 100644 samples/index_script.js diff --git a/samples/index.js b/samples/index.js new file mode 100644 index 0000000..d00e208 --- /dev/null +++ b/samples/index.js @@ -0,0 +1,14 @@ +let ECI = ''; + +async function attach(event) { + event.preventDefault(); + ECI = document.getElementById('PicoECI').value; + console.log("Pico ECI: ", ECI); + window.location.href = 'pod.html'; +} + +async function exit(event) { + event.preventDefault(); + ECI = ''; + window.location.href = 'index.html'; +} diff --git a/samples/index_script.js b/samples/index_script.js deleted file mode 100644 index a0e8c67..0000000 --- a/samples/index_script.js +++ /dev/null @@ -1,35 +0,0 @@ -document.addEventListener('DOMContentLoaded', function() { - var button = document.getElementById('attachButton'); - - button.addEventListener('click', function(event) { - event.preventDefault(); - - const podURL = document.getElementById('podURL').value; - const webID = document.getElementById('webID').value; - const clientID = document.getElementById('clientID').value; - const clientSecret = document.getElementById('clientSecret').value; - const tokenURL = document.getElementById('tokenURL').value; - - // change the ECI to make it work on your pico - const queryURL = "http://localhost:3001/sky/event/cltqlszq00012ycu4dtvt55l9/1556/test/connect_storage"; - const queryParams = new URLSearchParams({ - storageURL: podURL, - webID: webID, - clientID: clientID, - clientSecret: clientSecret, - tokenURL: tokenURL - }).toString(); - - const attachURL = `${queryURL}?${queryParams}`; - - fetch(attachURL, { - method: 'POST', - }) - .then(response => response.json()) - .then(data => { - console.log(data); - window.location.href = 'pod.html'; - }) - .catch(error => console.error('Error:', error)); - }); -}); \ No newline at end of file From 8fe9b3bc269cad5fa8c064d29cd3182d78c52869 Mon Sep 17 00:00:00 2001 From: KyerHarris <101298443+KyerHarris@users.noreply.github.com> Date: Mon, 18 Mar 2024 11:07:09 -0600 Subject: [PATCH 04/10] Update and rename index_style.css to index.css --- samples/{index_style.css => index.css} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename samples/{index_style.css => index.css} (100%) diff --git a/samples/index_style.css b/samples/index.css similarity index 100% rename from samples/index_style.css rename to samples/index.css From 1a8f78dfed24d0d68b42f53f1c50808e68e67e09 Mon Sep 17 00:00:00 2001 From: KyerHarris <101298443+KyerHarris@users.noreply.github.com> Date: Mon, 18 Mar 2024 11:07:26 -0600 Subject: [PATCH 05/10] Update index.html --- samples/index.html | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/samples/index.html b/samples/index.html index 1f189a4..41e3933 100644 --- a/samples/index.html +++ b/samples/index.html @@ -4,35 +4,19 @@ Welcome to the dApps! - + +
-

Welcome to the dApps!

+

Welcome to THE dApps!

- - + +
-
- - -
-
- - -
-
- - -
-
- - -
- +
- From ab8a03099719dfa849686b5ecac1d04d46a80ec9 Mon Sep 17 00:00:00 2001 From: KyerHarris <101298443+KyerHarris@users.noreply.github.com> Date: Mon, 18 Mar 2024 11:21:02 -0600 Subject: [PATCH 06/10] Update index.js --- samples/index.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/samples/index.js b/samples/index.js index d00e208..9477333 100644 --- a/samples/index.js +++ b/samples/index.js @@ -6,9 +6,3 @@ async function attach(event) { console.log("Pico ECI: ", ECI); window.location.href = 'pod.html'; } - -async function exit(event) { - event.preventDefault(); - ECI = ''; - window.location.href = 'index.html'; -} From 57e6d494213e02321f2d3b8f0b3db499090d5905 Mon Sep 17 00:00:00 2001 From: KyerHarris <101298443+KyerHarris@users.noreply.github.com> Date: Mon, 18 Mar 2024 11:21:14 -0600 Subject: [PATCH 07/10] Update pod.html --- samples/pod.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/pod.html b/samples/pod.html index 0b3e10b..821a42b 100644 --- a/samples/pod.html +++ b/samples/pod.html @@ -8,7 +8,7 @@

Welcome to your pod!

- +
sample From ec00c7aad2fb5c412a4c3b476d356d9dea007265 Mon Sep 17 00:00:00 2001 From: KyerHarris <101298443+KyerHarris@users.noreply.github.com> Date: Mon, 18 Mar 2024 12:07:58 -0600 Subject: [PATCH 08/10] Create pod.css --- samples/pod.css | 119 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 samples/pod.css diff --git a/samples/pod.css b/samples/pod.css new file mode 100644 index 0000000..a9352f7 --- /dev/null +++ b/samples/pod.css @@ -0,0 +1,119 @@ +button { + width: 5em; + padding: 10px; + border: none; + border-radius: 4px; + color: white; + background-color: #007bff; + cursor: pointer; +} + +.detach-button { + width: 10em; + position: fixed; + top: 10px; + right: 10px; + padding: 10px 20px; + border: none; + border-radius: 4px; +} + +.attach-button { + width: 10em; + position: fixed; + top: 10px; + right: 10px; + padding: 10px 20px; + border: none; + border-radius: 4px; + display: none; +} + +#searchInput { + width: 20em; +} + +.toggle-button { + padding: 8px 20px; + background-color: #0056b3; + color: white; + border: none; + border-radius: 4px; + cursor: pointer; +} + +.toggle-button.active { + background-color: #007bff; +} + +.modal { + display: none; /* Hidden by default */ + position: fixed; /* Stay in place */ + z-index: 2; /* Sit on top */ + left: 0; + top: 0; + width: 100%; /* Full width */ + height: 100%; /* Full height */ + overflow: auto; /* Enable scroll if needed */ + background-color: rgb(0,0,0); /* Fallback color */ + background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ +} + +.modal-content { + position: absolute; + width: 100%; + max-width: 400px; + padding: 50px 75px 50px 50px; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + background-color: white; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + border-radius: 8px; + text-align: center; +} + +body, html { + height: 100%; + margin: 0; + font-family: Arial, sans-serif; + background-color: #f0f4f8; +} + +h2 { + color: #333; + margin-bottom: 40px; +} + +.input-group { + position: relative; + margin-bottom: 20px; +} + +input[type="text"], input[type="password"] { + width: 100%; + padding: 10px; + border: 2px solid #ddd; + border-radius: 4px; + margin-top: 8px; +} + +input[type="text"]:focus, input[type="password"]:focus { + border-color: #007bff; + outline: none; +} + +label { + position: absolute; + top: -8px; + left: 10px; + background-color: white; + padding: 0 5px; + color: #007bff; +} + +button:hover { + background-color: #0056b3; +} + + From dfb25c698b20b3253d9d5cac3f612d50e4d65870 Mon Sep 17 00:00:00 2001 From: KyerHarris <101298443+KyerHarris@users.noreply.github.com> Date: Mon, 18 Mar 2024 12:08:14 -0600 Subject: [PATCH 09/10] Update index.js --- samples/index.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/samples/index.js b/samples/index.js index 9477333..34a4901 100644 --- a/samples/index.js +++ b/samples/index.js @@ -1,4 +1,5 @@ let ECI = ''; +let pod = true; async function attach(event) { event.preventDefault(); @@ -6,3 +7,35 @@ async function attach(event) { console.log("Pico ECI: ", ECI); window.location.href = 'pod.html'; } + +function toggleDetachAttachButtons() { + const detachPodButton = document.getElementById('detachPod'); + const attachPodButton = document.getElementById('attachPod'); + + if (pod) { + pod = false; + detachPodButton.style.display = 'none'; + attachPodButton.style.display = 'inline-block'; + } else { + pod = true; + const modal = document.getElementById('myModal'); + modal.style.display = 'block'; + detachPodButton.style.display = 'inline-block'; + attachPodButton.style.display = 'none'; + } +} + +async function allPhotos() { + const sharedPhotosButton = document.getElementById('listAllSharedPhotos'); + const allPhotosButton = document.getElementById('listAllPhotos'); + allPhotosButton.classList.add('active'); + sharedPhotosButton.classList.remove('active'); + +} + +async function sharedPhotos() { + const sharedPhotosButton = document.getElementById('listAllSharedPhotos'); + const allPhotosButton = document.getElementById('listAllPhotos'); + sharedPhotosButton.classList.add('active'); + allPhotosButton.classList.remove('active'); +} From e0a30d9ef52169cbb00ee9ec699feb4706e60431 Mon Sep 17 00:00:00 2001 From: KyerHarris <101298443+KyerHarris@users.noreply.github.com> Date: Mon, 18 Mar 2024 12:08:30 -0600 Subject: [PATCH 10/10] Update pod.html --- samples/pod.html | 47 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/samples/pod.html b/samples/pod.html index 821a42b..9eaf24c 100644 --- a/samples/pod.html +++ b/samples/pod.html @@ -4,20 +4,51 @@ Pod + + -

Welcome to your pod!

+

Welcome to your pico!

+ +
- + + +
sample - - -
- - +
+ + +
+ -