Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
70319df9
Commit
70319df9
authored
May 23, 2022
by
Tijmen de Mes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added loading screen to chat widget
parent
f832e5ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
chatwindow.py
blink/chatwindow.py
+2
-0
template.html
resources/chat/template.html
+6
-0
No files found.
blink/chatwindow.py
View file @
70319df9
...
@@ -644,6 +644,7 @@ class ChatWidget(base_class, ui_class):
...
@@ -644,6 +644,7 @@ class ChatWidget(base_class, ui_class):
done_all_icon
=
IconDescriptor
(
Resources
.
get
(
'icons/done-all.svg'
))
done_all_icon
=
IconDescriptor
(
Resources
.
get
(
'icons/done-all.svg'
))
chat_template
=
open
(
Resources
.
get
(
'chat/template.html'
))
.
read
()
chat_template
=
open
(
Resources
.
get
(
'chat/template.html'
))
.
read
()
loading_template
=
open
(
Resources
.
get
(
'chat/loading.html'
))
.
read
()
image_data_re
=
re
.
compile
(
r"data:(?P<type>image/.+?);base64,(?P<data>.*)"
,
re
.
I
|
re
.
U
)
image_data_re
=
re
.
compile
(
r"data:(?P<type>image/.+?);base64,(?P<data>.*)"
,
re
.
I
|
re
.
U
)
...
@@ -659,6 +660,7 @@ class ChatWidget(base_class, ui_class):
...
@@ -659,6 +660,7 @@ class ChatWidget(base_class, ui_class):
self
.
user_icons_css_class
=
'show-icons'
if
blink_settings
.
chat_window
.
show_user_icons
else
'hide-icons'
self
.
user_icons_css_class
=
'show-icons'
if
blink_settings
.
chat_window
.
show_user_icons
else
'hide-icons'
self
.
chat_view
.
setHtml
(
self
.
chat_template
.
format
(
base_url
=
FileURL
(
self
.
style
.
path
)
+
'/'
,
style_url
=
self
.
style_variant
+
'.style'
,
font_family
=
self
.
font_family
,
font_size
=
self
.
font_size
))
self
.
chat_view
.
setHtml
(
self
.
chat_template
.
format
(
base_url
=
FileURL
(
self
.
style
.
path
)
+
'/'
,
style_url
=
self
.
style_variant
+
'.style'
,
font_family
=
self
.
font_family
,
font_size
=
self
.
font_size
))
self
.
chat_element
=
self
.
chat_view
.
page
()
.
mainFrame
()
.
findFirstElement
(
'#chat'
)
self
.
chat_element
=
self
.
chat_view
.
page
()
.
mainFrame
()
.
findFirstElement
(
'#chat'
)
self
.
loading_element
=
self
.
chat_view
.
page
()
.
mainFrame
()
.
findFirstElement
(
'#loading'
)
self
.
composing_timer
=
QTimer
()
self
.
composing_timer
=
QTimer
()
self
.
last_message
=
None
self
.
last_message
=
None
self
.
session
=
session
self
.
session
=
session
...
...
resources/chat/template.html
View file @
70319df9
...
@@ -20,12 +20,18 @@
...
@@ -20,12 +20,18 @@
@import
url("../../message_status_icons.style")
;
@import
url("../../message_status_icons.style")
;
</style>
</style>
<!-- The loading screen styles!-->
<style
id=
"loading_style"
type=
"text/css"
media=
"screen,print"
>
@import
url("../../loading.style")
;
</style>
<!-- The selected font !-->
<!-- The selected font !-->
<style
id=
"font_style"
type=
"text/css"
media=
"screen,print"
>
<style
id=
"font_style"
type=
"text/css"
media=
"screen,print"
>
body
{
{
font
:
{
font_size
}
px
{
font_family
}
;
}}
body
{
{
font
:
{
font_size
}
px
{
font_family
}
;
}}
</style>
</style>
</head>
</head>
<body>
<body>
<div
id=
"loading"
></div>
<div
id=
"chat"
></div>
<div
id=
"chat"
></div>
</body>
</body>
</html>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment