feat(machine): landscape layout and fullscreen mode

- Switch Electron window to landscape (1920x1080) with fullscreen fallback
- Rearrange IdleView for horizontal layout (logo+badges left, action cards right)
- Fix hostname command in provision/build scripts (use ip route instead of hostname -I)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Patrick Mulligan 2026-02-18 20:43:49 -05:00
commit 722635a5a6
5 changed files with 28 additions and 37 deletions

View file

@ -44,9 +44,9 @@ const isDev =
process.env.ELECTRON_FORCE_PROD !== '1' &&
(process.env.NODE_ENV === 'development' || !app.isPackaged)
// Window dimensions (vertical ATM display)
const WINDOW_WIDTH = 1080
const WINDOW_HEIGHT = 1920
// Window dimensions (landscape ATM display)
const WINDOW_WIDTH = 1920
const WINDOW_HEIGHT = 1080
let mainWindow: BrowserWindow | null = null
@ -57,6 +57,7 @@ function createWindow() {
resizable: isDev, // Allow resize in dev for debugging
frame: isDev, // Show window frame in dev
kiosk: !isDev, // Kiosk mode in production
fullscreen: !isDev, // Ensure fullscreen even if kiosk fails
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
contextIsolation: true,

View file

@ -59,7 +59,7 @@ function handleCashOut() {
</script>
<template>
<div class="flex flex-1 flex-col items-center justify-center gap-12 p-8">
<div class="flex flex-1 items-center justify-center gap-12 p-8">
<!-- Logo -->
<div class="flex flex-col items-center gap-2">
<img
@ -68,6 +68,12 @@ function handleCashOut() {
class="h-40 w-40 animate-float drop-shadow-[0_0_24px_var(--primary)]"
/>
<h1 class="text-4xl font-bold text-primary">Bitcoinmat</h1>
<!-- Footer badges -->
<div class="mt-4 flex items-center gap-4">
<Badge variant="outline" class="border-success text-success">No KYC</Badge>
<Badge variant="outline" class="border-primary text-primary">No Registration</Badge>
<Badge variant="outline" class="border-bitcoin text-bitcoin">Just Bitcoin</Badge>
</div>
</div>
<!-- Action Buttons -->
@ -97,13 +103,6 @@ function handleCashOut() {
</Card>
</div>
<!-- Footer -->
<div class="flex items-center gap-4">
<Badge variant="outline" class="border-success text-success">No KYC</Badge>
<Badge variant="outline" class="border-primary text-primary">No Registration</Badge>
<Badge variant="outline" class="border-bitcoin text-bitcoin">Just Bitcoin</Badge>
</div>
<!-- Dev QR buttons -->
<div v-if="atmStore.debugMode" class="flex items-center gap-4">
<Button

View file

@ -1,6 +1,8 @@
#!/usr/bin/env bash
# Build a bootable NixOS Live USB ISO for testing the ATM Electron app
# on physical hardware (UpBoard).
# on physical hardware (UpBoard, Framework, etc).
#
# After booting, provision credentials with: bash provision-atm.sh <atm-ip>
#
# Usage: bash build-iso.sh
set -euo pipefail
@ -50,15 +52,15 @@ echo "=== ISO built successfully ==="
echo "File: $ISO_PATH"
echo "Size: $ISO_SIZE"
echo ""
echo "--- Test in QEMU ---"
echo "qemu-system-x86_64 -enable-kvm -m 2G \\"
echo " -bios /usr/share/edk2-ovmf/OVMF_CODE.fd \\"
echo " -cdrom $ISO_PATH -display gtk"
echo ""
echo "--- Write to USB flash drive ---"
echo "sudo dd if=$ISO_PATH of=/dev/sdX bs=4M status=progress oflag=sync"
echo ""
echo "--- After booting, SSH in and configure ---"
echo "ssh lamassu@<atm-ip>"
echo "sudo nano /var/lib/lamassu-atm/.env"
echo "sudo systemctl restart lamassu-atm"
echo "--- Test in QEMU ---"
echo "qemu-system-x86_64 -enable-kvm -m 2G \\"
echo " -drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2/x64/OVMF_CODE.4m.fd \\"
echo " -cdrom $ISO_PATH -display gtk,zoom-to-fit=on -vga std \\"
echo " -device e1000,netdev=net0 -netdev user,id=net0,hostfwd=tcp::2222-:22"
echo ""
echo "--- After booting, provision credentials ---"
echo "bash provision-atm.sh # QEMU (localhost:2222)"
echo "bash provision-atm.sh <atm-ip> 22 # Real hardware on LAN"

View file

@ -24,34 +24,23 @@ let
# .env template with regtest defaults pointing to the dev machine
envTemplate = pkgs.writeText "lamassu-atm-env" ''
# Lamassu ATM Live USB Configuration
# Edit this file and restart: sudo systemctl restart lamassu-atm
#
# Dev machine LAN address (adjust to your network)
# Run provision-atm.sh from your dev machine, or edit manually:
# sudo nano /var/lib/lamassu-atm/.env && sudo systemctl restart lamassu-atm
VITE_RELAY_URL=ws://192.168.1.190:7777
VITE_LIGHTNING_PUB_API_URL=http://192.168.1.190:1776
VITE_EXTENSION_API_URL=http://192.168.1.190:1777
# Lightning.Pub credentials (fill in after boot)
VITE_LIGHTNING_PUB_PUBKEY=
VITE_ATM_PRIVATE_KEY=
VITE_ADMIN_TOKEN=
VITE_APP_ID=
VITE_APP_TOKEN=
VITE_LINKING_TOKEN=
# Machine configuration
VITE_LAMASSU_MACHINE_MODEL=sintra
VITE_LAMASSU_FIAT_CODE=USD
# Hardware (uncomment and set for real hardware)
# VITE_LAMASSU_VALIDATOR_DEVICE=/dev/ttyUSB0
# VITE_LAMASSU_DISPENSER_DEVICE=/dev/ttyUSB1
# VITE_LAMASSU_CASSETTES=
# Force production mode when running via `electron /path`
ELECTRON_FORCE_PROD=1
# Display
DISPLAY=:0
'';
in
@ -159,7 +148,7 @@ in
};
};
# Install the .env template on first boot
# Install the .env on first boot
system.activationScripts.lamassu-env = ''
mkdir -p /var/lib/lamassu-atm
if [ ! -f /var/lib/lamassu-atm/.env ]; then

View file

@ -56,7 +56,7 @@ if [ "$ATM_HOST" = "localhost" ]; then
echo ""
echo "--- QEMU detected: using $HOST_IP as host gateway ---"
else
HOST_IP=$(hostname -I | awk '{print $1}')
HOST_IP=$(ip -4 route get 1 | awk '{print $7; exit}')
echo ""
echo "--- LAN ATM: using $HOST_IP as dev machine address ---"
fi