chore(app): better ux for settings actions
This commit is contained in:
@@ -18,6 +18,13 @@
|
|||||||
"sizes": "512x512"
|
"sizes": "512x512"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"permissions": [
|
||||||
|
"http://*/*",
|
||||||
|
"https://*/*",
|
||||||
|
"clipboardRead",
|
||||||
|
"clipboardWrite",
|
||||||
|
"storage"
|
||||||
|
],
|
||||||
"start_url": ".",
|
"start_url": ".",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"theme_color": "#35313D",
|
"theme_color": "#35313D",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.action-button {
|
button.action-button {
|
||||||
background-color: rgba(255, 255, 255, 0.05);
|
background-color: rgba(255, 255, 255, 0.05);
|
||||||
color: white;
|
color: white;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
@@ -6,6 +6,14 @@
|
|||||||
cursor: pointer;
|
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) {
|
@media screen and (max-width: 558px) {
|
||||||
.action-button {
|
.action-button {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -20,10 +20,14 @@ const SettingsActions: React.FC = () => {
|
|||||||
["size", size.toString()],
|
["size", size.toString()],
|
||||||
["color", color.replace("#", "")],
|
["color", color.replace("#", "")],
|
||||||
]).toString();
|
]).toString();
|
||||||
void navigator.clipboard?.writeText(
|
void navigator.clipboard
|
||||||
`${window.location.host}?${paramString}`
|
?.writeText(`${window.location.host}?${paramString}`)
|
||||||
);
|
.then(() => {
|
||||||
setCopied(true);
|
setCopied(true);
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
alert("Clipboard permissions must be enabled to copy links!");
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -58,5 +58,6 @@ export default () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, []);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user