1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 17:10:10 +00:00

fix more oddities

This commit is contained in:
Harvey Tindall 2021-12-31 01:51:42 +00:00
parent 0e1cbd7e7b
commit 508168b49e
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
7 changed files with 38 additions and 34 deletions

View File

@ -170,10 +170,6 @@ span.sm:not(.heading) {
} }
} }
.fr {
float: right;
}
.monospace { .monospace {
background-color: inherit; /* so we can use a17t code blocks */ background-color: inherit; /* so we can use a17t code blocks */
font-family: Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace; font-family: Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;
@ -397,6 +393,8 @@ table {
color: var(--color-content); color: var(--color-content);
} }
p.top { p.top {
margin-top: 0px; margin-top: 0px;
} }
@ -521,3 +519,7 @@ div.card:contains(section.banner.footer) {
.button.discord.\@low:not(.lang-link) { .button.discord.\@low:not(.lang-link) {
color: rgba(38, 51, 192, 90%); color: rgba(38, 51, 192, 90%);
} }
.pb-0i {
padding-bottom: 0px !important
}

View File

@ -1,6 +1,6 @@
.loader { .loader {
height: auto; height: auto;
color: rgba(0, 0, 0, 0); color: rgba(0, 0, 0, 0) !important;
} }
.loader .dot { .loader .dot {

View File

@ -252,7 +252,7 @@
<div class="modal-content card ~critical @low"> <div class="modal-content card ~critical @low">
<span class="heading">{{ .strings.settingsRestartRequired }} <span class="modal-close">&times;</span></span> <span class="heading">{{ .strings.settingsRestartRequired }} <span class="modal-close">&times;</span></span>
<p class="content pb-4">{{ .strings.settingsRestartRequiredDescription }}</p> <p class="content pb-4">{{ .strings.settingsRestartRequiredDescription }}</p>
<div class="fr"> <div class="float-right">
<span class="button ~info @low mb-2" id="settings-apply-no-restart">{{ .strings.settingsApplyRestartLater }}</span> <span class="button ~info @low mb-2" id="settings-apply-no-restart">{{ .strings.settingsApplyRestartLater }}</span>
<span class="button ~critical @low" id="settings-apply-restart">{{ .strings.settingsApplyRestartNow }}</span> <span class="button ~critical @low" id="settings-apply-restart">{{ .strings.settingsApplyRestartNow }}</span>
</div> </div>
@ -389,26 +389,28 @@
</form> </form>
</div> </div>
<div id="notification-box"></div> <div id="notification-box"></div>
<span class="dropdown" tabindex="0" id="lang-dropdown"> <div class="top-4 left-4 absolute">
<span class="button ~urge dropdown-button"> <span class="dropdown" tabindex="0" id="lang-dropdown">
<i class="ri-global-line"></i> <span class="button ~urge dropdown-button">
<span class="ml-2 chev"></span> <i class="ri-global-line"></i>
</span> <span class="ml-2 chev"></span>
<div class="dropdown-display"> </span>
<div class="card ~neutral @low"> <div class="dropdown-display">
<label class="switch pb-4"> <div class="card ~neutral @low">
<input type="radio" name="lang-time" id="lang-12h"> <label class="switch pb-4">
<span>{{ .strings.time12h }}</span> <input type="radio" name="lang-time" id="lang-12h">
</label> <span>{{ .strings.time12h }}</span>
<label class="switch pb-4"> </label>
<input type="radio" name="lang-time" id="lang-24h"> <label class="switch pb-4">
<span>{{ .strings.time24h }}</span> <input type="radio" name="lang-time" id="lang-24h">
</label> <span>{{ .strings.time24h }}</span>
<div id="lang-list"></div> </label>
<div id="lang-list"></div>
</div>
</div> </div>
</div> </span>
</span> <span class="button ~warning" alt="{{ .strings.theme }}" id="button-theme"><i class="ri-sun-line"></i></span>
<span class="button ~warning" alt="{{ .strings.theme }}" id="button-theme"><i class="ri-sun-line"></i></span> </div>
<div class="page-container"> <div class="page-container">
<div class="mb-4"> <div class="mb-4">
<header class="flex flex-wrap items-center justify-between"> <header class="flex flex-wrap items-center justify-between">
@ -576,7 +578,7 @@
</div> </div>
<div class="row"> <div class="row">
<span class="col sm button ~neutral @low center mb-2" id="accounts-add-user">{{ .quantityStrings.addUser.Singular }}</span> <span class="col sm button ~neutral @low center mb-2" id="accounts-add-user">{{ .quantityStrings.addUser.Singular }}</span>
<div id="accounts-announce-dropdown" class="col sm dropdown" tabindex="0"> <div id="accounts-announce-dropdown" class="col sm dropdown pb-0i" tabindex="0">
<span class="h-100 sm button ~info @low center mb-2" id="accounts-announce">{{ .strings.announce }}</span> <span class="h-100 sm button ~info @low center mb-2" id="accounts-announce">{{ .strings.announce }}</span>
<div class="dropdown-display"> <div class="dropdown-display">
<div class="card ~neutral @low"> <div class="card ~neutral @low">
@ -587,7 +589,7 @@
</div> </div>
<span class="col sm button ~urge @low center mb-2" id="accounts-modify-user">{{ .strings.modifySettings }}</span> <span class="col sm button ~urge @low center mb-2" id="accounts-modify-user">{{ .strings.modifySettings }}</span>
<span class="col sm button ~warning @low center mb-2" id="accounts-extend-expiry">{{ .strings.extendExpiry }}</span> <span class="col sm button ~warning @low center mb-2" id="accounts-extend-expiry">{{ .strings.extendExpiry }}</span>
<div id="accounts-disable-enable-dropdown" class="col sm dropdown manual" tabindex="0"> <div id="accounts-disable-enable-dropdown" class="col sm dropdown manual pb-0i" tabindex="0">
<span class="h-100 sm button ~positive @low center mb-2" id="accounts-disable-enable">{{ .strings.disable }}</span> <span class="h-100 sm button ~positive @low center mb-2" id="accounts-disable-enable">{{ .strings.disable }}</span>
<div class="dropdown-display"> <div class="dropdown-display">
<div class="card ~neutral @low"> <div class="card ~neutral @low">

View File

@ -5,7 +5,7 @@ let path = require("path");
const fixHTML = (infile, outfile) => { const fixHTML = (infile, outfile) => {
console.log(infile, outfile) console.log(infile, outfile)
let doc = new parser.JSDOM(fs.readFileSync(infile)); let doc = new parser.JSDOM(fs.readFileSync(infile));
for (let item of ["badge", "chip", "shield", "input", "table", "button", "portal", "select", "aside", "card"]) { for (let item of ["badge", "chip", "shield", "input", "table", "button", "portal", "select", "aside", "card", "field"]) {
let items = doc.window.document.body.querySelectorAll("."+item); let items = doc.window.document.body.querySelectorAll("."+item);
for (let i = 0; i < items.length; i++) { for (let i = 0; i < items.length; i++) {
let hasColor = false; let hasColor = false;

View File

@ -193,7 +193,7 @@ class user implements User {
if (!u) { if (!u) {
this._notifyDropdown.querySelector(".accounts-area-matrix").classList.add("unfocused"); this._notifyDropdown.querySelector(".accounts-area-matrix").classList.add("unfocused");
this._matrix.innerHTML = ` this._matrix.innerHTML = `
<span class="chip btn @low">${window.lang.strings("add")}</span> <span class="chip btn @high">${window.lang.strings("add")}</span>
<input type="text" class="input ~neutral @low stealth-input unfocused" placeholder="@user:riot.im"> <input type="text" class="input ~neutral @low stealth-input unfocused" placeholder="@user:riot.im">
`; `;
(this._matrix.querySelector("span") as HTMLSpanElement).onclick = this._addMatrix; (this._matrix.querySelector("span") as HTMLSpanElement).onclick = this._addMatrix;
@ -257,7 +257,7 @@ class user implements User {
this._telegramUsername = u; this._telegramUsername = u;
if (!u) { if (!u) {
this._notifyDropdown.querySelector(".accounts-area-telegram").classList.add("unfocused"); this._notifyDropdown.querySelector(".accounts-area-telegram").classList.add("unfocused");
this._telegram.innerHTML = `<span class="chip btn @low">${window.lang.strings("add")}</span>`; this._telegram.innerHTML = `<span class="chip btn @high">${window.lang.strings("add")}</span>`;
(this._telegram.querySelector("span") as HTMLSpanElement).onclick = this._addTelegram; (this._telegram.querySelector("span") as HTMLSpanElement).onclick = this._addTelegram;
} else { } else {
this._notifyDropdown.querySelector(".accounts-area-telegram").classList.remove("unfocused"); this._notifyDropdown.querySelector(".accounts-area-telegram").classList.remove("unfocused");
@ -322,7 +322,7 @@ class user implements User {
const lastNotifyMethod = this.lastNotifyMethod() == "discord"; const lastNotifyMethod = this.lastNotifyMethod() == "discord";
this._discordUsername = u; this._discordUsername = u;
if (!u) { if (!u) {
this._discord.innerHTML = `<span class="chip btn @low">Add</span>`; this._discord.innerHTML = `<span class="chip btn @high">Add</span>`;
(this._discord.querySelector("span") as HTMLSpanElement).onclick = () => addDiscord(this.id); (this._discord.querySelector("span") as HTMLSpanElement).onclick = () => addDiscord(this.id);
this._notifyDropdown.querySelector(".accounts-area-discord").classList.add("unfocused"); this._notifyDropdown.querySelector(".accounts-area-discord").classList.add("unfocused");
} else { } else {

View File

@ -39,10 +39,10 @@ export function newDiscordSearch(title: string, description: string, buttonText:
<td class="img-circle sm"> <td class="img-circle sm">
<img class="img-circle" src="${users[i].avatar_url}" width="32" height="32"> <img class="img-circle" src="${users[i].avatar_url}" width="32" height="32">
</td> </td>
<td class="w-100 sm"> <td class="sm">
<p class="content">${users[i].name}</p> <p class="content">${users[i].name}</p>
</td> </td>
<td class="sm"> <td class="sm float-right">
<span id="discord-user-${users[i].id}" class="button ~info @high">${buttonText}</span> <span id="discord-user-${users[i].id}" class="button ~info @high">${buttonText}</span>
</td> </td>
</tr> </tr>

View File

@ -77,7 +77,7 @@ export const loadLangSelector = (page: string) => {
const list = document.getElementById("lang-list") as HTMLDivElement; const list = document.getElementById("lang-list") as HTMLDivElement;
let innerHTML = ''; let innerHTML = '';
for (let code in req.response) { for (let code in req.response) {
innerHTML += `<a href="?lang=${code}" class="button input ~neutral field mb-2 lang-link">${req.response[code]}</a>`; innerHTML += `<a href="?lang=${code}" class="button w-100 al justify-start ~neutral mb-2 lang-link">${req.response[code]}</a>`;
} }
list.innerHTML = innerHTML; list.innerHTML = innerHTML;
} }