Replaced db project readme file with opening a doc in browser after project is created (#19543)

This commit is contained in:
Leila Lali
2022-05-27 08:24:00 -07:00
committed by GitHub
parent 1d276d90e0
commit 6b10ecd588
23 changed files with 33 additions and 105 deletions

View File

@@ -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));
}
}