<template>
	<div class="management-page">
		<div class="page-head">
			<div>
				<h1>Ollama</h1>
				<p>查看 Ollama 连接状态、本地模型列表，以及下载任务进度。</p>
			</div>
		</div>
		<OllamaManage @open-import-model="handleOpenImport" />
	</div>
</template>

<script setup lang="ts">
import OllamaManage from './OllamaManage.vue'

function handleOpenImport(name: string) {
	window.dispatchEvent(new CustomEvent('open-import-ollama-model', { detail: name }))
}
</script>

<style scoped lang="less">
.management-page {
	padding: 16px;
	background: #f5f7fa;
	min-height: 100%;
	box-sizing: border-box;
}

.page-head {
	margin-bottom: 20px;

	h1 {
		margin: 0;
		font-size: 28px;
		color: var(--text-primary);
	}

	p {
		margin: 6px 0 0;
		font-size: 14px;
		color: var(--text-secondary);
	}
}
</style>
