2024-08-01 07:22:52 +02:00
|
|
|
// Copyright 2024, Command Line Inc.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2024-10-04 05:28:05 +02:00
|
|
|
import { getApi } from "@/app/store/global";
|
|
|
|
import { useState } from "react";
|
2024-08-01 07:22:52 +02:00
|
|
|
import "./helpview.less";
|
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
class HelpViewModel implements ViewModel {
|
|
|
|
viewType: string;
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
this.viewType = "help";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function makeHelpViewModel() {
|
|
|
|
return new HelpViewModel();
|
|
|
|
}
|
|
|
|
|
2024-10-04 05:28:05 +02:00
|
|
|
function HelpView({}: { model: HelpViewModel }) {
|
|
|
|
const [url] = useState(() => getApi().getDocsiteUrl());
|
|
|
|
return (
|
|
|
|
<div className="help-view">
|
|
|
|
<webview className="docsite-webview" src={url} />
|
|
|
|
</div>
|
|
|
|
);
|
2024-08-01 07:22:52 +02:00
|
|
|
}
|
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
export { HelpView, HelpViewModel, makeHelpViewModel };
|