style(主播设置): 样式调整
This commit is contained in:
parent
998beb6a3f
commit
1882e5b4a4
@ -2,24 +2,43 @@
|
|||||||
<div class="host-setting gradient-background-circles">
|
<div class="host-setting gradient-background-circles">
|
||||||
<MobileHeader title="Host Setting" />
|
<MobileHeader title="Host Setting" />
|
||||||
|
|
||||||
<div class="content">
|
<div style="padding: 16px; position: relative; z-index: 2">
|
||||||
<!-- My Agent 部分 -->
|
<!-- My Agent 部分 -->
|
||||||
<div class="section">
|
<div style="margin-bottom: 20px">
|
||||||
<div class="section-header">
|
<div style="display: flex; align-items: center; margin-bottom: 12px">
|
||||||
<h3>My Agent</h3>
|
<div style="font-size: 1.4em; font-weight: 600">My Agent</div>
|
||||||
<span class="agency-tag">🏢 Agency</span>
|
<img src="/src/assets/icon/agency.png" alt="" height="25px" style="display: block" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="agent-card">
|
<div
|
||||||
<div class="agent-info">
|
style="
|
||||||
<div class="avatar">
|
background-color: white;
|
||||||
<span>{{ userInfo.name.charAt(0) }}</span>
|
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>
|
||||||
<div class="agent-details">
|
</div>
|
||||||
<h4>{{ userInfo.name }}</h4>
|
<!-- 按钮 -->
|
||||||
<p>ID: {{ userInfo.id }}</p>
|
<div style="display: flex; align-items: center">
|
||||||
</div>
|
<div class="leave-btn" @click="leaveAgent">Leave</div>
|
||||||
<!-- <button class="leave-btn" @click="leaveAgent">Leave</button>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -31,16 +50,22 @@
|
|||||||
import { reactive } from 'vue'
|
import { reactive } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import MobileHeader from '../components/MobileHeader.vue'
|
import MobileHeader from '../components/MobileHeader.vue'
|
||||||
import {showError} from "@/utils/toast.js";
|
import { showError } from '@/utils/toast.js'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const userInfo = reactive({
|
const userInfo = reactive({
|
||||||
name: 'User1',
|
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 = () => {
|
const leaveAgent = () => {
|
||||||
if (confirm('Are you sure you want to leave this agent?')) {
|
if (confirm('Are you sure you want to leave this agent?')) {
|
||||||
@ -51,100 +76,44 @@ const leaveAgent = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
* {
|
||||||
|
color: rgba(0, 0, 0, 0.8);
|
||||||
|
font-family: 'SF Pro Text';
|
||||||
|
}
|
||||||
|
|
||||||
.host-setting {
|
.host-setting {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
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 {
|
.leave-btn {
|
||||||
background-color: #EF4444;
|
background-color: #fff;
|
||||||
color: white;
|
border: 1px solid #e6e6e6;
|
||||||
border: none;
|
padding: 2px 8px;
|
||||||
padding: 8px 16px;
|
border-radius: 12px;
|
||||||
border-radius: 8px;
|
font-size: 0.9em;
|
||||||
font-size: 14px;
|
font-weight: 500;
|
||||||
font-weight: 600;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background-color 0.2s;
|
transition: background-color 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.leave-btn:active {
|
.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>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user