Removed unused code, cleaned up styles

This commit is contained in:
Dan Seripap 2016-02-25 09:28:19 -05:00
parent 0a9db6f85a
commit 3ba25cd14a
5 changed files with 7 additions and 22 deletions

View File

@ -11,7 +11,6 @@ export default class Darkwire {
this._users = [];
this._fileQueue = [];
this._keys = {};
this._autoEmbedImages = false;
}
getFile(id) {
@ -24,15 +23,6 @@ export default class Darkwire {
return file.data;
}
get autoEmbedImages() {
return this._autoEmbedImages;
}
set autoEmbedImages(state) {
this._autoEmbedImages = state;
return this._autoEmbedImages;
}
get keys() {
return this._keys;
}

View File

@ -51,7 +51,6 @@ $(function() {
chat.log('WARNING: Your browser is not in incognito mode!', {error: true});
});
}
chat.log(moment().format('MMMM Do YYYY, h:mm:ss a'), {info: true});
darkwire.updateUsername(username).then((socketData) => {
chat.chatPage.show();
@ -194,16 +193,11 @@ $(function() {
});
let audioSwitch = $('input.sound-enabled').bootstrapSwitch();
let autoEmbedImages = $('input.auto-embed-files').bootstrapSwitch();
audioSwitch.on('switchChange.bootstrapSwitch', function(event, state) {
darkwire.audio.soundEnabled = state;
});
autoEmbedImages.on('switchChange.bootstrapSwitch', (event, state) => {
darkwire.autoEmbedImages = state;
});
function handleMessageSending() {
let message = chat.inputMessage;
let cleanedMessage = cleanInput(message.val());

View File

@ -30,11 +30,14 @@ export default class WindowHandler {
}
enableFileTransfer() {
if (this.fileHandler.isSupported) {
if (!this.fileHandler.isSupported) {
$('#send-file').click((e) => {
e.preventDefault();
$('#fileInput').trigger('click');
});
} else {
$('#send-file').remove();
$('#fileInput').remove();
}
}

View File

@ -207,6 +207,7 @@ textarea {
bottom: 0;
width: 100%;
padding-bottom: 10px;
height: 60px;
}
.inputMessage{
@ -214,7 +215,7 @@ textarea {
color: white !important;
border: none;
border-top: 1px solid #282828;
height: 60px;
// height: 60px;
outline: none;
width: 100%;
padding: 10px 75px 10px 10px;
@ -227,7 +228,7 @@ textarea {
position: fixed;
bottom: 0px;
right: 0px;
padding: 22px;
padding: 15px;
cursor: pointer;
}

View File

@ -103,8 +103,6 @@
<h6>Sound</h6>
<input type="checkbox" name="sound-enabled" class="form-control bs-switch sound-enabled" checked>
<br>
<h6>Auto-embed images?</h6>
<input type="checkbox" name="embed-images" class="form-control bs-switch auto-embed-files">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default encryption-active" data-dismiss="modal">Close</button>
@ -179,7 +177,6 @@
<script src="/vendor/bootstrap-switch.min.js"></script>
<script src="/vendor/web-crypto-shim.js"></script>
<script src="/vendor/fastclick-1.0.6.min.js"></script>
<script src="/vendor/autogrow.js"></script>
<script src="/main.js"></script>
</body>
</html>