diff --git a/public/css/custom.css b/public/css/custom.css index 9ca1ee1..d88826d 100644 --- a/public/css/custom.css +++ b/public/css/custom.css @@ -623,3 +623,73 @@ } /* BoardComment end */ + +/* 권한부여 */ +.user-card-container { + display: flex; + flex-wrap: wrap; + gap: 20px; + justify-content: center; + margin-top: 20px; +} +.user-card { + width: 200px; + padding: 15px; + border: 1px solid #ddd; + border-radius: 10px; + background-color: #fff; + box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1); + display: flex; + flex-direction: column; + align-items: center; + text-align: center; +} +.profile-img { + width: 80px; + height: 80px; + border-radius: 50%; + object-fit: cover; + margin-bottom: 10px; +} +.switch { + position: relative; + display: inline-block; + width: 50px; + height: 24px; + margin-top: 5px; +} +.switch input { + opacity: 0; + width: 0; + height: 0; +} +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + transition: .4s; + border-radius: 24px; +} +.slider:before { + position: absolute; + content: ""; + height: 18px; + width: 18px; + left: 4px; + bottom: 3px; + background-color: white; + transition: .4s; + border-radius: 50%; +} +input:checked + .slider { + background-color: #4CAF50; +} + +input:checked + .slider:before { + transform: translateX(24px); +} +/* 권한부여 끝 */ diff --git a/src/views/admin/TheAuthorization.vue b/src/views/admin/TheAuthorization.vue index a5ae2b2..d4da706 100644 --- a/src/views/admin/TheAuthorization.vue +++ b/src/views/admin/TheAuthorization.vue @@ -74,7 +74,7 @@ async function toggleAdmin(user) { role: user.isAdmin ? 'MEMBER' : 'ADMIN' }; try { - const response = await axios.put('admin/role', requestData); // API 경로 수정 + const response = await axios.put('admin/role', requestData); if (response.status === 200) { user.isAdmin = !user.isAdmin; @@ -92,71 +92,4 @@ onMounted(fetchUsers);