Enabled remote channel trees
parent
c6b0a7d731
commit
30357018c4
1
file.ts
1
file.ts
|
@ -314,6 +314,7 @@ namespace server {
|
|||
}
|
||||
|
||||
async function serve_file(pathname: string, response: http.ServerResponse) {
|
||||
if(pathname.startsWith("//")) { pathname = pathname.substring(1); }
|
||||
const file = await generator.search_http_file(files, pathname, options.search_options);
|
||||
if(!file) {
|
||||
console.log("[SERVER] Client requested unknown file %s", pathname);
|
||||
|
|
|
@ -382,25 +382,6 @@ export class ChannelTree {
|
|||
renderChannelTree(this, this.tagContainer[0], { popoutButton: true });
|
||||
|
||||
this.reset();
|
||||
|
||||
if(!settings.static(Settings.KEY_DISABLE_CONTEXT_MENU, false)) {
|
||||
/*
|
||||
TODO: Show the context menu when clicked on no channel
|
||||
this._tag_container.on("contextmenu", (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
const entry = this.view.current?.getEntryFromPoint(event.pageX, event.pageY);
|
||||
if(entry) {
|
||||
if(this.selection.is_multi_select()) {
|
||||
this.open_multiselect_context_menu(this.selection.selected_entries, event.pageX, event.pageY);
|
||||
}
|
||||
} else {
|
||||
this.selection.clear_selection();
|
||||
this.showContextMenu(event.pageX, event.pageY);
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
tag_tree() : JQuery {
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
import {RemoteIcon} from "tc-shared/file/Icons";
|
||||
import {ClientIcon} from "svg-sprites/client-icons";
|
||||
|
||||
import "./Ipc";
|
||||
|
||||
export type MenuEntryLabel = {
|
||||
text: string,
|
||||
bold?: boolean;
|
||||
} | string;
|
||||
|
||||
type MenuEntryClickable = {
|
||||
export type MenuEntryClickable = {
|
||||
uniqueId?: string,
|
||||
label: MenuEntryLabel,
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import {closeContextMenu, ContextMenuEntry, spawnContextMenu} from "tc-shared/ui/context-menu";
|
||||
import {closeContextMenu, ContextMenuEntry, spawnContextMenu} from "tc-shared/ui/ContextMenu";
|
||||
import {ClientIcon} from "svg-sprites/client-icons";
|
||||
|
||||
export interface MenuEntry {
|
||||
|
|
|
@ -11,7 +11,7 @@ import {useContext, useRef, useState} from "react";
|
|||
import {DropdownEntry} from "tc-shared/ui/frames/control-bar/DropDown";
|
||||
import {Translatable} from "tc-shared/ui/react-elements/i18n";
|
||||
import {Button} from "tc-shared/ui/frames/control-bar/Button";
|
||||
import {spawnContextMenu} from "tc-shared/ui/context-menu";
|
||||
import {spawnContextMenu} from "tc-shared/ui/ContextMenu";
|
||||
import {ClientIcon} from "svg-sprites/client-icons";
|
||||
|
||||
const cssStyle = require("./Renderer.scss");
|
||||
|
|
|
@ -14,7 +14,6 @@ import {setupJSRender} from "../../../ui/jsrender";
|
|||
|
||||
import "../../../file/RemoteAvatars";
|
||||
import "../../../file/RemoteIcons";
|
||||
import "../../context-menu";
|
||||
|
||||
let modalRenderer: ModalRenderer;
|
||||
let modalInstance: AbstractModal;
|
||||
|
|
|
@ -12,7 +12,7 @@ import "./hooks/AudioRecorder";
|
|||
|
||||
import "./UnloadHandler";
|
||||
|
||||
|
||||
import "./ui/context-menu";
|
||||
import "./ui/FaviconRenderer";
|
||||
|
||||
export = require("tc-shared/main");
|
|
@ -5,11 +5,10 @@ import {
|
|||
ContextMenuEntry,
|
||||
ContextMenuFactory,
|
||||
setGlobalContextMenuFactory
|
||||
} from "tc-shared/ui/context-menu/index";
|
||||
} from "tc-shared/ui/ContextMenu";
|
||||
import {ChannelMessage, IPCChannel} from "tc-shared/ipc/BrowserIPC";
|
||||
import * as ipc from "tc-shared/ipc/BrowserIPC";
|
||||
import {Settings} from "tc-shared/settings";
|
||||
import {reactContextMenuInstance} from "tc-shared/ui/context-menu/ReactRenderer";
|
||||
import {reactContextMenuInstance} from "./ReactRenderer";
|
||||
import {getIconManager, RemoteIcon} from "tc-shared/file/Icons";
|
||||
|
||||
const kIPCContextMenuChannel = "context-menu";
|
|
@ -5,7 +5,7 @@ import {
|
|||
ContextMenuEntry,
|
||||
ContextMenuEntryNormal,
|
||||
ContextMenuFactory, MenuEntryLabel,
|
||||
} from "tc-shared/ui/context-menu/index";
|
||||
} from "tc-shared/ui/ContextMenu";
|
||||
import * as React from "react";
|
||||
import * as ReactDOM from "react-dom";
|
||||
import {IconRenderer, RemoteIconRenderer} from "tc-shared/ui/react-elements/Icon";
|
||||
|
@ -189,91 +189,5 @@ loader.register_task(Stage.JAVASCRIPT_INITIALIZING, {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
setTimeout(() => {
|
||||
spawnContextMenu({ pageX: 100, pageY: 100 }, [
|
||||
{
|
||||
type: "normal",
|
||||
label: { text: "test", bold: true },
|
||||
icon: ClientIcon.IsTalker
|
||||
},
|
||||
{
|
||||
type: "normal",
|
||||
label: "test 2",
|
||||
icon: ClientIcon.ServerGreen
|
||||
},
|
||||
{
|
||||
type: "separator"
|
||||
},
|
||||
{
|
||||
type: "normal",
|
||||
label: "test 3",
|
||||
subMenu: [
|
||||
{
|
||||
type: "checkbox",
|
||||
label: "test - cb",
|
||||
checked: false
|
||||
},
|
||||
{
|
||||
type: "checkbox",
|
||||
label: "test - cb 1",
|
||||
checked: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "normal",
|
||||
label: "test 4",
|
||||
subMenu: [
|
||||
{
|
||||
type: "normal",
|
||||
label: "test 1",
|
||||
icon: ClientIcon.IsTalker
|
||||
},
|
||||
{
|
||||
type: "normal",
|
||||
label: "test 2",
|
||||
icon: ClientIcon.ServerGreen
|
||||
},
|
||||
{
|
||||
type: "separator"
|
||||
},
|
||||
{
|
||||
type: "normal",
|
||||
label: "test 3"
|
||||
},
|
||||
{
|
||||
type: "normal",
|
||||
label: "test 4",
|
||||
subMenu: [
|
||||
{
|
||||
type: "normal",
|
||||
label: "test 1",
|
||||
icon: ClientIcon.IsTalker
|
||||
},
|
||||
{
|
||||
type: "normal",
|
||||
label: "test 2",
|
||||
icon: ClientIcon.ServerGreen
|
||||
},
|
||||
{
|
||||
type: "separator"
|
||||
},
|
||||
{
|
||||
type: "normal",
|
||||
label: "test 3"
|
||||
},
|
||||
{
|
||||
type: "normal",
|
||||
label: "test 4"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]);
|
||||
}, 1000);
|
||||
*/
|
||||
}
|
||||
})
|
|
@ -0,0 +1 @@
|
|||
import "./Ipc.ts";
|
Loading…
Reference in New Issue