mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-06 09:35:41 -05:00
Replaced db project readme file with opening a doc in browser after project is created (#19543)
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
import * as fs from 'fs';
|
||||
import type * as azdataType from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import * as constants from './constants';
|
||||
|
||||
export async function directoryExist(directoryPath: string): Promise<boolean> {
|
||||
const stats = await getFileStatus(directoryPath);
|
||||
@@ -69,3 +71,15 @@ try {
|
||||
export function getAzdataApi(): typeof azdataType | undefined {
|
||||
return azdataApi;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows a message with a "Learn More" button
|
||||
* @param message Info message
|
||||
* @param link Link to open when "Learn Button" is clicked
|
||||
*/
|
||||
export async function showInfoMessageWithLearnMoreLink(message: string, link: string): Promise<void> {
|
||||
const result = await vscode.window.showInformationMessage(message, constants.LearnMore);
|
||||
if (result === constants.LearnMore) {
|
||||
void vscode.env.openExternal(vscode.Uri.parse(link));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user