mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-19 14:56:22 +01:00
Merge branch 'master' of http://github.com/mickael-kerjean/filestash
This commit is contained in:
commit
f8cc366165
2 changed files with 4 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ function encode_path(path){
|
|||
}
|
||||
|
||||
export function prepare(path){
|
||||
return encodeURIComponent(decodeURIComponent(path)); // to send our url correctly without using directly '/'
|
||||
return encodeURIComponent(decodeURIComponent(path.replace(/%/g, '%25')));
|
||||
}
|
||||
|
||||
export function urlParams() {
|
||||
|
|
|
|||
|
|
@ -240,9 +240,11 @@ export class ExistingThing extends React.Component {
|
|||
}
|
||||
className = className.trim();
|
||||
|
||||
let encodedLink = encodeURIComponent(this.props.file.link).replace(/%2F/g, '/');
|
||||
|
||||
return connectDragSource(connectDropNativeFile(connectDropFile(
|
||||
<div className={"component_thing view-"+this.props.view+(this.props.selected === true ? " selected" : " not-selected")}>
|
||||
<ToggleableLink onClick={this.onThingClick.bind(this)} to={this.props.file.link + window.location.search} disabled={this.props.file.icon === "loading"}>
|
||||
<ToggleableLink onClick={this.onThingClick.bind(this)} to={encodedLink + window.location.search} disabled={this.props.file.icon === "loading"}>
|
||||
<Card ref="$card"className={this.state.hover} className={className}>
|
||||
<Image preview={this.state.preview}
|
||||
icon={this.props.file.icon || this.props.file.type}
|
||||
|
|
|
|||
Loading…
Reference in a new issue