Skip to content

Commit febf422

Browse files
committed
header link more visible + copy link to clipboard
1 parent 1b8cf31 commit febf422

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

apps/sensenet/src/components/appbar/desktop-app-bar.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ const useStyles = makeStyles((theme: Theme) => {
3333
flex: 1,
3434
marginRight: '10px',
3535
},
36+
linkText: {
37+
marginRight: '2rem',
38+
fontSize: '18px',
39+
fontWeight: 500,
40+
fontFamily: 'Roboto,Helvetica,Arial,sans-serif',
41+
'&:hover': {
42+
cursor: 'pointer',
43+
},
44+
},
3645
})
3746
})
3847

@@ -42,6 +51,10 @@ export const DesktopAppBar: React.FunctionComponent<{ openDrawer?: () => void }>
4251
const globalClasses = useGlobalStyles()
4352
const repository = useRepository()
4453

54+
const copyAddress = () => {
55+
navigator.clipboard.writeText(repository.configuration.repositoryUrl)
56+
}
57+
4558
return (
4659
<AppBar position="sticky" className={clsx(globalClasses.centeredHorizontal, classes.appBar)}>
4760
<Toolbar className={classes.toolBar}>
@@ -57,7 +70,11 @@ export const DesktopAppBar: React.FunctionComponent<{ openDrawer?: () => void }>
5770
<Menu />
5871
</IconButton>
5972
) : null}
60-
<div style={{ marginRight: '2rem' }} data-test="sensenet-header">
73+
<div
74+
className={classes.linkText}
75+
data-test="sensenet-header"
76+
onClick={copyAddress}
77+
title="Copy to Clipboard ">
6178
{repository.configuration.repositoryUrl}
6279
</div>
6380
</div>

0 commit comments

Comments
 (0)