mirror of
https://github.com/plankanban/planka.git
synced 2025-12-23 01:11:40 +03:00
@@ -1,29 +1,30 @@
|
||||
const { BASE_URL } = window;
|
||||
|
||||
const BASE_PATH = BASE_URL.replace(/^.*\/\/[^/]*(.*)[^?#]*.*$/, '$1');
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
const SERVER_BASE_URL =
|
||||
process.env.REACT_APP_SERVER_BASE_URL ||
|
||||
(process.env.NODE_ENV === 'production' ? BASE_URL : 'http://localhost:1337');
|
||||
|
||||
const SERVER_BASE_PATH = SERVER_BASE_URL.replace(/^.*\/\/[^/]*(.*)[^?#]*.*$/, '$1');
|
||||
const SERVER_HOST_NAME = SERVER_BASE_URL.replace(/^(.*\/\/[^/?#]*).*$/, '$1');
|
||||
import.meta.env.VITE_SERVER_BASE_URL || (import.meta.env.DEV ? 'http://localhost:1337' : '');
|
||||
|
||||
const ACCESS_TOKEN_KEY = 'accessToken';
|
||||
const ACCESS_TOKEN_VERSION_KEY = 'accessTokenVersion';
|
||||
const ACCESS_TOKEN_VERSION = '1';
|
||||
|
||||
const POSITION_GAP = 65535;
|
||||
const POSITION_GAP = 65536;
|
||||
const CARDS_LIMIT = 50;
|
||||
const COMMENTS_LIMIT = 50;
|
||||
const ACTIVITIES_LIMIT = 50;
|
||||
|
||||
const IS_MAC = navigator.platform.startsWith('Mac');
|
||||
|
||||
export default {
|
||||
BASE_PATH,
|
||||
SERVER_BASE_URL,
|
||||
SERVER_BASE_PATH,
|
||||
SERVER_HOST_NAME,
|
||||
ACCESS_TOKEN_KEY,
|
||||
ACCESS_TOKEN_VERSION_KEY,
|
||||
ACCESS_TOKEN_VERSION,
|
||||
POSITION_GAP,
|
||||
CARDS_LIMIT,
|
||||
COMMENTS_LIMIT,
|
||||
ACTIVITIES_LIMIT,
|
||||
IS_MAC,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user