mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-19 11:45:12 +00:00
feat: run on a single port (#3163)
* start v2 * start * run * some cleanup * remove v2 pkg again * simplify * webauthn * remove unused config * fix login path in Dockerfile * fix asset_generator.go * health handler * fix grpc web * refactor * merge * build new main.go * run new main.go * update logging pkg * fix error msg * update logging * cleanup * cleanup * go mod tidy * change localDevMode * fix customEndpoints * update logging * comments * change local flag to external configs * fix location generated go code * fix Co-authored-by: fforootd <[email protected]>
This commit is contained in:
co-authored by
fforootd
parent
2f3a482ade
commit
389eb4a27a
@@ -0,0 +1,38 @@
|
||||
function RenderDefaultLoginnameSuffix() {
|
||||
let orgNameText = document.getElementById("orgname").value;
|
||||
let userName = document.getElementById("username");
|
||||
let defaultLoginNameSuffix = document.getElementById("default-login-suffix");
|
||||
|
||||
let iamDomain = userName.dataset.iamDomain;
|
||||
let orgDomain = orgNameText.replace(" ", "-");
|
||||
if (orgDomain !== "") {
|
||||
defaultLoginNameSuffix.innerText = "@" + orgDomain.toLowerCase() + "." + iamDomain;
|
||||
} else {
|
||||
defaultLoginNameSuffix.innerText = "";
|
||||
}
|
||||
|
||||
offsetLabel();
|
||||
}
|
||||
|
||||
window.addEventListener('DOMContentLoaded', (event) => {
|
||||
RenderDefaultLoginnameSuffix();
|
||||
});
|
||||
|
||||
document.getElementById("orgname").addEventListener('input', function () {
|
||||
RenderDefaultLoginnameSuffix();
|
||||
});
|
||||
|
||||
function offsetLabel() {
|
||||
const suffix = document.getElementById('default-login-suffix');
|
||||
const suffixInput = document.getElementsByClassName('lgn-suffix-input')[0];
|
||||
|
||||
calculateOffset();
|
||||
suffix.addEventListener("DOMCharacterDataModified", calculateOffset);
|
||||
|
||||
function calculateOffset() {
|
||||
// add suffix width to inner right padding of the input field
|
||||
if (suffix && suffixInput) {
|
||||
suffixInput.style.paddingRight = `${(suffix.offsetWidth ?? 0) + 10}px`;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user