style(主播设置): 样式调整
This commit is contained in:
parent
998beb6a3f
commit
1882e5b4a4
@ -2,24 +2,43 @@
|
||||
<div class="host-setting gradient-background-circles">
|
||||
<MobileHeader title="Host Setting" />
|
||||
|
||||
<div class="content">
|
||||
<div style="padding: 16px; position: relative; z-index: 2">
|
||||
<!-- My Agent 部分 -->
|
||||
<div class="section">
|
||||
<div class="section-header">
|
||||
<h3>My Agent</h3>
|
||||
<span class="agency-tag">🏢 Agency</span>
|
||||
<div style="margin-bottom: 20px">
|
||||
<div style="display: flex; align-items: center; margin-bottom: 12px">
|
||||
<div style="font-size: 1.4em; font-weight: 600">My Agent</div>
|
||||
<img src="/src/assets/icon/agency.png" alt="" height="25px" style="display: block" />
|
||||
</div>
|
||||
|
||||
<div class="agent-card">
|
||||
<div class="agent-info">
|
||||
<div class="avatar">
|
||||
<span>{{ userInfo.name.charAt(0) }}</span>
|
||||
<div
|
||||
style="
|
||||
background-color: white;
|
||||
padding: 16px;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<!-- 用户信息 -->
|
||||
<div style="display: flex; align-items: center">
|
||||
<img
|
||||
:src="avatarUrl || ''"
|
||||
alt=""
|
||||
width="50px"
|
||||
style="aspect-ratio: 1/1; border-radius: 50%; object-fit: cover"
|
||||
@error="defaultAvatarUrl"
|
||||
/>
|
||||
<div class="agent-details" style="flex: 1">
|
||||
<div style="margin-bottom: 4px; font-weight: 600">
|
||||
{{ userInfo.name }}
|
||||
</div>
|
||||
<div style="font-size: 0.9em; color: rgba(0, 0, 0, 0.4)">ID: {{ userInfo.id }}</div>
|
||||
</div>
|
||||
<div class="agent-details">
|
||||
<h4>{{ userInfo.name }}</h4>
|
||||
<p>ID: {{ userInfo.id }}</p>
|
||||
</div>
|
||||
<!-- <button class="leave-btn" @click="leaveAgent">Leave</button>-->
|
||||
</div>
|
||||
<!-- 按钮 -->
|
||||
<div style="display: flex; align-items: center">
|
||||
<div class="leave-btn" @click="leaveAgent">Leave</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -31,16 +50,22 @@
|
||||
import { reactive } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import MobileHeader from '../components/MobileHeader.vue'
|
||||
import {showError} from "@/utils/toast.js";
|
||||
import { showError } from '@/utils/toast.js'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
// 用户信息
|
||||
const userInfo = reactive({
|
||||
name: 'User1',
|
||||
id: '1234567890'
|
||||
id: '1234567890',
|
||||
})
|
||||
|
||||
const defaultAvatarUrl = (e) => {
|
||||
console.log('头像资源出错')
|
||||
e.target.onerror = null //防止循环
|
||||
e.target.src = new URL('/src/assets/images/WeeklyStar/defaultAvatar.png', import.meta.url).href
|
||||
}
|
||||
|
||||
// 方法
|
||||
const leaveAgent = () => {
|
||||
if (confirm('Are you sure you want to leave this agent?')) {
|
||||
@ -51,100 +76,44 @@ const leaveAgent = () => {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
* {
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
font-family: 'SF Pro Text';
|
||||
}
|
||||
|
||||
.host-setting {
|
||||
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 16px;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.section-header h3 {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.agency-tag {
|
||||
background-color: #DBEAFE;
|
||||
color: #1E40AF;
|
||||
padding: 4px 12px;
|
||||
border-radius: 16px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Agent Card */
|
||||
.agent-card {
|
||||
background-color: white;
|
||||
padding: 16px;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.agent-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 25px;
|
||||
background-color: #8B5CF6;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.agent-details {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.agent-details h4 {
|
||||
margin: 0 0 4px 0;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.agent-details p {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.leave-btn {
|
||||
background-color: #EF4444;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 8px 16px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
background-color: #fff;
|
||||
border: 1px solid #e6e6e6;
|
||||
padding: 2px 8px;
|
||||
border-radius: 12px;
|
||||
font-size: 0.9em;
|
||||
font-weight: 500;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.leave-btn:active {
|
||||
background-color: #DC2626;
|
||||
background-color: #00000010;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 360px) {
|
||||
* {
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 360px) {
|
||||
* {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
* {
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user