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) {
|
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);
|
const file = await generator.search_http_file(files, pathname, options.search_options);
|
||||||
if(!file) {
|
if(!file) {
|
||||||
console.log("[SERVER] Client requested unknown file %s", pathname);
|
console.log("[SERVER] Client requested unknown file %s", pathname);
|
||||||
|
|
|
@ -382,25 +382,6 @@ export class ChannelTree {
|
||||||
renderChannelTree(this, this.tagContainer[0], { popoutButton: true });
|
renderChannelTree(this, this.tagContainer[0], { popoutButton: true });
|
||||||
|
|
||||||
this.reset();
|
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 {
|
tag_tree() : JQuery {
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
import {RemoteIcon} from "tc-shared/file/Icons";
|
import {RemoteIcon} from "tc-shared/file/Icons";
|
||||||
import {ClientIcon} from "svg-sprites/client-icons";
|
import {ClientIcon} from "svg-sprites/client-icons";
|
||||||
|
|
||||||
import "./Ipc";
|
|
||||||
|
|
||||||
export type MenuEntryLabel = {
|
export type MenuEntryLabel = {
|
||||||
text: string,
|
text: string,
|
||||||
bold?: boolean;
|
bold?: boolean;
|
||||||
} | string;
|
} | string;
|
||||||
|
|
||||||
type MenuEntryClickable = {
|
export type MenuEntryClickable = {
|
||||||
uniqueId?: string,
|
uniqueId?: string,
|
||||||
label: MenuEntryLabel,
|
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";
|
import {ClientIcon} from "svg-sprites/client-icons";
|
||||||
|
|
||||||
export interface MenuEntry {
|
export interface MenuEntry {
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {useContext, useRef, useState} from "react";
|
||||||
import {DropdownEntry} from "tc-shared/ui/frames/control-bar/DropDown";
|
import {DropdownEntry} from "tc-shared/ui/frames/control-bar/DropDown";
|
||||||
import {Translatable} from "tc-shared/ui/react-elements/i18n";
|
import {Translatable} from "tc-shared/ui/react-elements/i18n";
|
||||||
import {Button} from "tc-shared/ui/frames/control-bar/Button";
|
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";
|
import {ClientIcon} from "svg-sprites/client-icons";
|
||||||
|
|
||||||
const cssStyle = require("./Renderer.scss");
|
const cssStyle = require("./Renderer.scss");
|
||||||
|
|
|
@ -14,7 +14,6 @@ import {setupJSRender} from "../../../ui/jsrender";
|
||||||
|
|
||||||
import "../../../file/RemoteAvatars";
|
import "../../../file/RemoteAvatars";
|
||||||
import "../../../file/RemoteIcons";
|
import "../../../file/RemoteIcons";
|
||||||
import "../../context-menu";
|
|
||||||
|
|
||||||
let modalRenderer: ModalRenderer;
|
let modalRenderer: ModalRenderer;
|
||||||
let modalInstance: AbstractModal;
|
let modalInstance: AbstractModal;
|
||||||
|
|
|
@ -12,7 +12,7 @@ import "./hooks/AudioRecorder";
|
||||||
|
|
||||||
import "./UnloadHandler";
|
import "./UnloadHandler";
|
||||||
|
|
||||||
|
import "./ui/context-menu";
|
||||||
import "./ui/FaviconRenderer";
|
import "./ui/FaviconRenderer";
|
||||||
|
|
||||||
export = require("tc-shared/main");
|
export = require("tc-shared/main");
|
|
@ -5,11 +5,10 @@ import {
|
||||||
ContextMenuEntry,
|
ContextMenuEntry,
|
||||||
ContextMenuFactory,
|
ContextMenuFactory,
|
||||||
setGlobalContextMenuFactory
|
setGlobalContextMenuFactory
|
||||||
} from "tc-shared/ui/context-menu/index";
|
} from "tc-shared/ui/ContextMenu";
|
||||||
import {ChannelMessage, IPCChannel} from "tc-shared/ipc/BrowserIPC";
|
import {ChannelMessage, IPCChannel} from "tc-shared/ipc/BrowserIPC";
|
||||||
import * as ipc from "tc-shared/ipc/BrowserIPC";
|
import * as ipc from "tc-shared/ipc/BrowserIPC";
|
||||||
import {Settings} from "tc-shared/settings";
|
import {reactContextMenuInstance} from "./ReactRenderer";
|
||||||
import {reactContextMenuInstance} from "tc-shared/ui/context-menu/ReactRenderer";
|
|
||||||
import {getIconManager, RemoteIcon} from "tc-shared/file/Icons";
|
import {getIconManager, RemoteIcon} from "tc-shared/file/Icons";
|
||||||
|
|
||||||
const kIPCContextMenuChannel = "context-menu";
|
const kIPCContextMenuChannel = "context-menu";
|
|
@ -5,7 +5,7 @@ import {
|
||||||
ContextMenuEntry,
|
ContextMenuEntry,
|
||||||
ContextMenuEntryNormal,
|
ContextMenuEntryNormal,
|
||||||
ContextMenuFactory, MenuEntryLabel,
|
ContextMenuFactory, MenuEntryLabel,
|
||||||
} from "tc-shared/ui/context-menu/index";
|
} from "tc-shared/ui/ContextMenu";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import * as ReactDOM from "react-dom";
|
import * as ReactDOM from "react-dom";
|
||||||
import {IconRenderer, RemoteIconRenderer} from "tc-shared/ui/react-elements/Icon";
|
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