<script setup>
// Copyright 2024 FlexCDN root@flexcdn.cn. All rights reserved. Official site: https://flexcdn.cn .

import ctxRef from "@/utils/ctx_ref.js"
import Context from "./index.js"
import TInputText from "@/components/ui/TInputText.vue";
import SubmitButton from "@/components/form/SubmitButton.vue";
import PostForm from "@/components/form/PostForm.vue";
import ChildLayout from "@/layouts/ChildLayout.vue";
import DefinitionTable from "@/components/common/DefinitionTable.vue";

const ctx = ctxRef(new Context())

</script>

<template>
	<ChildLayout :ctx="ctx" :has-tab="true">
		<PostForm action="$" @success="ctx.success">
			<input type="hidden" name="serverId" :value="ctx.serverId"/>
			<DefinitionTable>
				<tbody>
				<tr>
					<td class="title">网站名称 *</td>
					<td>
						<TInputText name="name" maxlength="50" v-model="ctx.name" autofocus class="w-full"/>
					</td>
				</tr>
				</tbody>
			</DefinitionTable>
			<SubmitButton></SubmitButton>
		</PostForm>
	</ChildLayout>
</template>

<style lang="postcss" scoped>
</style>