Update app.py
Browse files
app.py
CHANGED
@@ -775,26 +775,39 @@ def load_user(username):
|
|
775 |
return User(username)
|
776 |
|
777 |
# User status management views
|
778 |
-
index_page =
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
798 |
|
799 |
# Successful login
|
800 |
success = html.Div([html.Div([html.H2('Login successful.'),
|
|
|
775 |
return User(username)
|
776 |
|
777 |
# User status management views
|
778 |
+
index_page = html.Div([
|
779 |
+
dbc.Col([dcc.Location(id='url_login', refresh=True),
|
780 |
+
html.H2('''Please log in to continue:''', id='h1'),
|
781 |
+
dcc.Input(placeholder='Enter your username',
|
782 |
+
type='text', id='uname-box'),
|
783 |
+
dcc.Input(placeholder='Enter your password',
|
784 |
+
type='password', id='pwd-box'),
|
785 |
+
html.Button(children='Login', n_clicks=0,
|
786 |
+
type='submit', id='login-button'),
|
787 |
+
html.Div(children='', id='output-state'),]
|
788 |
+
, sm=4,style={'textAlign': 'center', 'marginTop': 'calc(50vh - 120px)','border':'1px solid #495057','border-radius':'10px'}),
|
789 |
+
])
|
790 |
+
|
791 |
+
#index_page = dmc.MantineProvider(
|
792 |
+
# [
|
793 |
+
# dmc.Container(
|
794 |
+
# children=[
|
795 |
+
# dmc.Grid(
|
796 |
+
# children=[
|
797 |
+
# dmc.GridCol(
|
798 |
+
# html.Div([dcc.Location(id='url_login', refresh=True),
|
799 |
+
# dmc.Text("BCC Agent", id='h1',style={"fontSize": 48}, fw=900),
|
800 |
+
# dmc.TextInput(placeholder="login",w=250, ml="calc(50% - 125px)", id='uname-box'),
|
801 |
+
# dmc.PasswordInput(id='pwd-box',placeholder="Mot de passe",w=250, ml="calc(50% - 125px)", mt=10),
|
802 |
+
# dmc.Button("Continuer", w=250,variant="gradient", n_clicks=0, id='login-button', mt=20, mb=20),
|
803 |
+
# html.Div(children='', id='output-state')
|
804 |
+
# ]), span=4, offset=4, style={'textAlign': 'center', 'marginTop': 'calc(50vh - 120px)','border':'1px solid #495057','border-radius':'10px'}, c='white'
|
805 |
+
# )
|
806 |
+
# ]
|
807 |
+
# )
|
808 |
+
# ]
|
809 |
+
#)]
|
810 |
+
# )
|
811 |
|
812 |
# Successful login
|
813 |
success = html.Div([html.Div([html.H2('Login successful.'),
|