diff --git a/alembic/versions/8712dd727be7_create_user_and_session_modal.py b/alembic/versions/56750c50a8c3_create_user_and_session_modal.py similarity index 89% rename from alembic/versions/8712dd727be7_create_user_and_session_modal.py rename to alembic/versions/56750c50a8c3_create_user_and_session_modal.py index 35d30ba..66f4e30 100644 --- a/alembic/versions/8712dd727be7_create_user_and_session_modal.py +++ b/alembic/versions/56750c50a8c3_create_user_and_session_modal.py @@ -1,8 +1,8 @@ """Create User and Session Modal -Revision ID: 8712dd727be7 +Revision ID: 56750c50a8c3 Revises: -Create Date: 2024-05-11 12:44:09.963953 +Create Date: 2024-05-13 12:36:10.095215 """ from typing import Sequence, Union @@ -12,7 +12,7 @@ import sqlalchemy as sa # revision identifiers, used by Alembic. -revision: str = '8712dd727be7' +revision: str = '56750c50a8c3' down_revision: Union[str, None] = None branch_labels: Union[str, Sequence[str], None] = None depends_on: Union[str, Sequence[str], None] = None @@ -28,7 +28,7 @@ def upgrade() -> None: sa.Column('is_admin', sa.Boolean(), nullable=True), sa.Column('is_lock', sa.Boolean(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), - sa.Column('update_at', sa.DateTime(), nullable=True), + sa.Column('updated_at', sa.DateTime(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_users_created_at'), 'users', ['created_at'], unique=False) @@ -38,15 +38,15 @@ def upgrade() -> None: op.create_index(op.f('ix_users_username'), 'users', ['username'], unique=True) op.create_table('session_login', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), - sa.Column('session', sa.UUID(), nullable=False), + sa.Column('session', sa.String(), nullable=False), sa.Column('user_id', sa.UUID(), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=True), - sa.Column('update_at', sa.DateTime(), nullable=True), + sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_session_login_created_at'), 'session_login', ['created_at'], unique=False) - op.create_index(op.f('ix_session_login_session'), 'session_login', ['session'], unique=False) + op.create_index(op.f('ix_session_login_session'), 'session_login', ['session'], unique=True) op.create_index(op.f('ix_session_login_user_id'), 'session_login', ['user_id'], unique=True) # ### end Alembic commands ### diff --git a/fuware-fe/public/images/logo_fuware.png b/fuware-fe/public/images/logo_fuware.png new file mode 100644 index 0000000..d9611b2 Binary files /dev/null and b/fuware-fe/public/images/logo_fuware.png differ diff --git a/fuware-fe/src/components/Header.jsx b/fuware-fe/src/components/Header.jsx index d2c8250..9b11a6b 100644 --- a/fuware-fe/src/components/Header.jsx +++ b/fuware-fe/src/components/Header.jsx @@ -67,7 +67,7 @@ export default function Header() { colorScheme="info" onClick={logOut} > - {language.logout} + {language.ui.logout} diff --git a/fuware-fe/src/components/Navbar/Navbar.jsx b/fuware-fe/src/components/Navbar/Navbar.jsx index 7c724bf..652bc69 100644 --- a/fuware-fe/src/components/Navbar/Navbar.jsx +++ b/fuware-fe/src/components/Navbar/Navbar.jsx @@ -12,7 +12,7 @@ const NAVBAR_ITEM = [ { path: '/dashboard', icon: IconDashboard, - text: language?.dashboard, + text: language?.ui.dashboard, }, ] diff --git a/fuware-fe/src/lang/vi.json b/fuware-fe/src/lang/vi.json index 67bd3a9..d9ea066 100644 --- a/fuware-fe/src/lang/vi.json +++ b/fuware-fe/src/lang/vi.json @@ -1,10 +1,14 @@ { - "login": "Đăng Nhập", - "logout": "Đăng xuất", - "dashboard": "Bảng điều khiển", - "champion": "Tướng", - "skin": "Trang phục", - "list": "Danh sách", - "favourite": "Yêu thích", - "bought": "Đã Mua" + "ui": { + "username": "Tên người dùng", + "password": "Mật khẩu", + "login": "Đăng Nhập", + "logout": "Đăng xuất", + "dashboard": "Bảng điều khiển" + }, + "message": { + "CREATED_USER": "Username already registered!", + "LOGIN_WRONG": "Your username or password input is wrong!", + "USER_LOCK": "Your Account was locked" + } } diff --git a/fuware-fe/src/pages/Login.jsx b/fuware-fe/src/pages/Login.jsx index 4db7da4..e22b321 100644 --- a/fuware-fe/src/pages/Login.jsx +++ b/fuware-fe/src/pages/Login.jsx @@ -23,12 +23,22 @@ const LoginPage = styled('div')` width: 100%; height: 100svh; display: flex; + padding-left: 15px; + padding-right: 15px; place-items: center; .login-wrap { - width: 500px; + width: 40%; + max-width: 500px; + min-width: 320px; margin: 0 auto; + .logo { + width: 40%; + max-width: 150px; + min-width: 100px; + } + .login-box { box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.25); border-radius: 5px; @@ -87,14 +97,21 @@ export default function Login() {
- gsdfgj;l +
-
+