refine: use icon for currency display toggle
This commit is contained in:
parent
1b52de229f
commit
758f061eb5
|
|
@ -104,30 +104,21 @@ input:focus-visible {
|
|||
gap: 6px;
|
||||
}
|
||||
|
||||
.currency-display-toggle {
|
||||
height: 32px;
|
||||
display: inline-flex;
|
||||
align-items: stretch;
|
||||
.currency-display-button {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
border: 1px solid rgba(255, 255, 255, 0.28);
|
||||
border-radius: 7px;
|
||||
padding: 2px;
|
||||
padding: 0;
|
||||
background: rgba(0, 0, 0, 0.12);
|
||||
color: rgba(255, 255, 255, 0.82);
|
||||
}
|
||||
|
||||
.currency-display-toggle button {
|
||||
min-width: 32px;
|
||||
border: 0;
|
||||
border-radius: 5px;
|
||||
padding: 0 6px;
|
||||
background: transparent;
|
||||
color: rgba(255, 255, 255, 0.72);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.currency-display-toggle button.active {
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
color: #24766d;
|
||||
.currency-display-button.active {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.participant-avatars {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
import { formatCurrencyAmount, type LedgerEntry } from "@cents/domain";
|
||||
import {
|
||||
BookOpen,
|
||||
ArrowLeftRight,
|
||||
ChevronLeft,
|
||||
ChevronDown,
|
||||
ChevronRight,
|
||||
|
|
@ -437,10 +438,17 @@ async function shareLedger() {
|
|||
<ChevronDown :size="16" />
|
||||
</button>
|
||||
<div class="header-right-actions">
|
||||
<div class="currency-display-toggle" role="group" aria-label="流水金额显示方式">
|
||||
<button type="button" :class="{ active: showBaseCurrency }" :aria-pressed="showBaseCurrency" @click="showBaseCurrency = true">本币</button>
|
||||
<button type="button" :class="{ active: !showBaseCurrency }" :aria-pressed="!showBaseCurrency" @click="showBaseCurrency = false">原币</button>
|
||||
</div>
|
||||
<button
|
||||
class="currency-display-button"
|
||||
type="button"
|
||||
:class="{ active: showBaseCurrency }"
|
||||
:aria-label="showBaseCurrency ? '当前显示本币,点击显示原币' : '当前显示原币,点击显示本币'"
|
||||
:title="showBaseCurrency ? '当前显示本币,点击切换为原币' : '当前显示原币,点击切换为本币'"
|
||||
:aria-pressed="showBaseCurrency"
|
||||
@click="showBaseCurrency = !showBaseCurrency"
|
||||
>
|
||||
<ArrowLeftRight :size="17" />
|
||||
</button>
|
||||
<button v-if="ledgerStore.currentRole === 'owner'" class="icon-button header-icon" type="button" aria-label="更多" title="更多" @click.stop="moreMenuOpen = true">
|
||||
<MoreHorizontal :size="21" />
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue