diff --git a/src/main.tsx b/src/main.tsx index d8fc4c483..94bb685d5 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1769,7 +1769,12 @@ class ScreenWindowView extends React.Component<{screen : Screen}, {}> { @boundMethod copyShareLink() : void { - console.log("copy-share-link"); + let {screen} = this.props; + let shareLink = screen.getWebShareUrl(); + if (shareLink == null) { + return; + } + navigator.clipboard.writeText(shareLink); mobx.action(() => { this.shareCopied.set(true); })(); @@ -1831,7 +1836,14 @@ class ScreenWindowView extends React.Component<{screen : Screen}, {}> {
web shared
-
{screen.getWebShareUrl()}
+
+
+ copy link + + + +
+
0}> diff --git a/src/sh2.less b/src/sh2.less index c976cbb67..6bcba11e2 100644 --- a/src/sh2.less +++ b/src/sh2.less @@ -135,39 +135,28 @@ body::-webkit-scrollbar { color: #ccc; position: absolute; top: 0; - left: 0; + left: 40%; background-color: darken(rgb(0, 177, 10), 20%); padding: 2px 8px 2px 4px; z-index: 11; font-size: 12px; border-bottom-right-radius: 5px; opacity: 0.8; + display: flex; + flex-direction: column; .share-tag-link { + margin-top: 10px; display: none; } &:hover { opacity: 1.0; padding: 20px; + width: 150px; .share-tag-link { display: block; - a { - color: #ccc; - } - } - - .share-tag-link a:hover { - color: white; - } - - .share-tag-link i:hover { - color: white; - } - - .share-tag-link i { - cursor: pointer; } } }