Skip to content

Commit

Permalink
navigation fixed in Verify + transitions specified
Browse files Browse the repository at this point in the history
  • Loading branch information
dbence2002 committed Sep 29, 2023
2 parents 1a8970a + 8b7fe2d commit 2c1895f
Show file tree
Hide file tree
Showing 19 changed files with 153 additions and 174 deletions.
5 changes: 5 additions & 0 deletions frontend/build/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
"unsuccessful_settings_save": "The settings couldn't be saved.",
"successful_password_change": "The password has been changed successfully."
},
"tag_modal": {
"title": "Change tags",
"cancel": "Cancel",
"save": "Save"
},
"tag": {
"dp": "dynamic programming",
"greedy": "greedy",
Expand Down
5 changes: 5 additions & 0 deletions frontend/build/locales/hu/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
"unsuccessful_settings_save": "A beállítások mentése nem sikerült.",
"successful_password_change": "A jelszóváltoztatás sikeres volt."
},
"tag_modal": {
"title": "Címkék módosítása",
"cancel": "Mégse",
"save": "Mentés"
},
"tag": {
"dp": "dinamikus programozás",
"greedy": "mohó",
Expand Down
4 changes: 0 additions & 4 deletions frontend/build/static/css/main.b6c49d21.css

This file was deleted.

1 change: 0 additions & 1 deletion frontend/build/static/css/main.b6c49d21.css.map

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/build/static/js/main.fc656d11.js

This file was deleted.

85 changes: 0 additions & 85 deletions frontend/build/static/js/main.fc656d11.js.LICENSE.txt

This file was deleted.

1 change: 0 additions & 1 deletion frontend/build/static/js/main.fc656d11.js.map

This file was deleted.

5 changes: 2 additions & 3 deletions frontend/src/components/concrete/other/ProfileSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ function SubmissionsFrame({ titleComponent, submissions }) {
<td className="padding-td-default">
<Link
className="link"
to={routeMap.problem.replace(":problem", item.problem)}>
{item.problem}
to={item.problem.href}>
{item.problem.text}
</Link>
</td>
</tr>
Expand All @@ -93,7 +93,6 @@ function SubmissionsFrame({ titleComponent, submissions }) {
function ProfileSideBar() {
const { t } = useTranslation();
const { userData, isLoggedIn } = useContext(UserContext);
console.log(isLoggedIn + " ??? ")
const titleComponent = (
<SVGTitleComponent
svg={
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/config/RouteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const routeMap = {
admin: "/user/admin/",
};

const apiRoot = "https://127.0.0.1:5555/api/v2";
const apiRoot = "http://localhost:5555/api/v2";

export function apiRoute(route) {
console.log(`${apiRoot}${route}`);
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/util/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export async function login(username, password) {
username: username,
password: password,
}),
credentials: 'include',
};
try {
const response = await fetch(
Expand All @@ -32,6 +33,7 @@ export async function register(username, email, password, passwordConfirm) {
password: password,
passwordConfirm: passwordConfirm,
}),
credentials: 'include',
};
try {
const response = await fetch(
Expand Down Expand Up @@ -67,7 +69,10 @@ export async function logout() {

export async function authenticate() {
try {
const response = await fetch(apiRoute("/user/auth/"));
const requestOptions = {
credentials: 'include',
};
const response = await fetch(apiRoute("/user/auth/"), requestOptions);
const data = await response.json();
return data.userData;
} catch (error) {
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/util/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export async function saveSettings(user, showUnsolved, hideSolved) {
showUnsolved: showUnsolved,
hideSolved: hideSolved,
}),
credentials: 'include',
};
console.log(
apiRoute(`/user/profile/${encodeURIComponent(user)}/settings/other/`),
Expand All @@ -29,6 +30,7 @@ export async function changePassword(user, oldPw, newPw, newPwConfirm) {
newPw: newPw,
newPwConfirm: newPwConfirm,
}),
credentials: 'include',
};
const response = await fetch(
apiRoute(
Expand Down
1 change: 1 addition & 0 deletions frontend/src/util/submitSolution.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ async function submitSolution({ problem, language, file, submissionCode }) {
const requestOptions = {
method: "POST",
body: formData,
credentials: 'include',
};
const response = await fetch(
apiRoute("/problemset/main/submit/"),
Expand Down
Loading

0 comments on commit 2c1895f

Please sign in to comment.