mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-11-13 22:00:10 +00:00
8 lines
7.1 KiB
Plaintext
8 lines
7.1 KiB
Plaintext
{
|
|
"version": 3,
|
|
"sources": ["ts/main.ts"],
|
|
"sourcesContent": ["interface Window {\n transitionEvent: string;\n animationEvent: string;\n}\n\ninterface ArrayConstructor {\n from(arrayLike: any, mapFn?, thisArg?): Array<any>;\n}\n\ndeclare var window: Window;\n\nconst whichAnimationEvent = () => {\n const el = document.createElement(\"fakeElement\");\n if (el.style[\"animation\"] !== void 0) {\n return \"animationend\";\n }\n return \"webkitAnimationEnd\";\n}\nwindow.animationEvent = whichAnimationEvent();\nconst toggles: HTMLInputElement[] = Array.from(document.getElementsByClassName('toggle-details'));\nfor (let toggle of toggles) {\n toggle.onclick = () => {\n const el = toggle.parentElement.parentElement.parentElement.nextElementSibling as HTMLDivElement;\n if (el.classList.contains(\"visible\")) {\n el.classList.toggle(\"visible\");\n el.classList.toggle(\"hidden\");\n } else {\n el.classList.toggle(\"hidden\");\n el.classList.toggle(\"visible\");\n }\n toggle.previousElementSibling.classList.toggle(\"rotated\");\n toggle.previousElementSibling.classList.toggle(\"not-rotated\");\n };\n}\n\nconst checkInfUses = function (check: HTMLInputElement, mode = 2) {\n const uses = document.getElementById('inv-uses') as HTMLInputElement;\n if (mode == 2) {\n uses.disabled = check.checked;\n check.parentElement.classList.toggle('!normal');\n check.parentElement.classList.toggle('!high');\n } else if (mode == 1) {\n uses.disabled = true;\n check.checked = true;\n check.parentElement.classList.remove('!normal');\n check.parentElement.classList.add('!high');\n } else {\n uses.disabled = false;\n check.checked = false;\n check.parentElement.classList.remove('!high');\n check.parentElement.classList.add('!normal');\n }\n};\n\nlet invInfUses = document.getElementById('inv-inf-uses') as HTMLInputElement;\ninvInfUses.onclick = () => { checkInfUses(invInfUses, 2); };\n\nconst checkEmailEnabled = function (check: HTMLInputElement, mode = 2) {\n const input = document.getElementById('inv-email') as HTMLInputElement;\n if (mode == 2) {\n input.disabled = !check.checked;\n check.parentElement.classList.toggle('!normal');\n check.parentElement.classList.toggle('!high');\n } else if (mode == 1) {\n input.disabled = false;\n check.checked = true;\n check.parentElement.classList.remove('!normal');\n check.parentElement.classList.add('!high');\n } else {\n input.disabled = true;\n check.checked = false;\n check.parentElement.classList.remove('!high');\n check.parentElement.classList.add('!normal');\n }\n};\nlet invEmailEnabled = document.getElementById('inv-email-enabled') as HTMLInputElement;\ninvEmailEnabled.onchange = () => { checkEmailEnabled(invEmailEnabled, 2); };\n\ncheckInfUses(invInfUses, 0);\ncheckEmailEnabled(invEmailEnabled, 0);\n\nconst loadAccounts = function () {\n const rows: HTMLTableRowElement[] = Array.from(document.getElementById(\"accounts-list\").children);\n for (let i = 0; i < rows.length; i++) {\n const row = rows[i];\n const editButton = row.querySelector(\".icon\") as HTMLElement;\n const emailInput = row.querySelector(\".input\") as HTMLInputElement;\n editButton.onclick = function () {\n emailInput.classList.toggle('stealth-input-hidden');\n emailInput.readOnly = !emailInput.readOnly;\n editButton.classList.toggle('icon-edit');\n editButton.classList.toggle('icon-check');\n };\n }\n};\n\nloadAccounts();\n\nconst tabs = [\"invitesTab\", \"accountsTab\", \"settingsTab\"]\nfor (let tab of tabs) {\n (document.getElementById(`${tab}-button`) as HTMLSpanElement).onclick = function () {\n for (let t of tabs) {\n const tabEl = document.getElementById(t) as HTMLDivElement;\n const tabButtonEl = document.getElementById(`${t}-button`) as HTMLSpanElement;\n if (t == tab) {\n tabButtonEl.classList.add(\"active\", \"~positive\");\n tabEl.classList.remove(\"unfocused\");\n } else {\n tabButtonEl.classList.remove(\"active\");\n tabButtonEl.classList.remove(\"~positive\");\n tabEl.classList.add(\"unfocused\");\n }\n }\n }\n}\n\nconst modalLogin = new Modal(document.getElementById('modal-login'), true);\ndocument.getElementById('form-login').addEventListener('submit', modalLogin.close);\ndocument.getElementById('modalButton').onclick = modalLogin.toggle;\n\nconst modalAddUser = new Modal(document.getElementById('modal-add-user'));\n(document.getElementById('accounts-add-user') as HTMLSpanElement).onclick = modalAddUser.toggle;\ndocument.getElementById('form-add-user').addEventListener('submit', modalAddUser.close);\n\nconst modalAbout = new Modal(document.getElementById('modal-about'));\n(document.getElementById('setting-about') as HTMLSpanElement).onclick = modalAbout.toggle;\n\n"],
|
|
"mappings": "AAWA,MAAM,sBAAsB;AACxB,aAAW,SAAS,cAAc;AAClC,MAAI,GAAG,MAAM,iBAAiB;AAC1B,WAAO;AAAA;AAEX,SAAO;AAAA;AAEX,OAAO,iBAAiB;AACxB,gBAAoC,MAAM,KAAK,SAAS,uBAAuB;AAC/E,mBAAmB;AACf,SAAO,UAAU;AACb,eAAW,OAAO,cAAc,cAAc,cAAc;AAC5D,QAAI,GAAG,UAAU,SAAS;AACtB,SAAG,UAAU,OAAO;AACpB,SAAG,UAAU,OAAO;AAAA;AAEpB,SAAG,UAAU,OAAO;AACpB,SAAG,UAAU,OAAO;AAAA;AAExB,WAAO,uBAAuB,UAAU,OAAO;AAC/C,WAAO,uBAAuB,UAAU,OAAO;AAAA;AAAA;AAIvD,qBAAqB,uBAA0C;AAC3D,eAAa,SAAS,eAAe;AACrC,MAAI,QAAQ;AACR,SAAK,WAAW,MAAM;AACtB,UAAM,cAAc,UAAU,OAAO;AACrC,UAAM,cAAc,UAAU,OAAO;AAAA,aAC9B,QAAQ;AACf,SAAK,WAAW;AAChB,UAAM,UAAU;AAChB,UAAM,cAAc,UAAU,OAAO;AACrC,UAAM,cAAc,UAAU,IAAI;AAAA;AAElC,SAAK,WAAW;AAChB,UAAM,UAAU;AAChB,UAAM,cAAc,UAAU,OAAO;AACrC,UAAM,cAAc,UAAU,IAAI;AAAA;AAAA;AAI1C,iBAAiB,SAAS,eAAe;AACzC,WAAW,UAAU;AAAQ,eAAa,YAAY;AAAA;AAEtD,0BAA0B,uBAA0C;AAChE,gBAAc,SAAS,eAAe;AACtC,MAAI,QAAQ;AACR,UAAM,WAAW,CAAC,MAAM;AACxB,UAAM,cAAc,UAAU,OAAO;AACrC,UAAM,cA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