Skip to content

Commit

Permalink
Add project edit panel (#240)
Browse files Browse the repository at this point in the history
* add project edit dialog

* fix dialog
  • Loading branch information
younes200 authored Nov 17, 2023
1 parent cffd078 commit e200c62
Show file tree
Hide file tree
Showing 18 changed files with 497 additions and 503 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ node_modules
.env.production.local
.env
deploy.env
.vscode

npm-debug.log*
yarn-debug.log*
Expand Down
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"Prisma.prisma",
"inlang.vs-code-extension"
]
}
38 changes: 38 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.formatOnSave": true,
"eslint.enable": true,
"eslint.lintTask.enable": true,
"eslint.lintTask.options": "--ext .js,.jsx,.ts,.tsx,.graphql .",
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"[markdown]": {
"files.trimTrailingWhitespace": false,
"editor.wordWrap": "off",
"editor.formatOnSave": false,
"editor.formatOnPaste": false,
"editor.formatOnType": false
},
"[prisma]": {
"editor.defaultFormatter": "Prisma.prisma"
},
"json.schemas": [
{
"url": "https://cdn.jsdelivr.net/npm/tsup/schema.json",
"fileMatch": [
"package.json",
"tsup.config.json"
]
}
]
}
Binary file modified .yarn/install-state.gz
Binary file not shown.
1 change: 0 additions & 1 deletion apps/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ async function main() {
}));

app.disable('x-powered-by');

app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(sessionParser);
Expand Down
16 changes: 9 additions & 7 deletions apps/frontend/src/components/SigninMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IconButton, Menu, MenuItem } from "@mui/material";
import Button from "@mui/material/Button";
import * as React from "react";
import { Trans } from "react-i18next";
import { useTranslation } from "react-i18next";
import { useLocation, useNavigate } from "react-router";

import { trpc, UserMe } from "~utils/trpc";
Expand All @@ -12,6 +12,8 @@ export const SigninMenu = ({ user }: { user: UserMe }) => {
const navigate = useNavigate();
const location = useLocation();

const { t } = useTranslation();

const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);
const open = Boolean(anchorEl);

Expand Down Expand Up @@ -80,7 +82,7 @@ export const SigninMenu = ({ user }: { user: UserMe }) => {
fontSize: 13,
}}
>
<Trans i18nKey={"menu.signup"} />
{t("menu.signup")}
</Button>
<Button
data-testid="header-login-button"
Expand All @@ -91,7 +93,7 @@ export const SigninMenu = ({ user }: { user: UserMe }) => {
fontSize: 13,
}}
>
<Trans i18nKey={"menu.login"} />
{t("menu.login")}
</Button>
</div>
)}
Expand Down Expand Up @@ -133,20 +135,20 @@ export const SigninMenu = ({ user }: { user: UserMe }) => {
>
{user && user.role == "Admin" ? (
<MenuItem onClick={handleOpenAdmin} data-testid="header-admin-button">
<Trans i18nKey={"menu.admin"} />
{t("menu.admin")}
</MenuItem>
) : null}
<MenuItem onClick={handleProfile} data-testid="header-profile-button">
<Trans i18nKey={"menu.profile"} />
{t("menu.profile")}
</MenuItem>
<MenuItem
onClick={handleSettingsClick}
data-testid="header-settings-button"
>
<Trans i18nKey={"menu.settings"} />
{t("menu.settings")}
</MenuItem>
<MenuItem onClick={handleLogout} data-testid="header-logout-button">
<Trans i18nKey={"menu.logout"} />
{t("menu.logout")}
</MenuItem>
</Menu>
</div>
Expand Down
Loading

0 comments on commit e200c62

Please sign in to comment.