Updated the ChangeLog.md and fixed some minor bugs
parent
8824525d38
commit
6221cd9028
|
@ -1,4 +1,8 @@
|
|||
# Changelog:
|
||||
* **03.12.20**
|
||||
- Fixed server connection tab move handler
|
||||
- Fixed file browser context menu when having an overlay
|
||||
|
||||
* **02.12.20**
|
||||
- Fixed a bug within the client entry move mechanic of the channel tree which prevented any client selection
|
||||
- Selecting clicked client when moving
|
||||
|
|
|
@ -113,10 +113,14 @@ class FileCommandHandler extends AbstractCommandHandler {
|
|||
|
||||
finishFileInfo(returnCode: string) : FileInfo[] | "unknown-request" | "unfinished-request" {
|
||||
const qIndex = this.pendingFileInfos.findIndex(e => e.returnCode === returnCode);
|
||||
if(qIndex === -1) return "unknown-request";
|
||||
if(qIndex === -1) {
|
||||
return "unknown-request";
|
||||
}
|
||||
|
||||
const [ query ] = this.pendingFileInfos.splice(qIndex, 1);
|
||||
if(!query.finished) return "unfinished-request";
|
||||
if(!query.finished) {
|
||||
return "unfinished-request";
|
||||
}
|
||||
|
||||
return query.currentFiles;
|
||||
}
|
||||
|
@ -440,8 +444,9 @@ export class FileManager {
|
|||
}
|
||||
|
||||
requestFileInfo(files: { channelId?: number, channelPassword?: string, path: string }[]) : Promise<(FileInfo | CommandResult)[]> {
|
||||
if(files.length === 0)
|
||||
if(files.length === 0) {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
const returnCode = this.commandHandler.registerFileInfo();
|
||||
const infos = files.map(e => {
|
||||
|
@ -455,23 +460,26 @@ export class FileManager {
|
|||
|
||||
return this.connectionHandler.serverConnection.send_command("ftgetfileinfo", infos, { flagset: ["as-list"] }).then(cmdResult => {
|
||||
const bulks = cmdResult.getBulks();
|
||||
if(bulks.length != files.length)
|
||||
if(bulks.length != files.length) {
|
||||
return Promise.reject(tr("response bulk miss match"));
|
||||
}
|
||||
|
||||
const infos = this.commandHandler.finishFileInfo(returnCode);
|
||||
if(!Array.isArray(infos)) {
|
||||
if(infos === "unfinished-request")
|
||||
if(infos === "unfinished-request") {
|
||||
return Promise.reject(tr("the server failed to full fill the request"));
|
||||
else
|
||||
} else {
|
||||
return Promise.reject(tr("request gone away while parsing response"));
|
||||
}
|
||||
}
|
||||
|
||||
let result: (FileInfo | CommandResult)[] = [];
|
||||
for(let index = 0; index < files.length; index++) {
|
||||
if(bulks[index].id === 0) {
|
||||
const info = infos.pop_front();
|
||||
if(!info)
|
||||
if(!info) {
|
||||
return Promise.reject(tr("Missing info for bulk ") + index);
|
||||
}
|
||||
|
||||
result.push(info);
|
||||
} else {
|
||||
|
|
|
@ -608,7 +608,7 @@ const FileListEntry = (props: { row: TableRow<ListedFileInfo>, columns: TableCol
|
|||
pageX: e.pageX,
|
||||
pageY: e.pageY
|
||||
});
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}}
|
||||
draggable={!props.row.userData.virtual}
|
||||
onDragStart={event => {
|
||||
|
@ -901,9 +901,7 @@ export class FileBrowser extends ReactComponentBase<FileListTableProperties, Fil
|
|||
}
|
||||
|
||||
private onBodyContextMenu(event: React.MouseEvent) {
|
||||
if (event.isDefaultPrevented()) return;
|
||||
event.preventDefault();
|
||||
|
||||
this.props.events.fire("action_select_files", {mode: "exclusive", files: []});
|
||||
this.props.events.fire("action_selection_context_menu", {pageY: event.pageY, pageX: event.pageX});
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ export function initializeRemoteFileBrowserController(connection: ConnectionHand
|
|||
const response = channelInfos[index];
|
||||
|
||||
if (response instanceof CommandResult) {
|
||||
/* some kind of error occured (maybe password set, or non existing) */
|
||||
/* some kind of error occurred (maybe password set, or non existing) */
|
||||
result.push({
|
||||
type: FileType.DIRECTORY,
|
||||
name: requestArray[index].name,
|
||||
|
|
|
@ -69,10 +69,12 @@ const ExpendState = (props: { extended: boolean, events: Registry<TransferInfoEv
|
|||
const [expended, setExpended] = useState(props.extended);
|
||||
|
||||
props.events.reactUse("action_toggle_expansion", event => setExpended(event.visible));
|
||||
return <div className={cssStyle.expansionContainer + (expended ? " " + cssStyle.expended : "")}
|
||||
return (
|
||||
<div className={cssStyle.expansionContainer + (expended ? " " + cssStyle.expended : "")}
|
||||
onClick={() => props.events.fire("action_toggle_expansion", {visible: !expended})}>
|
||||
<HTMLRenderer purify={false}>{iconArrow}</HTMLRenderer>
|
||||
</div>;
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const ToggleFinishedTransfersCheckbox = (props: { events: Registry<TransferInfoEvents> }) => {
|
||||
|
|
|
@ -145,7 +145,8 @@ export class Table extends React.Component<TableProperties, TableState> {
|
|||
<div
|
||||
className={cssStyle.container + " " + (this.props.className || " ")}
|
||||
onDrop={e => this.props.onDrop && this.props.onDrop(e)}
|
||||
onDragOver={e => this.props.onDragOver && this.props.onDragOver(e)}>
|
||||
onDragOver={e => this.props.onDragOver && this.props.onDragOver(e)}
|
||||
>
|
||||
<div
|
||||
ref={this.refHeader}
|
||||
className={cssStyle.header + " " + (this.props.headerClassName || " ")}
|
||||
|
|
Loading…
Reference in New Issue