mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 09:35:36 -05:00
* Add message when no history exists on projects dashboard * Bump version for sql db projects * Update text, add refresh button * Remove commented code
41 lines
1.4 KiB
TypeScript
41 lines
1.4 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import * as vscode from 'vscode';
|
|
|
|
export interface IconPath {
|
|
dark: string;
|
|
light: string;
|
|
}
|
|
|
|
export class IconPathHelper {
|
|
private static extensionContext: vscode.ExtensionContext;
|
|
public static folder: IconPath;
|
|
public static refresh: IconPath;
|
|
|
|
public static setExtensionContext(extensionContext: vscode.ExtensionContext) {
|
|
IconPathHelper.extensionContext = extensionContext;
|
|
|
|
IconPathHelper.folder = IconPathHelper.makeIcon('folder', true);
|
|
IconPathHelper.refresh = IconPathHelper.makeIcon('refresh', true);
|
|
}
|
|
|
|
private static makeIcon(name: string, sameIcon: boolean = false) {
|
|
const folder = 'images';
|
|
|
|
if (sameIcon) {
|
|
return {
|
|
dark: IconPathHelper.extensionContext.asAbsolutePath(`${folder}/${name}.svg`),
|
|
light: IconPathHelper.extensionContext.asAbsolutePath(`${folder}/${name}.svg`)
|
|
};
|
|
} else {
|
|
return {
|
|
dark: IconPathHelper.extensionContext.asAbsolutePath(`${folder}/dark/${name}.svg`),
|
|
light: IconPathHelper.extensionContext.asAbsolutePath(`${folder}/light/${name}.svg`)
|
|
};
|
|
}
|
|
}
|
|
}
|