This commit is contained in:
2020-08-18 15:48:14 +03:00
parent 4e465ce39f
commit 1d285fcfc3
117 changed files with 154 additions and 15 deletions
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Generated Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 304 B

After

Width:  |  Height:  |  Size: 304 B

View File

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 402 B

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Executable → Regular
View File
Executable → Regular
+2 -2
View File
@@ -1,4 +1,4 @@
const baseUrl = process.env.NODE_ENV === "development" ? 'http://localhost:8080/v1' : 'https://api.unmei.nix13.pw/v1';
const baseUrl = process.env.NODE_ENV === "development" ? 'http://localhost:8080/v1' : 'https://api.unmei.space/v1';
const response = async (url: string, method: string, body?: string | FormData) => {
let bUrl = baseUrl;
@@ -41,4 +41,4 @@ const TranslateStatus: { [id: string]: string } = {
export const getVersion = () => get('version');
export const version = '0.10';
export { get, post, put, del, TranslateStatus };
export { get, post, put, del, TranslateStatus };
Executable → Regular
+4 -1
View File
@@ -1,3 +1,6 @@
import {post} from "./api";
export const restore = (token: string, new_password: string) => post('auth/restore', { token, new_password });
export const restore = (token: string, new_password: string) => post('auth/restore', { token, new_password });
export const registerUser = (login: string, password: string, email: string, recaptcha: string) => post('auth/register', { login, password, email, recaptcha });
export const login = (login: string, password: string, recaptcha: string) => post('auth/login', { login, password, recaptcha });
export const userLogout = () => post('auth/logout');
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
+1 -5
View File
@@ -8,10 +8,6 @@ export const updateUser = (user: UserType) => put(`users/${user.id}`, { user })
export const fetchCurrentUser = () => get('users/me');
export const fetchUserNovels = (id: number) => get(`users/${id}/novels`);
export const registerUser = (login: string, password: string, email: string, recaptcha: string) => post('auth/register', { login, password, email, recaptcha });
export const login = (login: string, password: string, recaptcha: string) => post('auth/login', { login, password, recaptcha });
export const userLogout = () => post('auth/logout');
export const activateAccount = (token: string) => post('auth/activate', { token });
export const generateActivateLink = () => post('auth/activateToken');
@@ -19,4 +15,4 @@ export const fetchUserSettings = () => get('users/me/settings');
export const updateUserSettings = (use_gravatar: boolean, avatar: string) => post('users/me/settings', { use_gravatar, avatar });
export const uploadAvatar = (avatar: FormData) => post('users/me/avatar', avatar);
export const generateRestoreLink = (email: string, recaptcha: string) => post('auth/restoreToken', { email, recaptcha });
export const generateRestoreLink = (email: string, recaptcha: string) => post('auth/restoreToken', { email, recaptcha });
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
+2 -2
View File
@@ -1,6 +1,6 @@
import React, {FormEvent, ChangeEvent} from "react";
import Modal from "../../ui/Modal/Modal";
import {login} from "../../api/users";
import {login} from "../../api/auth";
import {connect} from "react-redux";
import {addNotification, hideModal, setModal, setUser} from "../../store/actions";
import './LoginModal.sass'
@@ -107,4 +107,4 @@ export default connect(null,
setModal: (modal: React.ReactNode | null) => dispatch(setModal(modal)),
hideModal: () => dispatch(hideModal())
})
)(LoginModal);
)(LoginModal);
View File
+2 -2
View File
@@ -2,7 +2,7 @@ import React from "react";
import Modal from "../../ui/Modal/Modal";
import Recaptcha from '../../ui/Recaptcha/Recaptcha'
import './RegisterModal.sass'
import {registerUser} from "../../api/users";
import {registerUser} from "../../api/auth";
import {connect} from "react-redux";
import {addNotification, setModal} from "../../store/actions";
import NotificationMessage from "../../ui/Notifications/NotificationMessage";
@@ -122,4 +122,4 @@ export default connect(null,
addNotification: (notification: React.ReactNode) => dispatch(addNotification(notification)),
setModal: (modal: React.ReactNode | null) => dispatch(setModal(modal))
})
)(RegisterModal);
)(RegisterModal);
Executable → Regular
View File
Executable → Regular
+2 -2
View File
@@ -1,7 +1,7 @@
import React from "react";
import './Navbar.sass'
import {connect} from "react-redux";
import {userLogout} from "../../api/users";
import {userLogout} from "../../api/auth";
import {Link} from "react-router-dom";
import {logout, setModal} from "../../store/actions";
import {hasAccessToAdminPanel} from "../../utils";
@@ -108,4 +108,4 @@ export default connect(
logout: () => dispatch(logout()),
setModal: (modal: React.ReactNode | null) => dispatch(setModal(modal))
})
)(Navbar);
)(Navbar);
Executable → Regular
+2 -1
View File
@@ -30,6 +30,7 @@ class AllNews extends React.Component<{}, State> {
<div className="News__Title">
Новости
</div>
{/*{<ProgressBar progress={50} alternative color={'red'}/>}*/}
{news.map(post => (
<Link key={post.id} to={`/post/${post.id}`}>
<NewsPost {...post} />
@@ -40,4 +41,4 @@ class AllNews extends React.Component<{}, State> {
}
}
export default AllNews;
export default AllNews;
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
View File
View File
View File
View File
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Vendored Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
Executable → Regular
View File
Executable → Regular
View File
View File
Executable → Regular
View File
Vendored Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File

Some files were not shown because too many files have changed in this diff Show More