Add github oauth logo.

This commit is contained in:
Yang Luo
2021-02-13 21:04:23 +08:00
parent cf2152846c
commit bac289d387
6 changed files with 70 additions and 3 deletions

View File

@ -16,15 +16,25 @@ import {message} from "antd";
import React from "react";
import {isMobile as isMobileDevice} from "react-device-detect";
export let ServerUrl = '';
export let ServerUrl = "";
export let ClientUrl = "";
export function initServerUrl() {
const hostname = window.location.hostname;
if (hostname === 'localhost') {
if (hostname === "localhost") {
ServerUrl = `http://${hostname}:8000`;
}
}
export function initClientUrl() {
const hostname = window.location.hostname;
if (hostname === "localhost") {
ClientUrl = `http://${hostname}:7001`;
} else {
ClientUrl = `https://${hostname}`;
}
}
export function parseJson(s) {
if (s === "") {
return null;