mirror of
https://github.com/usebruno/bruno.git
synced 2025-06-26 15:01:40 +02:00
adds PATH_SEPARATOR constant
This commit is contained in:
parent
9ca22cd1d1
commit
b07ccbdfab
@ -21,7 +21,7 @@ import {
|
|||||||
} from 'utils/collections';
|
} from 'utils/collections';
|
||||||
import { collectionSchema, itemSchema, environmentSchema, environmentsSchema } from '@usebruno/schema';
|
import { collectionSchema, itemSchema, environmentSchema, environmentsSchema } from '@usebruno/schema';
|
||||||
import { waitForNextTick } from 'utils/common';
|
import { waitForNextTick } from 'utils/common';
|
||||||
import { getDirectoryName, isWindowsOS } from 'utils/common/platform';
|
import { getDirectoryName, isWindowsOS, PATH_SEPARATOR } from 'utils/common/platform';
|
||||||
import { sendNetworkRequest, cancelNetworkRequest } from 'utils/network';
|
import { sendNetworkRequest, cancelNetworkRequest } from 'utils/network';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -46,8 +46,6 @@ import {
|
|||||||
import { closeAllCollectionTabs } from 'providers/ReduxStore/slices/tabs';
|
import { closeAllCollectionTabs } from 'providers/ReduxStore/slices/tabs';
|
||||||
import { resolveRequestFilename } from 'utils/common/platform';
|
import { resolveRequestFilename } from 'utils/common/platform';
|
||||||
|
|
||||||
const PATH_SEPARATOR = path.sep;
|
|
||||||
|
|
||||||
export const renameCollection = (newName, collectionUid) => (dispatch, getState) => {
|
export const renameCollection = (newName, collectionUid) => (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const collection = findCollectionByUid(state.collections.collections, collectionUid);
|
const collection = findCollectionByUid(state.collections.collections, collectionUid);
|
||||||
|
@ -24,9 +24,7 @@ import {
|
|||||||
areItemsTheSameExceptSeqUpdate
|
areItemsTheSameExceptSeqUpdate
|
||||||
} from 'utils/collections';
|
} from 'utils/collections';
|
||||||
import { parseQueryParams, stringifyQueryParams } from 'utils/url';
|
import { parseQueryParams, stringifyQueryParams } from 'utils/url';
|
||||||
import { getSubdirectoriesFromRoot, getDirectoryName, isWindowsOS } from 'utils/common/platform';
|
import { getSubdirectoriesFromRoot, getDirectoryName, PATH_SEPARATOR } from 'utils/common/platform';
|
||||||
|
|
||||||
const PATH_SEPARATOR = isWindowsOS() ? '\\' : '/';
|
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
collections: [],
|
collections: [],
|
||||||
|
@ -48,3 +48,5 @@ export const isMacOS = () => {
|
|||||||
|
|
||||||
return osFamily.includes('os x');
|
return osFamily.includes('os x');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const PATH_SEPARATOR = isWindowsOS() ? '\\' : '/';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user