printedparts kiosk: keypad and entry-panel visual polish
The keypad becomes a proper terminal pad: fixed 3-column grid of rounded square buttons with tabular numerals, press feedback, and muted Clear/backspace actions. Each manual step (item number, SSO, quantity) shares one card panel - boxed entry display with placeholder styling, keypad, and a full-width action button.
This commit is contained in:
@@ -4,11 +4,11 @@
|
|||||||
class="keypad-button" @click="$emit('digit', digit)">
|
class="keypad-button" @click="$emit('digit', digit)">
|
||||||
{{ digit }}
|
{{ digit }}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="keypad-button keypad-muted"
|
<button type="button" class="keypad-button keypad-action"
|
||||||
@click="$emit('clear')">C</button>
|
@click="$emit('clear')">Clear</button>
|
||||||
<button type="button" class="keypad-button" @click="$emit('digit', '0')">0</button>
|
<button type="button" class="keypad-button" @click="$emit('digit', '0')">0</button>
|
||||||
<button type="button" class="keypad-button keypad-muted"
|
<button type="button" class="keypad-button keypad-action"
|
||||||
@click="$emit('backspace')"><</button>
|
aria-label="Backspace" @click="$emit('backspace')">⌫</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -20,19 +20,35 @@ defineEmits(['digit', 'clear', 'backspace'])
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.touch-keypad {
|
.touch-keypad {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 5.2rem);
|
||||||
gap: 0.6rem;
|
gap: 0.65rem;
|
||||||
max-width: 20rem;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.keypad-button {
|
.keypad-button {
|
||||||
font-size: 1.8rem;
|
height: 4.4rem;
|
||||||
padding: 1rem 0;
|
font-size: 1.9rem;
|
||||||
border-radius: 0.5rem;
|
font-weight: 600;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
border-radius: 0.75rem;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
background: var(--bg-card);
|
background: var(--bg-card-solid, var(--bg-card));
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
|
||||||
|
transition: transform 0.05s ease, background 0.1s ease;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
.keypad-button:active { background: var(--primary); color: #fff; }
|
.keypad-button:hover { border-color: var(--primary); }
|
||||||
.keypad-muted { color: var(--text-light); }
|
.keypad-button:active {
|
||||||
|
background: var(--primary);
|
||||||
|
color: #fff;
|
||||||
|
transform: scale(0.96);
|
||||||
|
}
|
||||||
|
.keypad-action {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--text-light);
|
||||||
|
}
|
||||||
|
.keypad-action:active { color: #fff; }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -21,15 +21,17 @@
|
|||||||
No scanner?
|
No scanner?
|
||||||
<a href="#" @click.prevent="manualEntry = !manualEntry">Type the number</a>
|
<a href="#" @click.prevent="manualEntry = !manualEntry">Type the number</a>
|
||||||
</p>
|
</p>
|
||||||
<div v-if="manualEntry" class="manual-block">
|
<div v-if="manualEntry" class="entry-panel">
|
||||||
<div class="quantity-display">{{ manualCode || 'label number' }}</div>
|
<div class="entry-display" :class="{ empty: !manualCode }">
|
||||||
|
{{ manualCode || 'label number' }}
|
||||||
|
</div>
|
||||||
<TouchKeypad @digit="manualCode += $event"
|
<TouchKeypad @digit="manualCode += $event"
|
||||||
@clear="manualCode = ''"
|
@clear="manualCode = ''"
|
||||||
@backspace="manualCode = manualCode.slice(0, -1)" />
|
@backspace="manualCode = manualCode.slice(0, -1)" />
|
||||||
<button class="btn btn-primary take-button" :disabled="!manualCode"
|
<button class="btn btn-primary take-button" :disabled="!manualCode"
|
||||||
@click="lookupItem(manualCode)">Look up</button>
|
@click="lookupItem(manualCode)">Look up</button>
|
||||||
<p class="kiosk-hint">Just the number from the label - e.g. 4 for
|
<p class="kiosk-hint">Just the number from the label; letters are
|
||||||
{{ '0004' }}; letters are added automatically.</p>
|
added automatically.</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -43,8 +45,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="kiosk-prompt">Scan your badge or tap in your SSO</p>
|
<p class="kiosk-prompt">Scan your badge or tap in your SSO</p>
|
||||||
<div class="manual-block">
|
<div class="entry-panel">
|
||||||
<div class="quantity-display">{{ manualBadge || 'SSO' }}</div>
|
<div class="entry-display" :class="{ empty: !manualBadge }">
|
||||||
|
{{ manualBadge || 'SSO' }}
|
||||||
|
</div>
|
||||||
<TouchKeypad @digit="manualBadge += $event"
|
<TouchKeypad @digit="manualBadge += $event"
|
||||||
@clear="manualBadge = ''"
|
@clear="manualBadge = ''"
|
||||||
@backspace="manualBadge = manualBadge.slice(0, -1)" />
|
@backspace="manualBadge = manualBadge.slice(0, -1)" />
|
||||||
@@ -63,14 +67,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="kiosk-prompt">How many are you taking?</p>
|
<p class="kiosk-prompt">How many are you taking?</p>
|
||||||
<div class="quantity-display">{{ quantity || '0' }}</div>
|
<div class="entry-panel">
|
||||||
<TouchKeypad @digit="quantity += $event"
|
<div class="entry-display" :class="{ empty: !quantity }">
|
||||||
@clear="quantity = ''"
|
{{ quantity || '0' }}
|
||||||
@backspace="quantity = quantity.slice(0, -1)" />
|
</div>
|
||||||
<button class="btn btn-primary take-button" :disabled="!quantity || submitting"
|
<TouchKeypad @digit="quantity += $event"
|
||||||
@click="submitTake">
|
@clear="quantity = ''"
|
||||||
{{ submitting ? 'Working...' : 'TAKE' }}
|
@backspace="quantity = quantity.slice(0, -1)" />
|
||||||
</button>
|
<button class="btn btn-primary take-button" :disabled="!quantity || submitting"
|
||||||
|
@click="submitTake">
|
||||||
|
{{ submitting ? 'Working...' : 'TAKE' }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- done -->
|
<!-- done -->
|
||||||
@@ -240,16 +248,42 @@ function reset() {
|
|||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
border-radius: 0.4rem;
|
border-radius: 0.4rem;
|
||||||
}
|
}
|
||||||
.quantity-display {
|
.entry-panel {
|
||||||
font-size: 3rem;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1rem;
|
||||||
|
background: var(--bg-card);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 1rem;
|
||||||
|
padding: 1.5rem 2rem;
|
||||||
|
}
|
||||||
|
.entry-display {
|
||||||
|
width: 16.9rem;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 2.4rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
min-width: 8rem;
|
font-variant-numeric: tabular-nums;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-bottom: 3px solid var(--primary);
|
padding: 0.5rem 1rem;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 0.75rem;
|
||||||
|
background: var(--bg);
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.entry-display.empty {
|
||||||
|
color: var(--text-light);
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
line-height: 2.4rem;
|
||||||
}
|
}
|
||||||
.take-button {
|
.take-button {
|
||||||
font-size: 1.5rem;
|
font-size: 1.4rem;
|
||||||
padding: 0.9rem 3.5rem;
|
padding: 0.85rem 0;
|
||||||
|
width: 16.9rem;
|
||||||
|
border-radius: 0.75rem;
|
||||||
}
|
}
|
||||||
.manual-row { display: flex; gap: 0.6rem; }
|
.manual-row { display: flex; gap: 0.6rem; }
|
||||||
.manual-block {
|
.manual-block {
|
||||||
|
|||||||
Reference in New Issue
Block a user