mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-30 01:12:39 +00:00
Mobile: same stacked treatment for the Admin + Moderation account cards
Extends the .profile-account-card pattern to the remaining compact account lists so they all behave consistently on phones: - Admin lists (whitelist/blacklist/editors): use the shared .profile-account-card / __actions classes (was bespoke responsive utilities; now full-width equal-width action buttons on mobile like the others). - Moderation overrides: the summary+actions row (a nested flex inside an already-padded card) uses a new padding-less .profile-account-card__row variant so it stacks on phones too. The account switcher (single tap-button with a column meta-stack) and DM conversation rows (tap-to-open, no action buttons) are already mobile-friendly and structurally different, so they're intentionally left as-is. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
9ae49bf51f
commit
27808533d2
3 files changed
+17
-13
No files matched your search
+13
-7
@@ -3594,13 +3594,19 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Compact creator/account cards (Subscriptions, Friends, Blocked). Desktop
|
||||
lays them out in a row: summary left, actions right. */
|
||||
.profile-account-card {
|
||||
/* Compact creator/account cards (Subscriptions, Friends, Blocked, Admin
|
||||
lists, Moderation). Desktop lays them out in a row: summary left, actions
|
||||
right. `.profile-account-card` is the card itself (padded); the
|
||||
`--row` variant is for a nested flex row inside an already-padded card. */
|
||||
.profile-account-card,
|
||||
.profile-account-card__row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
.profile-account-card {
|
||||
padding: var(--space-md);
|
||||
}
|
||||
|
||||
@@ -3616,15 +3622,15 @@
|
||||
4-line-wrapped npub in a crammed column), with the actions as a full-width
|
||||
row of equal-width buttons below. */
|
||||
@media (max-width: calc(theme("screens.sm") - 0.02px)) {
|
||||
.profile-account-card {
|
||||
.profile-account-card,
|
||||
.profile-account-card__row {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: var(--space-sm);
|
||||
padding: var(--space-sm);
|
||||
}
|
||||
|
||||
.profile-account-card__actions {
|
||||
gap: var(--space-2xs);
|
||||
.profile-account-card {
|
||||
padding: var(--space-sm);
|
||||
}
|
||||
|
||||
.profile-account-card__actions > * {
|
||||
|
||||
@@ -161,8 +161,7 @@ export class ProfileAdminRenderer {
|
||||
|
||||
values.forEach((npub) => {
|
||||
const item = document.createElement("li");
|
||||
item.className =
|
||||
"card flex flex-col gap-3 p-4 sm:flex-row sm:items-center sm:justify-between";
|
||||
item.className = "card profile-account-card";
|
||||
|
||||
const normalizedNpub = typeof npub === "string" ? npub.trim() : "";
|
||||
const comparableNpub =
|
||||
@@ -216,8 +215,7 @@ export class ProfileAdminRenderer {
|
||||
}
|
||||
|
||||
const actions = document.createElement("div");
|
||||
actions.className =
|
||||
"flex flex-wrap items-center justify-end gap-2 sm:flex-none";
|
||||
actions.className = "profile-account-card__actions";
|
||||
|
||||
const viewButton = this.mainController.createViewChannelButton({
|
||||
targetNpub: encodedNpub,
|
||||
|
||||
@@ -501,7 +501,7 @@ export class ProfileModerationController {
|
||||
item.className = "card space-y-2 p-4";
|
||||
|
||||
const row = document.createElement("div");
|
||||
row.className = "flex items-center justify-between gap-4";
|
||||
row.className = "profile-account-card__row";
|
||||
|
||||
const authorKey = entry.authorPubkey;
|
||||
let profileSummary = null;
|
||||
@@ -516,7 +516,7 @@ export class ProfileModerationController {
|
||||
profileSummary = this.mainController.dmController.createCompactProfileSummary(summaryData);
|
||||
|
||||
const actions = document.createElement("div");
|
||||
actions.className = "flex flex-wrap items-center justify-end gap-2";
|
||||
actions.className = "profile-account-card__actions";
|
||||
|
||||
const resetButton = this.mainController.createRemoveButton({
|
||||
label: "Reset",
|
||||
|
||||
Reference in new issue
Block a user