mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
Rename global variable 'Chat' to 'Snapdrop'
Initially a lot of code was copied from another project. This lead to confusing naming conventions.
This commit is contained in:
parent
7ed10a7ba4
commit
78dd776426
15 changed files with 24 additions and 24 deletions
|
@ -81,7 +81,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
Polymer({
|
Polymer({
|
||||||
is: 'buddy-avatar',
|
is: 'buddy-avatar',
|
||||||
behaviors: [Chat.FileInputBehavior, Chat.TextInputBehavior],
|
behaviors: [Snapdrop.FileInputBehavior, Snapdrop.TextInputBehavior],
|
||||||
properties: {
|
properties: {
|
||||||
contact: Object,
|
contact: Object,
|
||||||
_displayName: {
|
_displayName: {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<link rel="import" href="file-selection-behavior.html">
|
<link rel="import" href="file-selection-behavior.html">
|
||||||
<script>
|
<script>
|
||||||
'use strict';
|
'use strict';
|
||||||
window.Chat = window.Chat || {};
|
window.Snapdrop = window.Snapdrop || {};
|
||||||
Chat.FileButtonBehaviorImpl = {
|
Snapdrop.FileButtonBehaviorImpl = {
|
||||||
get fileInput() {
|
get fileInput() {
|
||||||
var fileInput = Polymer.dom(this).querySelector('.fileInput');
|
var fileInput = Polymer.dom(this).querySelector('.fileInput');
|
||||||
if (!fileInput) {
|
if (!fileInput) {
|
||||||
|
@ -33,5 +33,5 @@ Chat.FileButtonBehaviorImpl = {
|
||||||
}.bind(this), false);
|
}.bind(this), false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Chat.FileButtonBehavior = [Chat.FileButtonBehaviorImpl, Chat.FileSelectionBehavior];
|
Snapdrop.FileButtonBehavior = [Snapdrop.FileButtonBehaviorImpl, Snapdrop.FileSelectionBehavior];
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
Polymer({
|
Polymer({
|
||||||
is: 'file-button',
|
is: 'file-button',
|
||||||
behaviors: [Chat.FileButtonBehavior]
|
behaviors: [Snapdrop.FileButtonBehavior]
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<link rel="import" href="file-selection-behavior.html">
|
<link rel="import" href="file-selection-behavior.html">
|
||||||
<script>
|
<script>
|
||||||
'use strict';
|
'use strict';
|
||||||
window.Chat = window.Chat || {};
|
window.Snapdrop = window.Snapdrop || {};
|
||||||
Chat.FileDropBehaviorImpl = {
|
Snapdrop.FileDropBehaviorImpl = {
|
||||||
attached: function() {
|
attached: function() {
|
||||||
var dropZone = this;
|
var dropZone = this;
|
||||||
|
|
||||||
|
@ -44,5 +44,5 @@ document.body.addEventListener('drop', function(event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
Chat.FileDropBehavior = [Chat.FileDropBehaviorImpl, Chat.FileSelectionBehavior];
|
Snapdrop.FileDropBehavior = [Snapdrop.FileDropBehaviorImpl, Snapdrop.FileSelectionBehavior];
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
<link rel="import" href="file-button-behavior.html">
|
<link rel="import" href="file-button-behavior.html">
|
||||||
<script>
|
<script>
|
||||||
'use strict';
|
'use strict';
|
||||||
Chat.FileInputBehavior = [Chat.FileDropBehavior,Chat.FileButtonBehavior];
|
Snapdrop.FileInputBehavior = [Snapdrop.FileDropBehavior,Snapdrop.FileButtonBehavior];
|
||||||
</script>
|
</script>
|
|
@ -48,7 +48,7 @@
|
||||||
(function() {
|
(function() {
|
||||||
Polymer({
|
Polymer({
|
||||||
is: 'file-receiver',
|
is: 'file-receiver',
|
||||||
behaviors: [Chat.SoundNotificationBehavior],
|
behaviors: [Snapdrop.SoundNotificationBehavior],
|
||||||
attached: function() {
|
attached: function() {
|
||||||
this.async(function() {
|
this.async(function() {
|
||||||
app.conn.addEventListener('file-offer', function(e) {
|
app.conn.addEventListener('file-offer', function(e) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
'use strict';
|
'use strict';
|
||||||
window.Chat = window.Chat || {};
|
window.Snapdrop = window.Snapdrop || {};
|
||||||
Chat.FileSelectionBehavior = {
|
Snapdrop.FileSelectionBehavior = {
|
||||||
notifyFilesSelection: function(files) {
|
notifyFilesSelection: function(files) {
|
||||||
if (!files) {
|
if (!files) {
|
||||||
console.log('no files selected...');
|
console.log('no files selected...');
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
'use strict';
|
'use strict';
|
||||||
window.Chat = window.Chat || {};
|
window.Snapdrop = window.Snapdrop || {};
|
||||||
Chat.InvitationLinkBehavior = {
|
Snapdrop.InvitationLinkBehavior = {
|
||||||
properties: {
|
properties: {
|
||||||
contact: {
|
contact: {
|
||||||
type: String
|
type: String
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
Polymer({
|
Polymer({
|
||||||
is: 'invitation-link',
|
is: 'invitation-link',
|
||||||
behaviors: [Chat.InvitationLinkBehavior]
|
behaviors: [Snapdrop.InvitationLinkBehavior]
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
notify: true
|
notify: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
behaviors: [Chat.FileTransferProtocol],
|
behaviors: [Snapdrop.FileTransferProtocol],
|
||||||
_sendFile: function(toPeer, file) {
|
_sendFile: function(toPeer, file) {
|
||||||
if (!rtcConnectionSupported(toPeer)) {
|
if (!rtcConnectionSupported(toPeer)) {
|
||||||
this.$.ws._sendFile(toPeer, file);
|
this.$.ws._sendFile(toPeer, file);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
'use strict';
|
'use strict';
|
||||||
window.Chat = window.Chat || {};
|
window.Snapdrop = window.Snapdrop || {};
|
||||||
Chat.FileTransferProtocol = {
|
Snapdrop.FileTransferProtocol = {
|
||||||
properties: {
|
properties: {
|
||||||
loading: {
|
loading: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<link rel="import" href="sound-notification.html">
|
<link rel="import" href="sound-notification.html">
|
||||||
<script>
|
<script>
|
||||||
'use strict';
|
'use strict';
|
||||||
Chat = window.Chat || {};
|
Snapdrop = window.Snapdrop || {};
|
||||||
Chat.SoundNotificationBehavior = {
|
Snapdrop.SoundNotificationBehavior = {
|
||||||
sounds: function() {
|
sounds: function() {
|
||||||
var sounds = document.querySelector('sound-notification');
|
var sounds = document.querySelector('sound-notification');
|
||||||
if (!sounds) {
|
if (!sounds) {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
style.top = '-10000px';
|
style.top = '-10000px';
|
||||||
document.body.appendChild(copyTextarea);
|
document.body.appendChild(copyTextarea);
|
||||||
|
|
||||||
window.Chat.ClipboardBehavior = {
|
window.Snapdrop.ClipboardBehavior = {
|
||||||
copyToClipboard: function(content) {
|
copyToClipboard: function(content) {
|
||||||
copyTextarea.value = content;
|
copyTextarea.value = content;
|
||||||
var range = document.createRange();
|
var range = document.createRange();
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<link rel="import" href="text-input-dialog.html">
|
<link rel="import" href="text-input-dialog.html">
|
||||||
<script>
|
<script>
|
||||||
'use strict';
|
'use strict';
|
||||||
window.Chat = window.Chat || {};
|
window.Snapdrop = window.Snapdrop || {};
|
||||||
(function() {
|
(function() {
|
||||||
var textInput = Polymer.Base.create('text-input-dialog');
|
var textInput = Polymer.Base.create('text-input-dialog');
|
||||||
textInput.className = 'textInput';
|
textInput.className = 'textInput';
|
||||||
document.body.appendChild(textInput);
|
document.body.appendChild(textInput);
|
||||||
Chat.TextInputBehavior = {
|
Snapdrop.TextInputBehavior = {
|
||||||
properties: {
|
properties: {
|
||||||
contact: Object,
|
contact: Object,
|
||||||
},
|
},
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
|
|
||||||
Polymer({
|
Polymer({
|
||||||
is: 'text-input-dialog',
|
is: 'text-input-dialog',
|
||||||
behaviors: [Chat.ClipboardBehavior, Chat.SoundNotificationBehavior],
|
behaviors: [Snapdrop.ClipboardBehavior, Snapdrop.SoundNotificationBehavior],
|
||||||
properties: {
|
properties: {
|
||||||
textToSend: {
|
textToSend: {
|
||||||
type: String
|
type: String
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue