Compare commits
9 commits
d72a23781d
...
bcc3f442ed
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bcc3f442ed | ||
|
|
58c720d933 | ||
|
|
ba826acc93 | ||
|
|
103ffe3e80 | ||
|
|
f817e70bb5 | ||
|
|
208ae63e6c | ||
|
|
88ec56f154 | ||
|
|
2ac7574adb | ||
|
|
217cd55609 |
|
|
@ -3,18 +3,19 @@
|
||||||
|
|
||||||
## Setup Development Environment
|
## Setup Development Environment
|
||||||
|
|
||||||
### General
|
|
||||||
|
|
||||||
1. Install `python>=3.10` and development packages
|
|
||||||
(`apt install python3-dev g++` on Ubuntu)
|
|
||||||
2. Run `./setup.sh`
|
|
||||||
|
|
||||||
### Backend
|
### Backend
|
||||||
|
|
||||||
0. `cd backend`
|
1. Install `python>=3.8`
|
||||||
1. Activate your dev environment with `source .venv/bin/activate`
|
2. Create a virtual environment with `python3 -m venv .venv`
|
||||||
2. Install with `pip install .`
|
3. Activate your dev environment with `source .venv/bin/activate`
|
||||||
3. Turn off production mode: `sudo su -c 'echo "production = 0" >> /etc/kibicara.conf'`
|
4. Update pip packages with `pip install -U pip setuptools wheel`
|
||||||
|
5. Install with `pip install .`
|
||||||
|
6. Install development dependencies with `pip install tox black pytest pytest-aiohttp`
|
||||||
|
7. Add git-hook to run test and stylecheck before commmit with
|
||||||
|
`ln -s ../../git-hooks/pre-commit .git/hooks/pre-commit`
|
||||||
|
8. Add git-hook to check commmit message format with
|
||||||
|
`ln -s ../../git-hooks/commit-msg .git/hooks/commit-msg`
|
||||||
|
9. Turn off production mode: `sudo su -c 'echo "production = 0" >> /etc/kibicara.conf'`
|
||||||
|
|
||||||
#### Cheatsheet
|
#### Cheatsheet
|
||||||
|
|
||||||
|
|
@ -22,7 +23,7 @@
|
||||||
- Execute Kibicara with `kibicara` (verbose: `kibicara -vvv`)
|
- Execute Kibicara with `kibicara` (verbose: `kibicara -vvv`)
|
||||||
- Interact with Swagger REST-API Documentation: `http://localhost:8000/api/docs`
|
- Interact with Swagger REST-API Documentation: `http://localhost:8000/api/docs`
|
||||||
- Test and stylecheck with `tox`
|
- Test and stylecheck with `tox`
|
||||||
- Fix style issues with `black -S src tests`
|
- Fix style issues with `black -S kibicara tests`
|
||||||
|
|
||||||
### Frontend
|
### Frontend
|
||||||
|
|
||||||
|
|
@ -59,9 +60,14 @@ email address and register via frontend or manually at `http://localhost:8000/ap
|
||||||
## Contribution Guidelines
|
## Contribution Guidelines
|
||||||
### Branches
|
### Branches
|
||||||
|
|
||||||
|
- **Master:** The master branch tracks the last stable release.
|
||||||
|
- Releases will be done using release tags.
|
||||||
|
- Force push and pushes without group consent are disallowed.
|
||||||
|
- There never should be a merge commit from development into master!
|
||||||
- **Development:** The development branch is used to add new features.
|
- **Development:** The development branch is used to add new features.
|
||||||
- Only rebase of feature branches is allowed.
|
- Only rebase of feature branches is allowed.
|
||||||
- On Release a release tag will be created
|
- On Release the development branch will be rebased onto master and a release
|
||||||
|
tag will be created on master
|
||||||
- **Feature-Branches:**
|
- **Feature-Branches:**
|
||||||
- A feature branch will be used to develop a feature.
|
- A feature branch will be used to develop a feature.
|
||||||
- It belongs to one developer only and force push is allowed.
|
- It belongs to one developer only and force push is allowed.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
# Kibicara backend
|
|
||||||
|
|
||||||
Kibicara relays messages between different platforms (= social networks).
|
|
||||||
This is just the backend. For info about the whole project see [our git
|
|
||||||
repo](https://git.0x90.space/ticketfrei/ticketfrei3).
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
[build-system]
|
|
||||||
requires = [
|
|
||||||
"setuptools>=42",
|
|
||||||
"wheel"
|
|
||||||
]
|
|
||||||
build-backend = "setuptools.build_meta"
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
||||||
[metadata]
|
|
||||||
name = kibicara
|
|
||||||
version = 0.1.0
|
|
||||||
author = 0x90.space
|
|
||||||
author_email = people@schleuder.0x90.space
|
|
||||||
description = distribute messages across different social media
|
|
||||||
long_description = file: README.md
|
|
||||||
long_description_content_type = text/markdown
|
|
||||||
url = https://git.0x90.space/ticketfrei/ticketfrei3
|
|
||||||
project_urls =
|
|
||||||
Bug Tracker = https://git.0x90.space/ticketfrei/ticketfrei3/issues
|
|
||||||
classifiers =
|
|
||||||
Programming Language :: Python :: 3
|
|
||||||
License :: Public Domain
|
|
||||||
|
|
||||||
[options]
|
|
||||||
package_dir =
|
|
||||||
= src
|
|
||||||
packages = find:
|
|
||||||
python_requires = >=3.10
|
|
||||||
install_requires =
|
|
||||||
aiofiles
|
|
||||||
aiogram
|
|
||||||
aiosqlite
|
|
||||||
argon2_cffi
|
|
||||||
fastapi
|
|
||||||
httpx
|
|
||||||
hypercorn
|
|
||||||
ormantic @ https://github.com/dl6tom/ormantic/tarball/master#egg=ormantic-0.0.32
|
|
||||||
passlib
|
|
||||||
peony-twitter[all]
|
|
||||||
pynacl
|
|
||||||
python-multipart
|
|
||||||
pytoml
|
|
||||||
requests
|
|
||||||
scrypt
|
|
||||||
Mastodon.py
|
|
||||||
|
|
||||||
[options.packages.find]
|
|
||||||
where = src
|
|
||||||
|
|
||||||
[options.entry_points]
|
|
||||||
console_scripts =
|
|
||||||
kibicara = kibicara.kibicara:Main
|
|
||||||
kibicara_mda = kibicara.platforms.email.mda:Main
|
|
||||||
|
|
||||||
[tox:tox]
|
|
||||||
envlist = lint, py310
|
|
||||||
isolated_build = True
|
|
||||||
|
|
||||||
[testenv:lint]
|
|
||||||
skip_install = True
|
|
||||||
deps =
|
|
||||||
black
|
|
||||||
flake8
|
|
||||||
mypy
|
|
||||||
commands =
|
|
||||||
black -S --check --diff src tests
|
|
||||||
flake8 src tests
|
|
||||||
# not yet
|
|
||||||
#mypy src tests
|
|
||||||
|
|
||||||
[testenv]
|
|
||||||
deps =
|
|
||||||
pytest
|
|
||||||
pytest-asyncio
|
|
||||||
commands =
|
|
||||||
pytest tests
|
|
||||||
|
|
||||||
[flake8]
|
|
||||||
max_line_length = 88
|
|
||||||
26775
frontend/package-lock.json
generated
26775
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,54 +0,0 @@
|
||||||
{
|
|
||||||
"name": "kibicara-frontend",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"scripts": {
|
|
||||||
"openapi-generator": "openapi-generator generate -g typescript-angular --additional-properties=providedInRoot=true -o src/app/core/api -i http://localhost:8000/api/openapi.json",
|
|
||||||
"ng": "ng",
|
|
||||||
"start": "ng serve",
|
|
||||||
"build": "ng build",
|
|
||||||
"test": "ng test",
|
|
||||||
"lint": "ng lint",
|
|
||||||
"e2e": "ng e2e"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@angular/animations": "^15.2.3",
|
|
||||||
"@angular/cdk": "^15.2.3",
|
|
||||||
"@angular/common": "^15.2.3",
|
|
||||||
"@angular/compiler": "^15.2.3",
|
|
||||||
"@angular/core": "^15.2.3",
|
|
||||||
"@angular/forms": "^15.2.3",
|
|
||||||
"@angular/localize": "^15.2.3",
|
|
||||||
"@angular/material": "^15.2.3",
|
|
||||||
"@angular/platform-browser": "^15.2.3",
|
|
||||||
"@angular/platform-browser-dynamic": "^15.2.3",
|
|
||||||
"@angular/router": "^15.2.3",
|
|
||||||
"ng2-search-filter": "^0.5.1",
|
|
||||||
"rxjs": "~6.5.4",
|
|
||||||
"tslib": "^2.0.0",
|
|
||||||
"zone.js": "~0.11.4"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@angular-devkit/build-angular": "^15.2.4",
|
|
||||||
"@angular/cli": "^15.2.4",
|
|
||||||
"@angular/compiler-cli": "^15.2.3",
|
|
||||||
"@angular/language-service": "^15.2.3",
|
|
||||||
"@openapitools/openapi-generator-cli": "^1.0.18-5.0.0-beta2",
|
|
||||||
"@types/jasmine": "~3.6.0",
|
|
||||||
"@types/jasminewd2": "~2.0.3",
|
|
||||||
"@types/node": "^12.12.64",
|
|
||||||
"codelyzer": "^6.0.0",
|
|
||||||
"jasmine-core": "~3.6.0",
|
|
||||||
"jasmine-spec-reporter": "~5.0.0",
|
|
||||||
"karma": "~6.4.1",
|
|
||||||
"karma-chrome-launcher": "~3.1.0",
|
|
||||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
|
||||||
"karma-jasmine": "~4.0.0",
|
|
||||||
"karma-jasmine-html-reporter": "^1.5.0",
|
|
||||||
"ngx-markdown": "^15.1.2",
|
|
||||||
"protractor": "~7.0.0",
|
|
||||||
"ts-node": "~8.3.0",
|
|
||||||
"tslint": "~6.1.0",
|
|
||||||
"typescript": "~4.9.5"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
<mat-card appearance="outlined" class="card">
|
|
||||||
<p>{{ status }}</p>
|
|
||||||
</mat-card>
|
|
||||||
|
|
@ -6,4 +6,4 @@
|
||||||
#
|
#
|
||||||
# client-side git-hook - run tests and stylechecker
|
# client-side git-hook - run tests and stylechecker
|
||||||
|
|
||||||
cd backend && exec .venv/bin/tox
|
exec tox
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ speed-measure-plugin*.json
|
||||||
.history/*
|
.history/*
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
/.angular/cache
|
|
||||||
/.sass-cache
|
/.sass-cache
|
||||||
/connect.lock
|
/connect.lock
|
||||||
/coverage
|
/coverage
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
"main": "src/main.ts",
|
"main": "src/main.ts",
|
||||||
"polyfills": "src/polyfills.ts",
|
"polyfills": "src/polyfills.ts",
|
||||||
"tsConfig": "tsconfig.app.json",
|
"tsConfig": "tsconfig.app.json",
|
||||||
|
"aot": true,
|
||||||
"assets": ["src/favicon.ico", "src/assets"],
|
"assets": ["src/favicon.ico", "src/assets"],
|
||||||
"styles": [
|
"styles": [
|
||||||
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
|
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
|
||||||
|
|
@ -30,13 +31,7 @@
|
||||||
"stylePreprocessorOptions": {
|
"stylePreprocessorOptions": {
|
||||||
"includePaths": ["src/sass"]
|
"includePaths": ["src/sass"]
|
||||||
},
|
},
|
||||||
"scripts": [],
|
"scripts": []
|
||||||
"vendorChunk": true,
|
|
||||||
"extractLicenses": false,
|
|
||||||
"buildOptimizer": false,
|
|
||||||
"sourceMap": true,
|
|
||||||
"optimization": false,
|
|
||||||
"namedChunks": true
|
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
|
|
@ -49,6 +44,7 @@
|
||||||
"optimization": true,
|
"optimization": true,
|
||||||
"outputHashing": "all",
|
"outputHashing": "all",
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
|
"extractCss": true,
|
||||||
"namedChunks": false,
|
"namedChunks": false,
|
||||||
"extractLicenses": true,
|
"extractLicenses": true,
|
||||||
"vendorChunk": false,
|
"vendorChunk": false,
|
||||||
|
|
@ -66,8 +62,7 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"defaultConfiguration": ""
|
|
||||||
},
|
},
|
||||||
"serve": {
|
"serve": {
|
||||||
"builder": "@angular-devkit/build-angular:dev-server",
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
|
|
@ -104,6 +99,17 @@
|
||||||
"scripts": []
|
"scripts": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"tsconfig.app.json",
|
||||||
|
"tsconfig.spec.json",
|
||||||
|
"e2e/tsconfig.json"
|
||||||
|
],
|
||||||
|
"exclude": ["**/node_modules/**", "src/app/core/api/**"]
|
||||||
|
}
|
||||||
|
},
|
||||||
"e2e": {
|
"e2e": {
|
||||||
"builder": "@angular-devkit/build-angular:protractor",
|
"builder": "@angular-devkit/build-angular:protractor",
|
||||||
"options": {
|
"options": {
|
||||||
|
|
@ -118,5 +124,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"defaultProject": "kibicara-frontend"
|
||||||
}
|
}
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../out-tsc/e2e",
|
"outDir": "../out-tsc/e2e",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es2018",
|
"target": "es5",
|
||||||
"types": [
|
"types": [
|
||||||
"jasmine",
|
"jasmine",
|
||||||
"jasminewd2",
|
"jasminewd2",
|
||||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
13550
kibicara-frontend/package-lock.json
generated
Normal file
13550
kibicara-frontend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
53
kibicara-frontend/package.json
Normal file
53
kibicara-frontend/package.json
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{
|
||||||
|
"name": "kibicara-frontend",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"scripts": {
|
||||||
|
"openapi-generator": "openapi-generator generate -g typescript-angular --additional-properties=providedInRoot=true -o src/app/core/api -i http://localhost:8000/api/openapi.json",
|
||||||
|
"ng": "ng",
|
||||||
|
"start": "ng serve",
|
||||||
|
"build": "ng build",
|
||||||
|
"test": "ng test",
|
||||||
|
"lint": "ng lint",
|
||||||
|
"e2e": "ng e2e"
|
||||||
|
},
|
||||||
|
"private": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@angular/animations": "~9.1.4",
|
||||||
|
"@angular/cdk": "^9.2.4",
|
||||||
|
"@angular/common": "~9.1.4",
|
||||||
|
"@angular/compiler": "~9.1.4",
|
||||||
|
"@angular/core": "~9.1.4",
|
||||||
|
"@angular/forms": "~9.1.4",
|
||||||
|
"@angular/material": "^9.2.4",
|
||||||
|
"@angular/platform-browser": "~9.1.4",
|
||||||
|
"@angular/platform-browser-dynamic": "~9.1.4",
|
||||||
|
"@angular/router": "~9.1.4",
|
||||||
|
"ng2-search-filter": "^0.5.1",
|
||||||
|
"ngx-markdown": "^10.1.1",
|
||||||
|
"rxjs": "~6.5.4",
|
||||||
|
"tslib": "^1.14.0",
|
||||||
|
"zone.js": "~0.10.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@angular-devkit/build-angular": "~0.901.4",
|
||||||
|
"@angular/cli": "~9.1.4",
|
||||||
|
"@angular/compiler-cli": "~9.1.4",
|
||||||
|
"@angular/language-service": "~9.1.4",
|
||||||
|
"@openapitools/openapi-generator-cli": "^1.0.18-5.0.0-beta2",
|
||||||
|
"@types/jasmine": "^3.5.14",
|
||||||
|
"@types/jasminewd2": "~2.0.3",
|
||||||
|
"@types/node": "^12.12.64",
|
||||||
|
"codelyzer": "^5.1.2",
|
||||||
|
"jasmine-core": "~3.5.0",
|
||||||
|
"jasmine-spec-reporter": "~4.2.1",
|
||||||
|
"karma": "~5.0.0",
|
||||||
|
"karma-chrome-launcher": "~3.1.0",
|
||||||
|
"karma-coverage-istanbul-reporter": "~2.1.0",
|
||||||
|
"karma-jasmine": "~3.0.1",
|
||||||
|
"karma-jasmine-html-reporter": "^1.4.2",
|
||||||
|
"protractor": "^7.0.0",
|
||||||
|
"ts-node": "~8.3.0",
|
||||||
|
"tslint": "^6.1.3",
|
||||||
|
"typescript": "~3.8.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -28,7 +28,7 @@ const routes: Routes = [
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forRoot(routes, {}), SharedModule],
|
imports: [RouterModule.forRoot(routes), SharedModule],
|
||||||
exports: [RouterModule],
|
exports: [RouterModule],
|
||||||
})
|
})
|
||||||
export class AppRoutingModule {}
|
export class AppRoutingModule {}
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import { TestBed, waitForAsync } from '@angular/core/testing';
|
import { TestBed, async } from '@angular/core/testing';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
|
||||||
describe('AppComponent', () => {
|
describe('AppComponent', () => {
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
RouterTestingModule
|
RouterTestingModule
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { ConfirmComponent } from './confirm.component';
|
import { ConfirmComponent } from './confirm.component';
|
||||||
|
|
||||||
|
|
@ -6,7 +6,7 @@ describe('ConfirmComponent', () => {
|
||||||
let component: ConfirmComponent;
|
let component: ConfirmComponent;
|
||||||
let fixture: ComponentFixture<ConfirmComponent>;
|
let fixture: ComponentFixture<ConfirmComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ ConfirmComponent ]
|
declarations: [ ConfirmComponent ]
|
||||||
})
|
})
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<mat-card appearance="outlined" class="login-form">
|
<mat-card class="login-form">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<h2>Log in as hood admin!</h2>
|
<h2>Log in as hood admin!</h2>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
margin-top: 3%;
|
margin-top: 3%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-mdc-card:not([class*="mat-elevation-z"]) {
|
.mat-card:not([class*="mat-elevation-z"]) {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { LoginComponent } from './login.component';
|
import { LoginComponent } from './login.component';
|
||||||
|
|
||||||
|
|
@ -6,7 +6,7 @@ describe('LoginComponent', () => {
|
||||||
let component: LoginComponent;
|
let component: LoginComponent;
|
||||||
let fixture: ComponentFixture<LoginComponent>;
|
let fixture: ComponentFixture<LoginComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ LoginComponent ]
|
declarations: [ LoginComponent ]
|
||||||
})
|
})
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { LoginService } from '../../core/auth/login.service';
|
import { LoginService } from '../../core/auth/login.service';
|
||||||
import { Router, ActivatedRoute } from '@angular/router';
|
import { Router, ActivatedRoute } from '@angular/router';
|
||||||
import { Validators, UntypedFormGroup, UntypedFormBuilder } from '@angular/forms';
|
import { Validators, FormGroup, FormBuilder } from '@angular/forms';
|
||||||
import { first } from 'rxjs/operators';
|
import { first } from 'rxjs/operators';
|
||||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||||
|
|
||||||
|
|
@ -11,7 +11,7 @@ import { MatSnackBar } from '@angular/material/snack-bar';
|
||||||
styleUrls: ['./login.component.scss'],
|
styleUrls: ['./login.component.scss'],
|
||||||
})
|
})
|
||||||
export class LoginComponent implements OnInit {
|
export class LoginComponent implements OnInit {
|
||||||
loginForm: UntypedFormGroup;
|
loginForm: FormGroup;
|
||||||
returnUrl: string;
|
returnUrl: string;
|
||||||
loading = false;
|
loading = false;
|
||||||
submitted = false;
|
submitted = false;
|
||||||
|
|
@ -21,7 +21,7 @@ export class LoginComponent implements OnInit {
|
||||||
private loginService: LoginService,
|
private loginService: LoginService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private formBuilder: UntypedFormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private snackBar: MatSnackBar
|
private snackBar: MatSnackBar
|
||||||
) {
|
) {
|
||||||
if (this.loginService.currentHoodAdminValue) {
|
if (this.loginService.currentHoodAdminValue) {
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<mat-card appearance="outlined" class="login-form">
|
<mat-card class="login-form">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<h2>Reset password</h2>
|
<h2>Reset password</h2>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
margin-top: 3%;
|
margin-top: 3%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-mdc-card:not([class*="mat-elevation-z"]) {
|
.mat-card:not([class*="mat-elevation-z"]) {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { PasswordResetComponent } from './password-reset.component';
|
import { PasswordResetComponent } from './password-reset.component';
|
||||||
|
|
||||||
|
|
@ -6,7 +6,7 @@ describe('PasswordResetComponent', () => {
|
||||||
let component: PasswordResetComponent;
|
let component: PasswordResetComponent;
|
||||||
let fixture: ComponentFixture<PasswordResetComponent>;
|
let fixture: ComponentFixture<PasswordResetComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [PasswordResetComponent],
|
declarations: [PasswordResetComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { first } from 'rxjs/operators';
|
import { first } from 'rxjs/operators';
|
||||||
|
|
@ -12,7 +12,7 @@ import { LoginService } from 'src/app/core/auth/login.service';
|
||||||
styleUrls: ['./password-reset.component.scss'],
|
styleUrls: ['./password-reset.component.scss'],
|
||||||
})
|
})
|
||||||
export class PasswordResetComponent implements OnInit {
|
export class PasswordResetComponent implements OnInit {
|
||||||
resetForm: UntypedFormGroup;
|
resetForm: FormGroup;
|
||||||
returnUrl: string;
|
returnUrl: string;
|
||||||
loading = false;
|
loading = false;
|
||||||
submitted = false;
|
submitted = false;
|
||||||
|
|
@ -23,7 +23,7 @@ export class PasswordResetComponent implements OnInit {
|
||||||
private loginService: LoginService,
|
private loginService: LoginService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private formBuilder: UntypedFormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private snackBar: MatSnackBar
|
private snackBar: MatSnackBar
|
||||||
) {
|
) {
|
||||||
if (this.loginService.currentHoodAdminValue) {
|
if (this.loginService.currentHoodAdminValue) {
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<mat-card appearance="outlined" class="login-form">
|
<mat-card class="login-form">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<h2>Enter your new password</h2>
|
<h2>Enter your new password</h2>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
margin-top: 3%;
|
margin-top: 3%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-mdc-card:not([class*="mat-elevation-z"]) {
|
.mat-card:not([class*="mat-elevation-z"]) {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { SetPasswordComponent } from './set-password.component';
|
import { SetPasswordComponent } from './set-password.component';
|
||||||
|
|
||||||
|
|
@ -6,7 +6,7 @@ describe('SetPasswordComponent', () => {
|
||||||
let component: SetPasswordComponent;
|
let component: SetPasswordComponent;
|
||||||
let fixture: ComponentFixture<SetPasswordComponent>;
|
let fixture: ComponentFixture<SetPasswordComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [SetPasswordComponent],
|
declarations: [SetPasswordComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { first } from 'rxjs/operators';
|
import { first } from 'rxjs/operators';
|
||||||
|
|
@ -12,7 +12,7 @@ import { LoginService } from 'src/app/core/auth/login.service';
|
||||||
styleUrls: ['./set-password.component.scss'],
|
styleUrls: ['./set-password.component.scss'],
|
||||||
})
|
})
|
||||||
export class SetPasswordComponent implements OnInit {
|
export class SetPasswordComponent implements OnInit {
|
||||||
resetForm: UntypedFormGroup;
|
resetForm: FormGroup;
|
||||||
returnUrl: string;
|
returnUrl: string;
|
||||||
loading = false;
|
loading = false;
|
||||||
submitted = false;
|
submitted = false;
|
||||||
|
|
@ -24,7 +24,7 @@ export class SetPasswordComponent implements OnInit {
|
||||||
private loginService: LoginService,
|
private loginService: LoginService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private formBuilder: UntypedFormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private snackBar: MatSnackBar
|
private snackBar: MatSnackBar
|
||||||
) {
|
) {
|
||||||
this.token = this.route.snapshot.queryParams.token;
|
this.token = this.route.snapshot.queryParams.token;
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="banner"></div>
|
<div class="banner"></div>
|
||||||
<mat-card appearance="outlined" class="register-form">
|
<mat-card class="register-form">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<h2>Register as a hood admin!</h2>
|
<h2>Register as a hood admin!</h2>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
margin-top: 3%;
|
margin-top: 3%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-mdc-card:not([class*="mat-elevation-z"]) {
|
.mat-card:not([class*="mat-elevation-z"]) {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { RegisterComponent } from './register.component';
|
import { RegisterComponent } from './register.component';
|
||||||
|
|
||||||
|
|
@ -6,7 +6,7 @@ describe('RegisterComponent', () => {
|
||||||
let component: RegisterComponent;
|
let component: RegisterComponent;
|
||||||
let fixture: ComponentFixture<RegisterComponent>;
|
let fixture: ComponentFixture<RegisterComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ RegisterComponent ]
|
declarations: [ RegisterComponent ]
|
||||||
})
|
})
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { AdminService } from '../../core/api';
|
import { AdminService } from '../../core/api';
|
||||||
import { Validators, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
|
||||||
import { first } from 'rxjs/operators';
|
import { first } from 'rxjs/operators';
|
||||||
import { Router, ActivatedRoute } from '@angular/router';
|
import { Router, ActivatedRoute } from '@angular/router';
|
||||||
import { LoginService } from 'src/app/core/auth/login.service';
|
import { LoginService } from 'src/app/core/auth/login.service';
|
||||||
|
|
@ -12,13 +12,13 @@ import { MatSnackBar } from '@angular/material/snack-bar';
|
||||||
styleUrls: ['./register.component.scss'],
|
styleUrls: ['./register.component.scss'],
|
||||||
})
|
})
|
||||||
export class RegisterComponent implements OnInit {
|
export class RegisterComponent implements OnInit {
|
||||||
registerForm: UntypedFormGroup;
|
registerForm: FormGroup;
|
||||||
loading = false;
|
loading = false;
|
||||||
submitted = false;
|
submitted = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly adminService: AdminService,
|
private readonly adminService: AdminService,
|
||||||
private formBuilder: UntypedFormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private loginService: LoginService,
|
private loginService: LoginService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<app-heading-one [title]="title"></app-heading-one>
|
<app-heading-one [title]="title"></app-heading-one>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<mat-card appearance="outlined">
|
<mat-card>
|
||||||
<form [formGroup]="form" class="form">
|
<form [formGroup]="form" class="form">
|
||||||
<mat-form-field appearance="fill">
|
<mat-form-field appearance="fill">
|
||||||
<mat-label for="email">E-Mail</mat-label>
|
<mat-label for="email">E-Mail</mat-label>
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
</form>
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
<mat-card appearance="outlined">
|
<mat-card>
|
||||||
<div class="delete">
|
<div class="delete">
|
||||||
<mat-card-title>Danger zone</mat-card-title>
|
<mat-card-title>Danger zone</mat-card-title>
|
||||||
<mat-divider></mat-divider>
|
<mat-divider></mat-divider>
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue