Skip to content

Commit

Permalink
Merge branch 'stable-2-0'
Browse files Browse the repository at this point in the history
  • Loading branch information
gcampax committed Jun 8, 2021
2 parents 348feec + a786aa1 commit ba2df3b
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 22 deletions.
11 changes: 7 additions & 4 deletions public/javascripts/conversation.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ $(() => {
manageSpinner('remove');
manageLostConnectionMsg('add');
manageLostConnectionMsg('show');
scrollChat();
return;
}

Expand Down Expand Up @@ -133,6 +134,7 @@ $(() => {
addVoteButtons();
manageLostConnectionMsg('add');
manageSpinner('remove');
scrollChat();
return msg;
}

Expand Down Expand Up @@ -245,7 +247,7 @@ $(() => {

function buttonMessage(title, json) {
var holder = $('<div>').addClass('col-xs-12 col-sm-6');
var btn = $('<a>').addClass('message message-button btn btn-default')
var btn = $('<a>').addClass('message message-button new-msg-button btn btn-default')
.attr('href', '#').text(title);
btn.click((event) => {
handleParsedCommand(json, title);
Expand All @@ -263,7 +265,7 @@ $(() => {
url = '/me' + url;*/

var holder = $('<div>').addClass('col-xs-12 col-sm-6');
var btn = $('<a>').addClass('message message-button btn btn-default')
var btn = $('<a>').addClass('message message-button new-msg-button btn btn-default')
.attr('href', url).attr("target", "_blank").attr("rel", "noopener").text(title);
holder.append(btn);
getGrid().append(holder);
Expand All @@ -272,7 +274,7 @@ $(() => {

function yesnoMessage() {
var holder = $('<div>').addClass('col-xs-6 col-sm-4 col-md-3');
var btn = $('<a>').addClass('message message-yesno btn btn-default')
var btn = $('<a>').addClass('message message-yesno new-msg-button btn btn-default')
.attr('href', '#').text("Yes");
btn.click((event) => {
handleSpecial('yes', "Yes");
Expand All @@ -281,7 +283,7 @@ $(() => {
holder.append(btn);
getGrid().append(holder);
holder = $('<div>').addClass('col-xs-6 col-sm-4 col-md-3');
btn = $('<a>').addClass('message message-yesno btn btn-default')
btn = $('<a>').addClass('message message-yesno new-msg-button btn btn-default')
.attr('href', '#').text("No");
btn.click(function(event) {
handleSpecial('no', "No");
Expand Down Expand Up @@ -414,6 +416,7 @@ $(() => {

manageLostConnectionMsg('add');
manageSpinner('show');
scrollChat();
}

$('#input-form').submit((event) => {
Expand Down
52 changes: 43 additions & 9 deletions public/stylesheets/conversation.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
}

#conversation #chat {
margin: 1px 0em;
overflow-y: scroll;
height: -webkit-fill-available;
padding: 20px 35px;
height: 595px;
min-height: 566px;
height: calc(100vh - 385px);
overflow-anchor: none;
}

Expand Down Expand Up @@ -85,7 +87,8 @@
margin: auto;
max-width: 800px;
background-color: #ece5dd6b;
font-weight: 600;
font-weight: 400;
font-size: 1.2em;
}

#conversation.single {
Expand All @@ -104,6 +107,11 @@
display: block;
}

.new-msg-button {
border-radius: 10px;
margin: 10px;
}

#input-form-group {
margin-bottom: 0;
}
Expand All @@ -123,12 +131,6 @@
padding: 3px;
}

#save-log {
padding-left: 10px;
cursor: pointer;
width: 50%;
}

.comment-options>.fa,
.comment-options>.far {
cursor: pointer;
Expand All @@ -138,8 +140,40 @@
margin: 5px;
}

.modal {
height: 980px;
}

.new-button.modal-footer {
margin-right: 1em;
margin-bottom: 0.6em;
}

.modal-content {
border-radius: 10px;
}

.modal-dialog {
height: 900px;
}

@media (min-width: 768px) {
.modal-dialog {
width: 767px;
}
}

#save-log {
padding-left: 10px;
cursor: pointer;
}

#recording-save {
padding-left: unset !important;
}

#recording-log {
max-height: calc(100vh - 200px);
max-height: calc(100vh - 250px);
}

#record-button {
Expand Down
5 changes: 4 additions & 1 deletion public/stylesheets/my_stuff.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

.bottom-bar.fa,
.bottom-bar.far {
cursor: pointer;
border-radius: 60px;
background-color: transparent;
color: white;
Expand Down Expand Up @@ -64,6 +63,10 @@ p.device-icon-small {
width: 100%;
}

#back-top>a {
padding: 8px 14px;
}

#bttop-button {
border-radius: 35px;
font-weight: 600;
Expand Down
8 changes: 7 additions & 1 deletion public/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ pre code {

.panel-default {
border-color: #585858;
margin: 30px 0px;
margin: 16px 0px;
}

.panel-body {
Expand Down Expand Up @@ -336,4 +336,10 @@ pre code {

#chat_upper_container {
padding-top: 1.2em;
}

.anchor {
display: block;
padding-top: 100px;
margin-top: -100px;
}
8 changes: 2 additions & 6 deletions views/conversation.pug
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ block content
p= _("The conversation log has been updated.")
pre#recording-log
p.small= _("Privacy warning: The log may include your account and device names, as well as the results from performing actions on your accounts.")
div.modal-footer
div.new-button.modal-footer
button.btn.btn-primary#recording-download= _("Download")
a(target='_blank',rel='noopener').btn.btn-primary#recording-share= _("Share with Almond Team")
button.btn.btn-default#recording-save-done= _("Done")
Expand All @@ -55,14 +55,10 @@ block content
div.form-group.has-feedback#input-form-group
label(for='#chat-input').sr-only= _("Command:")
input(type='text', placeholder=_("Write your command or answer here"), value=command ? command : '').form-control#input
button(type='button', title='Click to send a voice command').btn.btn-primary.hidden#record-button
span.glyphicon.glyphicon-warning-sign.form-control-feedback.hidden

div#hidden-container
div.help-block.hidden= _("Lost connection to the server.")
div.almond-thinking.hidden
span
span
span


span
1 change: 0 additions & 1 deletion views/devices_list.pug
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ block styles
link(rel='stylesheet', href=Config.BASE_URL + '/stylesheets/my_stuff.css')

block content
a#anch_top(href='#')
if message
div.row
div.col-xs-12
Expand Down
1 change: 1 addition & 0 deletions views/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ html
- var stdlayout = true;
- var includefooter = true;
body(data-developer-key=developerKey,data-thingpedia-url=Config.THINGPEDIA_URL,data-base-url=Config.BASE_URL,data-csrf-token=csrfToken)
a#anch-top.anchor(href='#')
nav.navbar-inverse.navbar.navbar-fixed-top(role="banner")

div.navbar-header
Expand Down

0 comments on commit ba2df3b

Please sign in to comment.