Lightmode/Darkmode merge including many fixes since 2.0.2

This commit is contained in:
Frikky
2025-05-19 00:04:37 +02:00
parent 7bc246c003
commit a4ebf3e558
59 changed files with 5931 additions and 2961 deletions
+26 -23
View File
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from "react";
import React, { useState, useEffect, useContext } from "react";
import { useNavigate } from "react-router-dom";
import theme from '../theme.jsx';
import {getTheme} from '../theme.jsx';
import {
Grid,
Typography,
@@ -15,6 +15,7 @@ import {
//import { useAlert
import { ToastContainer, toast } from "react-toastify";
import "../codeeditor-index.css";
import { Context } from "../context/ContextApi.jsx";
import { FileCopy, Visibility, VisibilityOff } from "@mui/icons-material";
import IconButton from "@mui/material/IconButton";
@@ -40,6 +41,8 @@ const Settings = (props) => {
const [MFARequired, setMFARequired] = React.useState(false);
const [image2FA, setImage2FA] = React.useState("");
const [value2FA, setValue2FA] = React.useState("");
const {themeMode, supportEmail} = useContext(Context);
const theme = getTheme(themeMode);
// const [file, setFile] = React.useState("");
// const [fileBase64, setFileBase64] = React.useState(
@@ -83,7 +86,7 @@ const Settings = (props) => {
const boxStyle = {
flex: "1",
color: "white",
color: theme.palette.text.primary,
position: "relative",
marginLeft: "10px",
marginRight: "10px",
@@ -213,8 +216,8 @@ const Settings = (props) => {
left: "50%",
transform: "translate(-50%, -50%)",
zIndex: "9999",
backgroundColor: "#1a1a1a",
color: "white",
backgroundColor: theme.palette.backgroundColor,
color: theme.palette.text.primary,
padding: 20,
borderRadius: 5,
boxShadow: "0 0 10px rgba(0, 0, 0, 0.3)",
@@ -223,7 +226,7 @@ const Settings = (props) => {
};
const closeIconButtonStyling = {
color: "white",
color: theme.palette.text.primary,
border: "none",
backgroundColor: "transparent",
marginLeft: "90%",
@@ -243,7 +246,7 @@ const Settings = (props) => {
width: "100%",
fontSize: 16,
backgroundColor: disabled ? "gray" : "red",
color: "white",
color: theme.palette.text.primary,
cursor: disabled === false && "pointer",
};
const checkboxStyle = {
@@ -381,7 +384,7 @@ const Settings = (props) => {
className="ais-RefinementList-checkbox"
onClick={handleCheckBoxEvent}
/>
<label style={{ fontSize: "16px", color: "white" }}>
<label style={{ fontSize: "16px", color: theme.palette.text.primary }}>
I have read the above information and I agree to it completely
</label>
</div>
@@ -410,7 +413,7 @@ const Settings = (props) => {
endAdornment: (
<IconButton
onClick={handlePasswordVisibility}
style={{color:"white"}}
style={{color:theme.palette.text.primary}}
>
{showPassword ? <VisibilityOff /> : <Visibility />}
</IconButton>
@@ -704,7 +707,7 @@ const Settings = (props) => {
InputProps={{
style: {
height: "50px",
color: "white",
color: theme.palette.text.primary,
},
}}
color="primary"
@@ -732,7 +735,7 @@ const Settings = (props) => {
InputProps={{
style: {
height: "50px",
color: "white",
color: theme.palette.text.primary,
},
}}
color="primary"
@@ -757,7 +760,7 @@ const Settings = (props) => {
InputProps={{
style: {
height: "50px",
color: "white",
color: theme.palette.text.primary,
},
}}
color="primary"
@@ -788,7 +791,7 @@ const Settings = (props) => {
InputProps={{
style: {
height: "50px",
color: "white",
color: theme.palette.text.primary,
},
}}
color="primary"
@@ -806,7 +809,7 @@ const Settings = (props) => {
InputProps={{
style: {
height: "50px",
color: "white",
color: theme.palette.text.primary,
},
endAdornment: (
<>
@@ -857,7 +860,7 @@ const Settings = (props) => {
InputProps={{
style:{
height: "50px",
color: "white",
color: theme.palette.text.primary,
},
}}
color="primary"
@@ -877,7 +880,7 @@ const Settings = (props) => {
InputProps={{
style:{
height: "50px",
color: "white",
color: theme.palette.text.primary,
},
}}
color="primary"
@@ -899,7 +902,7 @@ const Settings = (props) => {
InputProps={{
style:{
height: "50px",
color: "white",
color: theme.palette.text.primary,
},
}}
color="primary"
@@ -919,7 +922,7 @@ const Settings = (props) => {
InputProps={{
style:{
height: "50px",
color: "white",
color: theme.palette.text.primary,
},
}}
color="primary"
@@ -954,7 +957,7 @@ const Settings = (props) => {
InputProps={{
style: {
height: "50px",
color: "white",
color: theme.palette.text.primary,
},
}}
color="primary"
@@ -979,7 +982,7 @@ const Settings = (props) => {
InputProps={{
style: {
height: "50px",
color: "white",
color: theme.palette.text.primary,
},
}}
color="primary"
@@ -1002,7 +1005,7 @@ const Settings = (props) => {
InputProps={{
style: {
height: "50px",
color: "white",
color: theme.palette.text.primary,
},
}}
color="primary"
@@ -1046,7 +1049,7 @@ const Settings = (props) => {
{isCloud ?
<span>
<Typography variant="body1" color="textSecondary">
By <a href="/creators" target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>joining the Creator Incentive Program</a> and connecting your Github account, you agree to our <a href="/docs/terms_of_service" target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>Terms of Service</a>, and acknowledge that your non-sensitive data will be turned into a <a target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}} href="https://shuffler.io/creators">creator account</a>. This enables you to earn a passive income from Shuffle. This IS reversible. Support: support@shuffler.io
By <a href="/creators" target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>joining the Creator Incentive Program</a> and connecting your Github account, you agree to our <a href="/docs/terms_of_service" target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>Terms of Service</a>, and acknowledge that your non-sensitive data will be turned into a <a target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}} href="https://shuffler.io/creators">creator account</a>. This enables you to earn a passive income from Shuffle. This IS reversible. Support: {supportEmail}
</Typography>
<Button
style={{ height: 40, marginTop: 10 }}
@@ -1133,7 +1136,7 @@ const Settings = (props) => {
height: "60px",
marginTop: "10px",
backgroundColor: "#d52b2b",
color: "white",
color: theme.palette.text.primary,
}}
// variant="contained"
// color="primary"