chore(app): better ux for settings actions

This commit is contained in:
rektdeckard
2021-11-29 21:14:17 -05:00
parent 14d8c9d0e7
commit e4b99d2ca9
4 changed files with 25 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
.action-button {
button.action-button {
background-color: rgba(255, 255, 255, 0.05);
color: white;
padding: 8px;
@@ -6,6 +6,14 @@
cursor: pointer;
}
button.action-button:hover {
background-color: rgba(255, 255, 255, 0.1);
}
button.action-button:active {
background-color: rgba(255, 255, 255, 0.2);
}
@media screen and (max-width: 558px) {
.action-button {
display: none;

View File

@@ -20,10 +20,14 @@ const SettingsActions: React.FC = () => {
["size", size.toString()],
["color", color.replace("#", "")],
]).toString();
void navigator.clipboard?.writeText(
`${window.location.host}?${paramString}`
);
setCopied(true);
void navigator.clipboard
?.writeText(`${window.location.host}?${paramString}`)
.then(() => {
setCopied(true);
})
.catch(() => {
alert("Clipboard permissions must be enabled to copy links!");
});
};
return (

View File

@@ -58,5 +58,6 @@ export default () => {
}
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
};