fix (test): fix tests

This commit is contained in:
Mickael KERJEAN 2019-03-13 17:50:20 +11:00
parent 9e63eafb61
commit 8393b0d55a
4 changed files with 9 additions and 4 deletions

View file

@ -68,7 +68,7 @@ steps:
image: machines/puppeteer
depends_on: [ build_prepare, build_js, build_go ]
environment:
ADMIN_PASSWORD: PLKr3FcPUdUNVhNImO6QOSKQ.tkLRniUYWMnV84rlb8Fhvib8C2W
ADMIN_PASSWORD: $$2a$$10$$9OFbPZV4lYpYjU5eUi91o.kgeMyCuW11j878YBRri3gBwccq2lSFy
APP_URL: http://127.0.0.1:8334
CI: true
commands:
@ -98,7 +98,7 @@ steps:
when:
branch: master
settings:
command_timeout: 1000
command_timeout: 5m
host: hal.kerjean.me
user:
from_secret: SSH_USERNAME

View file

@ -105,6 +105,11 @@ export const onDelete = function(path, type){
export const onUpload = function(path, e){
const MAX_POOL_SIZE = 15;
let PRIOR_STATUS = {};
if(e.dataTransfer.types && e.dataTransfer.types.length >= 0){
if(e.dataTransfer.types[0] === "text/uri-list"){
return
}
}
extract_upload_directory_the_way_that_works_but_non_official(e.dataTransfer.items || [], [])
.then((files) => {
if(files.length === 0){

View file

@ -21,7 +21,7 @@ export class FileSystem extends React.PureComponent {
<div className="component_filesystem">
<Container>
<NewThing path={this.props.path} sort={this.props.sort} view={this.props.view} onViewUpdate={(value) => this.props.onView(value)} onSortUpdate={(value) => {this.props.onSort(value);}} accessRight={this.props.metadata || {}}></NewThing>
<NgIf cond={this.props.fileIsOver}>
<NgIf cond={this.props.fileIsOver && this.props.metadata.can_upload !== false}>
<FileZone path={this.props.path} />
</NgIf>
<NgIf className="list" cond={this.props.files.length > 0}>

View file

@ -64,7 +64,7 @@ type Metadata struct {
CanDelete *bool `json:"can_delete,omitempty"`
CanShare *bool `json:"can_share,omitempty"`
HideExtension *bool `json:"hide_extension,omitempty"`
RefreshOnCreate *bool `json:"refresh_on_create"`
RefreshOnCreate *bool `json:"refresh_on_create,omitempty"`
Expire *time.Time `json:"-"`
}