File tree Expand file tree Collapse file tree 3 files changed +28
-13
lines changed
Expand file tree Collapse file tree 3 files changed +28
-13
lines changed Original file line number Diff line number Diff line change 11<template >
22 <div class =" bg-white shadow rounded-lg" >
33 <div class =" flex divide-x divide-gray-200 transition-all" :class =" { 'border-b border-gray-200': open }" >
4- <div class =" flex justify-between px-4 py-5 flex-1" @click =" toggleCard" >
4+ <div class =" flex justify-between px-4 py-5 flex-1 cursor-pointer " @click =" toggleCard" >
55 <div class =" inline-flex" >
66 <label >{{ title }}</label >
77 <slot name =" icon" />
2222 <transition
2323 enter-active-class =" duration-300"
2424 enter-from-class =" transform opacity-0 max-h-0 delay-150"
25- enter-to-class =" opacity-100 max-h-[300px ]"
25+ enter-to-class =" opacity-100 max-h-[600px ]"
2626 leave-active-class =" duration-300"
27- leave-from-class =" opacity-100 max-h-[300px ]"
27+ leave-from-class =" opacity-100 max-h-[600px ]"
2828 leave-to-class =" transform opacity-0 max-h-0"
2929 >
3030 <slot v-if =" open" />
Original file line number Diff line number Diff line change 11<template >
2- <ClipboardIcon class =" inline-block ml-1 mb-1 w-4 h-4 cursor-pointer hover:text-primary" @click =" copyText" />
2+ <div @click =" copyText" >
3+ <slot />
4+ <ClipboardIcon class =" inline-block ml-1 my-auto w-4 h-4 cursor-pointer hover:text-primary flex-shrink-0" />
5+ </div >
36</template >
47
58<script setup lang="ts">
Original file line number Diff line number Diff line change 3434 v-for =" token in tokens"
3535 :key =" token.name"
3636 >
37- <div class =" flex items-center" >
37+ <div class =" flex-1 truncate flex items-center" >
3838 <KeyIcon class =" w-5 h-5 mr-4 text-green-500" />
3939 <span class =" text-gray-900 mr-4" >{{ token.name }}</span >
40- <span class =" text-gray-400 text-sm mt-1" >
41- {{
42- shortString(token.plainTextToken?.substring(token.plainTextToken?.indexOf('|') + 1 ?? 0)) ??
43- '*******'
44- }}
40+ <span class =" text-gray-400 text-sm mt-1 truncate" >
41+ <span v-if =" !token.plainTextToken" >
42+ {{ '*******' }}
43+ </span >
4544 <CopyTextIcon
4645 v-if =" token.plainTextToken"
46+ ref =" copyIconRef"
47+ class =" cursor-pointer flex mr-4"
4748 :text =" token.plainTextToken.substring(token.plainTextToken?.indexOf('|') + 1 ?? 0)"
48- />
49+ >
50+ <span class =" truncate" >
51+ {{ token.plainTextToken?.substring(token.plainTextToken?.indexOf('|') + 1 ?? 0) }}
52+ </span >
53+ </CopyTextIcon >
4954 </span >
5055 </div >
51- <Btn :dusk =" `btn__revoke-api-${token.name}`" error @click =" confirmRevoke(token.name)" > Revoke </Btn >
56+ <Btn
57+ class =" flex-shrink-0"
58+ :dusk =" `btn__revoke-api-${token.name}`"
59+ error
60+ @click =" confirmRevoke(token.name)"
61+ >
62+ Revoke
63+ </Btn >
5264 </div >
5365 </div >
5466
6476
6577<script setup lang="ts">
6678import { KeyIcon } from ' @heroicons/vue/24/outline' ;
67- import { shortString , snackbarErrors } from ' ~/util' ;
79+ import { snackbarErrors } from ' ~/util' ;
6880import CopyTextIcon from ' ../CopyTextIcon.vue' ;
6981import { computed , ref , watch } from ' vue' ;
7082import { useAppStore } from ' ~/store' ;
You can’t perform that action at this time.
0 commit comments