1006 lines
26 KiB
Vue
1006 lines
26 KiB
Vue
<script setup>
|
|
import { computed, onMounted, provide, ref, watch } from 'vue'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
import { useAuthStore } from './stores/auth'
|
|
import { toApiUrl } from './lib/runtime'
|
|
import { api } from './lib/api'
|
|
import { useToast } from './composables/useToast'
|
|
import iconDockToLeft from './assets/icons/dock_to_left.svg'
|
|
import iconDockToRight from './assets/icons/dock_to_right.svg'
|
|
import iconGridView from './assets/icons/grid_view.svg'
|
|
import iconLists from './assets/icons/lists.svg'
|
|
import iconMore from './assets/icons/more.svg'
|
|
import iconSearch from './assets/icons/search.svg'
|
|
import iconSettings from './assets/icons/settings.svg'
|
|
|
|
const route = useRoute()
|
|
const router = useRouter()
|
|
const auth = useAuthStore()
|
|
const { toasts, dismissToast } = useToast()
|
|
|
|
const leftRailCollapsed = ref(false)
|
|
const rightRailOpen = ref(true)
|
|
const searchQuery = ref('')
|
|
const favoriteShortcuts = ref([])
|
|
provide('rightRailOpen', rightRailOpen)
|
|
provide('localRightRailTarget', '#local-right-rail-root')
|
|
|
|
const isAdmin = computed(() => !!auth.user?.isAdmin)
|
|
const isPreviewMode = computed(() => route.query.preview === '1')
|
|
const usesLocalRightRail = computed(() => ['editEditor', 'newEditor', 'admin'].includes(String(route.name || '')))
|
|
const avatarUrl = computed(() => (auth.user?.avatarSrc ? toApiUrl(auth.user.avatarSrc) : ''))
|
|
const accountName = computed(() => {
|
|
const nickname = (auth.user?.nickname || '').trim()
|
|
if (nickname) return nickname
|
|
const email = (auth.user?.email || '').trim()
|
|
if (email) return email.split('@')[0] || email
|
|
return 'Guest'
|
|
})
|
|
const accountEmail = computed(() => (auth.user?.email || '').trim() || '로그인 후 개인 메뉴를 사용할 수 있어요.')
|
|
const shellStyle = computed(() => ({
|
|
'--left-rail-width': leftRailCollapsed.value ? '76px' : '248px',
|
|
'--right-rail-width': rightRailOpen.value ? '320px' : '0px',
|
|
}))
|
|
const leftNavItems = computed(() => {
|
|
const items = [
|
|
{ key: 'home', label: 'Games', path: '/', iconSrc: iconGridView },
|
|
{ key: 'me', label: '내 리스트', path: '/me', iconSrc: iconLists, requiresAuth: true },
|
|
{ key: 'favorites', label: '즐겨찾기', path: '/favorites', icon: 'M12 4.75l2.18 4.42 4.88.71-3.53 3.44.83 4.86L12 15.9 7.64 18.18l.83-4.86-3.53-3.44 4.88-.71z', requiresAuth: true },
|
|
{ key: 'profile', label: 'Settings', path: '/profile', iconSrc: iconSettings, requiresAuth: true },
|
|
]
|
|
return items.filter((item) => !item.requiresAuth || auth.user)
|
|
})
|
|
const routeMeta = computed(() => {
|
|
if (route.name === 'home') {
|
|
return {
|
|
title: 'Tier Maker',
|
|
subtitle: '게임 템플릿 선택과 커스텀 보드 시작',
|
|
contextTitle: '빠른 시작',
|
|
contextText: auth.user ? '커스텀 티어표를 만들거나 원하는 게임을 바로 선택할 수 있어요.' : '로그인하면 커스텀 티어표 생성과 개인 목록 관리가 열립니다.',
|
|
actionLabel: auth.user ? '커스텀 티어표 만들기' : '로그인하러 가기',
|
|
action: () => {
|
|
router.push(auth.user ? '/editor/freeform/new' : '/login')
|
|
},
|
|
}
|
|
}
|
|
if (route.name === 'gameHub') {
|
|
return {
|
|
title: 'Game Boards',
|
|
subtitle: '게임별 공개 티어표 탐색',
|
|
contextTitle: '작성 작업',
|
|
contextText: auth.user ? '이 게임의 새 티어표를 만들거나 기존 공개 티어표를 확인할 수 있어요.' : '로그인 후 새 티어표를 만들 수 있어요.',
|
|
actionLabel: auth.user ? '새 티어표 만들기' : '로그인하러 가기',
|
|
action: () => {
|
|
const target = `/editor/${route.params.gameId}/new`
|
|
router.push(auth.user ? target : `/login?redirect=${target}`)
|
|
},
|
|
}
|
|
}
|
|
if (route.name === 'editEditor' || route.name === 'newEditor') {
|
|
return {
|
|
title: 'Deck Builder',
|
|
subtitle: '티어표 편집 및 공유',
|
|
contextTitle: '편집 패널',
|
|
contextText: '현재 편집 옵션은 중앙 화면 안에 유지되어 있습니다. 다음 단계에서 우측 패널로 정리해갈게요.',
|
|
actionLabel: '게임 목록으로',
|
|
action: () => router.push('/'),
|
|
}
|
|
}
|
|
if (route.name === 'admin') {
|
|
return {
|
|
title: 'Admin Workspace',
|
|
subtitle: '게임·아이템·회원 관리',
|
|
contextTitle: '운영 노트',
|
|
contextText: '관리자 화면은 기능이 많아 우선 공통 셸 톤을 맞췄고, 세부 패널은 다음 단계에서 시안 방식으로 더 세밀하게 나눌 예정입니다.',
|
|
actionLabel: '게임 목록으로',
|
|
action: () => router.push('/'),
|
|
}
|
|
}
|
|
if (route.name === 'me') {
|
|
return {
|
|
title: 'My Lists',
|
|
subtitle: '내가 저장한 티어표',
|
|
contextTitle: '작성 이력',
|
|
contextText: '최근 저장한 티어표를 열람하고 정리할 수 있어요.',
|
|
actionLabel: '즐겨찾기 보기',
|
|
action: () => router.push('/favorites'),
|
|
}
|
|
}
|
|
if (route.name === 'favorites') {
|
|
return {
|
|
title: 'Favorites',
|
|
subtitle: '마음에 드는 티어표 모음',
|
|
contextTitle: '정리 도구',
|
|
contextText: '정렬과 검색으로 원하는 티어표를 빠르게 다시 찾을 수 있어요.',
|
|
actionLabel: '내 티어표 보기',
|
|
action: () => router.push('/me'),
|
|
}
|
|
}
|
|
if (route.name === 'profile') {
|
|
return {
|
|
title: 'Profile',
|
|
subtitle: '프로필 및 계정 설정',
|
|
contextTitle: '계정 관리',
|
|
contextText: '아바타와 닉네임을 관리하고 표시 정보를 확인할 수 있어요.',
|
|
actionLabel: '내 티어표 보기',
|
|
action: () => router.push('/me'),
|
|
}
|
|
}
|
|
if (route.name === 'search') {
|
|
return {
|
|
title: 'Search',
|
|
subtitle: '전체 공개 티어표 검색 결과',
|
|
contextTitle: '검색',
|
|
contextText: '제목, 작성자 기준으로 공개 티어표를 전체 검색할 수 있어요.',
|
|
actionLabel: '홈으로',
|
|
action: () => router.push('/'),
|
|
}
|
|
}
|
|
return {
|
|
title: 'Tier Maker',
|
|
subtitle: 'by zenn',
|
|
contextTitle: 'Workspace',
|
|
contextText: '현재 화면에 맞는 도구와 안내를 여기에 배치할 수 있습니다.',
|
|
actionLabel: '홈으로',
|
|
action: () => router.push('/'),
|
|
}
|
|
})
|
|
|
|
onMounted(async () => {
|
|
await auth.refresh()
|
|
if (typeof window !== 'undefined') {
|
|
const leftSaved = window.localStorage.getItem('tier-maker:left-rail-collapsed')
|
|
if (leftSaved === '1') leftRailCollapsed.value = true
|
|
const saved = window.localStorage.getItem('tier-maker:right-rail-open')
|
|
if (saved === '0') rightRailOpen.value = false
|
|
}
|
|
searchQuery.value = typeof route.query.q === 'string' ? route.query.q : ''
|
|
await loadFavoriteShortcuts()
|
|
})
|
|
|
|
watch(
|
|
() => route.fullPath,
|
|
() => {
|
|
searchQuery.value = typeof route.query.q === 'string' ? route.query.q : ''
|
|
}
|
|
)
|
|
|
|
function isRouteActive(path) {
|
|
if (path === '/') return route.path === '/'
|
|
return route.path.startsWith(path)
|
|
}
|
|
|
|
function toggleLeftRail() {
|
|
leftRailCollapsed.value = !leftRailCollapsed.value
|
|
if (typeof window !== 'undefined') {
|
|
window.localStorage.setItem('tier-maker:left-rail-collapsed', leftRailCollapsed.value ? '1' : '0')
|
|
}
|
|
}
|
|
|
|
function toggleRightRail() {
|
|
rightRailOpen.value = !rightRailOpen.value
|
|
if (typeof window !== 'undefined') {
|
|
window.localStorage.setItem('tier-maker:right-rail-open', rightRailOpen.value ? '1' : '0')
|
|
}
|
|
}
|
|
|
|
function avatarFallbackOfFavorite(tierList) {
|
|
return (tierList.authorAccountName || 'u').trim().charAt(0).toUpperCase() || '?'
|
|
}
|
|
|
|
function favoriteThumbnailUrl(tierList) {
|
|
return tierList.thumbnailSrc ? toApiUrl(tierList.thumbnailSrc) : ''
|
|
}
|
|
|
|
async function loadFavoriteShortcuts() {
|
|
if (!auth.user) {
|
|
favoriteShortcuts.value = []
|
|
return
|
|
}
|
|
try {
|
|
const data = await api.listMyFavoriteTierLists({ sort: 'favorited' })
|
|
favoriteShortcuts.value = (data.tierLists || []).slice(0, 10)
|
|
} catch (e) {
|
|
favoriteShortcuts.value = []
|
|
}
|
|
}
|
|
|
|
function openFavoriteShortcut(item) {
|
|
router.push(`/editor/${item.gameId}/${item.id}`)
|
|
}
|
|
|
|
function submitGlobalSearch() {
|
|
const query = (searchQuery.value || '').trim()
|
|
router.push(query ? `/search?q=${encodeURIComponent(query)}` : '/search')
|
|
}
|
|
|
|
watch(
|
|
() => auth.user?.id,
|
|
async () => {
|
|
await loadFavoriteShortcuts()
|
|
}
|
|
)
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
class="appShell"
|
|
:class="{
|
|
'appShell--preview': isPreviewMode,
|
|
'appShell--leftCollapsed': leftRailCollapsed,
|
|
'appShell--rightClosed': !rightRailOpen,
|
|
}"
|
|
:style="shellStyle"
|
|
>
|
|
<template v-if="isPreviewMode">
|
|
<main class="appMain appMain--preview">
|
|
<RouterView />
|
|
</main>
|
|
</template>
|
|
<template v-else>
|
|
<aside class="leftRail">
|
|
<div class="leftRail__top railHeader">
|
|
<button class="ghostIcon ghostIcon--iconOnly" type="button" aria-label="왼쪽 패널 토글" @click="toggleLeftRail">
|
|
<img :src="iconDockToRight" alt="" />
|
|
</button>
|
|
</div>
|
|
|
|
<div class="leftRail__body">
|
|
<div v-if="auth.user" class="appUserCard">
|
|
<div class="appUserCard__button">
|
|
<img v-if="avatarUrl" :src="avatarUrl" class="appUserCard__avatar" alt="avatar" />
|
|
<div v-else class="appUserCard__avatar appUserCard__avatar--fallback">{{ accountName[0]?.toUpperCase() || 'U' }}</div>
|
|
<div class="appUserCard__meta">
|
|
<div class="appUserCard__name">{{ accountName }}</div>
|
|
<div class="appUserCard__email">{{ accountEmail }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<form class="searchStub" @submit.prevent="submitGlobalSearch">
|
|
<span class="searchStub__icon">
|
|
<img :src="iconSearch" alt="" />
|
|
</span>
|
|
<input v-model="searchQuery" class="searchStub__input" type="search" :placeholder="leftRailCollapsed ? '' : '전체 티어표 검색'" />
|
|
</form>
|
|
|
|
<nav class="leftNav">
|
|
<RouterLink
|
|
v-for="item in leftNavItems"
|
|
:key="item.key"
|
|
:to="item.path"
|
|
class="leftNav__item"
|
|
:class="{ 'leftNav__item--active': isRouteActive(item.path) }"
|
|
>
|
|
<span class="leftNav__glyph">
|
|
<img v-if="item.iconSrc" :src="item.iconSrc" alt="" />
|
|
<svg v-else viewBox="0 0 24 24" aria-hidden="true"><path :d="item.icon" /></svg>
|
|
</span>
|
|
<span class="leftNav__label">{{ item.label }}</span>
|
|
</RouterLink>
|
|
</nav>
|
|
|
|
<div class="leftRail__section">
|
|
<div class="leftRail__sectionTitle">Favorites</div>
|
|
<template v-if="favoriteShortcuts.length">
|
|
<button
|
|
v-for="item in favoriteShortcuts"
|
|
:key="item.id"
|
|
type="button"
|
|
class="favoriteShortcut"
|
|
@click="openFavoriteShortcut(item)"
|
|
>
|
|
<img v-if="favoriteThumbnailUrl(item)" :src="favoriteThumbnailUrl(item)" alt="" class="favoriteShortcut__thumb" />
|
|
<div v-else class="favoriteShortcut__thumb favoriteShortcut__thumb--fallback">{{ avatarFallbackOfFavorite(item) }}</div>
|
|
<span class="favoriteShortcut__label">{{ item.title }}</span>
|
|
</button>
|
|
<RouterLink to="/favorites" class="favoriteMoreLink">
|
|
<span class="favoriteMoreLink__icon">
|
|
<img :src="iconMore" alt="" />
|
|
</span>
|
|
<span>즐겨찾기 더 보기</span>
|
|
<span class="favoriteMoreLink__arrow">↗</span>
|
|
</RouterLink>
|
|
</template>
|
|
<div v-else class="favoriteEmpty">아직 즐겨찾기한 티어표가 없어요.</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="leftRail__bottom railFooter">
|
|
<RouterLink v-if="isAdmin" to="/admin" class="adminButton">관리자 메뉴</RouterLink>
|
|
<RouterLink v-else-if="!auth.user" to="/login" class="adminButton">로그인</RouterLink>
|
|
</div>
|
|
</aside>
|
|
|
|
<main class="appMain">
|
|
<section class="workspace" :class="{ 'workspace--localRail': usesLocalRightRail }">
|
|
<header class="workspaceHead railHeader">
|
|
<div class="workspaceHead__brand" @click="$router.push('/')">
|
|
<span class="workspaceHead__brandTitle">Tier Maker</span>
|
|
<span class="workspaceHead__brandSub">by zenn</span>
|
|
</div>
|
|
<div class="workspaceHead__actions">
|
|
<button v-if="!rightRailOpen" class="ghostIcon ghostIcon--iconOnly" type="button" aria-label="패널 열기" @click="toggleRightRail">
|
|
<img :src="iconDockToLeft" alt="" />
|
|
</button>
|
|
</div>
|
|
</header>
|
|
<div class="workspaceBody" :class="{ 'workspaceBody--localRail': usesLocalRightRail }">
|
|
<RouterView />
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
<aside class="rightRail" :class="{ 'rightRail--closed': !rightRailOpen }" :aria-hidden="!rightRailOpen">
|
|
<div class="rightRail__top railHeader">
|
|
<button v-if="rightRailOpen" class="ghostIcon ghostIcon--iconOnly" type="button" aria-label="패널 닫기" @click="toggleRightRail">
|
|
<img :src="iconDockToLeft" alt="" />
|
|
</button>
|
|
</div>
|
|
<div class="rightRail__body">
|
|
<div id="local-right-rail-root" class="localRightRailRoot"></div>
|
|
</div>
|
|
<div class="rightRail__bottom railFooter">
|
|
<template v-if="!usesLocalRightRail">
|
|
<section class="rightRailAction">
|
|
<button class="rightRailAction__button" type="button" @click="routeMeta.action">
|
|
{{ routeMeta.actionLabel }}
|
|
</button>
|
|
</section>
|
|
</template>
|
|
</div>
|
|
</aside>
|
|
</template>
|
|
|
|
<div class="toastStack" :class="{ 'toastStack--preview': isPreviewMode }" aria-live="polite" aria-atomic="true">
|
|
<div v-for="item in toasts" :key="item.id" class="toast" :class="[`toast--${item.type}`, { 'toast--closing': item.isClosing }]">
|
|
<div class="toast__body">
|
|
<div class="toast__message">{{ item.message }}</div>
|
|
<div v-if="item.count > 1" class="toast__count">x{{ item.count }}</div>
|
|
</div>
|
|
<button class="toast__close" type="button" @click="dismissToast(item.id)">닫기</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.appShell {
|
|
min-height: 100vh;
|
|
display: grid;
|
|
grid-template-columns: var(--left-rail-width, 248px) minmax(0, 1fr) var(--right-rail-width, 320px);
|
|
background:
|
|
radial-gradient(circle at top left, rgba(255, 255, 255, 0.04), transparent 28%),
|
|
linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
|
|
color: rgba(255, 255, 255, 0.92);
|
|
transition: grid-template-columns 220ms ease;
|
|
}
|
|
|
|
.appShell--preview {
|
|
display: block;
|
|
}
|
|
|
|
.leftRail,
|
|
.rightRail {
|
|
min-height: 100vh;
|
|
border-right: 1px solid rgba(255, 255, 255, 0.08);
|
|
background: rgba(14, 14, 14, 0.92);
|
|
box-sizing: border-box;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.rightRail {
|
|
border-right: 0;
|
|
border-left: 1px solid rgba(255, 255, 255, 0.08);
|
|
transition:
|
|
opacity 220ms ease,
|
|
transform 220ms ease,
|
|
padding 220ms ease,
|
|
border-color 220ms ease;
|
|
}
|
|
|
|
.appShell--rightClosed .rightRail {
|
|
opacity: 0;
|
|
transform: translateX(18px);
|
|
pointer-events: none;
|
|
overflow: hidden;
|
|
padding-left: 0;
|
|
padding-right: 0;
|
|
border-left-color: transparent;
|
|
}
|
|
|
|
.railHeader {
|
|
height: 56px;
|
|
min-height: 56px;
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 12px;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.railFooter {
|
|
height: 56px;
|
|
min-height: 56px;
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 8px 12px;
|
|
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.leftRail__top,
|
|
.rightRail__top {
|
|
gap: 12px;
|
|
}
|
|
|
|
.leftRail__top {
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
.rightRail__top {
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.leftRail__body,
|
|
.rightRail__body {
|
|
flex: 1;
|
|
min-height: 0;
|
|
padding: 14px 12px;
|
|
box-sizing: border-box;
|
|
overflow: auto;
|
|
}
|
|
|
|
.ghostIcon {
|
|
min-width: 28px;
|
|
height: 28px;
|
|
padding: 0 10px;
|
|
border-radius: 8px;
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
background: rgba(255, 255, 255, 0.03);
|
|
color: rgba(255, 255, 255, 0.72);
|
|
cursor: pointer;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.ghostIcon svg,
|
|
.searchStub__icon svg,
|
|
.leftNav__glyph svg,
|
|
.contextLink svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
stroke: currentColor;
|
|
stroke-width: 1.8;
|
|
fill: none;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round;
|
|
}
|
|
|
|
.ghostIcon img,
|
|
.leftNav__glyph img,
|
|
.searchStub__icon img,
|
|
.favoriteMoreLink__icon img {
|
|
width: 16px;
|
|
height: 16px;
|
|
display: block;
|
|
filter: brightness(0) saturate(100%) invert(94%) sepia(6%) saturate(207%) hue-rotate(186deg) brightness(96%) contrast(92%);
|
|
}
|
|
|
|
.ghostIcon--iconOnly {
|
|
min-width: 32px;
|
|
width: 32px;
|
|
padding: 0;
|
|
}
|
|
|
|
.appUserCard {
|
|
position: relative;
|
|
margin-bottom: 14px;
|
|
min-height: 58px;
|
|
transition: margin 220ms ease;
|
|
}
|
|
|
|
.appUserCard__button,
|
|
.appUserCard__guest {
|
|
width: 100%;
|
|
display: flex;
|
|
gap: 12px;
|
|
align-items: center;
|
|
padding: 10px;
|
|
border-radius: 16px;
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
background: rgba(255, 255, 255, 0.04);
|
|
color: inherit;
|
|
text-align: left;
|
|
cursor: default;
|
|
box-sizing: border-box;
|
|
transition: padding 220ms ease, justify-content 220ms ease;
|
|
}
|
|
|
|
.appUserCard__avatar {
|
|
width: 42px;
|
|
height: 42px;
|
|
border-radius: 999px;
|
|
object-fit: cover;
|
|
flex: 0 0 auto;
|
|
border: 1px solid rgba(255, 255, 255, 0.14);
|
|
background: rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
.appUserCard__avatar--fallback {
|
|
display: grid;
|
|
place-items: center;
|
|
background: rgba(255, 255, 255, 0.12);
|
|
font-weight: 900;
|
|
}
|
|
|
|
.appUserCard__meta {
|
|
min-width: 0;
|
|
display: grid;
|
|
gap: 4px;
|
|
transition: opacity 180ms ease;
|
|
}
|
|
|
|
.appUserCard__name {
|
|
font-size: 14px;
|
|
font-weight: 800;
|
|
}
|
|
|
|
.appUserCard__email {
|
|
font-size: 12px;
|
|
color: rgba(255, 255, 255, 0.56);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.searchStub {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 11px 12px;
|
|
border-radius: 14px;
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
background: rgba(255, 255, 255, 0.03);
|
|
color: rgba(255, 255, 255, 0.62);
|
|
margin-bottom: 14px;
|
|
box-sizing: border-box;
|
|
transition: padding 220ms ease, justify-content 220ms ease;
|
|
}
|
|
|
|
.searchStub__input {
|
|
min-width: 0;
|
|
flex: 1;
|
|
border: 0;
|
|
background: transparent;
|
|
color: rgba(255, 255, 255, 0.92);
|
|
outline: none;
|
|
font: inherit;
|
|
transition: opacity 180ms ease, width 180ms ease;
|
|
}
|
|
|
|
.searchStub__input::placeholder {
|
|
color: rgba(255, 255, 255, 0.42);
|
|
}
|
|
|
|
.searchStub__icon {
|
|
width: 18px;
|
|
height: 18px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.leftNav {
|
|
display: grid;
|
|
gap: 8px;
|
|
}
|
|
|
|
.leftNav__item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 11px 12px;
|
|
border-radius: 14px;
|
|
color: rgba(255, 255, 255, 0.76);
|
|
text-decoration: none;
|
|
transition: background 180ms ease, color 180ms ease, transform 180ms ease;
|
|
}
|
|
|
|
.leftNav__label {
|
|
min-width: 0;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.leftNav__item--active,
|
|
.leftNav__item.router-link-active {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
color: rgba(255, 255, 255, 0.96);
|
|
}
|
|
|
|
.leftNav__glyph {
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 10px;
|
|
display: grid;
|
|
place-items: center;
|
|
background: rgba(255, 255, 255, 0.06);
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.leftRail__section {
|
|
margin-top: 22px;
|
|
display: grid;
|
|
gap: 8px;
|
|
transition: margin 220ms ease;
|
|
}
|
|
|
|
.leftRail__sectionTitle {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 11px;
|
|
color: rgba(255, 255, 255, 0.38);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.favoriteEmpty {
|
|
font-size: 13px;
|
|
color: rgba(255, 255, 255, 0.46);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.favoriteShortcut {
|
|
display: grid;
|
|
grid-template-columns: 24px minmax(0, 1fr);
|
|
gap: 8px;
|
|
align-items: center;
|
|
padding: 3px 0;
|
|
border: 0;
|
|
background: transparent;
|
|
color: rgba(255, 255, 255, 0.72);
|
|
text-align: left;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.favoriteShortcut__thumb {
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 6px;
|
|
object-fit: cover;
|
|
background: rgba(255, 255, 255, 0.08);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
.favoriteShortcut__thumb--fallback {
|
|
display: grid;
|
|
place-items: center;
|
|
font-size: 14px;
|
|
font-weight: 800;
|
|
}
|
|
|
|
.favoriteShortcut__label {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.favoriteMoreLink {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-top: 4px;
|
|
color: rgba(255, 255, 255, 0.62);
|
|
text-decoration: none;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.favoriteMoreLink__icon {
|
|
width: 22px;
|
|
height: 22px;
|
|
border-radius: 8px;
|
|
display: grid;
|
|
place-items: center;
|
|
background: rgba(255, 255, 255, 0.06);
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.favoriteMoreLink__icon img {
|
|
width: 12px;
|
|
height: 12px;
|
|
display: block;
|
|
filter: brightness(0) saturate(100%) invert(94%) sepia(6%) saturate(207%) hue-rotate(186deg) brightness(96%) contrast(92%);
|
|
}
|
|
|
|
.favoriteMoreLink__arrow {
|
|
margin-left: auto;
|
|
opacity: 0.56;
|
|
}
|
|
|
|
.appShell--leftCollapsed .leftRail__body {
|
|
padding-left: 10px;
|
|
padding-right: 10px;
|
|
}
|
|
|
|
.appShell--leftCollapsed .appUserCard {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.appShell--leftCollapsed .appUserCard__button,
|
|
.appShell--leftCollapsed .appUserCard__guest {
|
|
justify-content: center;
|
|
padding-left: 8px;
|
|
padding-right: 8px;
|
|
}
|
|
|
|
.appShell--leftCollapsed .appUserCard__meta,
|
|
.appShell--leftCollapsed .searchStub__input,
|
|
.appShell--leftCollapsed .leftNav__label,
|
|
.appShell--leftCollapsed .leftRail__sectionTitle,
|
|
.appShell--leftCollapsed .favoriteShortcut__label,
|
|
.appShell--leftCollapsed .favoriteMoreLink span:not(.favoriteMoreLink__icon),
|
|
.appShell--leftCollapsed .favoriteEmpty {
|
|
display: none;
|
|
}
|
|
|
|
.appShell--leftCollapsed .searchStub {
|
|
justify-content: center;
|
|
padding-left: 8px;
|
|
padding-right: 8px;
|
|
}
|
|
|
|
.appShell--leftCollapsed .leftNav {
|
|
gap: 10px;
|
|
}
|
|
|
|
.appShell--leftCollapsed .leftNav__item {
|
|
justify-content: center;
|
|
padding-left: 8px;
|
|
padding-right: 8px;
|
|
}
|
|
|
|
.appShell--leftCollapsed .leftRail__section {
|
|
margin-top: 18px;
|
|
}
|
|
|
|
.appShell--leftCollapsed .favoriteShortcut {
|
|
grid-template-columns: 1fr;
|
|
justify-items: center;
|
|
padding: 2px 0;
|
|
}
|
|
|
|
.appShell--leftCollapsed .favoriteMoreLink {
|
|
justify-content: center;
|
|
}
|
|
|
|
.appShell--leftCollapsed .leftRail__bottom {
|
|
display: none;
|
|
}
|
|
|
|
.leftRail__bottom {
|
|
justify-content: stretch;
|
|
}
|
|
|
|
.adminButton {
|
|
width: 100%;
|
|
display: inline-flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 12px 14px;
|
|
border-radius: 14px;
|
|
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
background: rgba(255, 255, 255, 0.05);
|
|
color: rgba(255, 255, 255, 0.92);
|
|
text-decoration: none;
|
|
box-sizing: border-box;
|
|
font-weight: 800;
|
|
}
|
|
|
|
.appMain {
|
|
min-width: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.appMain--preview {
|
|
padding: 0;
|
|
}
|
|
|
|
.workspace {
|
|
display: grid;
|
|
gap: 0;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.workspace--localRail {
|
|
gap: 0;
|
|
}
|
|
|
|
.workspaceHead {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
}
|
|
|
|
.workspaceHead__brand {
|
|
display: inline-flex;
|
|
align-items: baseline;
|
|
gap: 8px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.workspaceHead__brandTitle {
|
|
font-size: 28px;
|
|
font-weight: 900;
|
|
letter-spacing: -0.05em;
|
|
}
|
|
|
|
.workspaceHead__brandSub {
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
color: rgba(255, 255, 255, 0.58);
|
|
}
|
|
|
|
.workspaceHead__actions {
|
|
display: flex;
|
|
gap: 10px;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.workspaceBody {
|
|
min-height: calc(100vh - 56px);
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: 0;
|
|
background: transparent;
|
|
box-shadow: none;
|
|
margin: 18px 18px 0;
|
|
}
|
|
|
|
.workspaceBody--localRail {
|
|
min-height: calc(100vh - 56px);
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: 0;
|
|
background: transparent;
|
|
box-shadow: none;
|
|
margin: 18px 18px 0;
|
|
}
|
|
|
|
.rightRail {
|
|
gap: 0;
|
|
}
|
|
|
|
.rightRailAction {
|
|
display: grid;
|
|
width: 100%;
|
|
}
|
|
|
|
.rightRailAction__button {
|
|
width: 100%;
|
|
padding: 12px 14px;
|
|
border-radius: 14px;
|
|
border: 1px solid rgba(77, 127, 233, 0.96);
|
|
background: rgba(77, 127, 233, 0.88);
|
|
color: #fff;
|
|
font-weight: 800;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.localRightRailRoot {
|
|
min-height: calc(100vh - 84px);
|
|
display: grid;
|
|
align-content: start;
|
|
gap: 14px;
|
|
}
|
|
|
|
.toastStack {
|
|
position: fixed;
|
|
top: 18px;
|
|
right: 20px;
|
|
z-index: 40;
|
|
display: grid;
|
|
gap: 10px;
|
|
width: min(360px, calc(100vw - 24px));
|
|
}
|
|
|
|
.toastStack--preview {
|
|
top: 12px;
|
|
}
|
|
|
|
.toast {
|
|
display: flex;
|
|
gap: 12px;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
padding: 12px 14px;
|
|
border-radius: 16px;
|
|
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
background: rgba(11, 18, 32, 0.94);
|
|
backdrop-filter: blur(12px);
|
|
box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
transition: opacity 220ms ease, transform 220ms ease;
|
|
}
|
|
|
|
.toast--closing {
|
|
opacity: 0;
|
|
transform: translateY(-6px);
|
|
}
|
|
|
|
.toast--success {
|
|
border-color: rgba(52, 211, 153, 0.38);
|
|
}
|
|
|
|
.toast--error {
|
|
border-color: rgba(239, 68, 68, 0.34);
|
|
}
|
|
|
|
.toast--info {
|
|
border-color: rgba(96, 165, 250, 0.34);
|
|
}
|
|
|
|
.toast__message {
|
|
line-height: 1.5;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.toast__count {
|
|
margin-top: 6px;
|
|
font-size: 12px;
|
|
color: rgba(255, 255, 255, 0.56);
|
|
}
|
|
|
|
.toast__close {
|
|
border: 0;
|
|
background: transparent;
|
|
color: rgba(255, 255, 255, 0.68);
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
}
|
|
|
|
@media (max-width: 1280px) {
|
|
.appShell {
|
|
grid-template-columns: 220px minmax(0, 1fr);
|
|
}
|
|
|
|
.rightRail {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 860px) {
|
|
.appShell {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.leftRail {
|
|
min-height: auto;
|
|
border-right: 0;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
.workspaceBody {
|
|
padding: 0;
|
|
border-radius: 0;
|
|
margin: 14px 14px 0;
|
|
}
|
|
|
|
.workspaceBody--localRail {
|
|
padding: 0;
|
|
border-radius: 0;
|
|
margin: 14px 14px 0;
|
|
}
|
|
}
|
|
</style>
|