mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-07 19:28:44 +01:00
e2bd3cd94a
Adds a meta field `pinnedurl` that can be set to override the `web:defaulturl` setting for a given block. Also adds a home button to the webview to reset the block url to the homepage The help view is now an extension of the webview with some of the chrome removed. Also updates the cookie dependency to resolve a vulnerability
37 lines
946 B
TypeScript
37 lines
946 B
TypeScript
// Copyright 2024, Command Line Inc.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import { QuickTips } from "@/app/element/quicktips";
|
|
import { globalStore } from "@/app/store/global";
|
|
import { Atom, atom, PrimitiveAtom } from "jotai";
|
|
import "./quicktipsview.less";
|
|
|
|
class QuickTipsViewModel implements ViewModel {
|
|
viewType: string;
|
|
showTocAtom: PrimitiveAtom<boolean>;
|
|
endIconButtons: Atom<IconButtonDecl[]>;
|
|
|
|
constructor() {
|
|
this.viewType = "tips";
|
|
this.showTocAtom = atom(false);
|
|
}
|
|
|
|
showTocToggle() {
|
|
globalStore.set(this.showTocAtom, !globalStore.get(this.showTocAtom));
|
|
}
|
|
}
|
|
|
|
function makeQuickTipsViewModel() {
|
|
return new QuickTipsViewModel();
|
|
}
|
|
|
|
function QuickTipsView({ model }: { model: QuickTipsViewModel }) {
|
|
return (
|
|
<div className="quicktips-view">
|
|
<QuickTips />
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export { makeQuickTipsViewModel, QuickTipsView, QuickTipsViewModel };
|