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

View file

@ -105,6 +105,11 @@ export const onDelete = function(path, type){
export const onUpload = function(path, e){ export const onUpload = function(path, e){
const MAX_POOL_SIZE = 15; const MAX_POOL_SIZE = 15;
let PRIOR_STATUS = {}; 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 || [], []) extract_upload_directory_the_way_that_works_but_non_official(e.dataTransfer.items || [], [])
.then((files) => { .then((files) => {
if(files.length === 0){ if(files.length === 0){

View file

@ -21,7 +21,7 @@ export class FileSystem extends React.PureComponent {
<div className="component_filesystem"> <div className="component_filesystem">
<Container> <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> <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} /> <FileZone path={this.props.path} />
</NgIf> </NgIf>
<NgIf className="list" cond={this.props.files.length > 0}> <NgIf className="list" cond={this.props.files.length > 0}>

View file

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