mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Better error message when clipboard is not available
This commit is contained in:
parent
34375f5891
commit
4bf48d8d99
@ -78,6 +78,10 @@ class ReadUI:
|
||||
ui_operations.open_url = def(url):
|
||||
window.open(url, '_blank')
|
||||
ui_operations.copy_selection = def(text):
|
||||
if not window.navigator.clipboard:
|
||||
return error_dialog(_('No clipboard access'), _(
|
||||
'Your browser requires you to access the Content server over an HTTPS connection'
|
||||
' to be able to copy to clipboard.'))
|
||||
window.navigator.clipboard.writeText(text or '').then(def (): pass;, def():
|
||||
error_dialog(_('Could not copy to clipboard'), _('No permission to write to clipboard'))
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user