You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

127 lines
2.3 KiB

3 years ago
<template>
1 year ago
<div class="rtc-private-acceptor">
<head-image :id="friend.id" :name="friend.nickName" :url="friend.headImage" :size="100" :isShowUserInfo="false"></head-image>
2 years ago
<div class="acceptor-text">
{{tip}}
3 years ago
</div>
<div class="acceptor-btn-group">
<div class="icon iconfont icon-phone-accept accept" @click="$emit('accept')" title="接受"></div>
<div class="icon iconfont icon-phone-reject reject" @click="$emit('reject')" title="拒绝"></div>
3 years ago
</div>
</div>
</template>
<script>
import HeadImage from '../common/HeadImage.vue';
3 years ago
export default {
name: "rtcPrivateAcceptor",
components: {
HeadImage
},
data() {
return {}
3 years ago
},
props: {
mode:{
type: String
},
friend:{
type: Object
3 years ago
}
},
computed: {
tip() {
let modeText = this.mode == "video" ? "视频" : "语音"
return `${this.friend.nickName} 请求和您进行${modeText}通话...`
}
3 years ago
}
}
</script>
<style scoped lang="scss">
.rtc-private-acceptor {
3 years ago
position: absolute;
2 years ago
display: flex;
flex-direction: column;
align-items: center;
right: 5px;
bottom: 5px;
3 years ago
width: 250px;
height: 250px;
padding: 20px;
1 year ago
background-color: #fff;
box-shadow: var(--im-box-shadow-dark);
border-radius: 4px;
2 years ago
.acceptor-text {
padding: 10px;
text-align: center;
font-size: 16px;
}
3 years ago
.acceptor-btn-group {
display: flex;
justify-content: space-around;
margin-top: 20px;
2 years ago
width: 100%;
3 years ago
.icon {
2 years ago
font-size: 60px;
3 years ago
cursor: pointer;
2 years ago
border-radius: 50%;
3 years ago
&.accept {
color: green;
2 years ago
animation: anim 2s ease-in infinite, vibration 2s ease-in infinite;
@keyframes anim {
0% {
box-shadow: 0 1px 0 4px #ffffff;
}
10% {
box-shadow: 0 1px 0 8px rgba(255, 165, 0, 1);
}
25% {
box-shadow: 0 1px 0 12px rgba(255, 210, 128, 1), 0 1px 0 16px rgba(255, 201, 102, 1);
}
50% {
box-shadow: 0 2px 5px 10px rgba(255, 184, 51, 1), 0 2px 5px 23px rgba(248, 248, 255, 1);
}
}
@keyframes vibration {
0% {
transform: rotate(0deg);
}
25% {
transform: rotate(20deg);
}
50% {
transform: rotate(0deg);
}
75% {
transform: rotate(-15deg);
}
100% {
transform: rotate(0deg);
}
}
3 years ago
}
3 years ago
&.reject {
color: red;
}
}
3 years ago
}
}
1 year ago
</style>