Home Reference Source
public class | source

ElectronSettings

You can directly use an instance of this class. electronSettings

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

DOWNLOAD_PATH: string

public
public
public

PATCHID_FIELD: string

public
public
public
public
public
public

WINDOW_BOUNDS: string

public
public

data: *

public

opts: {}

Private Members
private
private

_log: *

Method Summary

Public Methods
public

addToRecentProjects(projectFile: *, project: *)

public

get(key: *): *

public

getBuildInfo(): {"updateWarning": *, "core": *, "ui": *, "api": *}

public
public
public
public

getCurrentUser(): {"username": *, "_id": *, "profile_theme": string, "isStaff": *, "usernameLowercase": *, "isAdmin": *, "theme": string, "created": *}

public
public

getProjectFromFile(projectFile: *): *

public

getRecentProjectFile(projectId: *): *

public
public

getUserSetting(key: *, defaultValue: undefined): *

public
public

replaceInRecentProjects(oldFile: *, newFile: *, newProject: *): *

public

set(key: *, val: *, silent: *)

public

setProject(projectFile: *, newProject: *)

public

setRecentProjects(recents: *): *

public

setUserSettings(value: *)

Private Methods
private

_parseDataFile(filePath: *, defaults: *): *

private

_setCurrentProject(projectFile: *, project: *)

private
private
private

_toRecentProjectInfo(project: *): {"_id": *, "shortId": *, "name": *, "screenshot": *, "created": *, "updated": *}

private

Public Constructors

public constructor() source

Public Members

public CURRENTPROJECTDIR_FIELD: string source

public DOWNLOAD_PATH: string source

public MAIN_CONFIG_NAME: string source

public OPEN_DEV_TOOLS_FIELD: string source

public PATCHID_FIELD: string source

public PROJECTFILE_FIELD: string source

public RECENT_PROJECTS_FIELD: string source

public SESSION_PARTITION: string source

public STORAGEDIR_FIELD: string source

public USER_SETTINGS_FIELD: string source

public WINDOW_BOUNDS: string source

public WINDOW_ZOOM_FACTOR: string source

public data: * source

public opts: {} source

Private Members

private _currentProject: * source

private _log: * source

Public Methods

public addToRecentProjects(projectFile: *, project: *) source

Params:

NameTypeAttributeDescription
projectFile *
project *

public get(key: *): * source

Params:

NameTypeAttributeDescription
key *

Return:

*

public getBuildInfo(): {"updateWarning": *, "core": *, "ui": *, "api": *} source

Return:

{"updateWarning": *, "core": *, "ui": *, "api": *}

public getCurrentProject(): * source

Return:

*

public getCurrentProjectDir(): * source

Return:

*

public getCurrentProjectFile(): * source

Return:

*

public getCurrentUser(): {"username": *, "_id": *, "profile_theme": string, "isStaff": *, "usernameLowercase": *, "isAdmin": *, "theme": string, "created": *} source

Return:

{"username": *, "_id": *, "profile_theme": string, "isStaff": *, "usernameLowercase": *, "isAdmin": *, "theme": string, "created": *}

public getDownloadPath(): * source

Return:

*

public getProjectFromFile(projectFile: *): * source

Params:

NameTypeAttributeDescription
projectFile *

Return:

*

public getRecentProjectFile(projectId: *): * source

Params:

NameTypeAttributeDescription
projectId *

Return:

*

public getRecentProjects(): * source

Return:

*

public getUserSetting(key: *, defaultValue: undefined): * source

Params:

NameTypeAttributeDescription
key *
defaultValue undefined
  • optional
  • default: undefined

Return:

*

public refresh() source

public replaceInRecentProjects(oldFile: *, newFile: *, newProject: *): * source

Params:

NameTypeAttributeDescription
oldFile *
newFile *
newProject *

Return:

*

public set(key: *, val: *, silent: *) source

Params:

NameTypeAttributeDescription
key *
val *
silent *

public setProject(projectFile: *, newProject: *) source

Params:

NameTypeAttributeDescription
projectFile *
newProject *

public setRecentProjects(recents: *): * source

Params:

NameTypeAttributeDescription
recents *

Return:

*

public setUserSettings(value: *) source

Params:

NameTypeAttributeDescription
value *

Private Methods

private _parseDataFile(filePath: *, defaults: *): * source

Params:

NameTypeAttributeDescription
filePath *
defaults *

Return:

*

private _setCurrentProject(projectFile: *, project: *) source

Params:

NameTypeAttributeDescription
projectFile *
project *

private _setCurrentProjectDir(value: *) source

Params:

NameTypeAttributeDescription
value *

private _setCurrentProjectFile(value: *) source

Params:

NameTypeAttributeDescription
value *

private _toRecentProjectInfo(project: *): {"_id": *, "shortId": *, "name": *, "screenshot": *, "created": *, "updated": *} source

Params:

NameTypeAttributeDescription
project *

Return:

{"_id": *, "shortId": *, "name": *, "screenshot": *, "created": *, "updated": *}

private _updateRecentProjects() source