Merge branch 'oauth3' of git.daplie.com:Daplie/walnut_launchpad into jon/tokens
This commit is contained in:
commit
6a4d46b238
|
@ -148,10 +148,18 @@ app.controller('websiteCtrl', [
|
||||||
, sld: vm.domain.sld
|
, sld: vm.domain.sld
|
||||||
//, sub: vm.record.sub
|
//, sub: vm.record.sub
|
||||||
, multipart: { site: vm.currentFiles[0] }
|
, multipart: { site: vm.currentFiles[0] }
|
||||||
|
, progress: function (ev) {
|
||||||
|
// TODO must digest
|
||||||
|
vm.uploadPercent = Math.round((ev.loaded / ev.total) * 100);
|
||||||
|
// TODO GiB, MiB, KiB, etc
|
||||||
|
vm.uploadTotal = (ev.total / (1024 * 1024)).toFixed(2);
|
||||||
|
vm.uploadProgress = (ev.loaded / (1024 * 1024)).toFixed(2);
|
||||||
|
}
|
||||||
, unzip: vm.unzip
|
, unzip: vm.unzip
|
||||||
, strip: vm.stripZip
|
, strip: vm.stripZip
|
||||||
, path: vm.webPath
|
, path: vm.webPath
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
|
vm.uploadTotal = 0;
|
||||||
window.alert(JSON.stringify(result));
|
window.alert(JSON.stringify(result));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,7 @@ OAUTH3._pkgs['www@daplie.com'] = {
|
||||||
+ '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld/*, sub: opts.sub*/, unzip: opts.unzip, strip: opts.strip, path: opts.path })
|
+ '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld/*, sub: opts.sub*/, unzip: opts.unzip, strip: opts.strip, path: opts.path })
|
||||||
, session: session
|
, session: session
|
||||||
, multipart: opts.multipart // special property to be figured out by browser request code
|
, multipart: opts.multipart // special property to be figured out by browser request code
|
||||||
|
, progress: opts.progress
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
|
|
|
@ -60,6 +60,8 @@
|
||||||
|
|
||||||
<!-- div ng-if="vm.isZip" ><label>Unzip directory</label> <input type="text" ng-model="vm.unzipPath" /></div -->
|
<!-- div ng-if="vm.isZip" ><label>Unzip directory</label> <input type="text" ng-model="vm.unzipPath" /></div -->
|
||||||
|
|
||||||
|
<div ng-if="vm.uploadTotal"><span ng-bind="vm.uploadPercent">99</span>% | <span ng-bind="vm.uploadProgress">1</span> MiB / <span ng-bind="vm.uploadTotal">100</span> MiB</div>
|
||||||
|
|
||||||
<div><label>Web path</label> <input type="text" ng-model="vm.webPath" /></div>
|
<div><label>Web path</label> <input type="text" ng-model="vm.webPath" /></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue