Skip to content

Commit

Permalink
preview styling
Browse files Browse the repository at this point in the history
  • Loading branch information
dendidibe committed Jul 24, 2023
1 parent 5f9716e commit dd9292f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 42 deletions.
14 changes: 6 additions & 8 deletions client-web/src/components/AppBuilder/AppMock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import defaultLoginBackground from "../../assets/images/login_background.png";
import defaultCoinPath from "../../assets/images/coin.png";
import profilePic from "../../assets/images/profilepic.png";
import { isValidHexCode } from "../../utils";
import { Box } from "@mui/material";

export default function AppMock(props: TCustomDetails) {
const {
Expand Down Expand Up @@ -258,15 +259,11 @@ export default function AppMock(props: TCustomDetails) {
};

return (
<div
style={{
// width: "50%",
<Box
sx={{
display: "flex",
flexDirection: "row",
justifyContent: "space-evenly",
// alignItems: "center",
// backgroundColor: "#EDEDED",
// background: "linear-gradient(45deg, #ffffff, #e6e6e6)",
transform: 'translateX(60px)'
}}
>
<div
Expand All @@ -275,6 +272,7 @@ export default function AppMock(props: TCustomDetails) {
display: "flex",
alignItems: "flex-start",
height: "100%",
marginLeft: 'auto'
}}
>
<MobileOutline screenIndex={0} />
Expand All @@ -287,6 +285,6 @@ export default function AppMock(props: TCustomDetails) {
>
<MobileOutline screenIndex={1} />
</div>
</div>
</Box>
);
}
68 changes: 34 additions & 34 deletions client-web/src/pages/AppBuilder/AppBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ export default function AppBuilder() {
const res = await httpWithAuth().post("apps/check-domain-name", {
domainName,
});
// console.log(res);
// setDomain(`${domainName}`);
setDomainNameError(false);
} catch (error) {
console.log(error);
Expand Down Expand Up @@ -220,7 +218,7 @@ export default function AppBuilder() {
try {
const res = await updateAppSettings(appId, data);
updateApp(res.data.result);
showSnackbar('success', 'Your app is ready to use')
showSnackbar("success", "Your app is ready to use");
} catch (error) {
showSnackbar("error", "Cannot save settings");
console.log({ error });
Expand Down Expand Up @@ -381,9 +379,6 @@ export default function AppBuilder() {
variant="outlined"
value={coinName}
onChange={(e) => setCoinName(e.target.value)}
// helperText={
// "Name of your internal coin used for gamification and token economy. Leave “Coin” if unsure."
// }
/>
<Tooltip title="Name of your internal coin used for gamification and token economy. Leave “Coin” if unsure.">
<InfoIcon
Expand All @@ -393,21 +388,10 @@ export default function AppBuilder() {
top: "50%",
transform: "translateY(-50%)",
}}
color="primary"
/>
</Tooltip>
</Box>
{/* <Box sx={{ gridColumn: "1/3" }}>
<TextField
fullWidth
margin="dense"
label="Coin symbol (3-4 letters)"
name="coinSymbol"
variant="outlined"
value={coinSymbol}
onChange={(e) => setCoinSymbol(e.target.value)}
/>
</Box> */}

<Box sx={{ mb: 2, mt: 1, position: "relative" }}>
<input
onChange={handleLogoChange}
Expand Down Expand Up @@ -503,7 +487,6 @@ export default function AppBuilder() {
top: 15,
transform: "translateY(-50%)",
}}
color="primary"
/>
</Tooltip>
</Box>
Expand Down Expand Up @@ -531,7 +514,7 @@ export default function AppBuilder() {
<TextField
margin="dense"
fullWidth
sx={{margin: 0,}}
sx={{ margin: 0 }}
label="Bundle ID"
name="bundleId"
variant="outlined"
Expand Down Expand Up @@ -573,7 +556,6 @@ export default function AppBuilder() {
onClick={prepareRnBuild}
sx={{ width: 300, height: 50 }}
variant="outlined"

startIcon={<DownloadIcon />}
>
{buildStage === "preparing" ? "Preparing" : "Prepare"} React
Expand Down Expand Up @@ -634,7 +616,6 @@ export default function AppBuilder() {
<Button
onClick={openAppDomain}
variant="outlined"

startIcon={<OpenInNewIcon />}
>
Open the Web App
Expand All @@ -653,18 +634,37 @@ export default function AppBuilder() {
</LoadingButton>
</Box>
</Box>

<AppMock
primaryColor={primaryColor}
secondaryColor={secondaryColor}
logo={logo.url}
loginScreenBackground={loginScreenBackground.value}
coinLogo={coinLogo.url}
coinSymbol={coinSymbol}
coinName={coinName}
currentScreenIndex={currentScreenIndex}
changeScreen={setCurrentScreenIndex}
/>
<fieldset
style={{
border: "1px solid rgba(0,0,0,0.3)",
borderRadius: 10,
height: "100%",
padding: 20,
display: "flex",
justifyContent: "center",
alignItems: "center",
}}
>
<legend>
<Chip
variant="filled"
color={"primary"}
sx={{ fontWeight: "bold" }}
label={"Mobile App Preview"}
/>
</legend>
<AppMock
primaryColor={primaryColor}
secondaryColor={secondaryColor}
logo={logo.url}
loginScreenBackground={loginScreenBackground.value}
coinLogo={coinLogo.url}
coinSymbol={coinSymbol}
coinName={coinName}
currentScreenIndex={currentScreenIndex}
changeScreen={setCurrentScreenIndex}
/>
</fieldset>
</Box>
</main>
);
Expand Down

0 comments on commit dd9292f

Please sign in to comment.