Files
rustfs-console/components/users/user/notice.vue
T
overtrueandClaude de0f2c550d feat: improve TypeScript type safety and code quality
- Added comprehensive TypeScript type definitions for app configuration
- Fixed type safety issues in sidebar component with proper type casting
- Improved code organization with better file naming conventions
- Enhanced error handling with centralized error management
- Added performance optimizations with caching and code splitting
- Improved development experience with better tooling configuration
- Updated project documentation with comprehensive README
- Added proper type definitions for navigation items and app config
- Fixed licensing information and added proper Apache 2.0 license

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 23:19:22 +08:00

83 lines
2.0 KiB
Vue

<template>
<div>
<n-modal
v-model:show="visible"
:mask-closable="false"
preset="card"
title="新用户已创建"
class="max-w-screen-md"
:segmented="{
content: true,
action: true
}">
<n-card>
<n-form label-placement="left" label-align="right" :label-width="130">
<n-grid :cols="24" :x-gap="18">
<n-form-item-grid-item :span="24" label="Access Key">
<copy-input
class="w-full"
v-model="accessKey"
:readonly="true"
:copy-icon="true"></copy-input>
</n-form-item-grid-item>
<n-form-item-grid-item :span="24" label="secretkey">
<copy-input
class="w-full"
v-model="secretkey"
:readonly="true"
:copy-icon="true"></copy-input>
</n-form-item-grid-item>
</n-grid>
</n-form>
</n-card>
<template #action>
<n-space justify="center">
<n-button @click="closeModal()">取消</n-button>
<n-button type="primary" @click="exportFile">导出</n-button>
</n-space>
</template>
</n-modal>
</div>
</template>
<script setup lang="ts">
import { download } from '@/utils/export-file'
const visible = ref(false)
const accessKey = ref('')
const secretkey = ref('')
const url = ref('')
function openDialog(data: any) {
accessKey.value = data.credentials.accessKey
secretkey.value = data.credentials.secretKey
url.value = data.url
visible.value = true
}
const emit = defineEmits(['search'])
function closeModal() {
visible.value = false
accessKey.value = ''
secretkey.value = ''
emit('search')
}
defineExpose({
openDialog
})
function exportFile() {
download(
'credentials.json',
JSON.stringify({
url: url.value,
accessKey: accessKey.value,
secretKey: secretkey.value,
api: 's3v4',
path: 'auto'
})
)
}
</script>
<style lang="scss" scoped></style>