Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-qt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-qt
Commits
5337ede5
Commit
5337ede5
authored
2 years ago
by
Sébastien Blin
Browse files
Options
Downloads
Patches
Plain Diff
preview: fix undefined domain for twitter and color with luma
Change-Id: I28a5d02881b9b5eb57ad6efa646dd1c5a3327856 GitLab:
#670
parent
920bb44a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
resources/misc/previewInterop.js
+4
-4
4 additions, 4 deletions
resources/misc/previewInterop.js
src/commoncomponents/TextMessageDelegate.qml
+9
-3
9 additions, 3 deletions
src/commoncomponents/TextMessageDelegate.qml
src/constant/JamiTheme.qml
+0
-2
0 additions, 2 deletions
src/constant/JamiTheme.qml
with
13 additions
and
9 deletions
resources/misc/previewInterop.js
+
4
−
4
View file @
5337ede5
...
...
@@ -24,13 +24,13 @@ function getPreviewInfo(messageId, url) {
var
doc
=
parser
.
parseFromString
(
html
,
"
text/html
"
)
if
(
!
url
.
includes
(
"
twitter.com
"
)){
title
=
getTitle
(
doc
)
image
=
getImage
(
doc
,
url
)
description
=
getDescription
(
doc
)
var
domain
=
(
new
URL
(
url
))
domain
=
(
domain
.
hostname
).
replace
(
"
www.
"
,
""
)
}
else
{
title
=
"
Twitter. It's what's happening.
"
}
image
=
getImage
(
doc
,
url
)
description
=
getDescription
(
doc
)
var
domain
=
(
new
URL
(
url
))
domain
=
(
domain
.
hostname
).
replace
(
"
www.
"
,
""
)
window
.
jsbridge
.
emitInfoReady
(
messageId
,
{
'
title
'
:
title
,
...
...
This diff is collapsed.
Click to expand it.
src/commoncomponents/TextMessageDelegate.qml
+
9
−
3
View file @
5337ede5
...
...
@@ -148,7 +148,9 @@ SBSMessageBase {
wrapMode
:
Label
.
WrapAtWordBoundaryOrAnywhere
renderType
:
Text
.
NativeRendering
textFormat
:
TextEdit
.
RichText
color
:
JamiTheme
.
previewTitleColor
color
:
UtilsAdapter
.
luma
(
bubble
.
color
)
?
JamiTheme
.
chatviewTextColorLight
:
JamiTheme
.
chatviewTextColorDark
visible
:
LinkPreviewInfo
.
title
!==
null
text
:
LinkPreviewInfo
.
title
}
...
...
@@ -159,7 +161,9 @@ SBSMessageBase {
wrapMode
:
Label
.
WrapAtWordBoundaryOrAnywhere
renderType
:
Text
.
NativeRendering
textFormat
:
TextEdit
.
RichText
color
:
JamiTheme
.
previewSubtitleColor
color
:
UtilsAdapter
.
luma
(
bubble
.
color
)
?
JamiTheme
.
chatviewTextColorLight
:
JamiTheme
.
chatviewTextColorDark
visible
:
LinkPreviewInfo
.
description
!==
null
text
:
'
<a href=" " style="text-decoration:
'
+
(
hoveredLink
?
'
underline
'
:
'
none
'
)
+
'
;"
'
+
...
...
@@ -172,7 +176,9 @@ SBSMessageBase {
wrapMode
:
Label
.
WrapAtWordBoundaryOrAnywhere
renderType
:
Text
.
NativeRendering
textFormat
:
TextEdit
.
RichText
color
:
JamiTheme
.
previewSubtitleColor
color
:
UtilsAdapter
.
luma
(
bubble
.
color
)
?
JamiTheme
.
chatviewTextColorLight
:
JamiTheme
.
chatviewTextColorDark
text
:
LinkPreviewInfo
.
domain
}
}
...
...
This diff is collapsed.
Click to expand it.
src/constant/JamiTheme.qml
+
0
−
2
View file @
5337ede5
...
...
@@ -175,8 +175,6 @@ Item {
property
color
chatviewButtonColor
:
darkTheme
?
whiteColor
:
blackColor
property
color
bgTextInput
:
darkTheme
?
"
#060608
"
:
whiteColor
property
color
previewTextContainerColor
:
darkTheme
?
"
#959595
"
:
"
#ececec
"
property
color
previewTitleColor
:
darkTheme
?
whiteColor
:
blackColor
property
color
previewSubtitleColor
:
darkTheme
?
whiteColor
:
blackColor
property
color
previewImageBackgroundColor
:
whiteColor
property
color
previewCardContainerColor
:
darkTheme
?
blackColor
:
whiteColor
property
color
previewUrlColor
:
darkTheme
?
"
#eeeeee
"
:
"
#333
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment