refactor(frontend): remove manual admin credential cards from permission pages
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
<div>
|
||||
<h2 class="text-xl font-bold text-gray-800 mb-6">權限管理</h2>
|
||||
|
||||
<AdminCredsCard />
|
||||
|
||||
<!-- Grant / Revoke -->
|
||||
<el-tabs v-model="activeTab" type="border-card" class="shadow-sm">
|
||||
<!-- Grant Tab -->
|
||||
@@ -66,13 +64,11 @@
|
||||
type="primary"
|
||||
native-type="submit"
|
||||
:loading="grantLoading"
|
||||
:disabled="!credsSaved"
|
||||
>
|
||||
Grant 授權
|
||||
</el-button>
|
||||
<el-button @click="resetGrant">清除</el-button>
|
||||
</el-form-item>
|
||||
<p v-if="!credsSaved" class="text-xs text-yellow-600 ml-2">請先設定管理員認證</p>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
|
||||
@@ -130,13 +126,11 @@
|
||||
type="danger"
|
||||
native-type="submit"
|
||||
:loading="revokeLoading"
|
||||
:disabled="!credsSaved"
|
||||
>
|
||||
Revoke 撤銷
|
||||
</el-button>
|
||||
<el-button @click="resetRevoke">清除</el-button>
|
||||
</el-form-item>
|
||||
<p v-if="!credsSaved" class="text-xs text-yellow-600 ml-2">請先設定管理員認證</p>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -144,15 +138,13 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { usePermissionStore } from '@/stores/permission'
|
||||
import AdminCredsCard from '@/components/AdminCredsCard.vue'
|
||||
|
||||
const permissionStore = usePermissionStore()
|
||||
|
||||
const activeTab = ref('grant')
|
||||
const credsSaved = computed(() => permissionStore.hasAdminCreds())
|
||||
|
||||
// Grant
|
||||
const grantFormRef = ref()
|
||||
|
||||
Reference in New Issue
Block a user