add: better mobile ui for timeline pages
add: rename button classes (quaternary->lowered, tertiary->raised)
This commit is contained in:
parent
7bfb113b1f
commit
0dede99682
42 changed files with 272 additions and 177 deletions
|
@ -537,7 +537,7 @@ media_theme_pref();
|
|||
if (href.pathname.startsWith("/api/v1/auth/user/find_by_ip/")) {
|
||||
const ban_button = document.createElement("button");
|
||||
ban_button.innerText = "Ban IP";
|
||||
ban_button.className = "quaternary red small";
|
||||
ban_button.className = "lowered red small";
|
||||
anchor.parentElement.parentElement.appendChild(ban_button);
|
||||
|
||||
ban_button.addEventListener("click", async (e) => {
|
||||
|
@ -840,6 +840,7 @@ media_theme_pref();
|
|||
// ui ns
|
||||
(() => {
|
||||
const self = reg_ns("ui");
|
||||
window.SETTING_SET_FUNCTIONS = [];
|
||||
|
||||
self.define("refresh_container", (_, element, keep) => {
|
||||
if (keep.length === 0) {
|
||||
|
@ -939,8 +940,8 @@ media_theme_pref();
|
|||
${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
|
||||
|
||||
${(option.attributes || { embed_html: "" }).embed_html}
|
||||
</div>
|
||||
</div>`;
|
||||
</div>
|
||||
</div>`;
|
||||
},
|
||||
);
|
||||
|
||||
|
@ -977,6 +978,10 @@ ${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
|
|||
console.log("update", key);
|
||||
};
|
||||
|
||||
window.SETTING_SET_FUNCTIONS.push(
|
||||
window[`set_setting_field${id_key}`],
|
||||
);
|
||||
|
||||
window.preview_color = (key, value) => {
|
||||
console.log("preview_color", key);
|
||||
const stylesheet = document.getElementById(
|
||||
|
@ -1070,14 +1075,14 @@ ${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
|
|||
for (const match of matching) {
|
||||
permissions_html += `<div class="card w-full secondary flex justify-between gap-2">
|
||||
<span>${match} <code>${permissions[match]}</code></span>
|
||||
<button class="red quaternary" onclick="remove_permission_from_role('${match}')">Remove</button>
|
||||
<button class="red lowered" onclick="remove_permission_from_role('${match}')">Remove</button>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
for (const match of not_matching) {
|
||||
permissions_html += `<div class="card w-full secondary flex justify-between gap-2">
|
||||
<span>${match} <code>${permissions[match]}</code></span>
|
||||
<button class="green quaternary" onclick="add_permission_to_role('${match}')">Add</button>
|
||||
<button class="green lowered" onclick="add_permission_to_role('${match}')">Add</button>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue