Removed import to the old icon handler
This commit is contained in:
parent
0e373cb8d9
commit
ef07b0c2e5
11 changed files with 14 additions and 19 deletions
|
@ -93,19 +93,19 @@ export class ImageCache {
|
|||
this._cache_category = await caches.open(this.cache_name);
|
||||
}
|
||||
|
||||
async cleanup(max_age: number) {
|
||||
async cleanup(maxAge: number) {
|
||||
/* FIXME: TODO */
|
||||
}
|
||||
|
||||
async resolveCached(key: string, max_age?: number) : Promise<Response | undefined> {
|
||||
max_age = typeof(max_age) === "number" ? max_age : -1;
|
||||
async resolveCached(key: string, maxAge?: number) : Promise<Response | undefined> {
|
||||
maxAge = typeof(maxAge) === "number" ? maxAge : -1;
|
||||
|
||||
const cached_response = await this._cache_category.match("https://_local_cache/cache_request_" + key);
|
||||
if(!cached_response)
|
||||
const cachedResponse = await this._cache_category.match("https://_local_cache/cache_request_" + key);
|
||||
if(!cachedResponse)
|
||||
return undefined;
|
||||
|
||||
/* FIXME: Max age */
|
||||
return cached_response;
|
||||
return cachedResponse;
|
||||
}
|
||||
|
||||
async putCache(key: string, value: Response, type?: string, headers?: {[key: string]:string}) {
|
||||
|
|
|
@ -239,7 +239,7 @@ export class FileTransfer {
|
|||
this.setTransferState(FileTransferState.PENDING);
|
||||
|
||||
this.events = new Registry<FileTransferEvents>();
|
||||
this.events.on("notify_transfer_canceled", event => {
|
||||
this.events.on("notify_transfer_canceled", () => {
|
||||
this.setTransferState(FileTransferState.CANCELED);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ import {spawnAbout} from "../../ui/modal/ModalAbout";
|
|||
import * as loader from "tc-loader";
|
||||
import {formatMessage} from "../../ui/frames/chat";
|
||||
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 {global_client_actions} from "tc-shared/events/GlobalEvents";
|
||||
import {server_connections} from "tc-shared/ConnectionManager";
|
||||
|
|
|
@ -6,8 +6,6 @@ import {ConnectionHandlerList} from "tc-shared/ui/frames/connection-handler-list
|
|||
import {server_connections} from "tc-shared/ConnectionManager";
|
||||
import {LogCategory, logWarn} from "tc-shared/log";
|
||||
import {ConnectionState} from "tc-shared/ConnectionHandler";
|
||||
import {LocalIcon} from "../../../file/IconsOld";
|
||||
import {RemoteIconInfo} from "tc-shared/file/Icons";
|
||||
|
||||
export function initializeConnectionUIList() {
|
||||
const container = document.getElementById("connection-handler-list");
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
} from "tc-shared/ui/frames/connection-handler-list/Definitions";
|
||||
import * as React 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 {Translatable} from "tc-shared/ui/react-elements/i18n";
|
||||
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 cutoffName = false;
|
||||
let voiceReplaying = false;
|
||||
let icon = <IconRenderer icon={ClientIcon.ServerGreen} key={"default"} />;
|
||||
let icon = <ClientIconRenderer icon={ClientIcon.ServerGreen} key={"default"} />;
|
||||
if(status === "loading") {
|
||||
displayedName = tr("loading status");
|
||||
} else {
|
||||
|
@ -79,7 +79,7 @@ const ConnectionHandler = React.memo((props: { handlerId: string, mode: Connecti
|
|||
<div className={cssStyle.buttonClose} onClick={() => {
|
||||
events.fire("action_destroy_handler", { handlerId: props.handlerId })
|
||||
}}>
|
||||
<IconRenderer icon={ClientIcon.TabCloseButton} />
|
||||
<ClientIconRenderer icon={ClientIcon.TabCloseButton} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -20,7 +20,6 @@ import * as i18nc from "../../i18n/country";
|
|||
import {formatMessage} from "../../ui/frames/chat";
|
||||
import * as top_menu from "../frames/MenuBar";
|
||||
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";
|
||||
|
||||
export function spawnBookmarkModal() {
|
||||
|
|
|
@ -7,7 +7,6 @@ import {ConnectionProfile, defaultConnectProfile, findConnectProfile, availableC
|
|||
import {KeyCode} from "../../PPTListener";
|
||||
import * as i18nc from "../../i18n/country";
|
||||
import {spawnSettingsModal} from "../../ui/modal/ModalSettings";
|
||||
import {icon_cache_loader, IconManager} from "../../file/IconsOld";
|
||||
import {server_connections} from "tc-shared/ConnectionManager";
|
||||
import {generateIconJQueryTag, getIconManager} from "tc-shared/file/Icons";
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import {LogCategory} from "tc-shared/log";
|
|||
import ResizeObserver from "resize-observer-polyfill";
|
||||
import {LoadingDots} from "tc-shared/ui/react-elements/LoadingDots";
|
||||
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 * as contextmenu from "tc-shared/ui/elements/ContextMenu";
|
||||
import {copy_to_clipboard} from "tc-shared/utils/helpers";
|
||||
|
|
|
@ -4,7 +4,7 @@ import {EventHandler, ReactEventHandler, Registry} from "tc-shared/events";
|
|||
import {ChannelInfo, GroupProperties, PermissionModalEvents} from "tc-shared/ui/modal/permission/ModalPermissionEditor";
|
||||
import {PermissionEditorEvents} from "tc-shared/ui/modal/permission/PermissionEditor";
|
||||
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 {Translatable} from "tc-shared/ui/react-elements/i18n";
|
||||
import {LoadingDots} from "tc-shared/ui/react-elements/LoadingDots";
|
||||
|
|
|
@ -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={"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} />
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {BatchUpdateAssignment, BatchUpdateType} from "tc-shared/ui/react-elements/ReactComponentBase";
|
||||
import {ServerEntry as ServerEntryController, ServerEvents} from "../../tree/Server";
|
||||
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 {Settings, settings} from "tc-shared/settings";
|
||||
import {TreeEntry, UnreadMarker} from "tc-shared/ui/tree/TreeEntry";
|
||||
|
|
Loading…
Add table
Reference in a new issue