浏览代码

Merge pull request #4922 from achillesrasquinha/chat-fixes

Fixed Vertical Spacing
version-14
Achilles Rasquinha 7 年前
committed by GitHub
父节点
当前提交
dc6737b12a
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 3 个文件被更改,包括 17 次插入33 次删除
  1. +0
    -9
      frappe/public/css/chat.css
  2. +17
    -16
      frappe/public/js/frappe/chat.js
  3. +0
    -8
      frappe/public/less/chat.less

+ 0
- 9
frappe/public/css/chat.css 查看文件

@@ -372,12 +372,6 @@ a.no-decoration:active {
width: 32px;
height: 32px;
}
.chat-room-footer {
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
.chat-room-footer .chat-form {
border-top: 1px solid #D1D8DD;
}
@@ -399,10 +393,7 @@ a.no-decoration:active {
transition: color 0.5s;
}
.chat-list {
padding-bottom: 50px;
height: 100%;
background-size: 350px 500px;
background-image: url(/assets/frappe/images/chat/wallpaper-default.jpg);
overflow-y: scroll;
}
.chat-list .chat-list-item {


+ 17
- 16
frappe/public/js/frappe/chat.js 查看文件

@@ -1954,19 +1954,19 @@ class extends Component {
return (
h("div", { class: `panel panel-default panel-bg ${frappe._.is_mobile() ? "panel-span" : ""}` },
h(frappe.Chat.Widget.Room.Header, { ...props, on_back: props.destroy }),
!frappe._.is_empty(props.messages) ?
h(frappe.chat.component.ChatList, {
messages: props.messages
})
:
h("div", { class: "panel-body vcenter" },
h("div","",
h("div", { class: "text-center text-extra-muted" },
h(frappe.components.Octicon, { type: "comment-discussion", style: "font-size: 48px" }),
h("p","",__("Start a conversation."))
)
)
),
// !frappe._.is_empty(props.messages) ?
h(frappe.chat.component.ChatList, {
messages: props.messages
}),
// :
// h("div", { class: "panel-body vcenter" },
// h("div","",
// h("div", { class: "text-center text-extra-muted" },
// h(frappe.components.Octicon, { type: "comment-discussion", style: "font-size: 48px" }),
// h("p","",__("Start a conversation."))
// )
// )
// ),
h("div", { class: "chat-room-footer" },
h(frappe.chat.component.ChatForm, { actions: actions,
on_change: () => {
@@ -2072,11 +2072,12 @@ class extends Component {
messages.push(message)
}
return !frappe._.is_empty(messages) ? (
return (
h("div",{class:"chat-list list-group"},
messages.map(m => h(frappe.chat.component.ChatList.Item, {...m}))
!frappe._.is_empty(messages) ?
messages.map(m => h(frappe.chat.component.ChatList.Item, {...m})) : null
)
) : null
)
}
}



+ 0
- 8
frappe/public/less/chat.less 查看文件

@@ -258,11 +258,6 @@

.chat-room-footer
{
position: absolute;
bottom: 0;
left: 0;
right: 0;

.chat-form
{
border-top: @frappe-chat-form-border;
@@ -298,11 +293,8 @@

.chat-list
{
padding-bottom: 50px;
height: 100%;
// background: @frappe-chat-list-bg-color;
background-size: 350px 500px;
background-image: url(/assets/frappe/images/chat/wallpaper-default.jpg);
overflow-y: scroll;

.chat-list-item


正在加载...
取消
保存