Skip to content

Commit

Permalink
some tweaks to push notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Sep 18, 2024
1 parent e28b6c3 commit 42c1b90
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions auctions/templates/view_lot_images.html
Original file line number Diff line number Diff line change
Expand Up @@ -482,13 +482,21 @@ <h5>Exchange info</h5>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="notification-help-label">How's this work?</h5>
<h5 class="modal-title" id="notification-help-label">Do you fall asleep during auctions?</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
You can get a notification on your phone lots you've watched go up for bidding.<br><br>
Note that this will only work if the person running this auction enters the lot number when bidding starts -- Some clubs enter the lot number only after bidding has ended, in which case you'll get a notification only after the lot has sold.<br><br>
You don't need to have auction.fish open to see the notification, it'll come up automatically!
Get a notification on your phone when lots you've watched go up for bidding.<br><br>
<small class='text-muted'>This will only work if the person running this auction enters the lot number when bidding starts! Some clubs enter the lot number only after bidding has ended, in which case you'll get a useless notification after the lot has sold. Complain to the person running your auction if this happens!<br><br></small>
Some tips:
<ul>
<li>Make sure notifications are enabled on your phone; check any lot you're watching and it will tell you if you will get a notification or not</li>
<li>Set your phone to vibrate, so you can still feel it, but it doesn't disturb others</li>
<li>You don't need to have auction.fish open to see the notification, it'll come up automatically!</li>
<li>This feature is considered experimental -- please <a href="https://github.com/iragm/fishauctions/issues/227">leave a comment here if you love or hate this feature</a> </li>
</ul>
<br><br>

</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">OK</button>
Expand Down
2 changes: 1 addition & 1 deletion auctions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2986,7 +2986,7 @@ def get_context_data(self, **kwargs):
"head": lot.lot_name + " is about to be sold",
"body": f"Lot {lot.custom_lot_number} Don't miss out, bid now! You're getting this notification because you watched this lot.",
"url": "https://" + lot.full_lot_link,
"tag": "lot_sell_notification",
"tag": f"lot_sell_notification_{lot.pk}",
}
if lot.thumbnail:
payload["icon"] = lot.thumbnail.image.url
Expand Down

0 comments on commit 42c1b90

Please sign in to comment.