Implement vote sending to backend. Have trackdetails spit out a msotly complete audiotrack for voting. Fix voting to actually modify list. Fix js code to not break on songs with apostrophes.

This commit is contained in:
Kevin Whitaker
2017-02-19 10:31:52 -05:00
parent 1b82d58c5e
commit 161e408a47
6 changed files with 54 additions and 5 deletions

View File

@@ -112,5 +112,5 @@ void WebInterface::voteTracksUpdatedFromServer(std::list<AudioTrack> voteableTra
std::string WebInterface::getNotificationJs(std::string notificationText)
{
return std::string("function notifyMe(a,b){var c='")+notificationText+std::string("';if('Notification'in window)if('granted'===Notification.permission){new Notification(c)}else'denied'!==Notification.permission&&Notification.requestPermission(function(a){if('granted'===a){new Notification(c)}});else;}");
return std::string("function notifyMe(a,b){var c=\"")+notificationText+std::string("\";if('Notification'in window)if('granted'===Notification.permission){new Notification(c)}else'denied'!==Notification.permission&&Notification.requestPermission(function(a){if('granted'===a){new Notification(c)}});else;}");
}