This commit is contained in:
0xa663
2024-02-15 20:14:23 +01:00
parent cf546a1b59
commit 735091c51d
8 changed files with 36794 additions and 776 deletions
+2 -1
View File
@@ -21,7 +21,8 @@ const ColorBox = styled.div`
height: 25px;
padding: 2px;
margin: 2px;
border: 1px solid black;
border: 2px solid black;
border-radius: 12px;
text-align: center;
font-weight: bolder;
`;
+5 -2
View File
@@ -10,6 +10,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Coordinates } from "../../coordinates";
import { TEXT_FORMATS } from "../importMural";
import saveAs from "file-saver";
import { Popup } from "./Popup";
const Margin = styled.div`
margin: 2px;
@@ -166,8 +167,10 @@ export class MuralView extends React.Component<Props, State> {
const blob = new Blob([JSON.stringify(rawMural)], { type: "application/json;charset=utf-8" });
saveAs(blob, `${rawMural.name}.${TEXT_FORMATS[0]}`);
};
onDelete = () => {
this.s.remove(this.props.mural);
onDelete = async () => {
if (await Popup.confirm(`Are you sure you want to remove "${this.props.mural.name}"`)) {
this.s.remove(this.props.mural);
}
};
onEnter = () => {
this.props.store.addPhantomOverlay(this.props.mural);