feat(redesign): re-skin admin-ops/platform-admin/public views to DS (Phase D batch 4 — panel re-skin complete)
All checks were successful
Test Asgard Runner / test (push) Successful in 3s
All checks were successful
Test Asgard Runner / test (push) Successful in 3s
Final re-skin batch: admin ops (Console/FileManager[VueFinder preserved]/WipeCalendar/WipeHistory/Changelog/Migration), platform-admin (Dashboard/Licenses/Servers/Subscriptions/Users), public product pages (ServerInfo/StatusPage/StoreView) + PublicLayout, WarpEditor, ErrorBoundary. All logic/store/router/WebSocket/handlers preserved. Marketing views (Landing/Pricing/FAQ/HowItWorks/Roadmap/EarlyAccess + MarketingLayout) intentionally deferred to the dedicated marketing-site redesign. Build green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2,8 +2,16 @@
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import type { PublicStoreInfo, PublicStoreItem, StorePurchaseRequest, StorePurchaseResponse } from '@/types'
|
||||
import { ShoppingCart, Package, Filter, X, AlertCircle, ExternalLink, Check } from 'lucide-vue-next'
|
||||
import { safeCurrency } from '@/utils/formatters'
|
||||
import Panel from '@/components/ds/data/Panel.vue'
|
||||
import Badge from '@/components/ds/core/Badge.vue'
|
||||
import Button from '@/components/ds/core/Button.vue'
|
||||
import Icon from '@/components/ds/core/Icon.vue'
|
||||
import Alert from '@/components/ds/feedback/Alert.vue'
|
||||
import EmptyState from '@/components/ds/feedback/EmptyState.vue'
|
||||
import Input from '@/components/ds/forms/Input.vue'
|
||||
import Select from '@/components/ds/forms/Select.vue'
|
||||
import Logo from '@/components/ds/brand/Logo.vue'
|
||||
|
||||
const route = useRoute()
|
||||
const subdomain = computed(() => route.params.subdomain as string)
|
||||
@@ -29,7 +37,7 @@ const categories = computed(() => {
|
||||
})
|
||||
return Array.from(cats).map(name => ({
|
||||
value: name,
|
||||
label: name === 'all' ? 'All Items' : name
|
||||
label: name === 'all' ? 'All items' : name
|
||||
}))
|
||||
})
|
||||
|
||||
@@ -142,14 +150,14 @@ function formatPrice(price: number): string {
|
||||
return safeCurrency(price, '$')
|
||||
}
|
||||
|
||||
function itemTypeBadgeClass(itemType: string): string {
|
||||
const colors: Record<string, string> = {
|
||||
kit: 'bg-blue-500/15 text-blue-400',
|
||||
rank: 'bg-purple-500/15 text-purple-400',
|
||||
currency: 'bg-green-500/15 text-green-400',
|
||||
custom_command: 'bg-orange-500/15 text-orange-400',
|
||||
function itemTypeTone(itemType: string): 'info' | 'wiping' | 'online' | 'warn' | 'neutral' {
|
||||
const tones: Record<string, 'info' | 'wiping' | 'online' | 'warn' | 'neutral'> = {
|
||||
kit: 'info',
|
||||
rank: 'wiping',
|
||||
currency: 'online',
|
||||
custom_command: 'warn',
|
||||
}
|
||||
return colors[itemType] || 'bg-neutral-700/50 text-neutral-400'
|
||||
return tones[itemType] ?? 'neutral'
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
@@ -158,264 +166,631 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="min-h-screen bg-gradient-to-b from-neutral-950 to-neutral-900">
|
||||
<!-- Header -->
|
||||
<div class="bg-neutral-950/80 backdrop-blur-sm border-b border-neutral-800 sticky top-0 z-10">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
|
||||
<div class="flex items-center gap-3 mb-2">
|
||||
<ShoppingCart class="w-6 h-6 text-oxide-500" />
|
||||
<h1 class="text-3xl font-bold text-neutral-100">
|
||||
{{ storeInfo?.store_name || 'Server Store' }}
|
||||
</h1>
|
||||
<div class="sv-page">
|
||||
<!-- Sticky store header -->
|
||||
<header class="sv-bar">
|
||||
<div class="sv-bar__inner">
|
||||
<div class="sv-bar__brand">
|
||||
<Logo :size="20" :wordmark="true" />
|
||||
<div class="sv-bar__divider" />
|
||||
<div class="sv-bar__store">
|
||||
<Icon name="shopping-cart" :size="16" />
|
||||
<span class="sv-bar__name">{{ storeInfo?.store_name ?? 'Server store' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="storeInfo?.description" class="text-neutral-400 max-w-3xl">
|
||||
{{ storeInfo.description }}
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Store description -->
|
||||
<div v-if="storeInfo?.description" class="sv-desc-wrap">
|
||||
<p class="sv-desc">{{ storeInfo.description }}</p>
|
||||
</div>
|
||||
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
<!-- Loading state -->
|
||||
<div v-if="isLoading" class="flex items-center justify-center py-20">
|
||||
<div class="text-center">
|
||||
<div class="inline-block w-8 h-8 border-4 border-oxide-500 border-t-transparent rounded-full animate-spin mb-4"></div>
|
||||
<p class="text-neutral-400">Loading store...</p>
|
||||
</div>
|
||||
<div class="sv-body">
|
||||
<!-- Loading -->
|
||||
<div v-if="isLoading" class="sv-state">
|
||||
<Icon name="loader" :size="28" class="sv-spin" />
|
||||
<span class="sv-state__label">Loading store...</span>
|
||||
</div>
|
||||
|
||||
<!-- Error state -->
|
||||
<div v-else-if="storeError" class="bg-neutral-900 border border-neutral-800 rounded-lg p-12 text-center">
|
||||
<AlertCircle class="w-16 h-16 text-red-400 mx-auto mb-4" />
|
||||
<h2 class="text-2xl font-bold text-neutral-100 mb-2">Store Unavailable</h2>
|
||||
<p class="text-neutral-400 mb-6">{{ storeError }}</p>
|
||||
<button
|
||||
@click="loadStore"
|
||||
class="px-6 py-3 bg-oxide-600 hover:bg-oxide-700 text-white font-medium rounded-lg transition-colors"
|
||||
<!-- Error -->
|
||||
<div v-else-if="storeError" class="sv-error">
|
||||
<EmptyState
|
||||
icon="shopping-bag"
|
||||
title="Store unavailable"
|
||||
:description="storeError"
|
||||
>
|
||||
Retry
|
||||
</button>
|
||||
<template #action>
|
||||
<Button icon="refresh-cw" variant="secondary" @click="loadStore">Retry</Button>
|
||||
</template>
|
||||
</EmptyState>
|
||||
</div>
|
||||
|
||||
<!-- Store content -->
|
||||
<div v-else-if="storeInfo">
|
||||
<template v-else-if="storeInfo">
|
||||
<!-- Category filter -->
|
||||
<div v-if="categories.length > 1" class="mb-6 flex items-center gap-3">
|
||||
<Filter class="w-4 h-4 text-neutral-500" />
|
||||
<select
|
||||
<div v-if="categories.length > 1" class="sv-filter">
|
||||
<Icon name="list" :size="14" class="sv-filter__icon" />
|
||||
<Select
|
||||
v-model="selectedCategory"
|
||||
class="px-4 py-2 bg-neutral-800 border border-neutral-700 rounded-lg text-sm text-neutral-100 focus:outline-none focus:ring-2 focus:ring-oxide-500/50 focus:border-oxide-500 transition-colors"
|
||||
>
|
||||
<option v-for="cat in categories" :key="cat.value" :value="cat.value">
|
||||
{{ cat.label }}
|
||||
</option>
|
||||
</select>
|
||||
size="sm"
|
||||
:options="categories"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Items grid -->
|
||||
<div v-if="filteredItems.length > 0" class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
|
||||
<div v-if="filteredItems.length > 0" class="sv-grid">
|
||||
<div
|
||||
v-for="item in filteredItems"
|
||||
:key="item.id"
|
||||
class="bg-neutral-900 border border-neutral-800 rounded-xl overflow-hidden hover:border-oxide-500/50 transition-all group shadow-lg hover:shadow-oxide-500/10"
|
||||
class="sv-item"
|
||||
>
|
||||
<!-- Item image -->
|
||||
<div class="relative h-48 bg-gradient-to-br from-neutral-800 to-neutral-900 overflow-hidden">
|
||||
<div class="sv-item__img-wrap">
|
||||
<img
|
||||
v-if="item.image_url"
|
||||
:src="item.image_url"
|
||||
:alt="item.name"
|
||||
class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"
|
||||
class="sv-item__img"
|
||||
/>
|
||||
<div v-else class="w-full h-full flex items-center justify-center">
|
||||
<Package class="w-16 h-16 text-neutral-700" />
|
||||
<div v-else class="sv-item__img-ph">
|
||||
<Icon name="package" :size="32" :stroke-width="1.5" />
|
||||
</div>
|
||||
<div v-if="item.category_name" class="absolute top-3 right-3">
|
||||
<span class="text-xs font-medium px-2.5 py-1 rounded-full bg-neutral-950/80 backdrop-blur-sm text-neutral-300 border border-neutral-700">
|
||||
{{ item.category_name }}
|
||||
</span>
|
||||
<div v-if="item.category_name" class="sv-item__cat">
|
||||
<Badge tone="neutral">{{ item.category_name }}</Badge>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Item details -->
|
||||
<div class="p-5 space-y-4">
|
||||
<div>
|
||||
<div class="flex items-start justify-between gap-2 mb-2">
|
||||
<h3 class="text-lg font-bold text-neutral-100 group-hover:text-oxide-400 transition-colors">
|
||||
{{ item.name }}
|
||||
</h3>
|
||||
<span class="text-xl font-bold text-oxide-400 shrink-0">
|
||||
{{ formatPrice(item.price) }}
|
||||
</span>
|
||||
</div>
|
||||
<p v-if="item.description" class="text-sm text-neutral-400 line-clamp-2 leading-relaxed">
|
||||
{{ item.description }}
|
||||
</p>
|
||||
<div class="sv-item__body">
|
||||
<div class="sv-item__top">
|
||||
<h3 class="sv-item__name">{{ item.name }}</h3>
|
||||
<span class="sv-item__price">{{ formatPrice(item.price) }}</span>
|
||||
</div>
|
||||
<p v-if="item.description" class="sv-item__desc">{{ item.description }}</p>
|
||||
|
||||
<!-- Item type badge -->
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-xs font-medium px-2 py-1 rounded" :class="itemTypeBadgeClass(item.item_type)">
|
||||
<!-- Type badge + limit -->
|
||||
<div class="sv-item__meta">
|
||||
<Badge :tone="itemTypeTone(item.item_type)">
|
||||
{{ item.item_type.replace('_', ' ') }}
|
||||
</Badge>
|
||||
<span v-if="item.limit_per_player" class="sv-item__limit">
|
||||
Limit {{ item.limit_per_player }} per player
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Purchase limit indicator -->
|
||||
<div v-if="item.limit_per_player" class="text-xs text-neutral-500">
|
||||
Limited to {{ item.limit_per_player }} per player
|
||||
</div>
|
||||
|
||||
<!-- Buy button -->
|
||||
<button
|
||||
<Button
|
||||
:block="true"
|
||||
icon="shopping-cart"
|
||||
@click="openPurchaseModal(item)"
|
||||
class="w-full py-3 text-sm font-semibold text-white bg-oxide-600 hover:bg-oxide-700 rounded-lg transition-colors shadow-lg shadow-oxide-500/20"
|
||||
>
|
||||
Buy Now
|
||||
</button>
|
||||
>Buy now</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Empty state -->
|
||||
<div v-else class="bg-neutral-900 border border-neutral-800 rounded-lg p-16 text-center">
|
||||
<Package class="w-16 h-16 text-neutral-600 mx-auto mb-4" />
|
||||
<h3 class="text-xl font-medium text-neutral-300 mb-2">No Items Available</h3>
|
||||
<p class="text-sm text-neutral-500">
|
||||
{{ selectedCategory === 'all' ? 'This store has no items at the moment.' : 'No items in this category.' }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Empty category -->
|
||||
<EmptyState
|
||||
v-else
|
||||
icon="package"
|
||||
title="No items available"
|
||||
:description="selectedCategory === 'all' ? 'This store has no items at the moment.' : 'No items in this category.'"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- Purchase Modal -->
|
||||
<!-- Purchase modal -->
|
||||
<div
|
||||
v-if="showPurchaseModal && selectedItem"
|
||||
class="fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4"
|
||||
class="sv-modal-scrim"
|
||||
@click.self="closePurchaseModal"
|
||||
>
|
||||
<div class="bg-neutral-900 border border-neutral-800 rounded-xl max-w-lg w-full shadow-2xl">
|
||||
<!-- Modal Header -->
|
||||
<div class="border-b border-neutral-800 px-6 py-5 flex items-start justify-between">
|
||||
<div class="flex-1">
|
||||
<h2 class="text-2xl font-bold text-neutral-100 mb-1">Complete Purchase</h2>
|
||||
<p class="text-sm text-neutral-400">You'll be redirected to PayPal to complete payment</p>
|
||||
<div class="sv-modal">
|
||||
<!-- Modal header -->
|
||||
<div class="sv-modal__head">
|
||||
<div>
|
||||
<div class="sv-modal__title">Complete purchase</div>
|
||||
<div class="sv-modal__sub">You'll be redirected to PayPal to complete payment</div>
|
||||
</div>
|
||||
<button
|
||||
class="sv-modal__close"
|
||||
type="button"
|
||||
aria-label="Close"
|
||||
@click="closePurchaseModal"
|
||||
class="p-2 text-neutral-400 hover:text-neutral-200 rounded-lg transition-colors"
|
||||
>
|
||||
<X class="w-5 h-5" />
|
||||
<Icon name="x" :size="16" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Modal Body -->
|
||||
<div class="p-6 space-y-5">
|
||||
<!-- Modal body -->
|
||||
<div class="sv-modal__body">
|
||||
<!-- Item preview -->
|
||||
<div class="bg-neutral-800/50 border border-neutral-700 rounded-lg p-4 flex items-start gap-4">
|
||||
<div class="w-20 h-20 bg-neutral-800 rounded-lg overflow-hidden shrink-0">
|
||||
<div class="sv-modal__item">
|
||||
<div class="sv-modal__thumb">
|
||||
<img
|
||||
v-if="selectedItem.image_url"
|
||||
:src="selectedItem.image_url"
|
||||
:alt="selectedItem.name"
|
||||
class="w-full h-full object-cover"
|
||||
class="sv-modal__thumb-img"
|
||||
/>
|
||||
<div v-else class="w-full h-full flex items-center justify-center">
|
||||
<Package class="w-8 h-8 text-neutral-600" />
|
||||
<div v-else class="sv-modal__thumb-ph">
|
||||
<Icon name="package" :size="20" :stroke-width="1.5" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 min-w-0">
|
||||
<h3 class="text-lg font-semibold text-neutral-100 mb-1">{{ selectedItem.name }}</h3>
|
||||
<p v-if="selectedItem.description" class="text-sm text-neutral-400 line-clamp-2 mb-2">
|
||||
{{ selectedItem.description }}
|
||||
</p>
|
||||
<p class="text-2xl font-bold text-oxide-400">{{ formatPrice(selectedItem.price) }}</p>
|
||||
<div class="sv-modal__item-info">
|
||||
<div class="sv-modal__item-name">{{ selectedItem.name }}</div>
|
||||
<p v-if="selectedItem.description" class="sv-modal__item-desc">{{ selectedItem.description }}</p>
|
||||
<div class="sv-modal__item-price">{{ formatPrice(selectedItem.price) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Steam ID input -->
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral-300 mb-2">
|
||||
Steam ID <span class="text-red-400">*</span>
|
||||
</label>
|
||||
<input
|
||||
v-model="steamId"
|
||||
type="text"
|
||||
placeholder="76561198012345678"
|
||||
maxlength="17"
|
||||
class="w-full px-4 py-3 bg-neutral-800 border border-neutral-700 rounded-lg text-neutral-100 placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-oxide-500/50 focus:border-oxide-500 transition-colors"
|
||||
:class="{ 'border-red-500': purchaseError && !validateSteamId() }"
|
||||
/>
|
||||
<p class="text-xs text-neutral-500 mt-1.5">
|
||||
Required for item delivery. Must be your 17-digit Steam ID.
|
||||
</p>
|
||||
</div>
|
||||
<!-- Steam ID -->
|
||||
<Input
|
||||
v-model="steamId"
|
||||
label="Steam ID"
|
||||
:required="true"
|
||||
:mono="true"
|
||||
placeholder="76561198012345678"
|
||||
:error="purchaseError && !validateSteamId() ? 'Must be your 17-digit Steam ID' : undefined"
|
||||
hint="Required for item delivery."
|
||||
/>
|
||||
|
||||
<!-- Player name input -->
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral-300 mb-2">
|
||||
Player Name (Optional)
|
||||
</label>
|
||||
<input
|
||||
v-model="playerName"
|
||||
type="text"
|
||||
placeholder="Your in-game name"
|
||||
class="w-full px-4 py-3 bg-neutral-800 border border-neutral-700 rounded-lg text-neutral-100 placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-oxide-500/50 focus:border-oxide-500 transition-colors"
|
||||
/>
|
||||
</div>
|
||||
<!-- Player name -->
|
||||
<Input
|
||||
v-model="playerName"
|
||||
label="Player name (optional)"
|
||||
placeholder="Your in-game name"
|
||||
/>
|
||||
|
||||
<!-- Error message -->
|
||||
<div v-if="purchaseError" class="flex items-start gap-2 bg-red-500/10 border border-red-500/20 rounded-lg p-3">
|
||||
<AlertCircle class="w-4 h-4 text-red-400 shrink-0 mt-0.5" />
|
||||
<p class="text-sm text-red-400">{{ purchaseError }}</p>
|
||||
</div>
|
||||
<!-- Purchase error -->
|
||||
<Alert v-if="purchaseError" tone="danger" :title="purchaseError" />
|
||||
|
||||
<!-- Legal disclaimer -->
|
||||
<div class="bg-neutral-800/30 border border-neutral-700 rounded-lg p-4">
|
||||
<p class="text-xs text-neutral-500 leading-relaxed space-y-1.5">
|
||||
<span class="flex items-start gap-1.5">
|
||||
<Check class="w-3 h-3 text-oxide-500 shrink-0 mt-0.5" />
|
||||
<span>Items will be delivered automatically to your in-game character after payment</span>
|
||||
</span>
|
||||
<span class="flex items-start gap-1.5">
|
||||
<Check class="w-3 h-3 text-oxide-500 shrink-0 mt-0.5" />
|
||||
<Panel variant="raised">
|
||||
<div class="sv-modal__terms">
|
||||
<div class="sv-modal__term">
|
||||
<Icon name="check" :size="13" class="sv-modal__term-icon" />
|
||||
<span>Items delivered automatically to your character after payment</span>
|
||||
</div>
|
||||
<div class="sv-modal__term">
|
||||
<Icon name="check" :size="13" class="sv-modal__term-icon" />
|
||||
<span>All purchases are final and non-refundable</span>
|
||||
</span>
|
||||
<span class="flex items-start gap-1.5">
|
||||
<Check class="w-3 h-3 text-oxide-500 shrink-0 mt-0.5" />
|
||||
</div>
|
||||
<div class="sv-modal__term">
|
||||
<Icon name="check" :size="13" class="sv-modal__term-icon" />
|
||||
<span>You must be logged into the server to receive items</span>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Panel>
|
||||
</div>
|
||||
|
||||
<!-- Modal Footer -->
|
||||
<div class="border-t border-neutral-800 px-6 py-5 flex items-center justify-between gap-4">
|
||||
<button
|
||||
@click="closePurchaseModal"
|
||||
<!-- Modal footer -->
|
||||
<div class="sv-modal__foot">
|
||||
<Button
|
||||
variant="secondary"
|
||||
:disabled="isPurchasing"
|
||||
class="px-6 py-3 text-sm font-medium text-neutral-300 bg-neutral-800 hover:bg-neutral-700 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
<button
|
||||
@click="confirmPurchase"
|
||||
@click="closePurchaseModal"
|
||||
>Cancel</Button>
|
||||
<Button
|
||||
icon="external-link"
|
||||
:disabled="isPurchasing || !steamId.trim()"
|
||||
class="flex items-center gap-2 px-8 py-3 text-sm font-semibold text-white bg-oxide-600 hover:bg-oxide-700 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed shadow-lg shadow-oxide-500/20"
|
||||
>
|
||||
<ExternalLink v-if="!isPurchasing" class="w-4 h-4" />
|
||||
<span>{{ isPurchasing ? 'Processing...' : 'Proceed to PayPal' }}</span>
|
||||
</button>
|
||||
:loading="isPurchasing"
|
||||
@click="confirmPurchase"
|
||||
>{{ isPurchasing ? 'Processing...' : 'Proceed to PayPal' }}</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="mt-16 py-8 border-t border-neutral-800">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex items-center justify-center gap-2 text-neutral-600 text-sm">
|
||||
<img src="/logo.png" alt="Corrosion" class="h-4 w-4 opacity-60" />
|
||||
<span>Powered by <span class="text-oxide-500 font-semibold">Corrosion</span></span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.sv-page {
|
||||
min-height: 100vh;
|
||||
background: var(--surface-canvas);
|
||||
}
|
||||
|
||||
/* Store bar */
|
||||
.sv-bar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 20;
|
||||
background: var(--surface-base);
|
||||
box-shadow: 0 1px 0 var(--border-subtle);
|
||||
}
|
||||
|
||||
.sv-bar__inner {
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
padding: var(--space-4) var(--space-6);
|
||||
}
|
||||
|
||||
.sv-bar__brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
.sv-bar__divider {
|
||||
width: 1px;
|
||||
height: 20px;
|
||||
background: var(--border-default);
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.sv-bar__store {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.sv-bar__name {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
/* Description strip */
|
||||
.sv-desc-wrap {
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
padding: var(--space-4) var(--space-6) 0;
|
||||
}
|
||||
|
||||
.sv-desc {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--text-tertiary);
|
||||
line-height: 1.6;
|
||||
max-width: 640px;
|
||||
}
|
||||
|
||||
/* Body */
|
||||
.sv-body {
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
padding: var(--space-5) var(--space-6) var(--space-8);
|
||||
}
|
||||
|
||||
/* Loading state */
|
||||
.sv-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--space-4);
|
||||
padding: var(--space-16) 0;
|
||||
}
|
||||
|
||||
.sv-spin {
|
||||
color: var(--accent);
|
||||
animation: sv-rotate 0.7s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes sv-rotate {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.sv-spin { animation: none; }
|
||||
}
|
||||
|
||||
.sv-state__label {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
/* Error */
|
||||
.sv-error {
|
||||
background: var(--surface-base);
|
||||
box-shadow: var(--ring-default);
|
||||
border-radius: var(--radius-xl);
|
||||
}
|
||||
|
||||
/* Category filter */
|
||||
.sv-filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
|
||||
.sv-filter__icon {
|
||||
color: var(--text-muted);
|
||||
flex: none;
|
||||
}
|
||||
|
||||
/* Items grid */
|
||||
.sv-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||||
gap: var(--space-5);
|
||||
}
|
||||
|
||||
/* Item card */
|
||||
.sv-item {
|
||||
background: var(--surface-base);
|
||||
box-shadow: var(--ring-default), var(--shadow-sm);
|
||||
border-radius: var(--radius-xl);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: box-shadow var(--dur-fast) var(--ease-standard),
|
||||
transform var(--dur-fast) var(--ease-standard);
|
||||
}
|
||||
|
||||
.sv-item:hover {
|
||||
box-shadow: var(--ring-strong), var(--shadow-md);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.sv-item__img-wrap {
|
||||
position: relative;
|
||||
height: 180px;
|
||||
background: var(--surface-raised);
|
||||
overflow: hidden;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.sv-item__img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
transition: transform 0.3s var(--ease-standard);
|
||||
}
|
||||
|
||||
.sv-item:hover .sv-item__img {
|
||||
transform: scale(1.04);
|
||||
}
|
||||
|
||||
.sv-item__img-ph {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.sv-item__cat {
|
||||
position: absolute;
|
||||
top: var(--space-3);
|
||||
right: var(--space-3);
|
||||
}
|
||||
|
||||
.sv-item__body {
|
||||
padding: var(--space-4);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sv-item__top {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.sv-item__name {
|
||||
font-size: var(--text-base);
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
line-height: 1.3;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.sv-item__price {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
color: var(--accent-text);
|
||||
flex: none;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.sv-item__desc {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--text-tertiary);
|
||||
line-height: 1.55;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sv-item__meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.sv-item__limit {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* Modal scrim */
|
||||
.sv-modal-scrim {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 50;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--scrim);
|
||||
backdrop-filter: blur(4px);
|
||||
padding: var(--space-4);
|
||||
}
|
||||
|
||||
/* Modal */
|
||||
.sv-modal {
|
||||
background: var(--surface-overlay);
|
||||
box-shadow: var(--shadow-pop);
|
||||
border-radius: var(--radius-xl);
|
||||
max-width: 520px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: calc(100vh - var(--space-8));
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.sv-modal__head {
|
||||
padding: var(--space-5) var(--space-6);
|
||||
border-bottom: 1px solid var(--border-subtle);
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: var(--space-4);
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.sv-modal__title {
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.01em;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.sv-modal__sub {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--text-tertiary);
|
||||
margin-top: var(--space-1);
|
||||
}
|
||||
|
||||
.sv-modal__close {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
flex: none;
|
||||
border-radius: var(--radius-sm);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: background var(--dur-fast) var(--ease-standard),
|
||||
color var(--dur-fast) var(--ease-standard);
|
||||
}
|
||||
|
||||
.sv-modal__close:hover {
|
||||
background: var(--surface-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.sv-modal__close:focus-visible {
|
||||
outline: none;
|
||||
box-shadow: var(--focus-ring);
|
||||
}
|
||||
|
||||
.sv-modal__body {
|
||||
padding: var(--space-5) var(--space-6);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-4);
|
||||
}
|
||||
|
||||
/* Item preview in modal */
|
||||
.sv-modal__item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: var(--space-4);
|
||||
background: var(--surface-raised);
|
||||
box-shadow: var(--ring-default);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-3);
|
||||
}
|
||||
|
||||
.sv-modal__thumb {
|
||||
width: 76px;
|
||||
height: 76px;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--surface-raised-2);
|
||||
overflow: hidden;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.sv-modal__thumb-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sv-modal__thumb-ph {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.sv-modal__item-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-1);
|
||||
}
|
||||
|
||||
.sv-modal__item-name {
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.sv-modal__item-desc {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--text-tertiary);
|
||||
line-height: 1.5;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sv-modal__item-price {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
color: var(--accent-text);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
/* Terms list */
|
||||
.sv-modal__terms {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.sv-modal__term {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: var(--space-2);
|
||||
font-size: var(--text-xs);
|
||||
color: var(--text-tertiary);
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.sv-modal__term-icon {
|
||||
color: var(--accent-text);
|
||||
flex: none;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
/* Modal footer */
|
||||
.sv-modal__foot {
|
||||
padding: var(--space-4) var(--space-6);
|
||||
border-top: 1px solid var(--border-subtle);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: var(--space-3);
|
||||
flex: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user