Skip to content

Commit

Permalink
frontend changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vicente6j committed Oct 28, 2023
1 parent e65fed2 commit c330a9a
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 38 deletions.
4 changes: 2 additions & 2 deletions client/src/Pages/Login/Login.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
}

.Mini {
font-size: 1.1em;
font-size: 1em;
font-weight: 500;
margin-bottom: 10px;
width: 100%;
Expand All @@ -127,7 +127,7 @@
padding: 0.5em;
padding-top: 0.4em;
border-radius: 10px;
transition: var(--animDuration) background ease;
transition: var(--animDuration)ß ease;
margin: 10px 0;
&:hover {
background: var(--hover);
Expand Down
8 changes: 4 additions & 4 deletions client/src/Pages/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Login: FC<LoginProps> = () => {
<div style={{ width: "100%", maxWidth: "500px" }}>
<form onSubmit={handleSubmit}>
<FlexColumn width="100%">
<div className={styles.Alert}>
{/* <div className={styles.Alert}>
Accepting new members for the Fall 2023 semester! After paying
the dues, your account will automatically be activated.
Make sure to use the email associated with your previous account
Expand All @@ -65,8 +65,8 @@ const Login: FC<LoginProps> = () => {
href="mailto:[email protected]">[email protected]
</a>.
Welcome to the DSGT Family 😄
</div>
<h1 className={styles.Major}>Login</h1>
</div> */}
<h1 className={styles.Major}>DSGT Login</h1>
<InputField
type="email"
placeholder="Email"
Expand Down Expand Up @@ -95,7 +95,7 @@ const Login: FC<LoginProps> = () => {
: ""
}`}
>
forgot password?
Forgot password?
</a>
</FlexRow>
</div>
Expand Down
3 changes: 2 additions & 1 deletion client/src/Pages/PortalAccount/PortalAccount.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
height: 100%;
width: 100%;
max-width: calc(100vw - 5.5em);
padding: 5em;
padding-left: 10em;
padding-top: 5em;
}

.Major {
Expand Down
3 changes: 2 additions & 1 deletion client/src/Pages/PortalAnnounce/PortalAnnounce.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
height: 100%;
width: 100%;
max-width: calc(100vw - 5.5em);
padding: 5em;
padding-left: 10em;
padding-top: 5em;
}

.Major {
Expand Down
2 changes: 2 additions & 0 deletions client/src/Pages/PortalCheckin/PortalCheckin.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.PortalCheckin {
padding-left: 10em;
padding-top: 5em;
}

.ScanVideo {
Expand Down
3 changes: 2 additions & 1 deletion client/src/Pages/PortalEvent/PortalEvent.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
height: 100%;
width: 100%;
max-width: calc(100vw - 5.5em);
padding: 5em;
padding-left: 10em;
padding-top: 5em;
}

.Major {
Expand Down
3 changes: 2 additions & 1 deletion client/src/Pages/PortalFeedback/PortalFeedback.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
height: 100%;
width: 100%;
max-width: calc(100vw - 5.5em);
padding: 5em;
padding-left: 10em;
padding-top: 5em;
}

.Major {
Expand Down
5 changes: 3 additions & 2 deletions client/src/Pages/PortalForms/PortalForms.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
position: relative;
height: 100%;
width: 100%;
max-width: calc(100vw - 5.5em);
padding: 5em;
max-width: calc(100vw - 10em);
padding-left: 10em;
padding-top: 5em;
}

.Major {
Expand Down
3 changes: 2 additions & 1 deletion client/src/Pages/PortalHome/PortalHome.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
width: 100%;
min-height: 100vh;
max-width: calc(100vw - 5.5em);
padding: 5em;
padding-left: 10em;
padding-top: 5em;
}

.Major {
Expand Down
1 change: 0 additions & 1 deletion client/src/Pages/PortalHome/PortalHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const PortalHome: FC<PortalHomeProps> = ({ role }: PortalHomeProps) => {

// get last 1-10 announcements and increment views as needed
const getAnnouncements = async (counts_as_view: boolean) => {
console.log(role || "guest");
await fetch(
`/api/announcement/get?count=10
&counts_as_view=${counts_as_view}
Expand Down
3 changes: 2 additions & 1 deletion client/src/Pages/PortalMembers/PortalMembers.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.PortalMembers {
display: block;
position: relative;
padding: 5em;
padding-left: 10em;
padding-top: 5em;
}

.MemberActions {
Expand Down
3 changes: 2 additions & 1 deletion client/src/Pages/PortalSettings/PortalSettings.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
position: relative;
width: 100%;
height: 200vh;
padding: 5em;
padding-left: 10em;
padding-top: 5em;
}

.Major {
Expand Down
2 changes: 2 additions & 0 deletions client/src/Pages/PortalTeams/PortalTeams.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.PortalTeams {
padding-left: 10em;
padding-top: 5em;
}

.DescriptionInput {
Expand Down
11 changes: 4 additions & 7 deletions client/src/components/InputField/InputField.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,10 @@
height: 52px;
width: auto;
margin: 1em 0;

> input {
// background: rgb(32 163 158);
// background: $fill;
// background: var(--foreground);
background: none;
// color: #fff;
color: var(--foreground);
background: rgb(32 163 158);
color: #fff;
border: 2px solid var(--borderColor);
font-size: 1.2em;
float: right;
Expand All @@ -136,7 +133,7 @@
width: 100%;
padding: 10px 20px;

border-radius: 500px;
border-radius: 10px;
transition: 0.3s all ease;
cursor: pointer;

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Sidebar/Sidebar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
}

.Open {
width: 20em;
width: 12em;
}
.Closed {
width: 5.5em;
Expand Down
16 changes: 9 additions & 7 deletions client/src/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import { Theme, ThemeContext } from "../../Context/ThemeContext";

import { compareUserRoles } from "../../Scripts/RoleManagement";

//import all icons
import right_arrow_icon from "../../assets/icons/angle-right.svg";

import home_icon from "../../assets/icons/home.svg";
import settings_icon from "../../assets/icons/settings.svg";
import teams_icon from "../../assets/icons/users-alt.svg";
Expand All @@ -19,16 +17,16 @@ import events_icon from "../../assets/icons/calendars.svg";
import forms_icon from "../../assets/icons/form.svg";
import feedback_icon from "../../assets/icons/comments-question.svg";
import checkin_icon from "../../assets/icons/calendar-check.svg";

import logout_icon from "../../assets/icons/sign-out-alt.svg";
import DSGT from "../../assets/branding/favicon-32x32.png";

interface SidebarProps {
role?: string;
}

const Sidebar: FC<SidebarProps> = ({ role }: SidebarProps) => {
const { theme, setTheme } = useContext(ThemeContext);
const [open, setOpen] = useState(false);
const [open, setOpen] = useState(true);

useEffect(() => {
let current_path = window.location.pathname;
Expand Down Expand Up @@ -59,8 +57,7 @@ const Sidebar: FC<SidebarProps> = ({ role }: SidebarProps) => {
let x = document.querySelector(`div[data-active=true]`);
x?.removeAttribute("data-active");
e.currentTarget.setAttribute("data-active", "true");
//close the sidebar
setOpen(false);
setOpen(true);

//old
//href
Expand Down Expand Up @@ -101,7 +98,12 @@ const Sidebar: FC<SidebarProps> = ({ role }: SidebarProps) => {
/>
</div>
<div className={styles.Header}>
<h1>DSGT</h1>
<h1 className={styles.HeaderMajor}>DSGT</h1>
{open ? (
<img src={DSGT} alt="DSGT-logo"/>
) : (
""
)}
</div>
<div className={styles.SidebarItems}>

Expand Down
7 changes: 0 additions & 7 deletions data/seeds/role_updates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ import { checkUserEmail } from "../../model";
export async function seed(knex: Knex): Promise<void> {
// Inserts seed entries
if (process.env.NODE_ENV == "development") {
// await knex("billing_details").insert({ email: "[email protected]" });
// if (await checkUserEmail("[email protected]")) {
// await knex("user")
// .update({ role: "developer" })
// .where({ email: "[email protected]" });
// }

// FACTORY RESET
// await knex("billing_details").del();
// await knex("user").del();
Expand Down

0 comments on commit c330a9a

Please sign in to comment.