mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
style(console): pin theme and language controls to the right
Separate utility controls from page actions so narrow screens retain a readable title column and right-aligned actions below. Wrap long headings without letting them push controls out of view.
This commit is contained in:
1 parent
3e44c0b659
commit
356d3e7689
1 file changed
+43
-14
@@ -27,11 +27,11 @@
|
|||||||
|
|
||||||
<div class="console-main">
|
<div class="console-main">
|
||||||
<header class="console-topbar">
|
<header class="console-topbar">
|
||||||
<div>
|
<div class="console-heading">
|
||||||
<p class="console-kicker">WebHooker / {{ activeNav }}</p>
|
<p class="console-kicker">WebHooker / {{ activeNav }}</p>
|
||||||
<h1>{{ pageTitle }}</h1>
|
<h1 :title="pageTitle">{{ pageTitle }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="console-actions">
|
<div class="console-utilities">
|
||||||
<RcBadge
|
<RcBadge
|
||||||
v-if="!needLogin && loadingAny"
|
v-if="!needLogin && loadingAny"
|
||||||
variant="soft"
|
variant="soft"
|
||||||
@@ -41,12 +41,14 @@
|
|||||||
>
|
>
|
||||||
{{ t("status.loading") }}
|
{{ t("status.loading") }}
|
||||||
</RcBadge>
|
</RcBadge>
|
||||||
<RcButton v-if="view === 'overview'" variant="ghost" size="sm" @click="refreshOverview"
|
|
||||||
><RefreshCw :size="15" />{{ t("metrics.refresh") }}</RcButton
|
|
||||||
>
|
|
||||||
<ThemeToggle />
|
<ThemeToggle />
|
||||||
<RcButton variant="ghost" size="sm" @click="toggle"
|
<RcButton variant="ghost" size="sm" @click="toggle"
|
||||||
><Languages :size="15" />{{ t("app.langToggle") }}</RcButton
|
><Languages :size="15" class="console-lang-icon" />{{ t("app.langToggle") }}</RcButton
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="console-actions">
|
||||||
|
<RcButton v-if="view === 'overview'" variant="ghost" size="sm" @click="refreshOverview"
|
||||||
|
><RefreshCw :size="15" />{{ t("metrics.refresh") }}</RcButton
|
||||||
>
|
>
|
||||||
<RcButton
|
<RcButton
|
||||||
v-if="!needLogin && selectedGroup && canEditRoutes(selectedGroup.id) && !reordering"
|
v-if="!needLogin && selectedGroup && canEditRoutes(selectedGroup.id) && !reordering"
|
||||||
@@ -870,21 +872,36 @@ async function onDeleteGroup(group: Group): Promise<void> {
|
|||||||
display: flex;
|
display: flex;
|
||||||
min-height: 76px;
|
min-height: 76px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
gap: 0.45rem;
|
||||||
gap: 1rem;
|
|
||||||
border-bottom: 1px solid rgb(var(--wh-border));
|
border-bottom: 1px solid rgb(var(--wh-border));
|
||||||
background: color-mix(in srgb, rgb(var(--wh-bg)) 87%, transparent);
|
background: color-mix(in srgb, rgb(var(--wh-bg)) 87%, transparent);
|
||||||
padding: 0.8rem clamp(1rem, 3vw, 2.5rem);
|
padding: 0.8rem clamp(1rem, 3vw, 2.5rem);
|
||||||
backdrop-filter: blur(18px);
|
backdrop-filter: blur(18px);
|
||||||
}
|
}
|
||||||
|
.console-heading {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-width: 0;
|
||||||
|
padding-right: 0.55rem;
|
||||||
|
}
|
||||||
.console-topbar h1 {
|
.console-topbar h1 {
|
||||||
|
display: -webkit-box;
|
||||||
|
overflow: hidden;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
margin: 0.1rem 0 0;
|
margin: 0.1rem 0 0;
|
||||||
font-size: 1.15rem;
|
font-size: 1.15rem;
|
||||||
letter-spacing: -0.035em;
|
letter-spacing: -0.035em;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
.console-kicker {
|
.console-kicker {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
.console-heading .console-kicker {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.console-utilities,
|
||||||
.console-actions {
|
.console-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -994,17 +1011,29 @@ async function onDeleteGroup(group: Group): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 620px) {
|
@media (max-width: 620px) {
|
||||||
|
/* Title left with theme/language pinned top-right; page actions below, right-aligned. */
|
||||||
.console-topbar {
|
.console-topbar {
|
||||||
align-items: flex-start;
|
display: grid;
|
||||||
flex-direction: column;
|
grid-template-columns: minmax(0, 1fr) auto;
|
||||||
|
align-items: start;
|
||||||
|
gap: 0.75rem 0.25rem;
|
||||||
|
}
|
||||||
|
.console-heading {
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
.console-utilities {
|
||||||
|
gap: 0.25rem;
|
||||||
}
|
}
|
||||||
.console-actions {
|
.console-actions {
|
||||||
width: 100%;
|
grid-column: 1 / -1;
|
||||||
justify-content: flex-start;
|
justify-self: end;
|
||||||
|
max-width: 100%;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
padding-bottom: 0.05rem;
|
padding-bottom: 0.05rem;
|
||||||
}
|
}
|
||||||
.console-status {
|
/* Keep the top-right tools compact so the title column stays readable. */
|
||||||
|
.console-status,
|
||||||
|
.console-lang-icon {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.console-content {
|
.console-content {
|
||||||
|
|||||||
Reference in new issue
Block a user