mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
chore: standardize tsconfig (#9568)
This commit is contained in:
@@ -9,11 +9,14 @@ import {
|
||||
WebContentViewsManager,
|
||||
} from './tab-views';
|
||||
|
||||
export const showTabContextMenu = async (tabId: string, viewIndex: number) => {
|
||||
export const showTabContextMenu = async (
|
||||
tabId: string,
|
||||
viewIndex: number
|
||||
): Promise<TabAction | null> => {
|
||||
const workbenches = WebContentViewsManager.instance.tabViewsMeta.workbenches;
|
||||
const tabMeta = workbenches.find(w => w.id === tabId);
|
||||
if (!tabMeta) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
const { resolve, promise } = Promise.withResolvers<TabAction | null>();
|
||||
@@ -93,7 +96,7 @@ export const showTabContextMenu = async (tabId: string, viewIndex: number) => {
|
||||
];
|
||||
const menu = Menu.buildFromTemplate(template);
|
||||
menu.popup();
|
||||
// eslint-disable-next-line prefer-const
|
||||
|
||||
let unsub: (() => void) | undefined;
|
||||
const subscription = WebContentViewsManager.instance.tabAction$.subscribe(
|
||||
action => {
|
||||
|
||||
Reference in New Issue
Block a user