Skip to content

Commit

Permalink
feat: move download button and improve message
Browse files Browse the repository at this point in the history
  • Loading branch information
alexclifton4 committed Dec 15, 2024
1 parent f2b16df commit e170860
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion public/diary.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ window.deleteEntry = function() {

// Menu bar option to download data
window.downloadData = function() {
if (confirm("Download all data?")) {
if (confirm("Download all data? Note: This needs to be done from a laptop")) {
// Format data
let data = "diary,date,country,place,notes\n"
diaryEntries.forEach(entry => {
Expand Down
9 changes: 6 additions & 3 deletions views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@
<li class="nav-item">
<a class="nav-link" href="#" onclick="showStats(); return false">Stats</a>
</li>
<li>
<a class="nav-link" href="#" onclick="downloadData()"; return false">Download</a>
</li>
</ul>
</div>
</nav>
Expand Down Expand Up @@ -105,6 +102,12 @@ <h5>Diaries</h5>
<button type="button" class="btn btn-danger" onclick="clearFilters()">Clear Filters</button>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm">
<button type="button" class="btn btn-success" onclick="downloadData()">Download data to Excel</button>
</div>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit e170860

Please sign in to comment.