update position of webshare and webshare-copy link

This commit is contained in:
sawka 2023-03-31 21:01:29 -07:00
parent 0a4de40e34
commit 10da862942
2 changed files with 19 additions and 18 deletions

View File

@ -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}, {}> {
<div className="copied-indicator"/>
</If>
<div><i title="archived" className="fa-sharp fa-solid fa-share-nodes"/> web shared</div>
<div className="share-tag-link"><a target="_blank" href={makeExternLink(screen.getWebShareUrl())}>{screen.getWebShareUrl()}</a> <i onClick={this.copyShareLink} title="copy link" className="fa-sharp fa-solid fa-copy"/></div>
<div className="share-tag-link">
<div className="button is-prompt-green is-outlined is-small" onClick={this.copyShareLink}>
<span>copy link</span>
<span className="icon">
<i className="fa-sharp fa-solid fa-copy"/>
</span>
</div>
</div>
</div>
</If>
<If condition={lines.length > 0}>

View File

@ -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;
}
}
}