固定input字体大小

This commit is contained in:
al 2024-11-14 17:23:01 +08:00
parent 16cd1ec0c4
commit 685b2c39e7
11 changed files with 116 additions and 85 deletions

View File

@ -1,12 +1,12 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
body{
color:#fff;
body {
color: #fff;
/* padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom); */
}
footer{
footer {
/* Fallback for non-iOS devices */
bottom: 0;
/* iOS 11.0+ */
@ -35,7 +35,7 @@ footer{
-ms-user-select: none; /* IE/Edge */
user-select: none; /* 标准语法 */
}
img{
img {
pointer-events: none;
}
input {
@ -57,11 +57,19 @@ input {
font-family: inherit;
font-size: inherit;
color: inherit;
}
input,textarea{
-webkit-user-select: auto; /* Safari */
-moz-user-select: auto; /* Firefox */
-ms-user-select: auto; /* IE/Edge */
user-select: auto; /* 标准语法 */
}
@media only screen and (min-device-width: 320px) and (max-device-width: 1024px) {
select:focus, textarea:focus, input:focus {
font-size: 16px !important;
select:focus,
textarea:focus,
input:focus {
font-size: 16px !important;
}
}
/* .adm-image-viewer-slides-inner > *{
@ -102,7 +110,7 @@ input {
.adm-list-body-inner {
/* margin-top: 8px; */
}
.adm-image-viewer-indicator{
.adm-image-viewer-indicator {
color: #fff;
}
@ -138,23 +146,24 @@ input {
scroll-behavior: smooth;
}
.scrollbarBoxX::-webkit-scrollbar, .scrollbarBox::-webkit-scrollbar {
.scrollbarBoxX::-webkit-scrollbar,
.scrollbarBox::-webkit-scrollbar {
/* display:none; */
width: 6px;
}
.scrollbarBoxX::-webkit-scrollbar-thumb,.scrollbarBox::-webkit-scrollbar-thumb {
.scrollbarBoxX::-webkit-scrollbar-thumb,
.scrollbarBox::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 5px rgba(138, 138, 138, 0.2);
background: nb-theme(background-basic-color-4);
}
.scrollbarBoxX::-webkit-scrollbar-track,.scrollbarBox::-webkit-scrollbar-track {
.scrollbarBoxX::-webkit-scrollbar-track,
.scrollbarBox::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 5px rgba(138, 138, 138, 0.2);
border-radius: 10px;
background: nb-theme(background-basic-color-2);
;
}
.scrollbarBox_hidden {
@ -178,7 +187,6 @@ input {
white-space: nowrap;
}
.imageBlur {
filter: blur(8px);
}
@ -211,62 +219,62 @@ input {
bottom: -4px;
}
.adm-floating-panel{
--border-radius:16px !important;
.adm-floating-panel {
--border-radius: 16px !important;
}
.adm-jumbo-tabs-tab-active{
color:#fff!important;
.adm-jumbo-tabs-tab-active {
color: #fff !important;
/* font-weight: bold; */
}
.adm-jumbo-tabs-tab-description{
.adm-jumbo-tabs-tab-description {
background: none;
width: 100%!important;
width: 100% !important;
}
.adm-jumbo-tabs-header{
.adm-jumbo-tabs-header {
position: sticky;
top: 0;
z-index: 10;
background-color: #07050A;
background-color: #07050a;
color: #ffffff88;
}
.spaceBoxTwo .adm-jumbo-tabs-header .adm-jumbo-tabs-tab-list{
.spaceBoxTwo .adm-jumbo-tabs-header .adm-jumbo-tabs-tab-list {
display: grid;
grid-template-columns: repeat(2, 1fr);
}
.spaceBoxThree .adm-jumbo-tabs-header .adm-jumbo-tabs-tab-list{
.spaceBoxThree .adm-jumbo-tabs-header .adm-jumbo-tabs-tab-list {
display: grid;
grid-template-columns: repeat(3, 1fr);
}
.adm-floating-panel-header{
background-color: #07050A!important;
.adm-floating-panel-header {
background-color: #07050a !important;
}
.adm-floating-panel-header .adm-floating-panel-bar{
background-color: #ffffff!important;
width: 30px!important;
.adm-floating-panel-header .adm-floating-panel-bar {
background-color: #ffffff !important;
width: 30px !important;
}
.adm-tab-bar .adm-tab-bar-item-icon{
height:32px;
.adm-tab-bar .adm-tab-bar-item-icon {
height: 32px;
}
.adm-image-viewer-slides .adm-image-viewer-slide{
.adm-image-viewer-slides .adm-image-viewer-slide {
/* margin-right: 0; */
}
.videoMask{
.videoMask {
display: none;
}
.adm-dialog .adm-center-popup-wrap{
.adm-dialog .adm-center-popup-wrap {
top: 0;
left: 0;
transform: none;
max-width: none;
width: 100%;
height: 100%;
left: 0;
transform: none;
max-width: none;
width: 100%;
height: 100%;
}
.adm-dialog .adm-dialog-content{
.adm-dialog .adm-dialog-content {
max-height: none;
height: 100%;
}
.adm-toast-icon{
.adm-toast-icon {
display: flex;
justify-content: center;
align-items: center;
@ -275,26 +283,26 @@ input {
.adm-floating-panel .adm-floating-panel-content {
flex: 1;
overflow-y: scroll;
background: rgb(7 5 10/ var(--tw-bg-opacity))!important;
background: rgb(7 5 10 / var(--tw-bg-opacity)) !important;
}
.adm-list>div>div>div>div{
.adm-list > div > div > div > div {
padding: 0;
}
.adm-list-item-content{
.adm-list-item-content {
padding: 0;
}
.customize-body img{
.customize-body img {
max-height: 90vh;
filter: blur(8px);
}
.customize-body>div>div{
.customize-body > div > div {
display: flex;
justify-content: center;
align-items: center;
}
.customize-body>div>div>div{
.customize-body > div > div > div {
transform: matrix(1, 0, 0, 1, 0, 0);
overflow: hidden;
height: max-content;
@ -313,44 +321,44 @@ input {
width: max-content;
border-radius: 0.25rem;
} */
.mediaDom .adm-image-viewer-slides-inner{
.mediaDom .adm-image-viewer-slides-inner {
padding-top: 68px;
}
.mediaDom .adm-image-viewer-slide{
.mediaDom .adm-image-viewer-slide {
max-height: calc(100vh - 100px);
width: 100vw;
}
.photos-body img{
.photos-body img {
/* max-height: 90vh; */
filter: blur(8px);
}
.photos-body .adm-image-viewer-control{
.photos-body .adm-image-viewer-control {
display: flex;
justify-content: center;
align-items: center;
}
.photos-body .adm-image-viewer-image-wrapper{
.photos-body .adm-image-viewer-image-wrapper {
overflow: hidden;
height: max-content;
width: max-content;
border-radius: 0.25rem;
}
.photos-bodyBox-full{
.photos-bodyBox-full {
width: 100vw;
max-height: calc(100vh);
}
.photos-bodyBox{
.photos-bodyBox {
width: 100vw;
max-height: calc(100vh - 120px);
}
.adm-checkbox.adm-checkbox-checked .adm-checkbox-icon,.adm-radio.adm-radio-checked .adm-radio-icon {
border-color: #FF669E!important;
background-color: #FF669E!important;
.adm-checkbox.adm-checkbox-checked .adm-checkbox-icon,
.adm-radio.adm-radio-checked .adm-radio-icon {
border-color: #ff669e !important;
background-color: #ff669e !important;
}
.adm-modal .adm-modal-content{
.adm-modal .adm-modal-content {
max-height: 100vh;
}
}

View File

@ -374,6 +374,7 @@ export default function CreateProfile() {
</div>
<div className="mt-2 px-4 py-3 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
<TextArea
style={{ "--font-size": `16px` }}
value={formData.spaceIntro}
placeholder="介绍下你的空间吧~"
onChange={(value) =>

View File

@ -651,6 +651,7 @@ export default function EditHome() {
</div>
<div className="mt-2 px-4 py-3 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
<TextArea
style={{ "--font-size": `16px` }}
value={formData.info}
placeholder="点此输入,文案将在“主页”展示"
onChange={(value) =>
@ -669,6 +670,7 @@ export default function EditHome() {
</div>
<div className="mt-2 px-4 py-3 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
<TextArea
style={{ "--font-size": `16px` }}
value={formData.autoResponse}
placeholder="文案将自动发送给点开私信的用户"
onChange={(value) =>

View File

@ -940,6 +940,7 @@ export default function CompleteStreamerInformation() {
</div>
<div className="mt-2 px-4 py-3 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
<TextArea
style={{ "--font-size": `16px` }}
value={formData.info}
placeholder="点此输入,文案将在“主页”展示"
onChange={(value) =>
@ -958,6 +959,7 @@ export default function CompleteStreamerInformation() {
</div>
<div className="mt-2 px-4 py-3 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
<TextArea
style={{ "--font-size": `16px` }}
value={formData.autoResponse}
placeholder="文案将自动发送给点开私信的用户"
onChange={(value) =>

View File

@ -263,7 +263,7 @@ export default function CreateImagePost() {
onChange={(value) =>
setFormData((old) => ({ ...old, content: value }))
}
style={{ "--font-size": "14px" }}
style={{ "--font-size": "16px" }}
className="h-full bg-[#FFFFFF1A] rounded-2xl mt-2 mb-4 p-2"
/>
</div>
@ -278,7 +278,7 @@ export default function CreateImagePost() {
}
autoSize={{ minRows: 6, maxRows: 15 }}
value={formData.paidText}
style={{ "--font-size": "14px" }}
style={{ "--font-size": "16px" }}
className="h-full bg-[#FFFFFF1A] rounded-2xl mt-2 mb-4 p-2"
/>
</div>

View File

@ -233,7 +233,7 @@ export default function CreateVideoPost() {
setFormData((old) => ({ ...old, content: value }))
}
autoSize={{ minRows: 6, maxRows: 15 }}
style={{ "--font-size": "14px" }}
style={{ "--font-size": "16px" }}
className="min-h-32 max-h-96 bg-[#FFFFFF1A] text-white rounded-2xl mt-2 mb-4 p-2"
/>
{formData.isCreatingPaidText && formData.price > 0 && (
@ -246,7 +246,7 @@ export default function CreateVideoPost() {
}
autoSize={{ minRows: 6, maxRows: 15 }}
value={formData.paidText}
style={{ "--font-size": "14px" }}
style={{ "--font-size": "16px" }}
className="min-h-32 max-h-96 bg-[#FFFFFF1A] text-white rounded-2xl mt-2 mb-4 p-2"
/>
</>

View File

@ -295,7 +295,7 @@ export default function EditSpacePost() {
setFormData((old) => ({ ...old, content: value }))
}
autoSize={{ minRows: 6, maxRows: 15 }}
style={{ "--font-size": "14px" }}
style={{ "--font-size": "16px" }}
className="h-full bg-[#FFFFFF1A] rounded-2xl mt-2 mb-4 p-2"
/>
</div>
@ -317,7 +317,7 @@ export default function EditSpacePost() {
? formData.paidText.slice(1)
: formData.paidText
}
style={{ "--font-size": "14px" }}
style={{ "--font-size": "16px" }}
className="bg-[#FFFFFF1A] rounded-2xl mt-2 mb-4 p-2 h-full"
/>
</div>

View File

@ -133,7 +133,8 @@ export default function Setting() {
<div
className="flex justify-between items-center"
onClick={() => {
router.push("spaceIntroSetting/" + streamerInfo.mid);
streamerInfo?.visitor_role == 3 &&
router.push("spaceIntroSetting/" + streamerInfo.mid);
}}
>
<div className="flex items-center">
@ -171,11 +172,17 @@ export default function Setting() {
</ul>
</div>
</div>
<FontAwesomeIcon
icon={faAngleRight}
size="xl"
style={{ maxWidth: "12px" }}
/>
<div
className={`${
streamerInfo?.visitor_role == 3 ? "visible" : "invisible"
}`}
>
<FontAwesomeIcon
icon={faAngleRight}
size="xl"
style={{ maxWidth: "12px" }}
/>
</div>
</div>
<ul className="mt-6">
<li>

View File

@ -3,7 +3,7 @@
import OwnInput from "@/components/OwnInput";
import { Button, Divider, TextArea, Toast } from "antd-mobile";
import React, { useEffect, useState } from "react";
import { useRouter, useSearchParams,useParams } from "next/navigation";
import { useRouter, useSearchParams, useParams } from "next/navigation";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faAngleRight, faAngleLeft } from "@fortawesome/free-solid-svg-icons";
import { getStreamerInfo } from "@/api/space";
@ -17,8 +17,8 @@ export default function SpaceIntroSetting() {
const [spaceIntro, setSpaceIntro] = useState("");
useEffect(() => {
// const _data = decodeURIComponent(searchParams.get("data"));
const {mid} = params
getStreamerInfo(parseInt(mid,10)).then((res) => {
const { mid } = params;
getStreamerInfo(parseInt(mid, 10)).then((res) => {
setData(res);
setSpaceIntro(res?.profile);
});
@ -90,7 +90,10 @@ export default function SpaceIntroSetting() {
onChange={(value) => setSpaceIntro(value)}
placeholder="介绍下你的空间吧~"
className="h-32 bg-[#FFFFFF1A] text-white rounded-2xl mt-2 p-2"
style={{ "--placeholder-color": "#FFFFFF80" }}
style={{
"--placeholder-color": "#FFFFFF80",
"--font-size": "16px",
}}
/>
<Divider />
<div

View File

@ -63,12 +63,15 @@ export default function CreatePost() {
//
if (isSubmitting) return;
setIsSubmitting(true);
const { content, imageAssets, videoAssets} = formData;
const { content, imageAssets, videoAssets } = formData;
const newImageMedia = imageAssets.filter((it) => it.id == undefined);
const type = formData.imageAssets.length > 0 ? 1 : 2;
const media = await multiUploadImage(type==1?newImageMedia:videoAssets, type);
const media = await multiUploadImage(
type == 1 ? newImageMedia : videoAssets,
type
);
// const media = await multiUploadImage(imageAssets);
if(type==1){
if (type == 1) {
media.image_ids = [
...imageAssets.filter((it) => it.id != undefined).map((it) => it.id),
...media.image_ids,
@ -80,9 +83,14 @@ export default function CreatePost() {
media_component: media,
status: 2,
};
const data = await requireAPI("POST", "/api/moment/create", {
body,
},true);
const data = await requireAPI(
"POST",
"/api/moment/create",
{
body,
},
true
);
if (data.ret === -1) {
Toast.show({
icon: "fail",
@ -139,7 +147,7 @@ export default function CreatePost() {
onChange={(value) =>
setFormData((old) => ({ ...old, content: value }))
}
style={{ "--font-size": "14px" }}
style={{ "--font-size": "16px" }}
className="h-full bg-[#FFFFFF1A] rounded-2xl mt-2 mb-4 p-2"
/>
</div>

View File

@ -14,7 +14,7 @@ export default function OwnInput({
disabled = false,
className,
inputClassName = "",
fontSize,
fontSize = 16,
id,
}) {
return (
@ -29,7 +29,7 @@ export default function OwnInput({
onChange={(e) => onChange(e.target?.value)}
value={value}
className={`w-full placeholder:text-[#FFFFFF80] ${inputClassName}`}
style={{ fontSize: `${fontSize || 16}px` }}
style={{ fontSize: `${fontSize}px!important` }}
/>
{clearable && value != "" && (
<div className="w-4 h-4 absolute right-2 top-[2px] flex justify-center items-center bg-[#ffffff33] p-1 rounded-full">