Skip to content

Commit 93b462c

Browse files
committed
save before merge with dev
1 parent 397aa02 commit 93b462c

File tree

5 files changed

+49
-6
lines changed

5 files changed

+49
-6
lines changed

app/src/components/login/SignIn.tsx

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const SignIn: React.FC<LoginInt & RouteComponentProps> = props => {
225225
>
226226
{isDarkMode ? `Light Mode`: `Dark Mode`}
227227
</Button>
228-
<Avatar className={classes.avatar}>
228+
<Avatar className={classes.avatar} sx={{marginTop: '10vh'}}>
229229
<LockOutlinedIcon />
230230
</Avatar>
231231
<Typography component="h1" variant="h5" color="textPrimary">
@@ -271,8 +271,16 @@ const SignIn: React.FC<LoginInt & RouteComponentProps> = props => {
271271
color="primary"
272272
className={classes.submit}
273273
onClick={e => handleLogin(e)}
274+
sx={{
275+
marginBottom: '5px',
276+
marginTop:'20px',
277+
}}
274278
>
275279
Sign In
280+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-check" viewBox="0 0 16 16" style={{marginLeft: '5px'}}>
281+
<path d="M12.5 16a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm1.679-4.493-1.335 2.226a.75.75 0 0 1-1.174.144l-.774-.773a.5.5 0 0 1 .708-.708l.547.548 1.17-1.951a.5.5 0 1 1 .858.514ZM11 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM8 7a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"/>
282+
<path d="M8.256 14a4.474 4.474 0 0 1-.229-1.004H3c.001-.246.154-.986.832-1.664C4.484 10.68 5.711 10 8 10c.26 0 .507.009.74.025.226-.341.496-.65.804-.918C9.077 9.038 8.564 9 8 9c-5 0-6 3-6 4s1 1 1 1h5.256Z"/>
283+
</svg>
276284
</Button>
277285
<Button
278286
fullWidth
@@ -281,8 +289,14 @@ const SignIn: React.FC<LoginInt & RouteComponentProps> = props => {
281289
color="primary"
282290
className={classes.submit}
283291
onClick={e => handleGithubLogin(e)}
292+
sx={{
293+
marginBottom: '5px'
294+
}}
284295
>
285296
Sign In With Github
297+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-github" viewBox="0 0 16 16" style={{marginLeft: '5px'}}>
298+
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"/>
299+
</svg>
286300
</Button>
287301
<Button
288302
fullWidth
@@ -293,17 +307,30 @@ const SignIn: React.FC<LoginInt & RouteComponentProps> = props => {
293307
e.preventDefault();
294308
window.location.assign('http://localhost:5656/auth/google');
295309
}}
310+
sx={{
311+
marginBottom: '5px'
312+
}}
296313
>
297314
Sign in With Google
315+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-google" viewBox="0 0 16 16" style={{marginLeft: '5px'}}>
316+
<path d="M15.545 6.558a9.42 9.42 0 0 1 .139 1.626c0 2.434-.87 4.492-2.384 5.885h.002C11.978 15.292 10.158 16 8 16A8 8 0 1 1 8 0a7.689 7.689 0 0 1 5.352 2.082l-2.284 2.284A4.347 4.347 0 0 0 8 3.166c-2.087 0-3.86 1.408-4.492 3.304a4.792 4.792 0 0 0 0 3.063h.003c.635 1.893 2.405 3.301 4.492 3.301 1.078 0 2.004-.276 2.722-.764h-.003a3.702 3.702 0 0 0 1.599-2.431H8v-3.08h7.545z"/>
317+
</svg>
298318
</Button>
299319
<Button
300320
fullWidth
301321
variant="contained"
302322
color="primary"
303323
className={classes.submit}
304324
onClick={e => handleLoginGuest(e)}
325+
sx={{
326+
marginBottom: '5px'
327+
}}
305328
>
306329
Continue as Guest
330+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-circle" viewBox="0 0 16 16" style={{marginLeft: '5px'}}>
331+
<path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/>
332+
<path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"/>
333+
</svg>
307334
</Button>
308335
<Grid container>
309336
<Grid item xs>

app/src/components/login/SignUp.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@ const SignUp: React.FC<LoginInt & RouteComponentProps> = props => {
227227
>
228228
{`Dark Mode: ${isDarkMode}`}
229229
</Button>
230-
<Avatar className={classes.avatar}>
230+
<Avatar className={classes.avatar} sx={{marginTop: '10vh'}}>
231231
<AssignmentIcon />
232232
</Avatar>
233-
<Typography component="h1" variant="h5" color="textPrimary">
233+
<Typography component="h1" variant="h5" color="textPrimary" sx={{marginBottom: '10px'}}>
234234
Sign up
235235
</Typography>
236236
<form className={classes.form} noValidate>
@@ -310,8 +310,16 @@ const SignUp: React.FC<LoginInt & RouteComponentProps> = props => {
310310
color="primary"
311311
className={classes.submit}
312312
onClick={e => handleSignUp(e)}
313+
sx={{
314+
marginTop: '15px',
315+
marginBottom: '5px'
316+
}}
313317
>
314318
Sign Up
319+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-add" viewBox="0 0 16 16" style={{marginLeft: '5px'}}>
320+
<path d="M12.5 16a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm.5-5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0Zm-2-6a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM8 7a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"/>
321+
<path d="M8.256 14a4.474 4.474 0 0 1-.229-1.004H3c.001-.246.154-.986.832-1.664C4.484 10.68 5.711 10 8 10c.26 0 .507.009.74.025.226-.341.496-.65.804-.918C9.077 9.038 8.564 9 8 9c-5 0-6 3-6 4s1 1 1 1h5.256Z"/>
322+
</svg>
315323
</Button>
316324
<Grid container justifyContent="flex-end">
317325
<Grid item>

app/src/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const PrivateRoute = ({ component: Component, ...rest }) => (
5757
// websocket front end starts here
5858
import { io } from 'socket.io-client'
5959
import { toggleDarkMode } from './redux/reducers/slice/darkModeSlice'
60+
import { cooperative } from './redux/reducers/slice/appStateSlice.ts'
6061

6162
const socket = io('http://localhost:5656', {
6263
transports: ['websocket']
@@ -89,6 +90,10 @@ socket.on('receive message', (event) => {
8990
console.log('stores do not match')
9091
if (currentStore.darkMode.isDarkMode!==event.darkMode.isDarkMode){
9192
store.dispatch(toggleDarkMode())
93+
}
94+
if (currentStore.appState!==event.appState){
95+
console.log(event.appState)
96+
store.dispatch()
9297
}
9398
}
9499
console.log('updated user Store from another user: ', store.getState())

app/src/public/styles/style.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,5 +661,4 @@ a.nav_link:hover {
661661
display: flex;
662662
flex-direction: column;
663663
align-items: center;
664-
}
665-
664+
}

app/src/redux/reducers/slice/appStateSlice.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,14 +1286,18 @@ const appStateSlice = createSlice({
12861286
},
12871287
snapShotAction: (state, action) => {
12881288
state.components[action.payload.focusIndex].past.push(action.payload.deepCopiedState.components[action.payload.focusIndex].children);
1289+
},
1290+
cooperative: (state, action) => {
1291+
console.log(action.payload);
1292+
return {...action.payload};
12891293
}
12901294
}
12911295
});
12921296

12931297
// Exports the action creator function to be used with useDispatch
12941298

12951299

1296-
export const { addComponent, addChild, changeFocus, changeTailwind, changePosition, updateStateUsed, resetAllState, updateUseContext, updateCss, updateEvents, deleteEventAction, deletePage, deleteReusableComponent, setProjectName, changeProjectType, resetState, updateProjectName, deleteElement, updateAttributes, deleteChild, setInitialState, openProject, addElement, undo, redo, addState, addPassedInProps, deletePassedInProps, deleteState, toggleLoggedIn, configToggle, snapShotAction } = appStateSlice.actions;
1300+
export const { addComponent, addChild, changeFocus, changeTailwind, changePosition, updateStateUsed, resetAllState, updateUseContext, updateCss, updateEvents, deleteEventAction, deletePage, deleteReusableComponent, setProjectName, changeProjectType, resetState, updateProjectName, deleteElement, updateAttributes, deleteChild, setInitialState, openProject, addElement, undo, redo, addState, addPassedInProps, deletePassedInProps, deleteState, toggleLoggedIn, configToggle, snapShotAction, cooperative } = appStateSlice.actions;
12971301

12981302

12991303
// Exports so we can combine in rootReducer

0 commit comments

Comments
 (0)