feat: store local system name in global state
This commit is contained in:
10
src/utils.ts
10
src/utils.ts
@@ -115,4 +115,14 @@ export async function showErrorNotification(message: string): Promise<void> {
|
||||
} else if (selection === 'Report a problem') {
|
||||
vscode.commands.executeCommand('vscode.open', vscode.Uri.parse('https://gitee.com/SuperIDE/DevStar/issues'));
|
||||
}
|
||||
}
|
||||
|
||||
export function updateLocalSystemName(context: vscode.ExtensionContext) {
|
||||
// win32, linux, darwin
|
||||
const name = os.platform()
|
||||
context.globalState.update('localSystemName', name)
|
||||
}
|
||||
|
||||
export function getLocalSystemName(context: vscode.ExtensionContext): string | undefined {
|
||||
return context.globalState.get('localSystemName')
|
||||
}
|
Reference in New Issue
Block a user