mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:27:48 +02:00
Linking fix.
Disabled sending on Shift + Enter to prevent confusion. Signed-off-by: Armored Dragon <publicmail@armoreddragon.com>
This commit is contained in:
parent
7920610d4d
commit
9bf5f3d0d3
1 changed files with 7 additions and 7 deletions
|
@ -194,18 +194,18 @@ Rectangle {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
width: parent.width - 60
|
width: parent.width - 60
|
||||||
height: parent.height
|
height: parent.height
|
||||||
placeholderText: pageVal.charAt(0).toUpperCase() + pageVal.slice(1) + " chat message..."
|
placeholderText: pageVal.charAt(0).toUpperCase() + pageVal.slice(1) + " chat message..."
|
||||||
|
Keys.onPressed: {
|
||||||
onAccepted: {
|
if ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && !(event.modifiers & Qt.ShiftModifier)) {
|
||||||
toScript({type: "send_message", message: text, channel: pageVal});
|
event.accepted = true;
|
||||||
text = ""
|
toScript({type: "send_message", message: text, channel: pageVal});
|
||||||
|
text = ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
width: 60
|
width: 60
|
||||||
height:parent.height
|
height:parent.height
|
||||||
|
@ -498,7 +498,7 @@ Rectangle {
|
||||||
|
|
||||||
function formatContent(mess) {
|
function formatContent(mess) {
|
||||||
var link = /(https?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+(?:\/[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]*)?(?=\s|$)/g;
|
var link = /(https?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+(?:\/[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]*)?(?=\s|$)/g;
|
||||||
mess = mess.replace(link, () => {return "<a onclick='Window.openUrl("+match+")' href='" + match + "'>" + match + "</a>"});
|
mess = mess.replace(link, (match) => {return "<a onclick='Window.openUrl("+match+")' href='" + match + "'>" + match + "</a> <a onclick='Window.openUrl("+match+")'>⮺</a>"});
|
||||||
|
|
||||||
var script_tag = /<script\b[^>]*>/gi;
|
var script_tag = /<script\b[^>]*>/gi;
|
||||||
mess = mess.replace(script_tag, "script");
|
mess = mess.replace(script_tag, "script");
|
||||||
|
|
Loading…
Reference in a new issue