profile partly done. added scrolling on login and register page
This commit is contained in:
parent
3e0f7229c4
commit
b44d180284
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ActiveDebugProfile>https</ActiveDebugProfile>
|
||||
<ActiveDebugProfile>http</ActiveDebugProfile>
|
||||
<Controller_SelectedScaffolderID>ApiControllerWithContextScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Common/Api</Controller_SelectedScaffolderCategoryPath>
|
||||
<WebStackScaffolding_ControllerDialogWidth>650</WebStackScaffolding_ControllerDialogWidth>
|
||||
|
@ -29,9 +29,9 @@ namespace API.Application.Users.Commands
|
||||
{
|
||||
return new UnauthorizedObjectResult(new { message = "Invalid email or password." });
|
||||
}
|
||||
var token = GenerateJwtToken(user);
|
||||
var jwtToken = GenerateJwtToken(user);
|
||||
|
||||
return new OkObjectResult(token);
|
||||
return new OkObjectResult(new { token = jwtToken, id = user.Id});
|
||||
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
using API.Persistence.Repositories;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.VisualStudio.Web.CodeGenerators.Mvc.Templates.BlazorIdentity.Pages.Manage;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace API.Application.Users.Queries
|
||||
{
|
||||
@ -23,14 +24,8 @@ namespace API.Application.Users.Queries
|
||||
return new ConflictObjectResult(new { message = "No user on given Id" });
|
||||
}
|
||||
|
||||
UserDTO userDTO = new UserDTO
|
||||
{
|
||||
Id = user.Id,
|
||||
Email = user.Email,
|
||||
Username = user.Username
|
||||
};
|
||||
return new OkObjectResult(new { id = user.Id, email = user.Email, username = user.Username, createdAt = user.CreatedAt });
|
||||
|
||||
return userDTO;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -49,7 +49,8 @@ class _LoginPageState extends State<LoginPage> {
|
||||
return SideMenu(
|
||||
selectedIndex: 4,
|
||||
body: Scaffold(
|
||||
body: Center(
|
||||
body: SingleChildScrollView(
|
||||
child: Center(
|
||||
child: Container(
|
||||
constraints: const BoxConstraints(minWidth: 100, maxWidth: 400),
|
||||
child: Column(children: [
|
||||
@ -87,6 +88,7 @@ class _LoginPageState extends State<LoginPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
|
@ -41,10 +41,12 @@ class _RegisterPageState extends State<RegisterPage> {
|
||||
return SideMenu(
|
||||
selectedIndex: 3,
|
||||
body: Scaffold(
|
||||
body: Center(
|
||||
body: SingleChildScrollView(
|
||||
child: Center( // Added SingleChildScrollView here
|
||||
child: Container(
|
||||
constraints: const BoxConstraints(minWidth: 100, maxWidth: 400),
|
||||
child: Column(children: [
|
||||
child: Column(
|
||||
children: [
|
||||
const Image(
|
||||
image: AssetImage('assets/logo.png'),
|
||||
height: 200,
|
||||
@ -79,7 +81,6 @@ class _RegisterPageState extends State<RegisterPage> {
|
||||
autocorrect: false,
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
|
||||
ElevatedButton(
|
||||
onPressed: _register, child: const Text('Register')),
|
||||
const SizedBox(height: 10),
|
||||
@ -87,13 +88,16 @@ class _RegisterPageState extends State<RegisterPage> {
|
||||
TextButton(
|
||||
child: const Text('Login'),
|
||||
onPressed: () => Navigator.pushReplacementNamed(context, '/login')),
|
||||
]),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
usernameInput.dispose();
|
||||
|
Loading…
Reference in New Issue
Block a user