mirror of
https://github.com/Dadechin/XRoomDashboardFront.git
synced 2025-07-05 01:34:34 +00:00
change style cards of teams
This commit is contained in:
parent
01ebe2c0b8
commit
49180af19e
|
@ -171,12 +171,12 @@ export default {
|
||||||
|
|
||||||
// });
|
// });
|
||||||
if (response.status == 200) {
|
if (response.status == 200) {
|
||||||
alert('رمز عبور با موفقیت بازنشانی شد.');
|
alert('حد صحیح است');
|
||||||
this.$router.push('/dashboard');
|
this.$router.push('/dashboard');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error resetting password:', error);
|
console.error('Error resetting password:', error);
|
||||||
alert('خطا در بازنشانی رمز عبور. لطفاً کد یا رمز عبور را بررسی کنید.');
|
alert('کد خطا دارد');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -133,7 +133,7 @@ export default {
|
||||||
userProfilePicUrl() {
|
userProfilePicUrl() {
|
||||||
const customer = JSON.parse(localStorage.getItem('customer') || {});
|
const customer = JSON.parse(localStorage.getItem('customer') || {});
|
||||||
if (!customer.profile_img) return this.defaultProfileImage;
|
if (!customer.profile_img) return this.defaultProfileImage;
|
||||||
return `http://194.62.43.230:8000/media/${customer.profile_img}`;
|
return `${customer.profile_img}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -145,7 +145,7 @@ export default {
|
||||||
first_name: response.data.user.first_name,
|
first_name: response.data.user.first_name,
|
||||||
last_name: response.data.user.last_name,
|
last_name: response.data.user.last_name,
|
||||||
email: response.data.user.email,
|
email: response.data.user.email,
|
||||||
userAvatarUrl: this.baseUrl+ "/"+ response.data.customer.profile_img
|
userAvatarUrl: response.data.customer.profile_img
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching user data:', error);
|
console.error('Error fetching user data:', error);
|
||||||
|
|
|
@ -148,6 +148,8 @@ import AppHeader from '@/components/Header.vue';
|
||||||
await this.saveAvatarUrl(json.data.url);
|
await this.saveAvatarUrl(json.data.url);
|
||||||
|
|
||||||
alert('آواتار با موفقیت ذخیره شد');
|
alert('آواتار با موفقیت ذخیره شد');
|
||||||
|
this.$router.push('/dashboard');
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error saving avatar:', error);
|
console.error('Error saving avatar:', error);
|
||||||
alert('خطا در ذخیره آواتار');
|
alert('خطا در ذخیره آواتار');
|
||||||
|
@ -173,7 +175,9 @@ import AppHeader from '@/components/Header.vue';
|
||||||
try {
|
try {
|
||||||
await this.saveAvatarUrl(avatar.src);
|
await this.saveAvatarUrl(avatar.src);
|
||||||
this.avatarUrl = avatar.src;
|
this.avatarUrl = avatar.src;
|
||||||
alert('آواتار پیشفرض با موفقیت انتخاب شد');
|
alert('آواتار با موفقیت انتخاب شد');
|
||||||
|
this.$router.push('/dashboard');
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error selecting avatar:', error);
|
console.error('Error selecting avatar:', error);
|
||||||
alert(error.response?.data?.detail || error.message || 'خطا در انتخاب آواتار');
|
alert(error.response?.data?.detail || error.message || 'خطا در انتخاب آواتار');
|
||||||
|
|
|
@ -64,13 +64,17 @@
|
||||||
<div class="user-card add-card" @click="openAddUserDialog">
|
<div class="user-card add-card" @click="openAddUserDialog">
|
||||||
<span class="add-text">➕ اضافه کردن کاربر جدید</span>
|
<span class="add-text">➕ اضافه کردن کاربر جدید</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="user-card" v-for="(user, index) in userList" :key="index">
|
<div class="user-card" v-for="(user, index) in userList" :key="index">
|
||||||
|
<div class="user-card-header">
|
||||||
|
<img :src="user.avatar" class="user-avatar" alt="avatar" />
|
||||||
<div class="user-info-box">
|
<div class="user-info-box">
|
||||||
|
<div class="user-name">{{ user.name }}</div>
|
||||||
|
<div class="user-email">{{ user.email }}</div>
|
||||||
<div class="user-role">{{ user.role }}</div>
|
<div class="user-role">{{ user.role }}</div>
|
||||||
<div class="user-version">{{ user.version }}</div>
|
<div class="user-version">{{ user.version }}</div>
|
||||||
<div class="user-email">{{ user.email }}</div>
|
</div>
|
||||||
<div class="user-name">{{ user.name }}</div>
|
|
||||||
<img :src="user.avatar" class="user-avatar" alt="avatar" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="user-footer">
|
<div class="user-footer">
|
||||||
<span>اکانت XRoom</span>
|
<span>اکانت XRoom</span>
|
||||||
|
@ -79,7 +83,7 @@
|
||||||
<button><i class="icon">⚙️</i></button>
|
<button><i class="icon">⚙️</i></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -269,21 +273,21 @@ export default {
|
||||||
email: 'aminimperator@gmail.com',
|
email: 'aminimperator@gmail.com',
|
||||||
role: 'نسخه آزمایشی',
|
role: 'نسخه آزمایشی',
|
||||||
version: '',
|
version: '',
|
||||||
avatar: 'https://via.placeholder.com/60',
|
avatar: 'https://models.readyplayer.me/681f59760bc631a87ad25172.png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'امین رمضانی',
|
name: 'امین رمضانی',
|
||||||
email: 'aminimperator@gmail.com',
|
email: 'aminimperator@gmail.com',
|
||||||
role: 'مدیر',
|
role: 'مدیر',
|
||||||
version: 'نسخه آزمایشی',
|
version: 'نسخه آزمایشی',
|
||||||
avatar: 'https://via.placeholder.com/60',
|
avatar: 'https://models.readyplayer.me/681f59760bc631a87ad25172.png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'نوید رمضانی',
|
name: 'نوید رمضانی',
|
||||||
email: 'aminimperator@gmail.com',
|
email: 'aminimperator@gmail.com',
|
||||||
role: 'مدیر',
|
role: 'مدیر',
|
||||||
version: 'نسخه آزمایشی',
|
version: 'نسخه آزمایشی',
|
||||||
avatar: 'https://via.placeholder.com/60',
|
avatar: 'https://models.readyplayer.me/681f59760bc631a87ad25172.png',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
,
|
,
|
||||||
|
@ -1328,7 +1332,8 @@ submitNewUser() {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
|
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
|
||||||
width: 300px;
|
width: 440px;
|
||||||
|
height: 158px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -1560,5 +1565,94 @@ submitNewUser() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tab 2 */
|
/* tab 2 */
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.user-card {
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 16px;
|
||||||
|
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
|
||||||
|
width: 440px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 20px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-card-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-avatar {
|
||||||
|
width: 70px;
|
||||||
|
height: 70px;
|
||||||
|
border-radius: 50%;
|
||||||
|
object-fit: cover;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-info-box {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: flex-end;
|
||||||
|
flex: 1;
|
||||||
|
text-align: right;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-name {
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-email, .user-role, .user-version {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #4a5568;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-footer {
|
||||||
|
background: #3a57e8;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 0 0 12px 12px;
|
||||||
|
padding: 10px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-actions button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: white;
|
||||||
|
font-size: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user