From 60692c337b820f89414953addff956f5c1049c63 Mon Sep 17 00:00:00 2001 From: Sebastian Hallum Clarke Date: Sat, 18 Apr 2020 13:28:29 -0700 Subject: [PATCH] Add donation prompt --- Source/scripts/renderer.js | 5 +++++ Source/strings/en.json | 5 +++-- Source/styles/style.css | 29 +++++++++++++++++++++++++++++ Source/views/index.html | 4 ++++ 4 files changed, 41 insertions(+), 2 deletions(-) diff --git a/Source/scripts/renderer.js b/Source/scripts/renderer.js index bcb91d1..0bd13e4 100644 --- a/Source/scripts/renderer.js +++ b/Source/scripts/renderer.js @@ -34,6 +34,7 @@ document.addEventListener('DOMContentLoaded', function () { $('#sync-button').click(syncStartHandler) $('.folder-chooser').click(chooseFolderClickHandler) manageDragAndDrop() + $('#footerBar').click(footerBarClickHandler) }) const syncStartHandler = function () { @@ -158,6 +159,10 @@ const manageDragAndDrop = function () { }) } +const footerBarClickHandler = async () => { + await shell.openExternal('https://www.sebthedev.com/donate') +} + ipcRenderer.on('darkModeStatus', function (event, data) { if (data && 'shouldUseDarkColors' in data) { if (data.shouldUseDarkColors) { diff --git a/Source/strings/en.json b/Source/strings/en.json index 2d06aab..f76dcdb 100644 --- a/Source/strings/en.json +++ b/Source/strings/en.json @@ -11,7 +11,7 @@ "sync-complete-message": "$0 succesfully synced with $1", "sync-complete-detail": "MacDropAny succesfully synced $0 with $1. Any changes to $2 will now automatically be reflected in $3.", "sync-complete-button-show-folder": "Show $0 in $1", - "close": "", + "close": "Close", "Edit": "Edit", "Undo": "Undo", "Redo": "Redo", @@ -60,5 +60,6 @@ "target-folder-not-defined": "The target folder has not been set", "source-and-target-are-same": "The source folder and target folder are the same", "source-folder-contains-target-folder": "The target folder is inside the source folder", - "item-already-exists-in-target-with-same-name-as-source-folder": "A file or folder already exists inside the target folder with the same name as the source folder" + "item-already-exists-in-target-with-same-name-as-source-folder": "A file or folder already exists inside the target folder with the same name as the source folder", + "donation-prompt": "If you like MacDropAny, please consider making a donation to the developer." } diff --git a/Source/styles/style.css b/Source/styles/style.css index 6d8446b..b71abda 100644 --- a/Source/styles/style.css +++ b/Source/styles/style.css @@ -69,6 +69,35 @@ body.dark-mode margin: 0; } +#footerBar +{ + position: absolute; + bottom: 0; + + display: flex; + align-items: center; + justify-content: center; + + width: 100%; + + cursor: pointer; + transition: opacity .3s; + + opacity: 50%; + color: #fff; + background-color: #2460a7; +} + +#footerBar:hover +{ + opacity: 100%; +} + + +#footerBar p +{ + margin: 5px; +} /* Step Container Styling */ .step-container { diff --git a/Source/views/index.html b/Source/views/index.html index 6be86d7..8171ed9 100644 --- a/Source/views/index.html +++ b/Source/views/index.html @@ -73,5 +73,9 @@
+ +
+

+
\ No newline at end of file