mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
Add github oauth logo.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user