mirror of
https://github.com/szimek/sharedrop.git
synced 2026-06-13 21:03:07 +08:00
Merge branch 'master' into logos
This commit is contained in:
commit
9ec1277b63
@ -49,12 +49,12 @@
|
||||
<script src="/scripts/vendor/ba-tiny-pubsub.js"></script>
|
||||
<!-- endbuild -->
|
||||
|
||||
<script>window.FileDrop = {};</script>
|
||||
<!-- build:js({.tmp,app}) /scripts/app.js -->
|
||||
<script src="/scripts/app.js"></script>
|
||||
<script src="/scripts/app/lib/room.js"></script>
|
||||
<script src="/scripts/app/lib/file.js"></script>
|
||||
<script src="/scripts/app/lib/webrtc.js"></script>
|
||||
<script src="/scripts/initializer.js"></script>
|
||||
<script src="/scripts/app.js"></script>
|
||||
<script src="/scripts/app/components/confirm_popover_component.js"></script>
|
||||
<script src="/scripts/app/controllers/application_controller.js"></script>
|
||||
<script src="/scripts/app/controllers/index_controller.js"></script>
|
||||
|
||||
@ -1 +1,8 @@
|
||||
window.FileDrop = Ember.Application.create();
|
||||
window.FileDrop.App = Ember.Application.create();
|
||||
|
||||
// Clear HTML5 filesystem on page load
|
||||
FileDrop.App.deferReadiness();
|
||||
FileDrop.File.removeAll().then(function () {
|
||||
console.log("Cleared HTML5 filesystem");
|
||||
FileDrop.App.advanceReadiness();
|
||||
});
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FileDrop.ConfirmPopoverComponent = Ember.Component.extend({
|
||||
FileDrop.App.ConfirmPopoverComponent = Ember.Component.extend({
|
||||
classNames: ['popover-confirm'],
|
||||
|
||||
iconClass: function () {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
FileDrop.ApplicationController = Ember.Controller.extend({
|
||||
FileDrop.App.ApplicationController = Ember.Controller.extend({
|
||||
init: function () {
|
||||
this._super();
|
||||
|
||||
var you = FileDrop.User.create({
|
||||
var you = FileDrop.App.User.create({
|
||||
email: localStorage.email || null
|
||||
});
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FileDrop.IndexController = Ember.ArrayController.extend({
|
||||
FileDrop.App.IndexController = Ember.ArrayController.extend({
|
||||
needs: ['application'],
|
||||
|
||||
you: Ember.computed.alias('controllers.application.you'),
|
||||
@ -63,7 +63,7 @@ FileDrop.IndexController = Ember.ArrayController.extend({
|
||||
peer;
|
||||
|
||||
delete attrs.peer;
|
||||
peer = FileDrop.Peer.create(attrs);
|
||||
peer = FileDrop.App.Peer.create(attrs);
|
||||
peer.get('peer').setProperties(peerAttrs);
|
||||
|
||||
this.pushObject(peer);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FileDrop.PeerController = Ember.ObjectController.extend({
|
||||
FileDrop.App.PeerController = Ember.ObjectController.extend({
|
||||
needs: 'index',
|
||||
|
||||
webrtc: Ember.computed.alias('controllers.index.webrtc'),
|
||||
@ -16,9 +16,7 @@ FileDrop.PeerController = Ember.ObjectController.extend({
|
||||
// TODO: rename to something more meaningful (e.g. askIfWantToSendFile)
|
||||
uploadFile: function (data) {
|
||||
var peer = this.get('model'),
|
||||
webrtc = this.get('webrtc'),
|
||||
file = data.file,
|
||||
info = webrtc.getFileInfo(file);
|
||||
file = data.file;
|
||||
|
||||
// Make file available when the response from the recipient comes in
|
||||
peer.set('transfer.file', file);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FileDrop.Peer = Ember.Object.extend({
|
||||
FileDrop.App.Peer = Ember.Object.extend({
|
||||
uuid: null,
|
||||
email: null,
|
||||
public_ip: null,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FileDrop.User = FileDrop.Peer.extend({
|
||||
FileDrop.App.User = FileDrop.App.Peer.extend({
|
||||
room: null,
|
||||
|
||||
serialize: function () {
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
{{/confirm-popover}}
|
||||
|
||||
<div class="avatar">
|
||||
{{view FileDrop.ProgressBarView}}
|
||||
{{view FileDrop.PeerAvatarView}}
|
||||
{{view FileDrop.App.ProgressBarView}}
|
||||
{{view FileDrop.App.PeerAvatarView}}
|
||||
</div>
|
||||
|
||||
<div class="user-info">
|
||||
@ -23,4 +23,4 @@
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{view FileDrop.FileField action="uploadFile" file=transfer.file}}
|
||||
{{view FileDrop.App.FileField action="uploadFile" file=transfer.file}}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FileDrop.FileField = Ember.TextField.extend({
|
||||
FileDrop.App.FileField = Ember.TextField.extend({
|
||||
type: 'file',
|
||||
classNames: ['invisible'],
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FileDrop.PeerAvatarView = Ember.View.extend(Ember.ViewTargetActionSupport, {
|
||||
FileDrop.App.PeerAvatarView = Ember.View.extend(Ember.ViewTargetActionSupport, {
|
||||
tagName: 'img',
|
||||
classNames: ['gravatar', 'img-circle'],
|
||||
attributeBindings: [
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FileDrop.PeerView = Ember.View.extend({
|
||||
FileDrop.App.PeerView = Ember.View.extend({
|
||||
isConnected: Ember.computed.alias('controller.model.isConnected'),
|
||||
classNames: ['peer'],
|
||||
classNameBindings: ['isConnected:connected:disconnected']
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FileDrop.ProgressBarView = Ember.View.extend({
|
||||
FileDrop.App.ProgressBarView = Ember.View.extend({
|
||||
tagName: 'svg',
|
||||
templateName: 'progress-bar',
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FileDrop.UserView = Ember.View.extend({
|
||||
FileDrop.App.UserView = Ember.View.extend({
|
||||
isConnected: Ember.computed.alias('controller.model.isConnected'),
|
||||
classNames: ['peer'],
|
||||
classNameBindings: ['isConnected:connected:disconnected']
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
// Clear HTML5 filesystem on page load
|
||||
FileDrop.deferReadiness();
|
||||
FileDrop.File.removeAll().then(function () {
|
||||
console.log("Cleared HTML5 filesystem");
|
||||
FileDrop.advanceReadiness();
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user