Procházet zdrojové kódy

!175 fix: 火狐浏览器下表情位置的bug
Merge pull request !175 from blue/v_3.0.0

blue před 3 měsíci
rodič
revize
4a903f9fe7

+ 4 - 4
im-uniapp/im.scss

@@ -5,7 +5,7 @@ uni-button {
 }
 uni-button[type='primary'] {
 	color: #fff !important;
-	background: linear-gradient(135deg, $im-color-primary, lighten($im-color-primary, 15%)) !important;
+	background: $im-color-primary !important;
 }
 
 uni-button[type='primary'][plain] {
@@ -16,7 +16,7 @@ uni-button[type='primary'][plain] {
 
 uni-button[type='warn'] {
 	color: #fff !important;
-	background: linear-gradient(135deg, $im-color-danger, lighten($im-color-danger, 15%)) !important;
+	background: $im-color-danger !important;
 }
 
 uni-button[type='warn'][plain] {
@@ -37,7 +37,7 @@ button {
 
 button[type='primary'] {
 	color: #fff !important;
-	background: linear-gradient(135deg, $im-color-primary, lighten($im-color-primary, 15%)) !important;
+	background: $im-color-primary !important;
 }
 
 button[type='primary'][plain] {
@@ -48,7 +48,7 @@ button[type='primary'][plain] {
 
 button[type='warn'] {
 	color: #fff !important;
-	background: linear-gradient(135deg, $im-color-danger, lighten($im-color-danger, 15%)) !important;
+	background: $im-color-danger !important;
 }
 
 button[type='warn'][plain] {

+ 2 - 2
im-uniapp/manifest.json

@@ -2,8 +2,8 @@
     "name" : "盒子IM",
     "appid" : "__UNI__69DD57A",
     "description" : "",
-    "versionName" : "3.4.0",
-    "versionCode" : 3400,
+    "versionName" : "3.10.0",
+    "versionCode" : 31000,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 7 - 6
im-uniapp/pages/chat/chat-box.vue

@@ -848,12 +848,6 @@ export default {
 			h -= 50;
 			// 减去键盘高度
 			if (this.isShowKeyBoard || this.chatTabBox != 'none') {
-				// ios app的键盘高度不准,需要减去屏幕和窗口差
-				// #ifdef APP-PLUS
-				if (sysInfo.platform == 'ios') {
-					h += this.screenHeight - this.windowHeight;
-				}
-				// #endif
 				h -= this.keyboardHeight;
 				this.scrollToBottom();
 			}
@@ -922,6 +916,13 @@ export default {
 			this.isShowKeyBoard = res.height > 0;
 			if (this.isShowKeyBoard) {
 				this.keyboardHeight = res.height; // 获取并保存键盘高度
+				// #ifdef APP-PLUS
+				// ios app的键盘高度不准,需要减去屏幕和窗口差
+				let sysInfo = uni.getSystemInfoSync();
+				if (sysInfo.platform == 'ios') {
+					this.keyboardHeight -= this.screenHeight - this.windowHeight;
+				}
+				// #endif
 			}
 			setTimeout(() => this.reCalChatMainHeight(), 30);
 		},

+ 0 - 2
im-uniapp/pages/login/login.vue

@@ -228,7 +228,6 @@ export default {
 		height: 100rpx;
 		border-radius: 50rpx;
 		border: none;
-		box-shadow: 0 8rpx 32rpx rgba($im-color-primary, 0.3);
 		transition: all 0.3s ease;
 		overflow: hidden;
 		position: relative;
@@ -236,7 +235,6 @@ export default {
 
 		&:active {
 			transform: translateY(2rpx);
-			box-shadow: 0 4rpx 16rpx rgba($im-color-primary, 0.4);
 
 			&::before {
 				left: 100%;

+ 0 - 2
im-uniapp/pages/register/register.vue

@@ -288,7 +288,6 @@ export default {
 		height: 100rpx;
 		border-radius: 50rpx;
 		border: none;
-		box-shadow: 0 8rpx 32rpx rgba($im-color-primary, 0.3);
 		transition: all 0.3s ease;
 		overflow: hidden;
 		position: relative;
@@ -297,7 +296,6 @@ export default {
 
 		&:active {
 			transform: translateY(2rpx);
-			box-shadow: 0 4rpx 16rpx rgba($im-color-primary, 0.4);
 		}
 
 		.btn-content {

+ 3 - 3
im-web/src/components/chat/ChatInput.vue

@@ -46,7 +46,7 @@ export default {
 				range.deleteContents();
 			}
 			// 粘贴图片和文件时,这里没有数据
-			if (txt && typeof(txt) == 'string') {
+			if (txt && typeof (txt) == 'string') {
 				let textNode = document.createTextNode(txt);
 				range.insertNode(textNode)
 				range.collapse();
@@ -236,7 +236,7 @@ export default {
 		},
 		onBlur(e) {
 			if (!this.atIng) {
-				this.updateRange();
+				//this.updateRange();
 			}
 		},
 		onMousedown() {
@@ -268,7 +268,6 @@ export default {
 			blurRange.collapse()
 
 			this.selectElement(textNode);
-			this.updateRange();
 			this.isEmpty = false;
 		},
 		generateId() {
@@ -475,6 +474,7 @@ export default {
 		font-size: var(--im-font-size);
 		text-align: left;
 		overflow-y: auto;
+		white-space: pre-wrap;
 
 		// 单独一行时,无法在前面输入的bug
 		>div:before {

+ 15 - 22
im-web/src/view/Login.vue

@@ -125,12 +125,7 @@ export default {
 	width: 100%;
 	height: 100%;
 	box-sizing: border-box;
-	background: linear-gradient(135deg,
-			#87adeb 0%,
-			#8287ec 25%,
-			#87adeb 50%,
-			#898ee3 75%,
-			#87adeb 100%);
+	background: linear-gradient(15deg, var(--im-color-primary-light-9) 0%, var(--im-color-primary-light-4) 100%);
 	
 		/* 装饰性元素 */
 	.decoration {
@@ -140,27 +135,27 @@ export default {
 	}
 
 	.decoration-1 {
-		width: 450px;
-		height: 450px;
-		background: linear-gradient(45deg, rgba(255, 255, 255, 0.3) 0%, rgba(200, 220, 240, 0.4) 100%);
-		top: -250px;
-		right: -100px;
+		width: 150px;
+		height: 150px;
+		background: rgba(255, 255, 255, 0.2);
+		top: -150px;
+		right: 0px;
 		animation: float 16s infinite ease-in-out;
 	}
 
 	.decoration-2 {
-		width: 400px;
-		height: 400px;
-		background: linear-gradient(135deg, rgba(200, 220, 240, 0.4) 0%, rgba(255, 255, 255, 0.3) 100%);
-		bottom: -200px;
-		left: -100px;
+		width: 200px;
+		height: 200px;
+		background: rgba(255, 255, 255, 0.18);
+		bottom: -100px;
+		left: -50px;
 		animation: float 12s infinite ease-in-out;
 	}
 
 	.decoration-3 {
-		width: 300px;
-		height: 300px;
-		background: linear-gradient(45deg, rgba(161, 196, 253, 0.3) 0%, rgba(194, 233, 251, 0.4) 100%);
+		width: 100px;
+		height: 100px;
+		background: rgba(255, 255, 255, 0.15);
 		top: 50%;
 		right: 50px;
 		animation: float 8s infinite ease-in-out;
@@ -197,9 +192,7 @@ export default {
 			width: 360px;
 			height: 380px;
 			padding: 30px;
-			box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
-			background: rgba(255, 255, 255, 0.85);
-			backdrop-filter: blur(8px);
+			background: rgba(255, 255, 255, 0.95);
 			border-radius: 3%;
 			overflow: hidden;
 

+ 15 - 22
im-web/src/view/Register.vue

@@ -131,12 +131,7 @@ export default {
 	align-items: center;
 	width: 100%;
 	height: 100%;
-	background: linear-gradient(135deg,
-			#87adeb 0%,
-			#8287ec 25%,
-			#87adeb 50%,
-			#898ee3 75%,
-			#87adeb 100%);
+	background: linear-gradient(15deg, var(--im-color-primary-light-9) 0%, var(--im-color-primary-light-4) 100%);
 
 	/* 装饰性元素 */
 	.decoration {
@@ -146,27 +141,27 @@ export default {
 	}
 
 	.decoration-1 {
-		width: 450px;
-		height: 450px;
-		background: linear-gradient(45deg, rgba(255, 255, 255, 0.3) 0%, rgba(200, 220, 240, 0.4) 100%);
-		top: -250px;
-		right: -100px;
+		width: 150px;
+		height: 150px;
+		background: rgba(255, 255, 255, 0.2);
+		top: -150px;
+		right: 0px;
 		animation: float 16s infinite ease-in-out;
 	}
 
 	.decoration-2 {
-		width: 400px;
-		height: 400px;
-		background: linear-gradient(135deg, rgba(200, 220, 240, 0.4) 0%, rgba(255, 255, 255, 0.3) 100%);
-		bottom: -200px;
-		left: -100px;
+		width: 200px;
+		height: 200px;
+		background: rgba(255, 255, 255, 0.18);
+		bottom: -100px;
+		left: -50px;
 		animation: float 12s infinite ease-in-out;
 	}
 
 	.decoration-3 {
-		width: 300px;
-		height: 300px;
-		background: linear-gradient(45deg, rgba(161, 196, 253, 0.3) 0%, rgba(194, 233, 251, 0.5) 100%);
+		width: 100px;
+		height: 100px;
+		background: rgba(255, 255, 255, 0.15);
 		top: 50%;
 		right: 50px;
 		animation: float 8s infinite ease-in-out;
@@ -199,9 +194,7 @@ export default {
 		border-radius: 3px;
 		overflow: hidden;
 		border-radius: 3%;
-		box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
-		background: rgba(255, 255, 255, 0.85);
-		backdrop-filter: blur(8px);
+		background: rgba(255, 255, 255, 0.95);
 
 		.title {
 			display: flex;