tooltip: rework as pseudo-component, fix overflow
uses the <tool-tip> tag now, and the setupTooltips() function in ui.ts must be called at any point in the pages load. added "below-center" position, showing below and centered horizontally. breakpoint tailwind lingo also now works (e.g. "below-center sm:right"). If a left or right-aligned tooltip clips off the screen, it will be shifted the appropriate amount left/right to avoid that automatically.
This commit is contained in:
@@ -5,6 +5,7 @@ import { loadLangSelector } from "./modules/lang.js";
|
||||
import { Validator, ValidatorConf, ValidatorRespDTO } from "./modules/validator.js";
|
||||
import { Discord, Telegram, Matrix, ServiceConfiguration, MatrixConfiguration } from "./modules/account-linking.js";
|
||||
import { Captcha, GreCAPTCHA } from "./modules/captcha.js";
|
||||
import { setupTooltips } from "./modules/ui.js";
|
||||
|
||||
interface formWindow extends GlobalWindow {
|
||||
invalidPassword: string;
|
||||
@@ -42,6 +43,8 @@ interface formWindow extends GlobalWindow {
|
||||
collectEmail: boolean;
|
||||
}
|
||||
|
||||
setupTooltips();
|
||||
|
||||
loadLangSelector("form");
|
||||
|
||||
window.notifications = new notificationBox(document.getElementById("notification-box") as HTMLDivElement);
|
||||
|
||||
Reference in New Issue
Block a user