-
-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support multiple instances * Completely switch to state * Update to work properly * Move setting classes to their own models * Update service names * Only auto upload using focused window * Resolve merge conflicts
- Loading branch information
1 parent
d0002f2
commit 272273e
Showing
14 changed files
with
237 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { Environment } from "../environmentPath"; | ||
|
||
export class CloudSettings { | ||
public lastUpload: Date = null; | ||
public extensionVersion: string = "v" + Environment.getVersion(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,32 @@ | ||
"use strict"; | ||
import { Environment } from "./environmentPath"; | ||
|
||
export class ExtensionConfig { | ||
public gist: string = null; | ||
public quietSync: boolean = false; | ||
public removeExtensions: boolean = true; | ||
public syncExtensions: boolean = true; | ||
public autoDownload: boolean = false; | ||
public autoUpload = false; | ||
public forceDownload: boolean = false; | ||
} | ||
|
||
export class LocalConfig { | ||
public publicGist: boolean = false; | ||
public userName: string = null; | ||
public name: string = null; | ||
public extConfig: ExtensionConfig = new ExtensionConfig(); | ||
public customConfig: CustomSettings = new CustomSettings(); | ||
} | ||
|
||
export class CloudSetting { | ||
public lastUpload: Date = null; | ||
public extensionVersion: string = "v" + Environment.getVersion(); | ||
} | ||
|
||
export class KeyValue<T, S> { | ||
constructor(public Key: T, public Value: S) {} | ||
} | ||
|
||
export class CustomSettings { | ||
public ignoreUploadFiles: string[] = [ | ||
"state.*", | ||
"syncLocalSettings.json", | ||
".DS_Store", | ||
"sync.lock", | ||
"projects.json", | ||
"projects_cache_vscode.json", | ||
"projects_cache_git.json", | ||
"projects_cache_svn.json", | ||
"gpm_projects.json", | ||
"gpm-recentItems.json" | ||
]; | ||
public ignoreUploadFolders: string[] = ["workspaceStorage"]; | ||
public ignoreExtensions: string[] = []; | ||
public gistDescription: string = "Visual Studio Code Settings Sync Gist"; | ||
public version: number = Environment.CURRENT_VERSION; | ||
public token: string = ""; | ||
public downloadPublicGist: boolean = false; | ||
public supportedFileExtensions: string[] = ["json", "code-snippets"]; | ||
public openTokenLink: boolean = true; | ||
public disableUpdateMessage: boolean = false; | ||
public lastUpload: Date = null; | ||
public lastDownload: Date = null; | ||
public githubEnterpriseUrl: string = null; | ||
public askGistName: boolean = false; | ||
public customFiles: { [key: string]: string } = {}; | ||
public hostName: string = null; | ||
public universalKeybindings: boolean = false; | ||
} | ||
import { Environment } from "../environmentPath"; | ||
|
||
export class CustomConfig { | ||
public ignoreUploadFiles: string[] = [ | ||
"state.*", | ||
"syncLocalSettings.json", | ||
".DS_Store", | ||
"sync.lock", | ||
"projects.json", | ||
"projects_cache_vscode.json", | ||
"projects_cache_git.json", | ||
"projects_cache_svn.json", | ||
"gpm_projects.json", | ||
"gpm-recentItems.json" | ||
]; | ||
public ignoreUploadFolders: string[] = ["workspaceStorage"]; | ||
public ignoreExtensions: string[] = []; | ||
public gistDescription: string = "Visual Studio Code Settings Sync Gist"; | ||
public version: number = Environment.CURRENT_VERSION; | ||
public token: string = ""; | ||
public downloadPublicGist: boolean = false; | ||
public supportedFileExtensions: string[] = ["json", "code-snippets"]; | ||
public openTokenLink: boolean = true; | ||
public disableUpdateMessage: boolean = false; | ||
public lastUpload: Date = null; | ||
public lastDownload: Date = null; | ||
public githubEnterpriseUrl: string = null; | ||
public askGistName: boolean = false; | ||
public customFiles: { [key: string]: string } = {}; | ||
public hostName: string = null; | ||
public universalKeybindings: boolean = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export class ExtensionConfig { | ||
public gist = null; | ||
public quietSync = false; | ||
public removeExtensions = true; | ||
public syncExtensions = true; | ||
public autoDownload = false; | ||
public autoUpload = false; | ||
public forceDownload = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { CustomConfig } from "./customConfig.model"; | ||
import { ExtensionConfig } from "./extensionConfig.model"; | ||
|
||
export class LocalConfig { | ||
public publicGist: boolean = false; | ||
public userName: string = null; | ||
public name: string = null; | ||
public extConfig = new ExtensionConfig(); | ||
public customConfig = new CustomConfig(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ExtensionContext } from "vscode"; | ||
import Commons from "../commons"; | ||
import { Environment } from "../environmentPath"; | ||
|
||
export interface IExtensionState { | ||
context?: ExtensionContext; | ||
environment?: Environment; | ||
commons?: Commons; | ||
instanceID: string; | ||
} |
Oops, something went wrong.