Removed import to the old icon handler

This commit is contained in:
WolverinDEV 2020-09-26 11:17:55 +02:00
parent 0e373cb8d9
commit ef07b0c2e5
11 changed files with 14 additions and 19 deletions

View file

@ -93,19 +93,19 @@ export class ImageCache {
this._cache_category = await caches.open(this.cache_name); this._cache_category = await caches.open(this.cache_name);
} }
async cleanup(max_age: number) { async cleanup(maxAge: number) {
/* FIXME: TODO */ /* FIXME: TODO */
} }
async resolveCached(key: string, max_age?: number) : Promise<Response | undefined> { async resolveCached(key: string, maxAge?: number) : Promise<Response | undefined> {
max_age = typeof(max_age) === "number" ? max_age : -1; maxAge = typeof(maxAge) === "number" ? maxAge : -1;
const cached_response = await this._cache_category.match("https://_local_cache/cache_request_" + key); const cachedResponse = await this._cache_category.match("https://_local_cache/cache_request_" + key);
if(!cached_response) if(!cachedResponse)
return undefined; return undefined;
/* FIXME: Max age */ /* FIXME: Max age */
return cached_response; return cachedResponse;
} }
async putCache(key: string, value: Response, type?: string, headers?: {[key: string]:string}) { async putCache(key: string, value: Response, type?: string, headers?: {[key: string]:string}) {

View file

@ -239,7 +239,7 @@ export class FileTransfer {
this.setTransferState(FileTransferState.PENDING); this.setTransferState(FileTransferState.PENDING);
this.events = new Registry<FileTransferEvents>(); this.events = new Registry<FileTransferEvents>();
this.events.on("notify_transfer_canceled", event => { this.events.on("notify_transfer_canceled", () => {
this.setTransferState(FileTransferState.CANCELED); this.setTransferState(FileTransferState.CANCELED);
}); });
} }

View file

@ -20,7 +20,6 @@ import {spawnAbout} from "../../ui/modal/ModalAbout";
import * as loader from "tc-loader"; import * as loader from "tc-loader";
import {formatMessage} from "../../ui/frames/chat"; import {formatMessage} from "../../ui/frames/chat";
import {control_bar_instance} from "../../ui/frames/control-bar"; import {control_bar_instance} from "../../ui/frames/control-bar";
import {icon_cache_loader, IconManager, LocalIcon} from "../../file/IconsOld";
import {spawnPermissionEditorModal} from "../../ui/modal/permission/ModalPermissionEditor"; import {spawnPermissionEditorModal} from "../../ui/modal/permission/ModalPermissionEditor";
import {global_client_actions} from "tc-shared/events/GlobalEvents"; import {global_client_actions} from "tc-shared/events/GlobalEvents";
import {server_connections} from "tc-shared/ConnectionManager"; import {server_connections} from "tc-shared/ConnectionManager";

View file

@ -6,8 +6,6 @@ import {ConnectionHandlerList} from "tc-shared/ui/frames/connection-handler-list
import {server_connections} from "tc-shared/ConnectionManager"; import {server_connections} from "tc-shared/ConnectionManager";
import {LogCategory, logWarn} from "tc-shared/log"; import {LogCategory, logWarn} from "tc-shared/log";
import {ConnectionState} from "tc-shared/ConnectionHandler"; import {ConnectionState} from "tc-shared/ConnectionHandler";
import {LocalIcon} from "../../../file/IconsOld";
import {RemoteIconInfo} from "tc-shared/file/Icons";
export function initializeConnectionUIList() { export function initializeConnectionUIList() {
const container = document.getElementById("connection-handler-list"); const container = document.getElementById("connection-handler-list");

View file

@ -6,7 +6,7 @@ import {
} from "tc-shared/ui/frames/connection-handler-list/Definitions"; } from "tc-shared/ui/frames/connection-handler-list/Definitions";
import * as React from "react"; import * as React from "react";
import {useContext, useEffect, useRef, useState} from "react"; import {useContext, useEffect, useRef, useState} from "react";
import {IconRenderer, LocalIconRenderer, RemoteIconRenderer} from "tc-shared/ui/react-elements/Icon"; import {RemoteIconRenderer} from "tc-shared/ui/react-elements/Icon";
import {ClientIcon} from "svg-sprites/client-icons"; import {ClientIcon} from "svg-sprites/client-icons";
import {Translatable} from "tc-shared/ui/react-elements/i18n"; import {Translatable} from "tc-shared/ui/react-elements/i18n";
import {LoadingDots} from "tc-shared/ui/react-elements/LoadingDots"; import {LoadingDots} from "tc-shared/ui/react-elements/LoadingDots";
@ -38,7 +38,7 @@ const ConnectionHandler = React.memo((props: { handlerId: string, mode: Connecti
let displayedName; let displayedName;
let cutoffName = false; let cutoffName = false;
let voiceReplaying = false; let voiceReplaying = false;
let icon = <IconRenderer icon={ClientIcon.ServerGreen} key={"default"} />; let icon = <ClientIconRenderer icon={ClientIcon.ServerGreen} key={"default"} />;
if(status === "loading") { if(status === "loading") {
displayedName = tr("loading status"); displayedName = tr("loading status");
} else { } else {
@ -79,7 +79,7 @@ const ConnectionHandler = React.memo((props: { handlerId: string, mode: Connecti
<div className={cssStyle.buttonClose} onClick={() => { <div className={cssStyle.buttonClose} onClick={() => {
events.fire("action_destroy_handler", { handlerId: props.handlerId }) events.fire("action_destroy_handler", { handlerId: props.handlerId })
}}> }}>
<IconRenderer icon={ClientIcon.TabCloseButton} /> <ClientIconRenderer icon={ClientIcon.TabCloseButton} />
</div> </div>
</div> </div>
); );

View file

@ -20,7 +20,6 @@ import * as i18nc from "../../i18n/country";
import {formatMessage} from "../../ui/frames/chat"; import {formatMessage} from "../../ui/frames/chat";
import * as top_menu from "../frames/MenuBar"; import * as top_menu from "../frames/MenuBar";
import {control_bar_instance} from "../../ui/frames/control-bar"; import {control_bar_instance} from "../../ui/frames/control-bar";
import {icon_cache_loader, IconManager} from "../../file/IconsOld";
import {generateIconJQueryTag, getIconManager} from "tc-shared/file/Icons"; import {generateIconJQueryTag, getIconManager} from "tc-shared/file/Icons";
export function spawnBookmarkModal() { export function spawnBookmarkModal() {

View file

@ -7,7 +7,6 @@ import {ConnectionProfile, defaultConnectProfile, findConnectProfile, availableC
import {KeyCode} from "../../PPTListener"; import {KeyCode} from "../../PPTListener";
import * as i18nc from "../../i18n/country"; import * as i18nc from "../../i18n/country";
import {spawnSettingsModal} from "../../ui/modal/ModalSettings"; import {spawnSettingsModal} from "../../ui/modal/ModalSettings";
import {icon_cache_loader, IconManager} from "../../file/IconsOld";
import {server_connections} from "tc-shared/ConnectionManager"; import {server_connections} from "tc-shared/ConnectionManager";
import {generateIconJQueryTag, getIconManager} from "tc-shared/file/Icons"; import {generateIconJQueryTag, getIconManager} from "tc-shared/file/Icons";

View file

@ -11,7 +11,7 @@ import {LogCategory} from "tc-shared/log";
import ResizeObserver from "resize-observer-polyfill"; import ResizeObserver from "resize-observer-polyfill";
import {LoadingDots} from "tc-shared/ui/react-elements/LoadingDots"; import {LoadingDots} from "tc-shared/ui/react-elements/LoadingDots";
import {Button} from "tc-shared/ui/react-elements/Button"; import {Button} from "tc-shared/ui/react-elements/Button";
import {IconRenderer, LocalIconRenderer, RemoteIconRenderer} from "tc-shared/ui/react-elements/Icon"; import {IconRenderer, RemoteIconRenderer} from "tc-shared/ui/react-elements/Icon";
import {ConnectionHandler} from "tc-shared/ConnectionHandler"; import {ConnectionHandler} from "tc-shared/ConnectionHandler";
import * as contextmenu from "tc-shared/ui/elements/ContextMenu"; import * as contextmenu from "tc-shared/ui/elements/ContextMenu";
import {copy_to_clipboard} from "tc-shared/utils/helpers"; import {copy_to_clipboard} from "tc-shared/utils/helpers";

View file

@ -4,7 +4,7 @@ import {EventHandler, ReactEventHandler, Registry} from "tc-shared/events";
import {ChannelInfo, GroupProperties, PermissionModalEvents} from "tc-shared/ui/modal/permission/ModalPermissionEditor"; import {ChannelInfo, GroupProperties, PermissionModalEvents} from "tc-shared/ui/modal/permission/ModalPermissionEditor";
import {PermissionEditorEvents} from "tc-shared/ui/modal/permission/PermissionEditor"; import {PermissionEditorEvents} from "tc-shared/ui/modal/permission/PermissionEditor";
import {ConnectionHandler} from "tc-shared/ConnectionHandler"; import {ConnectionHandler} from "tc-shared/ConnectionHandler";
import {LocalIconRenderer, RemoteIconRenderer} from "tc-shared/ui/react-elements/Icon"; import {RemoteIconRenderer} from "tc-shared/ui/react-elements/Icon";
import {createInputModal} from "tc-shared/ui/elements/Modal"; import {createInputModal} from "tc-shared/ui/elements/Modal";
import {Translatable} from "tc-shared/ui/react-elements/i18n"; import {Translatable} from "tc-shared/ui/react-elements/i18n";
import {LoadingDots} from "tc-shared/ui/react-elements/LoadingDots"; import {LoadingDots} from "tc-shared/ui/react-elements/LoadingDots";

View file

@ -35,7 +35,7 @@ export const RemoteIconRenderer = (props: { icon: RemoteIcon, className?: string
return <div key={"loaded"} className={"icon_em client-group_" + props.icon.iconId + " " + props.className} title={props.title} />; return <div key={"loaded"} className={"icon_em client-group_" + props.icon.iconId + " " + props.className} title={props.title} />;
} }
return ( return (
<div key={"icon-" + props.icon.iconId} className={"icon-container " + props.className} x-debug-version={2}> <div key={"icon-" + props.icon.iconId} className={"icon-container " + props.className}>
<img style={{ maxWidth: "100%", maxHeight: "100%" }} src={props.icon.getImageUrl()} alt={props.title || ("icon " + props.icon.iconId)} draggable={false} /> <img style={{ maxWidth: "100%", maxHeight: "100%" }} src={props.icon.getImageUrl()} alt={props.title || ("icon " + props.icon.iconId)} draggable={false} />
</div> </div>
); );

View file

@ -1,7 +1,7 @@
import {BatchUpdateAssignment, BatchUpdateType} from "tc-shared/ui/react-elements/ReactComponentBase"; import {BatchUpdateAssignment, BatchUpdateType} from "tc-shared/ui/react-elements/ReactComponentBase";
import {ServerEntry as ServerEntryController, ServerEvents} from "../../tree/Server"; import {ServerEntry as ServerEntryController, ServerEvents} from "../../tree/Server";
import * as React from "react"; import * as React from "react";
import {LocalIconRenderer, RemoteIconRenderer} from "tc-shared/ui/react-elements/Icon"; import {RemoteIconRenderer} from "tc-shared/ui/react-elements/Icon";
import {EventHandler, ReactEventHandler} from "tc-shared/events"; import {EventHandler, ReactEventHandler} from "tc-shared/events";
import {Settings, settings} from "tc-shared/settings"; import {Settings, settings} from "tc-shared/settings";
import {TreeEntry, UnreadMarker} from "tc-shared/ui/tree/TreeEntry"; import {TreeEntry, UnreadMarker} from "tc-shared/ui/tree/TreeEntry";