Use text input in Quick Connect page

This commit is contained in:
Niels van Velzen 2022-04-26 19:35:57 +02:00
parent 9b697ce832
commit d03aed23c8
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@
<div>${QuickConnectDescription}</div>
<br />
<div class="inputContainer">
<input is="emby-input" type="number" min="0" max="999999" required id="txtQuickConnectCode" label="${LabelQuickConnectCode}" autocomplete="off" />
<input is="emby-input" type="text" inputmode="numeric" pattern="[0-9\s]*" required id="txtQuickConnectCode" label="${LabelQuickConnectCode}" autocomplete="off" />
</div>
<button id="btnQuickConnectAuthorize" is="emby-button" type="submit" class="raised button-submit block">
<span>${Authorize}</span>

View File

@ -15,7 +15,9 @@ export default function (view) {
return;
}
authorize(codeElement.value);
// Remove spaces from code
const normalizedCode = codeElement.value.replace(/\s/g, '');
authorize(normalizedCode);
});
});
}