补全丢失css;删除登录前获取剪贴板和设备信息;将获取设备信息移动到登录时

This commit is contained in:
yezian 2024-04-23 17:42:27 +08:00
parent 001fbb149e
commit a9fe9be78e
5 changed files with 74 additions and 23 deletions

12
App.jsx
View File

@ -56,7 +56,7 @@ import UpdateModal from "./components/UpdateModal";
import StreamerNavigatorModal from "./components/StreamerNavigatorModal";
import { Icon } from "@rneui/themed";
import { StatusBar } from "expo-status-bar";
import { save, get, remove, storeAppInfo } from "./utils/storeInfo";
import { save, get, remove } from "./utils/storeInfo";
import baseRequest from "./utils/baseRequest";
import { generateSignature } from "./utils/crypto";
import * as Clipboard from "expo-clipboard";
@ -161,9 +161,6 @@ const App = () => {
useEffect(() => {
async function prepare() {
try {
//app
storeAppInfo();
const token = await get("token");
const account = await get("account");
const base = await baseRequest();
@ -233,13 +230,6 @@ const App = () => {
setInviterCode(null);
}, []);
//,
useEffect(() => {
if (state.isSignin) return;
if (!checked) return; //
getClipboardContent();
}, [checked]);
//
useEffect(() => {
if (!state.isSignin) return;

View File

@ -9,7 +9,7 @@ import { cryptoPassword, generateSignature } from "../../../utils/crypto";
import { JSEncrypt } from "jsencrypt";
import MyDivider from "../../../components/MyDivider";
import baseRequest from "../../../utils/baseRequest";
import { get, save } from "../../../utils/storeInfo";
import { get, save, storeAppInfo } from "../../../utils/storeInfo";
export default function PasswordLogin() {
const { signIn, checked, setChecked } = useContext(AuthContext);
@ -72,6 +72,8 @@ export default function PasswordLogin() {
});
return;
}
//app
await storeAppInfo();
//RSA
const encrypt = new JSEncrypt();
encrypt.setPublicKey(process.env.EXPO_PUBLIC_RSA_KEY);

View File

@ -8,7 +8,7 @@ import { AuthContext } from "../../../App";
import { JSEncrypt } from "jsencrypt";
import MyDivider from "../../../components/MyDivider";
import baseRequest from "../../../utils/baseRequest";
import { get, save } from "../../../utils/storeInfo";
import { get, save, storeAppInfo } from "../../../utils/storeInfo";
import { generateSignature } from "../../../utils/crypto";
export default function PhoneNumLogin() {
@ -125,7 +125,8 @@ export default function PhoneNumLogin() {
});
return;
}
//app
await storeAppInfo();
//RSA
const encrypt = new JSEncrypt();
encrypt.setPublicKey(process.env.EXPO_PUBLIC_RSA_KEY);

View File

@ -42,10 +42,6 @@
right: 0.5rem
}
.right-3 {
right: 0.75rem
}
.right-5 {
right: 1.25rem
}
@ -177,10 +173,22 @@
margin-right: 1rem
}
.mt-0 {
margin-top: 0px
}
.mt-0\.5 {
margin-top: 0.125rem
}
.mt-1 {
margin-top: 0.25rem
}
.mt-1\.5 {
margin-top: 0.375rem
}
.mt-14 {
margin-top: 3.5rem
}
@ -273,6 +281,10 @@
height: 8rem
}
.h-48 {
height: 12rem
}
.h-5 {
height: 1.25rem
}
@ -496,6 +508,11 @@
border-top-right-radius: 1rem
}
.rounded-t-3xl {
border-top-left-radius: 1.5rem;
border-top-right-radius: 1.5rem
}
.border {
border-width: 1px
}
@ -715,6 +732,11 @@
padding-right: 0.5rem
}
.px-2\.5 {
padding-left: 0.625rem;
padding-right: 0.625rem
}
.px-3 {
padding-left: 0.75rem;
padding-right: 0.75rem
@ -945,6 +967,10 @@
color: rgb(255 255 255 / var(--tw-text-opacity))
}
.underline {
text-decoration-line: underline
}
.opacity-70 {
opacity: 0.7
}

View File

@ -54,11 +54,6 @@
"right": 8
}
},
"right-3": {
"style": {
"right": 12
}
},
"right-5": {
"style": {
"right": 20
@ -227,11 +222,26 @@
"marginRight": 16
}
},
"mt-0": {
"style": {
"marginTop": 0
}
},
"mt-0.5": {
"style": {
"marginTop": 2
}
},
"mt-1": {
"style": {
"marginTop": 4
}
},
"mt-1.5": {
"style": {
"marginTop": 6
}
},
"mt-14": {
"style": {
"marginTop": 56
@ -347,6 +357,11 @@
"height": 128
}
},
"h-48": {
"style": {
"height": 192
}
},
"h-5": {
"style": {
"height": 20
@ -650,6 +665,12 @@
"borderTopRightRadius": 16
}
},
"rounded-t-3xl": {
"style": {
"borderTopLeftRadius": 24,
"borderTopRightRadius": 24
}
},
"border": {
"style": {
"borderTopWidth": 1,
@ -959,6 +980,12 @@
"paddingRight": 8
}
},
"px-2.5": {
"style": {
"paddingLeft": 10,
"paddingRight": 10
}
},
"px-3": {
"style": {
"paddingLeft": 12,
@ -1240,6 +1267,11 @@
"color": "rgb(255 255 255 / var(--tw-text-opacity))"
}
},
"underline": {
"style": {
"textDecorationLine": "underline"
}
},
"opacity-70": {
"style": {
"opacity": 0.7