-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into epic/DEV-6-events
- Loading branch information
Showing
25 changed files
with
579 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: autoupdate | ||
on: | ||
# This will trigger on all pushes to all branches. | ||
push: | ||
# Alternatively, you can only trigger if commits are pushed to certain branches, e.g.: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
autoupdate: | ||
name: autoupdate | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: docker://chinthakagodawita/autoupdate-action:v1 | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
PR_FILTER: "labelled" | ||
PR_LABELS: "epic" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import resolveURL from "./fetch"; | ||
import Cookies from "js-cookie"; | ||
|
||
const LOGIN_URL = resolveURL('/auth/login'); | ||
const LOGOUT_URL = resolveURL('/auth/logout'); | ||
const GET_CSRF_URL = resolveURL('/auth/csrf'); | ||
|
||
export const signIn = async (username: string, password: string) => { | ||
const csrfmiddlewaretoken = Cookies.get("csrftoken"); | ||
if (csrfmiddlewaretoken === undefined) throw new Error("No CSRF Token Present") | ||
return await fetch(LOGIN_URL, { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json' | ||
}, | ||
credentials: 'include', | ||
body: JSON.stringify({username, password, csrfmiddlewaretoken}), | ||
}); | ||
}; | ||
|
||
|
||
export const signOut = async (): Promise<Response> => { | ||
const csrfmiddlewaretoken = Cookies.get("csrftoken"); | ||
if (csrfmiddlewaretoken === undefined) throw new Error("No CSRF Token Present") | ||
const response = await fetch(LOGOUT_URL, { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json' | ||
}, | ||
credentials: 'include', | ||
body: JSON.stringify({ csrfmiddlewaretoken }) | ||
}); | ||
|
||
Cookies.remove("csrftoken") | ||
|
||
return response; | ||
}; | ||
|
||
export const getCSRF = async (): Promise<Response> => { | ||
return await fetch(GET_CSRF_URL, { | ||
method: "POST", | ||
credentials: "include", | ||
headers: { | ||
"Content-Type": "application/json" | ||
}, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
src/assets/css/authentication/MobileLoginContainer.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* MobileLoginContainer.module.css */ | ||
.container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; /* Example to fill the screen */ | ||
padding: 20px; /* Padding for smaller screens */ | ||
background: linear-gradient(180deg, #0C1747 0%, rgba(37, 60, 92, 0.62) 100%); | ||
border: 1px black solid; | ||
} | ||
|
||
|
||
|
||
/* For small mobile phones */ | ||
@media (max-width: 480px) { | ||
/* styles for screens smaller than 600px */ | ||
.loginForm { | ||
width: 100%; /* Full width on mobile */ | ||
min-width: 320px; /* But not too small */ | ||
padding: 20px; | ||
background-color: white; | ||
border-radius: 4px; | ||
/* Add more styling as needed */ | ||
} | ||
} | ||
|
||
/* For large mobile phones */ | ||
@media (min-width: 481px) and (max-width: 768px) { | ||
/* styles for screens smaller than 600px */ | ||
.loginForm { | ||
width: 100%; /* Full width on mobile */ | ||
padding: 20px; | ||
background-color: white; | ||
border-radius: 4px; | ||
/* Add more styling as needed */ | ||
} | ||
} | ||
|
||
/* For tablets */ | ||
@media (min-width: 768px) and (max-width: 1024px) { | ||
/* styles for screens between 601px and 1024px */ | ||
.loginForm { | ||
width: 100%; /* Full width on mobile */ | ||
padding: 20px; | ||
background-color: white; | ||
border-radius: 4px; | ||
/* Add more styling as needed */ | ||
} | ||
} | ||
|
22 changes: 22 additions & 0 deletions
22
src/assets/css/authentication/WebLoginContainer.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* WebLoginContainer.module.css */ | ||
.container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; /* Example to fill the screen */ | ||
background: linear-gradient(180deg, #0C1747 0%, rgba(37, 60, 92, 0.62) 100%); | ||
border: 1px black solid; | ||
} | ||
|
||
/* For desktops */ | ||
@media (min-width: 1025px) { | ||
/* styles for screens larger than 1024px */ | ||
} | ||
.loginForm { | ||
width: 100%; /* Full width on mobile */ | ||
max-width: 1280px; /* But not too wide */ | ||
padding: 20px; | ||
background-color: white; | ||
border-radius: 4px; | ||
/* Add more styling as needed */ | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import styles from '../../assets/css/authentication/MobileLoginContainer.module.css'; // Import mobile-specific CSS | ||
|
||
const MobileLoginContainer = () => { | ||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.loginForm}> | ||
{/* Your login form goes here */} | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default MobileLoginContainer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import styles from '../../assets/css/authentication/WebLoginContainer.module.css'; // Import web-specific CSS | ||
|
||
const WebLoginContainer = () => { | ||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.loginForm}> | ||
{/* Your login form goes here */} | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default WebLoginContainer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export const BREAKPOINTS = { | ||
XS: 0, | ||
SM: 576, | ||
MD: 768, | ||
LG: 992, | ||
XL: 1200, | ||
XXL: 1400 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.