Skip to content

Commit 6b06445

Browse files
committed
yarn format
1 parent c2aa193 commit 6b06445

11 files changed

+24
-27
lines changed

src/commons/controlBar/ControlBarToggleFolderModeButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const ControlBarToggleFolderModeButton: React.FC<Props> = ({
3232
iconColor: isFolderModeEnabled ? Colors.BLUE4 : undefined
3333
}}
3434
onClick={toggleFolderMode}
35-
isDisabled={isSessionActive || false && isPersistenceActive}
35+
isDisabled={isSessionActive || isPersistenceActive}
3636
/>
3737
</Tooltip2>
3838
);

src/commons/fileSystem/FileSystemActions.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
import { createAction } from '@reduxjs/toolkit';
2-
import { GitHubSaveInfo } from 'src/features/github/GitHubTypes';
32
import { FSModule } from 'browserfs/dist/node/core/FS';
3+
import { GitHubSaveInfo } from 'src/features/github/GitHubTypes';
4+
import { PersistenceFile } from 'src/features/persistence/PersistenceTypes';
45

56
import {
67
ADD_GITHUB_SAVE_INFO,
7-
DELETE_ALL_GITHUB_SAVE_INFO,
8-
DELETE_GITHUB_SAVE_INFO,
9-
SET_IN_BROWSER_FILE_SYSTEM,
10-
UPDATE_GITHUB_SAVE_INFO,
118
ADD_PERSISTENCE_FILE,
9+
DELETE_ALL_GITHUB_SAVE_INFO,
10+
DELETE_ALL_PERSISTENCE_FILES, DELETE_GITHUB_SAVE_INFO,
1211
DELETE_PERSISTENCE_FILE,
13-
DELETE_ALL_PERSISTENCE_FILES } from './FileSystemTypes';
14-
import { PersistenceFile } from 'src/features/persistence/PersistenceTypes';
12+
SET_IN_BROWSER_FILE_SYSTEM,
13+
UPDATE_GITHUB_SAVE_INFO } from './FileSystemTypes';
1514

1615
export const setInBrowserFileSystem = createAction(
1716
SET_IN_BROWSER_FILE_SYSTEM,

src/commons/fileSystem/FileSystemReducer.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ import { Reducer } from 'redux';
44
import { defaultFileSystem } from '../application/ApplicationTypes';
55
import { SourceActionType } from '../utils/ActionsHelper';
66
import {
7-
setInBrowserFileSystem,
87
addGithubSaveInfo,
9-
deleteAllGithubSaveInfo,
10-
deleteGithubSaveInfo,
118
addPersistenceFile,
9+
deleteAllGithubSaveInfo,
10+
deleteAllPersistenceFiles, deleteGithubSaveInfo,
1211
deletePersistenceFile,
13-
deleteAllPersistenceFiles } from './FileSystemActions';
12+
setInBrowserFileSystem } from './FileSystemActions';
1413
import { FileSystemState } from './FileSystemTypes';
1514

1615
export const FileSystemReducer: Reducer<FileSystemState, SourceActionType> = createReducer(
@@ -25,7 +24,7 @@ export const FileSystemReducer: Reducer<FileSystemState, SourceActionType> = cre
2524
const githubSaveInfoArray = state['githubSaveInfoArray']
2625

2726
const saveInfoIndex = githubSaveInfoArray.findIndex(e => e === githubSaveInfoPayload);
28-
if (saveInfoIndex == -1) {
27+
if (saveInfoIndex === -1) {
2928
githubSaveInfoArray[githubSaveInfoArray.length] = githubSaveInfoPayload;
3029
} else {
3130
// file already exists, to replace file

src/commons/fileSystemView/FileSystemViewDirectoryNode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { FSModule } from 'browserfs/dist/node/core/FS';
44
import path from 'path';
55
import React from 'react';
66
import { useDispatch } from 'react-redux';
7+
import { persistenceCreateFile, persistenceCreateFolder, persistenceDeleteFolder } from 'src/features/persistence/PersistenceActions';
78
import classes from 'src/styles/FileSystemView.module.scss';
89

910
import { rmdirRecursively } from '../fileSystem/FileSystemUtils';
@@ -15,7 +16,6 @@ import FileSystemViewFileName from './FileSystemViewFileName';
1516
import FileSystemViewIndentationPadding from './FileSystemViewIndentationPadding';
1617
import FileSystemViewList from './FileSystemViewList';
1718
import FileSystemViewPlaceholderNode from './FileSystemViewPlaceholderNode';
18-
import { persistenceCreateFile, persistenceCreateFolder, persistenceDeleteFolder } from 'src/features/persistence/PersistenceActions';
1919

2020
type Props = {
2121
workspaceLocation: WorkspaceLocation;

src/commons/fileSystemView/FileSystemViewFileName.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { FSModule } from 'browserfs/dist/node/core/FS';
22
import path from 'path';
33
import React from 'react';
44
import { useDispatch } from 'react-redux';
5+
import { persistenceRenameFile, persistenceRenameFolder } from 'src/features/persistence/PersistenceActions';
56
import classes from 'src/styles/FileSystemView.module.scss';
67

78
import { showSimpleErrorDialog } from '../utils/DialogHelper';
@@ -10,7 +11,6 @@ import {
1011
renameEditorTabsForDirectory
1112
} from '../workspace/WorkspaceActions';
1213
import { WorkspaceLocation } from '../workspace/WorkspaceTypes';
13-
import { persistenceRenameFile, persistenceRenameFolder } from 'src/features/persistence/PersistenceActions';
1414

1515
type Props = {
1616
workspaceLocation: WorkspaceLocation;

src/commons/fileSystemView/FileSystemViewFileNode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { FSModule } from 'browserfs/dist/node/core/FS';
44
import path from 'path';
55
import React from 'react';
66
import { useDispatch, useStore } from 'react-redux';
7+
import { persistenceDeleteFile } from 'src/features/persistence/PersistenceActions';
78
import classes from 'src/styles/FileSystemView.module.scss';
89

910
import { OverallState } from '../application/ApplicationTypes';
@@ -13,7 +14,6 @@ import { WorkspaceLocation } from '../workspace/WorkspaceTypes';
1314
import FileSystemViewContextMenu from './FileSystemViewContextMenu';
1415
import FileSystemViewFileName from './FileSystemViewFileName';
1516
import FileSystemViewIndentationPadding from './FileSystemViewIndentationPadding';
16-
import { persistenceDeleteFile } from 'src/features/persistence/PersistenceActions';
1717

1818
type Props = {
1919
workspaceLocation: WorkspaceLocation;

src/commons/sagas/GitHubPersistenceSaga.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
GetResponseDataTypeFromEndpointMethod,
33
GetResponseTypeFromEndpointMethod
44
} from '@octokit/types';
5+
import { FSModule } from 'browserfs/dist/node/core/FS';
56
import { SagaIterator } from 'redux-saga';
67
import { call, put, select, takeLatest } from 'redux-saga/effects';
78

@@ -24,7 +25,6 @@ import Constants from '../utils/Constants';
2425
import { promisifyDialog } from '../utils/DialogHelper';
2526
import { showSuccessMessage } from '../utils/notifications/NotificationsHelper';
2627
import { EditorTabState } from '../workspace/WorkspaceTypes';
27-
import { FSModule } from 'browserfs/dist/node/core/FS';
2828

2929
export function* GitHubPersistenceSaga(): SagaIterator {
3030
yield takeLatest(LOGIN_GITHUB, githubLoginSaga);

src/commons/sagas/PersistenceSaga.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ async function getFilesOfFolder( // recursively get files
769769
let fileList: gapi.client.drive.File[] | undefined;
770770

771771
await gapi.client.drive.files.list({
772-
q: '\'' + folderId + '\'' + ' in parents and trashed = false',
772+
q: `'${folderId}' in parents and trashed = false`
773773
}).then(res => {
774774
fileList = res.result.files
775775
});
@@ -858,8 +858,8 @@ async function getContainingFolderIdRecursively( // TODO memoize?
858858
let folderList: gapi.client.drive.File[] | undefined;
859859

860860
await gapi.client.drive.files.list({
861-
q: '\'' + immediateParentFolderId + '\'' + ' in parents and trashed = false and mimeType = \''
862-
+ "application/vnd.google-apps.folder" + '\'',
861+
q: `'${immediateParentFolderId}' in parents and trashed = false and mimeType = '`
862+
+ 'application/vnd.google-apps.folder\''
863863
}).then(res => {
864864
folderList = res.result.files
865865
});

src/features/github/GitHubActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createAction } from '@reduxjs/toolkit';
22

3-
import { GITHUB_OPEN_FILE, GITHUB_SAVE_FILE, GITHUB_SAVE_FILE_AS, GITHUB_SAVE_ALL } from './GitHubTypes';
3+
import { GITHUB_OPEN_FILE, GITHUB_SAVE_ALL,GITHUB_SAVE_FILE, GITHUB_SAVE_FILE_AS } from './GitHubTypes';
44

55
export const githubOpenFile = createAction(GITHUB_OPEN_FILE, () => ({ payload: {} }));
66

src/features/github/GitHubUtils.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Octokit } from '@octokit/rest';
2-
32
import {
43
GetResponseDataTypeFromEndpointMethod,
54
GetResponseTypeFromEndpointMethod

0 commit comments

Comments
 (0)