67 |
CHANNEL SETTING
68 |
69 |
72 |
79 |
80 |
84 | You changed the privacy setting
85 |
86 |
87 |
90 |
97 |
98 |
99 | handleString(e.target.value, setNewPass)}
103 | className="password"
104 | placeholder="new channel password"
105 | />
106 |
107 |
116 | You changed the password setting
117 |
118 |
119 |
120 | UPDATE
121 |
122 |
123 | );
124 | }
125 |
--------------------------------------------------------------------------------
/front/src/routes/chat_modes/roomStatus.css:
--------------------------------------------------------------------------------
1 | .chat-status-zone {
2 | background-color: #252a2a;
3 | width: 250px;
4 | display: flex;
5 | flex-direction: column;
6 | height: 100%;
7 | padding-bottom: 20px;
8 | box-shadow: 0px 0px 96px 0px rgb(0 0 0 / 18%);
9 | }
10 |
11 | .status-top {
12 | background-color: #191e1e;
13 | height: 60px;
14 | }
15 |
16 | .add-box
17 | {
18 | display: flex;
19 | padding-left: 5px;
20 | }
21 |
22 | .add-box > .react-tags
23 | {
24 | background-color: inherit;
25 | border: none;
26 |
27 | }
28 |
29 | .add-box > .react-tags input
30 | {
31 | padding-top: 5px;
32 | background-color: inherit;
33 | color: white;
34 | width: 180px;
35 | }
36 |
37 | .add-box > .react-tags__search
38 | {
39 | margin-top: 10px;
40 | }
41 |
42 | .add-box > .react-tags input::placeholder
43 | {
44 | font-size: 14px;
45 | color: rgb(207, 202, 202);
46 | }
47 |
48 | .status-top > svg
49 | {
50 | float: right;
51 | padding: 3px;
52 | margin: 15px;
53 | opacity: 0.9;
54 | cursor: pointer;
55 | transition: all 0.3s ease;
56 | }
57 |
58 | .status-top > svg:hover
59 | {
60 | opacity: 1;
61 | }
62 |
63 | .add-box .xicon
64 | {
65 | float: right;
66 | padding: 15px;
67 | margin: 9px;
68 | opacity: 0.85;
69 | cursor: pointer;
70 | transition: all 0.3s ease;
71 | }
72 |
73 | .add-box .xicon:hover
74 | {
75 | opacity: 1;
76 | }
77 |
78 | .member-status {
79 | margin-top: 20px;
80 | margin-left: 20px;
81 | color: white;
82 | flex: 1;
83 | overflow: overlay;
84 | }
85 |
86 | .status-type {
87 | color: grey;
88 | font-weight: 600;
89 | font-size: 14px;
90 | }
91 |
92 | .one-status {
93 | margin-top: 5px;
94 | display: flex;
95 | cursor: pointer;
96 | }
97 |
98 | .one-pic {
99 | width: 30px;
100 | height: 30px;
101 | border-radius: 50%;
102 | background-color: white;
103 | }
104 |
105 | .one-name {
106 | padding-left: 20px;
107 | }
108 |
109 | .password-zone {
110 | width: 180px;
111 | margin: auto;
112 | margin-bottom: 30px;
113 | text-align: center;
114 | color : white;
115 | font-weight: 600;
116 | font-size: 14px;
117 |
118 | }
119 |
120 | .protected-tag {
121 | margin: auto;
122 | margin-bottom: 14px;
123 | }
124 |
125 | .password-tag {
126 | margin-left: 8px;
127 | margin-bottom: 0px;
128 | font-weight: 400;
129 | font-size: 12px;
130 | text-align: left;
131 | }
132 |
133 | .password-input {
134 | width: 100%;
135 | line-height: 2;
136 | padding-left: 8px;
137 | padding-right: 12px;
138 | color: white;
139 | border-radius: 3px;
140 | border: transparent;
141 | border-bottom: 1px solid white;
142 | background-color: transparent;
143 | }
144 |
145 | #password::placeholder {
146 | color: white;
147 | }
148 |
149 | .password-input:focus {
150 | outline: none;
151 | }
152 |
153 | .join-channel-button {
154 | cursor: pointer;
155 | margin: auto;
156 | width: 180px;
157 | color: white;
158 | line-height: 2.5;
159 | text-align: center;
160 | background-color: rgba(255, 255, 255, 0.25);
161 | border-radius: 3px;
162 | }
163 |
164 | .status-ball
165 | {
166 | position: relative;
167 | }
168 |
169 | .status-ball::after {
170 | content: ' ';
171 | background-color: rgb(122, 122, 122);
172 | height: 10px;
173 | width: 10px;
174 | position: absolute;
175 | bottom: -3px;
176 | right: -3px;
177 | border-radius: 50%;
178 | }
179 |
180 | .status-online::after {
181 | background-color: rgb(73, 179, 73);
182 | }
183 |
184 | .status-offline::after {
185 | background-color: grey;
186 | }
187 |
188 | .status-ingame::after {
189 | background-color: rgb(168, 5, 5);
190 | }
--------------------------------------------------------------------------------
/front/src/routes/chat_modes/card.css:
--------------------------------------------------------------------------------
1 | ::placeholder {
2 | background-color: transparent;
3 | color: grey;
4 | }
5 |
6 | .card-disappear-click-zone {
7 | position: absolute;
8 | z-index: 999;
9 | left: 0;
10 | top: 0;
11 | height: 100vh;
12 | width: 100vw;
13 | background-color: rgba(255, 255, 255, 0.3);
14 | }
15 |
16 | .card-chat {
17 | background-color: whitesmoke;
18 | z-index: 1000;
19 | height: 500px;
20 | width: 350px;
21 | border-radius: 12px;
22 | box-shadow: 0px 13px 36px 5px rgba(0,0,0,0.4);
23 | display: flex;
24 | flex-direction: column;
25 | padding-bottom: 20px;
26 | }
27 |
28 | .card-chat-title {
29 | margin: auto;
30 | margin-top: 10px;
31 | width: 260px;
32 | text-align: center;
33 | color: grey;
34 | font-weight: 600;
35 | line-height: 4;
36 | border-bottom: 1px solid grey;
37 | }
38 |
39 | .input-zone {
40 | margin: auto;
41 | margin-top: 5px;
42 | margin-bottom: 10px;
43 | width: 240px;
44 | }
45 |
46 | .new-room-name-input {
47 | margin: auto;
48 | height: 50px;
49 | width: 240px;
50 | padding-left: 18px;
51 | background-color: transparent;
52 | border-color: transparent;
53 | border-bottom: 1px solid #D1D1D1;
54 | color: grey;
55 |
56 | /* shared font styles */
57 | font-size: 1em;
58 | line-height: 1.2;
59 | }
60 |
61 | .new-room-name-input:focus {
62 | outline: none;
63 | border-bottom: 1px solid #B1B1B1;
64 | }
65 |
66 | .browse-users {
67 | max-height: 140px;
68 | overflow: overlay;
69 | }
70 |
71 | .div-switch {
72 | display: flex;
73 | margin: 30px 40px 0 40px;
74 | color: rgb(97, 95, 95);
75 | }
76 |
77 | .switch {
78 | margin-left: auto;
79 | }
80 |
81 | .password {
82 | margin: 20px 0 10px 40px;
83 | padding-left: 10px;
84 | border: none;
85 | outline: none;
86 | border-bottom: 1px solid #B1B1B1;
87 | background-color: transparent;
88 | color: rgb(97, 95, 95);
89 | }
90 |
91 | .password:focus {
92 | border-bottom: 1px solid #A1A1A1;
93 | }
94 |
95 | .card-confirm-button {
96 | padding: 20px 30px;
97 | margin-left: 50px;
98 | margin-right: 50px;
99 | border-radius: 4px;
100 | text-align: center;
101 | font-weight: 600;
102 | color: rgb(97, 95, 95);
103 | }
104 |
105 | .card-confirm-button:active {
106 | background-color: rgb(177, 169, 169);
107 | color: black;
108 | }
109 |
110 | .flex-block {
111 | margin: auto;
112 | flex: 1;
113 | }
114 |
115 | .owner-password {
116 | margin-top: 10px;
117 | margin-bottom: 10px;
118 | }
119 |
120 | .info-tag {
121 | margin-top: 30px;
122 | margin-bottom: 0px;
123 | margin-left: 40px;
124 | color: rgb(0, 136,0);
125 | }
126 |
127 | .foot-info-tag {
128 | margin-top: 10px;
129 | margin-bottom: -10px;
130 | margin-left: 40px;
131 | color: red;
132 | font-size: 14px;
133 | }
134 |
135 | .challenger-avatar {
136 | margin: auto;
137 | margin-top: 0px;
138 | border-radius: 50%;
139 | height: 110px;
140 | width: 110px;
141 | }
142 |
143 | .text {
144 | margin: auto;
145 | margin-top: 12px;
146 | width: 260px;
147 | text-align: center;
148 | color: grey;
149 | font-weight: 600;
150 | line-height: 2;
151 | }
152 |
153 |
154 | .join-button {
155 | padding: 20px;
156 | width: 120px;
157 | height:fit-content;
158 | margin-left: 50px;
159 | margin-right: 20px;
160 | border-radius: 4px;
161 | text-align: center;
162 | font-weight: 600;
163 | /* color: rgb(97, 95, 95); */
164 | color: green;
165 | cursor: pointer;
166 | }
167 |
168 | .join-button:active {
169 | background-color: rgb(177, 169, 169);
170 | color: black;
171 | }
172 |
173 |
174 | .decline-button {
175 | padding: 20px;
176 | width: 120px;
177 | height:fit-content;
178 | margin-left: 20px;
179 | margin-right: 50px;
180 | border-radius: 4px;
181 | text-align: center;
182 | font-weight: 600;
183 | /* color: rgb(97, 95, 95); */
184 | color: rgb(194, 7, 7);
185 | cursor: pointer;
186 | }
187 |
188 | .decline-button:active {
189 | background-color: rgb(177, 169, 169);
190 | color: black;
191 | }
--------------------------------------------------------------------------------
/front/src/App.css:
--------------------------------------------------------------------------------
1 | @import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@100;300;400;500;600;700&family=Raleway:wght@400;500&family=Roboto:wght@300;400;500;700&display=swap");
2 | @import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@100;300;400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap");
3 | :root {
4 | /* Text */
5 | --text-color-white: #dadada;
6 | --text-color-blue: #b9c5ff;
7 | --text-color-gray: #31353c;
8 | /* Basic */
9 | --basic-color-background: #292d32;
10 | --basic-color-green: #33ff00;
11 | --basic-color-yellow: #fee440;
12 | --basic-color-red: #ff0000;
13 | /* Cards */
14 | --cards-color-gray-up: #2e3238;
15 | --cards-color-gray: #31353c;
16 | --cards-color-blue: #4361ee;
17 | /* Buttons */
18 | --buttons-color-icons: #f2f2f2;
19 | --buttons-color-pink: #f72585;
20 | --buttons-color-blue: #5d76ec;
21 | --buttons-color-blue-selected: #3c58dd;
22 | --buttons-color-blue-disabled: #506df3;
23 | --buttons-color-gray-disabled: #3b4048;
24 | /* Styles */
25 | --styles-halo-blue: radial-gradient(
26 | 100% 110.77% at 0% 2.02%,
27 | #4361ee 0%,
28 | rgba(41, 45, 50, 0) 100%
29 | );
30 | --styles-halo-linear-blue: linear-gradient(
31 | 358.71deg,
32 | rgba(8, 16, 46, 0.5) 0%,
33 | rgba(0, 0, 0, 0.1) 0.01%,
34 | rgba(67, 97, 238, 0.5) 100%
35 | );
36 | --styles-linear-blue: linear-gradient(135deg, #4361ee 0%, #6982f5 100%);
37 | --styles-linear-transp-blue: linear-gradient(
38 | 135deg,
39 | rgba(60, 88, 221, 0) 0%,
40 | #3c58dd 100%
41 | );
42 | --styles-linear-light-blue: linear-gradient(
43 | 180deg,
44 | #50caff -11.53%,
45 | #4361ee 100%
46 | );
47 | }
48 |
49 | /* ///////////////////////////////////// */
50 |
51 | /* GENERAL CLASSES */
52 |
53 | .App {
54 | background-color: var(--basic-color-background);
55 | font-family: "Roboto" sans-serif;
56 | color: var(--text-color-white);
57 | width: 100vw;
58 | height: 100vh;
59 | overflow: hidden;
60 | }
61 |
62 | /* .Home {
63 | height: 100%;
64 | width: 100%;
65 | } */
66 |
67 | .IBM-text {
68 | font-family: "IBM Plex Mono";
69 | font-weight: 400;
70 | letter-spacing: -0.4px;
71 | color: var(--text-color-white);
72 | }
73 |
74 | .ROBOTO-text {
75 | font-family: "Roboto", sans-serif;
76 | font-weight: 300;
77 | letter-spacing: -0.4px;
78 | color: var(--text-color-white);
79 | }
80 |
81 | .wrapper {
82 | align-items: center;
83 | display: flex;
84 | }
85 |
86 | .content {
87 | font-family: "Roboto", sans-serif;
88 | padding-left: 20px;
89 | letter-spacing: -0.4px;
90 | }
91 |
92 | /* //////////////////////////////////////////////////// */
93 |
94 | /* EXISTING CLASSES */
95 |
96 | .text-button {
97 | font-size: 13px;
98 | }
99 |
100 | .text-button:hover {
101 | color: var(--buttons-color-blue);
102 | text-decoration: underline;
103 | transition: 0.2 ease;
104 | }
105 |
106 | .submit-button {
107 | margin-left: 30px;
108 | background: var(--buttons-color-blue);
109 | box-shadow: 2px 3.5px 15px #1f2427, -2px -3.5px 15px #485057;
110 | transition: 0.2s ease;
111 | border: none;
112 | outline: none;
113 | color: var(--text-color-white);
114 | }
115 |
116 | .submit-button:hover {
117 | background: #3c58dd;
118 | box-shadow: inset 2px 3.5px 15px rgba(15, 21, 49, 0.25),
119 | inset -2px -3.5px 15px #556fe8;
120 | color: var(--text-color-white);
121 | border-color: none;
122 | outline: 0;
123 | }
124 |
125 | .submit-button:focus {
126 | margin-left: 30px;
127 | background: var(--buttons-color-blue);
128 | box-shadow: 2px 3.5px 15px #1f2427, -2px -3.5px 15px #485057;
129 | transition: 0.2s ease;
130 | border: none;
131 | outline: none;
132 | color: var(--text-color-white);
133 | }
134 |
135 | .submit-button:active {
136 | color: var(--text-color-white);
137 | background-color: #3c58dd;
138 | box-shadow: inset 2px 3.5px 15px rgba(15, 21, 49, 0.25),
139 | inset -2px -3.5px 15px #556fe8;
140 | border-color: none;
141 | outline: 0;
142 | }
143 |
144 | .btn {
145 | border-radius: 12.5px;
146 | }
147 |
148 | .link-primary {
149 | cursor: pointer;
150 | }
151 |
152 | /* a:link {
153 | color: var(--buttons-color-blue);
154 | }
155 |
156 | /* visited link */
157 | /* a:visited {
158 | color: var(--text-color-white);
159 | } */
160 |
161 | /* mouse over link */
162 | a:hover {
163 | color: var(--buttons-color-blue-disabled);
164 | }
165 |
166 | /* selected link */
167 | /* a:active { */
168 | /* color: var(--basic-color-green); */
169 | /* } */
170 |
171 | .active-class {
172 | color: #4361ee;
173 | }
174 | .not-active-class {
175 | color: white;
176 | }
177 | .toast-container
178 | {
179 | z-index: 999;
180 | }
--------------------------------------------------------------------------------
/front/src/routes/profile_types/private/ModifyUserInfo.tsx:
--------------------------------------------------------------------------------
1 | import { useContext, useState } from "react";
2 | import { Col, Card, Row, Form } from "react-bootstrap";
3 | import { NotifCxt } from "../../../App";
4 | import {
5 | updateUsernameQuery,
6 | updateEmailQuery,
7 | } from "../../../queries/updateUserQueries";
8 |
9 | export const ModifyEntry = (props: any) => {
10 | const notif = useContext(NotifCxt);
11 | const initialValues = {
12 | email: "",
13 | userName: "",
14 | };
15 |
16 | const [userInput, setUserInput] = useState(initialValues);
17 |
18 | const handleInputChange = (e: any) => {
19 | const { name, value } = e.target;
20 | setUserInput({
21 | ...userInput,
22 | [name]: value,
23 | });
24 | };
25 |
26 | const handleSubmit = (e: any) => {
27 | e.preventDefault();
28 | if (userInput.userName) {
29 | const updateUsername = async () => {
30 | const result = await updateUsernameQuery(userInput.userName);
31 | if (result !== "error") {
32 | const button = document.getElementById("handleChange");
33 | if (button) {
34 | button.setAttribute("name", "userName");
35 | button.setAttribute("value", userInput.userName);
36 | props.changeUserInfoHook(e);
37 | props.onClick();
38 | }
39 | } else {
40 | notif?.setNotifText(
41 | "Username already taken. Please enter another username."
42 | );
43 | notif?.setNotifShow(true);
44 | }
45 | };
46 | updateUsername();
47 | }
48 | if (userInput.email) {
49 | const updateEmail = async () => {
50 | const result = await updateEmailQuery(userInput.email);
51 | if (result !== "error") {
52 | const button = document.getElementById("handleChange");
53 | if (button) {
54 | button.setAttribute("name", "email");
55 | button.setAttribute("value", userInput.email);
56 | props.changeUserInfoHook(e);
57 | props.onClick();
58 | }
59 | } else {
60 | notif?.setNotifText(
61 | "Email already taken. Please enter another email."
62 | );
63 | notif?.setNotifShow(true);
64 | }
65 | };
66 | updateEmail();
67 | }
68 | };
69 | return (
70 |