mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-18 18:54:52 +00:00
Removed unused code, cleaned up styles
This commit is contained in:
parent
0a9db6f85a
commit
3ba25cd14a
@ -11,7 +11,6 @@ export default class Darkwire {
|
|||||||
this._users = [];
|
this._users = [];
|
||||||
this._fileQueue = [];
|
this._fileQueue = [];
|
||||||
this._keys = {};
|
this._keys = {};
|
||||||
this._autoEmbedImages = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getFile(id) {
|
getFile(id) {
|
||||||
@ -24,15 +23,6 @@ export default class Darkwire {
|
|||||||
return file.data;
|
return file.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
get autoEmbedImages() {
|
|
||||||
return this._autoEmbedImages;
|
|
||||||
}
|
|
||||||
|
|
||||||
set autoEmbedImages(state) {
|
|
||||||
this._autoEmbedImages = state;
|
|
||||||
return this._autoEmbedImages;
|
|
||||||
}
|
|
||||||
|
|
||||||
get keys() {
|
get keys() {
|
||||||
return this._keys;
|
return this._keys;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,6 @@ $(function() {
|
|||||||
chat.log('WARNING: Your browser is not in incognito mode!', {error: true});
|
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});
|
chat.log(moment().format('MMMM Do YYYY, h:mm:ss a'), {info: true});
|
||||||
darkwire.updateUsername(username).then((socketData) => {
|
darkwire.updateUsername(username).then((socketData) => {
|
||||||
chat.chatPage.show();
|
chat.chatPage.show();
|
||||||
@ -194,16 +193,11 @@ $(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let audioSwitch = $('input.sound-enabled').bootstrapSwitch();
|
let audioSwitch = $('input.sound-enabled').bootstrapSwitch();
|
||||||
let autoEmbedImages = $('input.auto-embed-files').bootstrapSwitch();
|
|
||||||
|
|
||||||
audioSwitch.on('switchChange.bootstrapSwitch', function(event, state) {
|
audioSwitch.on('switchChange.bootstrapSwitch', function(event, state) {
|
||||||
darkwire.audio.soundEnabled = state;
|
darkwire.audio.soundEnabled = state;
|
||||||
});
|
});
|
||||||
|
|
||||||
autoEmbedImages.on('switchChange.bootstrapSwitch', (event, state) => {
|
|
||||||
darkwire.autoEmbedImages = state;
|
|
||||||
});
|
|
||||||
|
|
||||||
function handleMessageSending() {
|
function handleMessageSending() {
|
||||||
let message = chat.inputMessage;
|
let message = chat.inputMessage;
|
||||||
let cleanedMessage = cleanInput(message.val());
|
let cleanedMessage = cleanInput(message.val());
|
||||||
|
@ -30,11 +30,14 @@ export default class WindowHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enableFileTransfer() {
|
enableFileTransfer() {
|
||||||
if (this.fileHandler.isSupported) {
|
if (!this.fileHandler.isSupported) {
|
||||||
$('#send-file').click((e) => {
|
$('#send-file').click((e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$('#fileInput').trigger('click');
|
$('#fileInput').trigger('click');
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
$('#send-file').remove();
|
||||||
|
$('#fileInput').remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,6 +207,7 @@ textarea {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
|
height: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputMessage{
|
.inputMessage{
|
||||||
@ -214,7 +215,7 @@ textarea {
|
|||||||
color: white !important;
|
color: white !important;
|
||||||
border: none;
|
border: none;
|
||||||
border-top: 1px solid #282828;
|
border-top: 1px solid #282828;
|
||||||
height: 60px;
|
// height: 60px;
|
||||||
outline: none;
|
outline: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 10px 75px 10px 10px;
|
padding: 10px 75px 10px 10px;
|
||||||
@ -227,7 +228,7 @@ textarea {
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
padding: 22px;
|
padding: 15px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,8 +103,6 @@
|
|||||||
<h6>Sound</h6>
|
<h6>Sound</h6>
|
||||||
<input type="checkbox" name="sound-enabled" class="form-control bs-switch sound-enabled" checked>
|
<input type="checkbox" name="sound-enabled" class="form-control bs-switch sound-enabled" checked>
|
||||||
<br>
|
<br>
|
||||||
<h6>Auto-embed images?</h6>
|
|
||||||
<input type="checkbox" name="embed-images" class="form-control bs-switch auto-embed-files">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default encryption-active" data-dismiss="modal">Close</button>
|
<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/bootstrap-switch.min.js"></script>
|
||||||
<script src="/vendor/web-crypto-shim.js"></script>
|
<script src="/vendor/web-crypto-shim.js"></script>
|
||||||
<script src="/vendor/fastclick-1.0.6.min.js"></script>
|
<script src="/vendor/fastclick-1.0.6.min.js"></script>
|
||||||
<script src="/vendor/autogrow.js"></script>
|
|
||||||
<script src="/main.js"></script>
|
<script src="/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user