Skip to content

Commit

Permalink
Added favicon, mobile optimization, font awesome svgs to buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
ptmrio committed Apr 7, 2023
1 parent c76cc9b commit 01aa93b
Show file tree
Hide file tree
Showing 22 changed files with 343 additions and 42 deletions.
Binary file added android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions android-chrome-192x192.png:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=C:\Users\gpete\Downloads\favicon_package_v0.16.zip
Binary file added android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions android-chrome-512x512.png:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=C:\Users\gpete\Downloads\favicon_package_v0.16.zip
Binary file added apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apple-touch-icon.png:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=C:\Users\gpete\Downloads\favicon_package_v0.16.zip
9 changes: 9 additions & 0 deletions browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#f6792b</TileColor>
</tile>
</msapplication>
</browserconfig>
3 changes: 3 additions & 0 deletions browserconfig.xml:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=C:\Users\gpete\Downloads\favicon_package_v0.16.zip
Binary file added favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions favicon-16x16.png:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=C:\Users\gpete\Downloads\favicon_package_v0.16.zip
Binary file added favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions favicon-32x32.png:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=C:\Users\gpete\Downloads\favicon_package_v0.16.zip
Binary file added favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions favicon.ico:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=C:\Users\gpete\Downloads\favicon_package_v0.16.zip
189 changes: 168 additions & 21 deletions index.html

Large diffs are not rendered by default.

58 changes: 37 additions & 21 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
document.addEventListener('DOMContentLoaded', () => {
const encryptionForm = document.querySelector('[data-id="encryption-form"]');
const generatedLinkInput = document.querySelector('[data-id="generated-link"]');
const generatedLinkTextarea = document.querySelector('[data-id="generated-link"]');
const secretContainer = document.querySelector('[data-id="secret-container"]');
const messageInput = document.querySelector('[data-id="message"]');
const passphraseInput = document.querySelector('[data-id="passphrase"]');
Expand All @@ -20,14 +20,14 @@ document.addEventListener('DOMContentLoaded', () => {
encryptionForm.reportValidity();

if (encryptionForm.checkValidity() && passphrase) {

if (!urlParams.has('encryptedSecret')) {
const encryptedSecret = await encryptSecret(message, passphrase);
const link = generateLink(encryptedSecret);
generatedLinkInput.value = link;
generatedLinkTextarea.value = link;
showDialog(linkDialog); // Show the dialog
} else {
decryptSecret(urlParams.get('encryptedSecret'), passphrase).then((decryptedMessage) => {
decryptSecret(urlParams.get('encryptedSecret'), passphrase).then((decryptedMessage) => {
messageInput.value = decryptedMessage;
secretContainer.style.display = 'grid';
setTimeout(() => {
Expand Down Expand Up @@ -120,33 +120,49 @@ document.addEventListener('DOMContentLoaded', () => {
function closeDialog(dialog) {
dialog.setAttribute("closing", "");
dialog.addEventListener(
"animationend",
() => {
dialog.removeAttribute("closing");
dialog.close();
},
{once: true}
"animationend",
() => {
dialog.removeAttribute("closing");
dialog.close();
},
{ once: true }
);
}

closeDialogButton.addEventListener('click', () => {
closeDialog(linkDialog);
closeDialog(linkDialog);
});


generatedLinkInput.addEventListener('click', () => {
const tooltipContainer = generatedLinkInput.closest('.tooltip-container');

generatedLinkInput.select();
generatedLinkInput.setSelectionRange(0, 99999);
document.querySelectorAll('[data-class="copy"]').forEach((element) => {
element.addEventListener('click', () => {
const tooltipContainer = element.closest('.tooltip-container');
let clipboardText;
if (element.dataset.copy) {
clipboardText = element.dataset.copy;
}
else if (element.value) {
element.select();
element.setSelectionRange(0, element.value.length);
clipboardText = element.value;
}
else if (element.textContent) {
clipboardText = element.textContent;
}
else {
return;
}

document.execCommand('copy');
document.execCommand('copy');

tooltipContainer.classList.add('active');
tooltipContainer.classList.add('active');

setTimeout(() => {
tooltipContainer.classList.remove('active');
}, 2000);
setTimeout(() => {
tooltipContainer.classList.remove('active');
}, 2000);
});
});



});
Binary file added mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions mstile-150x150.png:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=C:\Users\gpete\Downloads\favicon_package_v0.16.zip
80 changes: 80 additions & 0 deletions safari-pinned-tab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions safari-pinned-tab.svg:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=C:\Users\gpete\Downloads\favicon_package_v0.16.zip
19 changes: 19 additions & 0 deletions site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "Share Password Online",
"short_name": "Share Password Online",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#f6792b",
"background_color": "#f6792b",
"display": "standalone"
}
3 changes: 3 additions & 0 deletions site.webmanifest:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=C:\Users\gpete\Downloads\favicon_package_v0.16.zip

0 comments on commit 01aa93b

Please sign in to comment.