Skip to content

Commit

Permalink
Add donation prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Hallum Clarke committed Apr 18, 2020
1 parent 0d84218 commit 60692c3
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Source/scripts/renderer.js
Expand Up @@ -34,6 +34,7 @@ document.addEventListener('DOMContentLoaded', function () {
$('#sync-button').click(syncStartHandler)
$('.folder-chooser').click(chooseFolderClickHandler)
manageDragAndDrop()
$('#footerBar').click(footerBarClickHandler)
})

const syncStartHandler = function () {
Expand Down Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions Source/strings/en.json
Expand Up @@ -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",
Expand Down Expand Up @@ -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."
}
29 changes: 29 additions & 0 deletions Source/styles/style.css
Expand Up @@ -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
{
Expand Down
4 changes: 4 additions & 0 deletions Source/views/index.html
Expand Up @@ -73,5 +73,9 @@ <h6 class="text-center font-weight-bold" data-string="sync-your-folder-title"></
</div>
</div>
</div>

<div id="footerBar">
<p data-string="donation-prompt"></p>
</div>
</body>
</html>

0 comments on commit 60692c3

Please sign in to comment.