Auth registration, trial form hack
This commit is contained in:
parent
5e4bfaa95e
commit
6292bb23a8
4 changed files with 31 additions and 8 deletions
|
@ -2,9 +2,9 @@
|
|||
|
||||
<PageTitle>About</PageTitle>
|
||||
|
||||
<h1>Abut this app</h1>
|
||||
<h1>About this app</h1>
|
||||
|
||||
We made this app to provide a reliable platform for social working environments.
|
||||
To create a renowned network where great minds can communicate their great ideas.
|
||||
Innovation, teamwork, diversity, sommunity engagement, social connection are
|
||||
Innovation, teamwork, diversity, sommunity engagement, social connection are
|
||||
all words that describe perfectly our desire to create that app.
|
||||
|
|
|
@ -56,11 +56,11 @@
|
|||
|
||||
private async Task Submit()
|
||||
{
|
||||
var resp = await req.PostAsJsonAsync("/api/auth/login", Model);
|
||||
var resp = await req.PostAsJsonAsync("/api/auth/register", Model);
|
||||
if (resp.StatusCode == HttpStatusCode.OK)
|
||||
{
|
||||
Model = new();
|
||||
ValidationMsg = "Successful login <3"; var user = await resp.Content.ReadFromJsonAsync<UserModel>();
|
||||
ValidationMsg = "Successful register <3"; var user = await resp.Content.ReadFromJsonAsync<UserModel>();
|
||||
if (user == null)
|
||||
{
|
||||
ValidationMsg = "Unknown authentication error";
|
||||
|
@ -73,16 +73,16 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (resp.StatusCode == HttpStatusCode.Unauthorized)
|
||||
if (resp.StatusCode == HttpStatusCode.Conflict)
|
||||
{
|
||||
Model = new();
|
||||
ValidationMsg = "Invalid username or password.";
|
||||
ValidationMsg = "User already registered.";
|
||||
this.StateHasChanged();
|
||||
return;
|
||||
}
|
||||
|
||||
Model = new();
|
||||
ValidationMsg = "Authorization error...";
|
||||
ValidationMsg = "Registration error...";
|
||||
this.StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,10 @@
|
|||
<link href="css/app.css" rel="stylesheet" />
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
<link href="Interlinked.Core.styles.css" rel="stylesheet" />
|
||||
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>
|
||||
<script
|
||||
src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js"
|
||||
type="text/javascript"
|
||||
></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -26,5 +29,6 @@
|
|||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
<script src="js/femboy.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
19
src/Interlinked.Core/wwwroot/js/femboy.js
Normal file
19
src/Interlinked.Core/wwwroot/js/femboy.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
const mutcal = (mutationList, observer) => {
|
||||
for (const mutation of mutationList) {
|
||||
if (mutation.type === "childList") {
|
||||
const being = document.querySelector("body > div:last-child");
|
||||
if (being !== null) {
|
||||
if (being.innerHTML.startsWith('<img src="data:image/svg+xml')) {
|
||||
being.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const observer = new MutationObserver(mutcal);
|
||||
observer.observe(document.body, {
|
||||
attributes: false,
|
||||
childList: true,
|
||||
subtree: false,
|
||||
});
|
Loading…
Reference in a new issue