diff options
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | public/scripts/chat.js | 7 | ||||
-rw-r--r-- | public/styles/style.sass | 20 | ||||
-rw-r--r-- | views/index.pug | 37 |
4 files changed, 47 insertions, 19 deletions
diff --git a/package.json b/package.json index 9049aaf..76d05e8 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "scripts": { "dev": "npm run watch & nodemon src/index.js --exec \"node -r dotenv/config -r babel-register\"", "watch": "npm run debug && onchange public/styles/* -- npm run css & onchange public/scripts/* -- npm run debug", - "css": "node-sass public/styles/main.sass dist/app.css", + "css": "node-sass public/styles/main.sass dist/app.css && cp public/images/* dist/", "debug": "rm -r dist/* && npm run css && browserify public/scripts/main.js -o dist/app.js", "build": "rm -r dist/* && node-sass public/styles/main.sass dist/app.css --output-style compressed && browserify public/scripts/main.js -o dist/temp.js && minify dist/temp.js > dist/app.js && pug views/index.pug --out dist && rm dist/temp*", "single": "rm -rf dist/* && node-sass public/styles/main.sass dist/app.css --output-style compressed && browserify public/scripts/main.js -o dist/temp.js && minify dist/temp.js > dist/app.js && rm dist/temp.* && pug views/index.pug --out dist && echo '<script>'$(cat dist/app.js)'</script>' >> dist/index.html && echo '<style>'$(cat dist/app.css)'</style>' >> dist/index.html && html-minifier --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype --minify-css true --minify-js true dist/index.html > dist/complete.html" diff --git a/public/scripts/chat.js b/public/scripts/chat.js index 2f15683..86044be 100644 --- a/public/scripts/chat.js +++ b/public/scripts/chat.js @@ -380,6 +380,13 @@ function chat() { }); } + function addContactToList(contactId) { + $('#contact_list') + .append(`<column><button class="button action-button is-big is-outlined is-white is-centered" id="peer_${contactId}"><i class="fas fa-user"></i></button></column>`); + } + + addContactToList('TEST'); + /** * Shows modal for adding a contact * TODO: Fix selecting from dropdown on enter diff --git a/public/styles/style.sass b/public/styles/style.sass index 9233455..34768fa 100644 --- a/public/styles/style.sass +++ b/public/styles/style.sass @@ -14,8 +14,24 @@ html, body .chat display: none -.main - align-items: flex-start +.main-window + position: relative + float: right + height: 100vh + width: calc(100vw - 90px) + +.contacts-wrapper + float: left + width: 90px + height: 100% + + .logo + padding: 8px + width: 90px + height: 90px + + img + margin: 22px auto .swal-text text-align: center diff --git a/views/index.pug b/views/index.pug index acc6648..79ff2f2 100644 --- a/views/index.pug +++ b/views/index.pug @@ -8,25 +8,30 @@ block content See https://github.com/texxme/Texx/blob/master/LICENSE .chat#chat - button.button.action-button.is-big.is-outlined.is-info#add_contact - i.fas.fa-plus - button.button.action-button.is-big.is-outlined.is-success#call - i.fas.fa-phone - button.button.action-button.is-big.is-outlined.is-warning#logout - i.fas.fa-sign-out-alt - button.button.action-button.is-big.is-outlined.is-black#anonymize - i.fas.fa-mask - button.button.action-button.is-big.is-outlined.is-danger#delete - i.fas.fa-trash + .contacts-wrapper + .is-multiline#contact_list + .logo + img(src='texx.png') + button.button.action-button.is-big.is-outlined.is-info#add_contact + i.fas.fa-plus + + .main-window + button.button.action-button.is-big.is-outlined.is-success#call + i.fas.fa-phone + button.button.action-button.is-big.is-outlined.is-warning#logout + i.fas.fa-sign-out-alt + button.button.action-button.is-big.is-outlined.is-black#anonymize + i.fas.fa-mask + button.button.action-button.is-big.is-outlined.is-danger#delete + i.fas.fa-trash - .columns.main.level //video#video - .section.column.level-right + .section.message-wrapper #messages - .message-field - input#message.message-input.input(placeholder='Enter a message') - button#send_message.message-button.button.is-success(type=submit) - i.fas.fa-paper-plane + .message-field + input#message.message-input.input(placeholder='Enter a message') + button#send_message.message-button.button.is-success(type=submit) + i.fas.fa-paper-plane .enter-pin#enter_pin .title.has-text-centered Enter a passphrase: |