fix(@desktop/channels): allow capitals in channel name
This commit is contained in:
parent
601d3dd0f1
commit
cb924053c6
|
@ -108,7 +108,7 @@ StatusDialog {
|
||||||
|
|
||||||
input.onTextChanged: {
|
input.onTextChanged: {
|
||||||
const cursorPosition = input.cursorPosition
|
const cursorPosition = input.cursorPosition
|
||||||
input.text = Utils.convertSpacesToDashesAndUpperToLowerCase(input.text)
|
input.text = Utils.convertSpacesToDashes(input.text)
|
||||||
input.cursorPosition = cursorPosition
|
input.cursorPosition = cursorPosition
|
||||||
if (root.channelEmoji === "") {
|
if (root.channelEmoji === "") {
|
||||||
input.letterIconName = text;
|
input.letterIconName = text;
|
||||||
|
|
|
@ -332,15 +332,9 @@ QtObject {
|
||||||
return (/[A-Z]/.test(str))
|
return (/[A-Z]/.test(str))
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertSpacesToDashesAndUpperToLowerCase(str)
|
function convertSpacesToDashes(str)
|
||||||
{
|
{
|
||||||
if (str.includes(" "))
|
return str.replace(/ /g, "-")
|
||||||
str = str.replace(/ /g, "-")
|
|
||||||
|
|
||||||
if(hasUpperCaseLetter(str))
|
|
||||||
str = str.toLowerCase()
|
|
||||||
|
|
||||||
return str
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Validation section start */
|
/* Validation section start */
|
||||||
|
|
Loading…
Reference in New Issue