File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
frontend/app/view/webview Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -431,6 +431,13 @@ export class WebViewModel implements ViewModel {
431
431
return true ;
432
432
}
433
433
434
+ copyUrlToClipboard ( ) {
435
+ const url = this . getUrl ( ) ;
436
+ if ( url != null && url != "" ) {
437
+ fireAndForget ( ( ) => navigator . clipboard . writeText ( url ) ) ;
438
+ }
439
+ }
440
+
434
441
keyDownHandler ( e : WaveKeyboardEvent ) : boolean {
435
442
if ( checkKeyPressed ( e , "Cmd:l" ) ) {
436
443
this . urlInputRef ?. current ?. focus ( ) ;
@@ -509,6 +516,10 @@ export class WebViewModel implements ViewModel {
509
516
510
517
const isNavHidden = globalStore . get ( this . hideNav ) ;
511
518
return [
519
+ {
520
+ label : "Copy URL to Clipboard" ,
521
+ click : ( ) => this . copyUrlToClipboard ( ) ,
522
+ } ,
512
523
{
513
524
label : "Set Block Homepage" ,
514
525
click : ( ) => fireAndForget ( ( ) => this . setHomepageUrl ( this . getUrl ( ) , "block" ) ) ,
You can’t perform that action at this time.
0 commit comments