From 96dbbf8a6d55015ee215066111e1f91e4cb92407 Mon Sep 17 00:00:00 2001 From: Ayaka Date: Sun, 16 Oct 2022 21:25:03 +0000 Subject: [PATCH] some fixes --- public/index.html | 11 ++- public/static/js/main.12a1fd73.js | 9 ++ src/App.css | 10 ++- src/App.jsx | 23 ++++-- src/components/Info.jsx | 131 ++++++++++++++++++++++++++++++ src/components/Picker.jsx | 14 ++-- src/index.jsx | 2 +- 7 files changed, 182 insertions(+), 18 deletions(-) create mode 100644 public/static/js/main.12a1fd73.js create mode 100644 src/components/Info.jsx diff --git a/public/index.html b/public/index.html index 990a13b..b8ab063 100644 --- a/public/index.html +++ b/public/index.html @@ -9,7 +9,7 @@ - + Project Sekai Stickers @@ -22,6 +22,15 @@ + + + + + + diff --git a/public/static/js/main.12a1fd73.js b/public/static/js/main.12a1fd73.js new file mode 100644 index 0000000..307a83b --- /dev/null +++ b/public/static/js/main.12a1fd73.js @@ -0,0 +1,9 @@ +//remove service worker and reload page +if ("serviceWorker" in navigator) { + navigator.serviceWorker.getRegistrations().then(function (registrations) { + for (let registration of registrations) { + registration.unregister(); + } + window.location.reload(); + }); +} diff --git a/src/App.css b/src/App.css index b0e35fd..acd0439 100644 --- a/src/App.css +++ b/src/App.css @@ -25,10 +25,14 @@ .horizontal { width: 296px; - margin-left: -30px; + /* margin-left: -30px; */ } +.slider-horizontal { + margin-left: -30px; +} + .settings { color: white; font-family: "YurukaStd"; @@ -87,7 +91,7 @@ flex-direction: column; } -.footer > a { +/* .footer > a { color: rgb(199, 199, 199); text-decoration: none; margin-bottom: 0.5rem; @@ -95,7 +99,7 @@ .footer > a:hover { color: rgb(255, 255, 255); -} +} */ ::-webkit-scrollbar { width: 0.5rem; diff --git a/src/App.jsx b/src/App.jsx index 7ac4c32..dc26ef9 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -7,6 +7,7 @@ import TextField from "@mui/material/TextField"; import Button from "@mui/material/Button"; import Switch from "@mui/material/Switch"; import Picker from "./components/Picker"; +import Info from "./components/Info"; const { ClipboardItem } = window; @@ -22,6 +23,16 @@ function App() { } }, []); + const [infoOpen, setInfoOpen] = useState(false); + + const handleClickOpen = () => { + setInfoOpen(true); + }; + + const handleClose = () => { + setInfoOpen(false); + }; + const [character, setCharacter] = useState(49); const [text, setText] = useState(characters[character].defaultText.text); const [position, setPosition] = useState({ @@ -144,6 +155,7 @@ function App() { return (
+
@@ -167,6 +179,7 @@ function App() {
setPosition({ ...position, x: v })} min={0} @@ -249,13 +262,9 @@ function App() {
- - GitHub - - {/*powered by vercel */} - - powered by vercel - +
diff --git a/src/components/Info.jsx b/src/components/Info.jsx new file mode 100644 index 0000000..d2c172d --- /dev/null +++ b/src/components/Info.jsx @@ -0,0 +1,131 @@ +import Button from "@mui/material/Button"; +import Dialog from "@mui/material/Dialog"; +import DialogActions from "@mui/material/DialogActions"; +import DialogContent from "@mui/material/DialogContent"; +import DialogContentText from "@mui/material/DialogContentText"; +import DialogTitle from "@mui/material/DialogTitle"; +import List from "@mui/material/List"; +import ListItem from "@mui/material/ListItem"; +import ListItemText from "@mui/material/ListItemText"; +import ListItemAvatar from "@mui/material/ListItemAvatar"; +import Avatar from "@mui/material/Avatar"; +import Typography from "@mui/material/Typography"; + +export default function Info({ open, handleClose }) { + return ( +
+ + Info + + + + This tool made possible by: + + + + (window.location.href = "https://github.com/theoriginalayaka") + } + > + + + + + + + (window.location.href = "https://github.com/modder4869") + } + > + + + + + + + (window.location.href = + "https://www.reddit.com/r/ProjectSekai/comments/x1h4v1/after_an_ungodly_amount_of_time_i_finally_made/") + } + > + + + + + + + (window.location.href = + "https://github.com/TheOriginalAyaka/sekai-stickers/graphs/contributors") + } + > + + + + + + + + You can find the source code or contribute here: + + + + (window.location.href = + "https://github.com/TheOriginalAyaka/sekai-stickers") + } + > + + + + + + + + + + + + +
+ ); +} diff --git a/src/components/Picker.jsx b/src/components/Picker.jsx index 4d024c8..78c9db6 100644 --- a/src/components/Picker.jsx +++ b/src/components/Picker.jsx @@ -28,9 +28,11 @@ export default function Picker({ setCharacter }) { const memoizedImageListItems = useMemo(() => { const s = search.toLowerCase(); return characters.map((c, index) => { - if (s === c.id || + if ( + s === c.id || c.name.toLowerCase().includes(s) || - c.character.toLowerCase().includes(s)) { + c.character.toLowerCase().includes(s) + ) { return ( - ) + ); } return null; - }) - }, [search, setCharacter]) + }); + }, [search, setCharacter]); return (
@@ -84,7 +86,7 @@ export default function Picker({ setCharacter }) { >