mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-12 07:55:11 +08:00
新增 BattleReportDialog、SpyReportDialog、NumberWithTooltip 等组件,完善舰队模拟器功能。重构并引入 Sheet、Sidebar、Tooltip、Skeleton 等 UI 组件,优化界面结构。实现 battle.worker 支持战斗计算,增加 universeStore、fleetStorageLogic 等核心逻辑,完善多语言与类型定义。
28 lines
643 B
Vue
28 lines
643 B
Vue
<template>
|
|
<Button
|
|
data-sidebar="trigger"
|
|
data-slot="sidebar-trigger"
|
|
variant="ghost"
|
|
size="icon"
|
|
:class="cn('h-7 w-7', props.class)"
|
|
@click="toggleSidebar"
|
|
>
|
|
<PanelLeft />
|
|
<span class="sr-only">Toggle Sidebar</span>
|
|
</Button>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import type { HTMLAttributes } from 'vue'
|
|
import { PanelLeft } from 'lucide-vue-next'
|
|
import { cn } from '@/lib/utils'
|
|
import { Button } from '@/components/ui/button'
|
|
import { useSidebar } from './utils'
|
|
|
|
const props = defineProps<{
|
|
class?: HTMLAttributes['class']
|
|
}>()
|
|
|
|
const { toggleSidebar } = useSidebar()
|
|
</script>
|