blob: 65d8d8c18acfcd4a5f90f7159b165c76fa5e8a4c [file] [log] [blame]
#
# Progressive Web Application 'Add to Home Screen' support
#
class Install < Vue
def render
_button.btn.btn_primary 'install', onClick: self.click
end
def click(event)
PageCache.installPrompt.prompt();
PageCache.installPrompt.userChoice.then do |choice|
console.log "install: #{choice.outcome}"
PageCache.installPrompt = nil if choice.outcome == 'accepted'
Main.refresh()
end
end
end