|
|
|
@ -257,7 +257,6 @@ const createColumns = (): DataTableColumns<DataProps> => {
|
|
|
|
|
{
|
|
|
|
|
title: t('store.title'),
|
|
|
|
|
key: 'renderKey',
|
|
|
|
|
width: 160,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: t('store.description'),
|
|
|
|
@ -296,6 +295,7 @@ const createColumns = (): DataTableColumns<DataProps> => {
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const columns = createColumns()
|
|
|
|
|
|
|
|
|
|
watch(
|
|
|
|
@ -321,11 +321,13 @@ const dataSource = computed(() => {
|
|
|
|
|
<template>
|
|
|
|
|
<NMessageProvider>
|
|
|
|
|
<NModal v-model:show="show" style="width: 90%; max-width: 900px;" preset="card">
|
|
|
|
|
<NCard>
|
|
|
|
|
<div class="space-y-4">
|
|
|
|
|
<NTabs type="segment">
|
|
|
|
|
<NTabPane name="local" :tab="$t('store.local')">
|
|
|
|
|
<div class="flex items-center justify-between">
|
|
|
|
|
<div
|
|
|
|
|
class="flex items-center justify-between"
|
|
|
|
|
:class="isMobile ? 'flex-col gap-2' : 'flex-row'"
|
|
|
|
|
>
|
|
|
|
|
<div class="flex items-center justify-end space-x-4">
|
|
|
|
|
<NButton
|
|
|
|
|
type="primary"
|
|
|
|
@ -357,7 +359,7 @@ const dataSource = computed(() => {
|
|
|
|
|
</NPopconfirm>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center space-x-4">
|
|
|
|
|
<NInput v-model:value="searchValue" />
|
|
|
|
|
<NInput v-model:value="searchValue" style="width: 100%" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<br>
|
|
|
|
@ -424,25 +426,16 @@ const dataSource = computed(() => {
|
|
|
|
|
</NTabPane>
|
|
|
|
|
</NTabs>
|
|
|
|
|
</div>
|
|
|
|
|
</NCard>
|
|
|
|
|
</NModal>
|
|
|
|
|
<NModal v-model:show="showModal">
|
|
|
|
|
<NCard
|
|
|
|
|
style="width: 600px"
|
|
|
|
|
:bordered="false"
|
|
|
|
|
size="huge"
|
|
|
|
|
role="dialog"
|
|
|
|
|
aria-modal="true"
|
|
|
|
|
>
|
|
|
|
|
<NModal v-model:show="showModal" style="width: 90%; max-width: 600px;" preset="card">
|
|
|
|
|
<NSpace v-if="modalMode === 'add' || modalMode === 'modify'" vertical>
|
|
|
|
|
{{ t('store.title') }}
|
|
|
|
|
<NInput v-model:value="tempPromptKey" />
|
|
|
|
|
{{ t('store.description') }}
|
|
|
|
|
<NInput v-model:value="tempPromptValue" type="textarea" />
|
|
|
|
|
<NButton
|
|
|
|
|
strong
|
|
|
|
|
secondary
|
|
|
|
|
:style="{ width: '100%' }"
|
|
|
|
|
block
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="inputStatus"
|
|
|
|
|
@click="() => { modalMode === 'add' ? addPromptTemplate() : modifyPromptTemplate() }"
|
|
|
|
|
>
|
|
|
|
@ -457,16 +450,14 @@ const dataSource = computed(() => {
|
|
|
|
|
type="textarea"
|
|
|
|
|
/>
|
|
|
|
|
<NButton
|
|
|
|
|
strong
|
|
|
|
|
secondary
|
|
|
|
|
:style="{ width: '100%' }"
|
|
|
|
|
block
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="inputStatus"
|
|
|
|
|
@click="() => { importPromptTemplate() }"
|
|
|
|
|
>
|
|
|
|
|
{{ t('common.import') }}
|
|
|
|
|
</NButton>
|
|
|
|
|
</NSpace>
|
|
|
|
|
</NCard>
|
|
|
|
|
</NModal>
|
|
|
|
|
</NMessageProvider>
|
|
|
|
|
</template>
|
|
|
|
|