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

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

const ctx = ctxRef(new Context())

</script>

<template>
	<PopupLayout>
		<header>修改网站名称</header>

		<PostForm action="$" @success="ctx.success">
			<input type="hidden" name="serverId" :value="ctx.server.id"/>

			<DefinitionTable>
				<tbody>
				<tr>
					<td class="title">网站名称 *</td>
					<td>
						<TInputText name="name" v-model="ctx.server.name" maxlength="60" autofocus/>
					</td>
				</tr>
				</tbody>
			</DefinitionTable>

			<SubmitButton></SubmitButton>
		</PostForm>
	</PopupLayout>
</template>

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