This commit is contained in:
WolverinDEV 2019-09-01 21:48:12 +02:00
commit 5f13bff708
2 changed files with 88 additions and 5 deletions

View File

@ -41,7 +41,7 @@ path_target="./modules/renderer/imports"
for file in "${files[@]}"
do
file_mapping=$(echo ${file_mapping} | tr ";" "\n")
file_mapping=($(echo ${file} | tr ";" "\n"))
src_file=${file_mapping[0]}
dst_file=${file_mapping[1]}

View File

@ -762,10 +762,14 @@ declare namespace transfer {
get_key(): DownloadKey;
request_file(): Promise<Response>;
}
export interface UploadTransfer {
get_key(): UploadKey;
put_data(data: BlobPart | File): Promise<void>;
}
export type DownloadKey = TransferKey;
export type UploadKey = TransferKey;
export function spawn_download_transfer(key: DownloadKey): DownloadTransfer;
export function spawn_upload_transfer(key: UploadKey): RequestFileUpload;
export function spawn_upload_transfer(key: UploadKey): UploadTransfer;
}
declare class RequestFileDownload implements transfer.DownloadTransfer {
readonly transfer_key: transfer.DownloadKey;
@ -774,11 +778,12 @@ declare class RequestFileDownload implements transfer.DownloadTransfer {
private try_fetch(url: string): Promise<Response>;
get_key(): transfer.DownloadKey;
}
declare class RequestFileUpload {
declare class RequestFileUpload implements transfer.UploadTransfer {
readonly transfer_key: transfer.UploadKey;
constructor(key: transfer.DownloadKey);
put_data(data: BlobPart | File);
try_put(data: FormData, url: string): Promise<void>;
get_key(): transfer.UploadKey;
put_data(data: BlobPart | File): Promise<void>;
private try_put(data: FormData, url: string): Promise<void>;
}
declare class FileManager extends connection.AbstractCommandHandler {
handle: ConnectionHandler;
@ -2720,6 +2725,83 @@ declare interface JQuery<TElement = HTMLElement> {
modalize(entry_callback?: (header: JQuery, body: JQuery, footer: JQuery) => ModalElements | void, properties?: ModalProperties | any): Modal;
}
/* File: /home/wolverindev/TeaSpeak/Web-Client/shared/js/ui/elements/net_graph.ts */
declare namespace net.graph {
export type Entry = {
timestamp: number;
upload: number;
download: number;
};
export type Style = {
background_color: string;
separator_color: string;
separator_count: number;
separator_width: number;
upload: {
fill: string;
stroke: string;
strike_width: number;
};
download: {
fill: string;
stroke: string;
strike_width: number;
};
};
export type TimeSpan = {
origin: {
begin: number;
end: number;
time: number;
};
target: {
begin: number;
end: number;
time: number;
};
};
/* Great explanation of Bezier curves: http://en.wikipedia.org/wiki/Bezier_curve#Quadratic_curves
*
* Assuming A was the last point in the line plotted and B is the new point,
* we draw a curve with control points P and Q as below.
*
* A---P
* |
* |
* |
* Q---B
*
* Importantly, A and P are at the same y coordinate, as are B and Q. This is
* so adjacent curves appear to flow as one.
*/
export class Graph {
private static _loops: (() => any)[];
readonly canvas: HTMLCanvasElement;
public style: Style;
private _canvas_context: CanvasRenderingContext2D;
private _entries: Entry[];
private _entry_max;
private _max_space;
private _max_gap;
private _animate_loop;
private _time_span: TimeSpan;
constructor(canvas: HTMLCanvasElement);
initialize();
terminate();
max_gap_size(value?: number): number;
private recalculate_cache(time_span?: boolean);
insert_entry(entry: Entry);
insert_entries(entries: Entry[]);
resize();
cleanup();
private calculate_time_span(): {
begin: number;
end: number;
};
draw();
}
}
/* File: /home/wolverindev/TeaSpeak/Web-Client/shared/js/ui/elements/slider.ts */
declare interface SliderOptions {
min_value?: number;
@ -3106,6 +3188,7 @@ declare namespace chat {
constructor(handle: ConnectionHandler);
html_tag(): JQuery;
info_frame(): InfoFrame;
content_type(): FrameContent;
destroy();
private _build_html_tag();
private_conversations(): PrivateConverations;