// Copyright (c) jdneo. All rights reserved. // Licensed under the MIT license. import { ViewColumn } from "vscode"; import { openKeybindingsEditor, promptHintMessage } from "../utils/uiUtils"; import { ILeetCodeWebviewOption, LeetCodeWebview } from "./LeetCodeWebview"; import { markdownEngine } from "./markdownEngine"; class LeetCodeSubmissionProvider extends LeetCodeWebview { protected readonly viewType: string = "leetcode.submission"; private result: string; public show(result: string): void { this.result = result; this.showWebviewInternal(); this.showKeybindingsHint(); } protected getWebviewOption(): ILeetCodeWebviewOption { return { title: "Submission", viewColumn: ViewColumn.Two, }; } protected getWebviewContent(): string { return `
${markdownEngine.getStyles()}${this.result.trim()}
`;
}
protected onDidDisposeWebview(): void {
super.onDidDisposeWebview();
delete this.result;
}
private async showKeybindingsHint(): Promise