Redesign server launcher modal for mobile UX

- Pills with flags for region selection
- Horizontal wrap layout for OS options
- Stacked card design for plan selection with icons
- Gradient launch button with Korean text
- Backdrop blur and refined spacing
- Active states with shadow glow effects

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
kappa
2026-01-20 20:22:32 +09:00
parent 9ed5fb300c
commit 2dade5d037

View File

@@ -659,189 +659,116 @@
role="dialog" role="dialog"
aria-modal="true" aria-modal="true"
aria-labelledby="launcher-title" aria-labelledby="launcher-title"
class="bg-slate-900 border border-white/10 w-full max-w-md rounded-2xl shadow-2xl overflow-hidden relative"> class="bg-slate-900/95 backdrop-blur-xl border border-white/10 w-[calc(100%-2rem)] max-w-sm mx-4 rounded-3xl shadow-2xl shadow-black/50 overflow-hidden">
<!-- Modal Header --> <!-- Modal Header -->
<div class="px-6 py-4 border-b border-white/5 flex justify-between items-center bg-slate-800/50"> <div class="px-5 py-4 border-b border-white/5 flex justify-between items-center">
<h3 id="launcher-title" class="text-xl font-bold flex items-center gap-2"> <h3 id="launcher-title" class="text-lg font-bold text-white">🚀 Server Launcher</h3>
<span class="text-brand-400">🚀</span> Server Launcher <button @click="resetLauncher" aria-label="닫기" class="w-8 h-8 flex items-center justify-center rounded-full bg-white/5 text-slate-400 hover:bg-white/10 hover:text-white transition" x-show="!launching">
</h3> <svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg>
<button @click="resetLauncher" aria-label="닫기" class="text-slate-400 hover:text-white" x-show="!launching">
<svg class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg>
</button> </button>
</div> </div>
<div class="p-5"> <div class="p-5">
<!-- Step 0: Configuration --> <!-- Step 0: Configuration -->
<div x-show="step === 0" class="space-y-6">
<div x-show="step === 0" class="space-y-5"> <!-- Region Selection - Horizontal Pills -->
<div> <div>
<label class="block text-xs font-medium text-slate-400 mb-3">리전 선택</label>
<label class="block text-xs font-mono text-slate-500 uppercase tracking-widest mb-2">1. Select Region</label> <div class="flex flex-wrap gap-2">
<template x-for="r in [{id: 'Seoul', flag: '🇰🇷'}, {id: 'Tokyo', flag: '🇯🇵'}, {id: 'Singapore', flag: '🇸🇬'}, {id: 'HongKong', flag: '🇭🇰'}]">
<div class="grid grid-cols-2 gap-2"> <button @click="config.region = r.id"
:class="config.region === r.id ? 'bg-brand-500 text-white shadow-lg shadow-brand-500/30' : 'bg-slate-800 text-slate-300 hover:bg-slate-700'"
<template x-for="r in ['Seoul', 'Tokyo', 'Singapore', 'HongKong']"> class="flex items-center gap-1.5 px-3 py-2 rounded-full text-sm font-medium transition-all">
<span x-text="r.flag"></span>
<button @click="config.region = r" <span x-text="r.id"></span>
:class="config.region === r ? 'border-brand-500 bg-brand-500/10 text-white' : 'border-slate-700 bg-slate-800 text-slate-400 hover:border-slate-500'"
class="px-3 py-1.5 rounded-lg border text-xs font-bold transition-all text-center">
<span x-text="r"></span>
</button> </button>
</template> </template>
</div> </div>
</div> </div>
<!-- OS Selection - Horizontal Pills -->
<div> <div>
<label class="block text-xs font-medium text-slate-400 mb-3">운영체제</label>
<label class="block text-xs font-mono text-slate-500 uppercase tracking-widest mb-2">2. Choose OS</label> <div class="flex flex-wrap gap-2">
<div class="grid grid-cols-2 gap-2">
<template x-for="o in ['Debian 12', 'Ubuntu 24.04', 'CentOS 9', 'Alpine']"> <template x-for="o in ['Debian 12', 'Ubuntu 24.04', 'CentOS 9', 'Alpine']">
<button @click="config.os = o" <button @click="config.os = o"
:class="config.os === o ? 'bg-purple-500 text-white shadow-lg shadow-purple-500/30' : 'bg-slate-800 text-slate-300 hover:bg-slate-700'"
:class="config.os === o ? 'border-purple-500 bg-purple-500/10 text-white' : 'border-slate-700 bg-slate-800 text-slate-400 hover:border-slate-500'" class="px-3 py-2 rounded-full text-sm font-medium transition-all">
class="px-3 py-1.5 rounded-lg border text-xs font-bold transition-all text-center">
<span x-text="o"></span> <span x-text="o"></span>
</button> </button>
</template> </template>
</div> </div>
</div> </div>
<!-- Plan Selection - Stacked Cards -->
<div> <div>
<label class="block text-xs font-medium text-slate-400 mb-3">플랜 선택</label>
<label class="block text-xs font-mono text-slate-500 uppercase tracking-widest mb-2">3. Instance Plan</label> <div class="space-y-2">
<div class="grid grid-cols-2 gap-2">
<template x-for="p in ['Micro', 'Starter', 'Pro', 'Business']"> <template x-for="p in ['Micro', 'Starter', 'Pro', 'Business']">
<button @click="config.plan = p" <button @click="config.plan = p"
:class="config.plan === p ? 'border-brand-500 bg-brand-500/10 ring-1 ring-brand-500/30' : 'border-slate-700/50 bg-slate-800/50 hover:border-slate-600'"
:class="config.plan === p ? 'border-brand-500 ring-1 ring-brand-500/20 bg-brand-500/5' : 'border-slate-700 bg-slate-800 hover:border-brand-400/50'" class="w-full p-3.5 rounded-xl border transition-all flex justify-between items-center">
<div class="flex items-center gap-3">
class="p-2.5 rounded-lg border transition-all text-left flex justify-between items-center"> <div class="w-10 h-10 rounded-lg flex items-center justify-center text-lg"
:class="config.plan === p ? 'bg-brand-500/20' : 'bg-slate-700/50'"
<div> x-text="p === 'Micro' ? '🔹' : p === 'Starter' ? '🔷' : p === 'Pro' ? '⭐' : '💎'"></div>
<div class="text-left">
<div class="font-bold text-white text-sm" x-text="p"></div> <div class="font-semibold text-white" x-text="p"></div>
<div class="text-xs text-slate-400" x-text="getPlanSpec(p)"></div>
<div class="text-[10px] text-slate-500" x-text="getPlanSpec(p)"></div> </div>
</div>
<div class="text-right">
<div class="font-bold text-brand-400" x-text="'₩' + getPrice(p)"></div>
<div class="text-[10px] text-slate-500">/월</div>
</div> </div>
<div class="text-brand-400 font-bold text-sm" x-text="'₩' + getPrice(p)"></div>
</button> </button>
</template> </template>
</div> </div>
</div> </div>
<!-- Launch Button -->
<button @click="startLaunch"
<button @click="startLaunch" class="w-full py-3 bg-brand-600 hover:bg-brand-500 text-white font-bold rounded-lg transition-all shadow-lg shadow-brand-500/20 flex items-center justify-center gap-2 text-sm"> class="w-full py-4 bg-gradient-to-r from-brand-600 to-brand-500 hover:from-brand-500 hover:to-brand-400 text-white font-bold rounded-xl transition-all shadow-lg shadow-brand-500/25 active:scale-[0.98]">
<span class="flex items-center justify-center gap-2">
<span>🚀 Launch in</span> <span>🚀</span>
<span x-text="config.region + '에서 시작'"></span>
<span class="bg-black/20 px-2 py-0.5 rounded text-brand-300" x-text="config.region"></span> </span>
</button> </button>
</div> </div>
<!-- Launching State --> <!-- Launching State -->
<div x-show="step > 0" class="min-h-[300px] flex flex-col">
<div x-show="step > 0" class="min-h-[280px] flex flex-col"> <!-- Progress -->
<div class="mb-4"> <div class="mb-4">
<div class="flex justify-between text-xs text-slate-400 mb-2">
<div class="flex justify-between text-xs font-mono text-slate-500 mb-2"> <span x-text="step < 5 ? '배포 중...' : '완료'"></span>
<span x-text="step < 5 ? 'Deploying...' : 'Ready'"></span>
<span x-text="(step * 20) + '%'"></span> <span x-text="(step * 20) + '%'"></span>
</div> </div>
<div class="h-1.5 bg-slate-800 rounded-full overflow-hidden">
<div class="h-2 bg-slate-800 rounded-full overflow-hidden"> <div class="h-full bg-gradient-to-r from-brand-500 to-purple-500 transition-all duration-500 rounded-full" :style="'width: ' + (step * 20) + '%'"></div>
<div class="h-full bg-brand-500 transition-all duration-500" :style="'width: ' + (step * 20) + '%'"></div>
</div> </div>
</div> </div>
<!-- Logs -->
<div class="flex-1 bg-black/30 rounded-xl p-4 font-mono text-xs text-slate-400 overflow-y-auto border border-white/5 space-y-1.5 max-h-48">
<div class="flex-1 bg-black/40 rounded-xl p-6 font-mono text-xs text-slate-400 overflow-y-auto border border-white/5 space-y-2">
<template x-for="log in logs"> <template x-for="log in logs">
<div :class="log.includes('[SUCCESS]') ? 'text-green-400' : log.includes('[COMPLETE]') ? 'text-brand-400 font-semibold' : 'text-slate-400'" x-text="log"></div>
<div class="flex gap-4">
<span class="text-slate-600" x-text="new Date().toLocaleTimeString()"></span>
<span :class="log.includes('[SUCCESS]') ? 'text-green-400' : log.includes('[COMPLETE]') ? 'text-brand-400 font-bold' : 'text-slate-300'" x-text="log"></span>
</div>
</template> </template>
<div x-show="launching" class="animate-pulse text-brand-400"></div>
<div x-show="launching" class="animate-pulse">_</div>
</div> </div>
<!-- Success State -->
<div x-show="step === 5" x-transition class="mt-4 p-5 bg-gradient-to-br from-brand-500/10 to-purple-500/10 border border-brand-500/20 rounded-2xl text-center">
<div x-show="step === 5" x-transition class="mt-8 p-6 bg-brand-500/10 border border-brand-500/20 rounded-xl flex flex-col items-center text-center"> <div class="w-14 h-14 rounded-full bg-gradient-to-br from-brand-500 to-purple-500 flex items-center justify-center text-white text-2xl mb-3 mx-auto shadow-lg shadow-brand-500/30"></div>
<h4 class="text-lg font-bold text-white mb-1">서버 준비 완료!</h4>
<div class="w-12 h-12 rounded-full bg-brand-500 flex items-center justify-center text-white text-2xl mb-4"></div> <p class="text-slate-400 text-sm mb-4">인스턴스가 활성화되었습니다</p>
<div class="flex gap-3">
<h4 class="text-xl font-bold text-white mb-2">서버가 생성되었습니다!</h4> <button @click="resetLauncher" class="flex-1 py-3 bg-slate-800 hover:bg-slate-700 text-white font-semibold rounded-xl transition active:scale-[0.98]">닫기</button>
<a href="https://t.me/AnvilForgeBot" target="_blank" class="flex-1 py-3 bg-gradient-to-r from-brand-600 to-brand-500 text-white font-semibold rounded-xl transition text-center active:scale-[0.98]">Console →</a>
<p class="text-slate-400 text-sm mb-6">설정한 구성대로 인스턴스가 활성화되었습니다.</p>
<div class="flex gap-4 w-full">
<button @click="resetLauncher" class="flex-1 py-3 bg-slate-800 hover:bg-slate-700 text-white font-bold rounded-lg transition">닫기</button>
<a href="https://t.me/AnvilForgeBot" target="_blank" class="flex-1 py-3 bg-brand-600 hover:bg-brand-500 text-white font-bold rounded-lg transition text-center">Console 이동</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>