rename all 'writer' to 'photos'

This commit is contained in:
2020-10-12 19:53:36 +03:00
committed by Stepan Usatiuk
parent 63c30750af
commit a8b5117979
9 changed files with 43 additions and 39 deletions

View File

@@ -15,10 +15,10 @@
"server": "db",
"driver": "MySQL",
"port": 3306,
"database": "writer",
"username": "writer",
"database": "photos",
"username": "photos",
"askForPassword": false,
"password": "writer",
"password": "photos",
"connectionTimeout": 15
},
{
@@ -26,10 +26,10 @@
"server": "dbtest",
"driver": "MySQL",
"port": 3306,
"database": "writer_test",
"username": "writer",
"database": "photos_test",
"username": "photos",
"askForPassword": false,
"password": "writer",
"password": "photos",
"connectionTimeout": 15
}
]
@@ -42,7 +42,10 @@
"ms-vscode.vscode-typescript-tslint-plugin"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [1234, 3000],
"forwardPorts": [
1234,
3000
],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm config set unsafe-perm=true && npm i && cd frontend && npm i",
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.

View File

@@ -33,10 +33,10 @@ services:
volumes:
- mariadb-data:/var/lib/mysql
environment:
MYSQL_DATABASE: writer
MYSQL_USER: writer
MYSQL_PASSWORD: writer
MYSQL_ROOT_PASSWORD: writer
MYSQL_DATABASE: photos
MYSQL_USER: photos
MYSQL_PASSWORD: photos
MYSQL_ROOT_PASSWORD: photos
dbtest:
image: mariadb:latest
@@ -44,10 +44,10 @@ services:
volumes:
- mariadbtest-data:/var/lib/mysql
environment:
MYSQL_DATABASE: writer_test
MYSQL_USER: writer
MYSQL_PASSWORD: writer
MYSQL_ROOT_PASSWORD: writer
MYSQL_DATABASE: photos_test
MYSQL_USER: photos
MYSQL_PASSWORD: photos
MYSQL_ROOT_PASSWORD: photos
# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward MongoDB locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

View File

@@ -4,7 +4,7 @@ import { AuthScreen } from "~Auth/AuthScreen";
import { requireAuth } from "~Auth/AuthWrapper";
import { Home } from "~Home/Home";
export function AppComponent(props: RouteComponentProps) {
export const AppComponent: React.FunctionComponent<RouteComponentProps> = () => {
return (
<Switch>
<Route path="/signup" component={AuthScreen} />,
@@ -12,6 +12,6 @@ export function AppComponent(props: RouteComponentProps) {
<Route path="/" component={requireAuth(Home)} />,
</Switch>
);
}
};
export const App = withRouter(AppComponent);

View File

@@ -5,7 +5,7 @@ export const AppToaster = Toaster.create({
position: Position.TOP,
});
export function showPasswordSavedToast() {
export function showPasswordSavedToast(): void {
AppToaster.show({
message: "Password saved!",
intent: "success",
@@ -13,7 +13,7 @@ export function showPasswordSavedToast() {
});
}
export function showPasswordNotSavedToast(error: string) {
export function showPasswordNotSavedToast(error: string): void {
AppToaster.show({
message: "Password not saved! " + error,
intent: "danger",

View File

@@ -52,7 +52,7 @@ export class HomeComponent extends React.PureComponent<IHomeProps> {
minimal={true}
onClick={() => this.props.history.push("/")}
>
Writer
Photos
</Button>
<Navbar.Divider />
</Navbar.Group>

View File

@@ -10,7 +10,7 @@ export function LandingComponent(props: RouteComponentProps) {
<>
<Navbar>
<Navbar.Group align={Alignment.LEFT}>
<Navbar.Heading>Writer</Navbar.Heading>
<Navbar.Heading>Photos</Navbar.Heading>
<Navbar.Divider />
</Navbar.Group>
<Navbar.Group align={Alignment.RIGHT}>

View File

@@ -1,20 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link
href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i&display=swap&subset=cyrillic,cyrillic-ext,latin-ext"
rel="stylesheet"
/>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Writer</title>
</head>
<link
href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i&display=swap&subset=cyrillic,cyrillic-ext,latin-ext"
rel="stylesheet" />
<body>
<div id="body"></div>
<script src="./index.tsx"></script>
</body>
</html>
<title>Photos</title>
</head>
<body>
<div id="body"></div>
<script src="./index.tsx"></script>
</body>
</html>

View File

@@ -1,3 +1,3 @@
export function flushPromises() {
export function flushPromises(): Promise<unknown> {
return new Promise(setImmediate);
}

View File

@@ -15,8 +15,8 @@
"lint-frontend-fix": "cd frontend && npm run lint-fix",
"lint-all": "npm run lint && npm run lint-frontend",
"lint-all-fix": "npm run lint-fix && npm run lint-frontend-fix",
"prettier-check": "prettier src/** --check && prettier frontend/src/** --check",
"prettify": "prettier src/** --write && prettier frontend/src/** --write"
"prettier-check": "prettier src/**/*.ts frontend/src/**/*.ts frontend/src/**/*.tsx --check",
"prettify": "prettier src/**/*.ts frontend/src/**/*.ts frontend/src/**/*.tsx --write"
},
"license": "MIT",
"dependencies": {