Skip to content

Commit 8ad1769

Browse files
Merge pull request #102 from OpenSIST/dev
fix scroll bug in safari
2 parents caefc46 + b60b634 commit 8ad1769

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
},
4747
"scripts": {
4848
"start_win": "set PORT=61234 && react-scripts start",
49-
"start_unix": "export PORT=61234 && react-scripts start",
49+
"start_unix": "export PORT=61234 HTTPS=true && react-scripts start",
5050
"build": "CI=false react-scripts build",
5151
"test": "react-scripts test",
5252
"eject": "臭小子别乱碰这个 react-scripts eject"

src/Components/common.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function LoadingBackdrop() {
1818
const loading = navigation.state !== 'idle';
1919
// const loading = navigation.state === 'loading';
2020
return (
21-
<Backdrop open={loading} sx={{zIndex: 99999}} transitionDuration={1000}>
21+
<Backdrop open={loading} sx={{zIndex: 99999}} transitionDuration={1000} style={{pointerEvents: "none"}} >
2222
<CircularProgress color="inherit"/>
2323
</Backdrop>
2424
)

src/Data/UserData.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export async function setUserInfo(user_info) {
7878
export async function logout() {
7979
const response = await fetch(LOGOUT, {
8080
method: 'POST',
81+
credentials: 'include',
8182
headers: await headerGenerator(true),
8283
})
8384
if (response.status !== 200 && response.status !== 401) {
@@ -136,6 +137,7 @@ export async function getAvatar(avatarId, displayName = null, isRefresh = false)
136137
if (isRefresh || !avatar || (Date.now() - avatar['Date']) > CACHE_EXPIRATION) {
137138
const response = await fetch(GET_AVATAR, {
138139
method: 'POST',
140+
credentials: 'include',
139141
headers: await headerGenerator(true),
140142
body: JSON.stringify({avatar_id: avatarId})
141143
})
@@ -212,6 +214,7 @@ export async function getDisplayName(isRefresh = false) {
212214
if (isRefresh || !displayName || (Date.now() - displayName['Date']) > CACHE_EXPIRATION) {
213215
const response = await fetch(GET_DISPLAY_NAME, {
214216
method: 'POST',
217+
credentials: 'include',
215218
headers: await headerGenerator(true),
216219
})
217220
await handleErrors(response);
@@ -242,6 +245,7 @@ export async function toggleAnonymous() {
242245

243246
const response = await fetch(TOGGLE_NICKNAME, {
244247
method: 'POST',
248+
credentials: 'include',
245249
headers: await headerGenerator(true),
246250
});
247251
await handleErrors(response);

0 commit comments

Comments
 (0)