Apply custom chrome to conversation windows
This commit is contained in:
parent
95f8e3921c
commit
39d11d8eb3
7 changed files with 17 additions and 11 deletions
|
@ -27,7 +27,8 @@
|
||||||
if (conversation) {
|
if (conversation) {
|
||||||
window.document.title = conversation.getTitle();
|
window.document.title = conversation.getTitle();
|
||||||
var view = new bg.Whisper.ConversationView({
|
var view = new bg.Whisper.ConversationView({
|
||||||
model: conversation
|
model: conversation,
|
||||||
|
appWindow: windowInfo
|
||||||
});
|
});
|
||||||
view.$el.prependTo(body);
|
view.$el.prependTo(body);
|
||||||
view.$('input.send-message').focus();
|
view.$('input.send-message').focus();
|
||||||
|
|
|
@ -88,6 +88,7 @@
|
||||||
id: modelId,
|
id: modelId,
|
||||||
url: 'conversation.html',
|
url: 'conversation.html',
|
||||||
type: 'panel',
|
type: 'panel',
|
||||||
|
frame: 'none',
|
||||||
focused: true,
|
focused: true,
|
||||||
width: 300,
|
width: 300,
|
||||||
height: 440
|
height: 440
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
render_attributes: function() {
|
render_attributes: function() {
|
||||||
return { group: this.model.get('type') === 'group' };
|
return { group: this.model.get('type') === 'group' };
|
||||||
},
|
},
|
||||||
initialize: function() {
|
initialize: function(options) {
|
||||||
this.listenTo(this.model, 'destroy', this.stopListening);
|
this.listenTo(this.model, 'destroy', this.stopListening);
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
|
@ -41,6 +41,10 @@
|
||||||
this.$('.discussion-container').append(this.view.el);
|
this.$('.discussion-container').append(this.view.el);
|
||||||
this.view.render();
|
this.view.render();
|
||||||
|
|
||||||
|
new Whisper.WindowControlsView({
|
||||||
|
appWindow: options.appWindow
|
||||||
|
}).$el.appendTo(this.$('#header'));
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
this.view.scrollToBottom();
|
this.view.scrollToBottom();
|
||||||
}.bind(this), 10);
|
}.bind(this), 10);
|
||||||
|
|
|
@ -39,6 +39,10 @@ body {
|
||||||
box-shadow: 0 -4px 3px 4px rgba(darken($header-color, 30%), 0.8);
|
box-shadow: 0 -4px 3px 4px rgba(darken($header-color, 30%), 0.8);
|
||||||
color: $blue;
|
color: $blue;
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
|
|
||||||
|
button {
|
||||||
|
-webkit-app-region: no-drag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
|
@ -71,7 +75,7 @@ button.back {
|
||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
position: relative;
|
position: relative;
|
||||||
float: right;
|
float: left;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
.window-controls {
|
.window-controls {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
||||||
button {
|
|
||||||
-webkit-app-region: no-drag;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.gutter {
|
.gutter {
|
||||||
|
|
|
@ -48,6 +48,8 @@ body {
|
||||||
box-shadow: 0 -4px 3px 4px rgba(165, 165, 165, 0.8);
|
box-shadow: 0 -4px 3px 4px rgba(165, 165, 165, 0.8);
|
||||||
color: #2090ea;
|
color: #2090ea;
|
||||||
-webkit-app-region: drag; }
|
-webkit-app-region: drag; }
|
||||||
|
#header button {
|
||||||
|
-webkit-app-region: no-drag; }
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -75,7 +77,7 @@ button.back {
|
||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
position: relative;
|
position: relative;
|
||||||
float: right;
|
float: left;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
padding-left: 8px; }
|
padding-left: 8px; }
|
||||||
.menu .hamburger {
|
.menu .hamburger {
|
||||||
|
@ -254,8 +256,6 @@ img.emoji {
|
||||||
|
|
||||||
.window-controls {
|
.window-controls {
|
||||||
text-align: right; }
|
text-align: right; }
|
||||||
.window-controls button {
|
|
||||||
-webkit-app-region: no-drag; }
|
|
||||||
|
|
||||||
.gutter {
|
.gutter {
|
||||||
padding: 36px 0 0; }
|
padding: 36px 0 0; }
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue