mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Sending cookies with fetch, bg color change
This commit is contained in:
parent
9f576a41f6
commit
cbba4cd616
10 changed files with 21 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"apiUrl": "http://api.frylabs.net/",
|
||||
"apiUrl": "https://api.frylabs.net/",
|
||||
"mobileWindowWidth": 700,
|
||||
"maxQuestionsToRender": 250
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
:root {
|
||||
--text-color: #9999ff;
|
||||
--bright-color: #f2f2f2;
|
||||
--background-color: #212127;
|
||||
--background-color: #222426;
|
||||
--hoover-color: #202020;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ a {
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
width: 200px;
|
||||
background-color: #212127;
|
||||
background-color: #222426;
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
|
|
|
@ -10,7 +10,7 @@ class MyDocument extends Document {
|
|||
return (
|
||||
<Html>
|
||||
<Head />
|
||||
<body bgcolor='#212127'>
|
||||
<body bgcolor='#222426'>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
|
|
|
@ -12,7 +12,9 @@ export default function AllQuestions (props) {
|
|||
const [searchTerm, setSearchTerm] = useState('')
|
||||
|
||||
useEffect(() => {
|
||||
fetch(`${constants.apiUrl}data.json`)
|
||||
fetch(`${constants.apiUrl}data.json`, {
|
||||
credentials: 'include'
|
||||
})
|
||||
.then((resp) => {
|
||||
return resp.json()
|
||||
})
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.searchBar {
|
||||
margin: 10px;
|
||||
color: white;
|
||||
background-color: #212127;
|
||||
background-color: #222426;
|
||||
border: none;
|
||||
font-size: 18px;
|
||||
flex-grow: 1;
|
||||
|
|
|
@ -73,6 +73,7 @@ export default function Feedback (props) {
|
|||
|
||||
const rawResponse = await fetch(constants.apiUrl + 'postfeedback', {
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -102,6 +103,7 @@ export default function Feedback (props) {
|
|||
|
||||
const rawFileResponse = await fetch(constants.apiUrl + 'postfeedbackfile', {
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
'Accept': 'application/json'
|
||||
},
|
||||
|
|
|
@ -16,7 +16,9 @@ export default function Index (props) {
|
|||
|
||||
useEffect(() => {
|
||||
console.info('Fetching news.json')
|
||||
fetch(`${constants.apiUrl}news.json`) // eslint-disable-line
|
||||
fetch(`${constants.apiUrl}news.json`, {
|
||||
credentials: 'include'
|
||||
})
|
||||
.then((resp) => {
|
||||
return resp.json()
|
||||
})
|
||||
|
@ -27,7 +29,9 @@ export default function Index (props) {
|
|||
|
||||
useEffect(() => {
|
||||
console.info('Fetching data')
|
||||
fetch(`${constants.apiUrl}motd`)
|
||||
fetch(`${constants.apiUrl}motd`, {
|
||||
credentials: 'include'
|
||||
})
|
||||
.then((resp) => {
|
||||
return resp.text()
|
||||
})
|
||||
|
|
|
@ -18,7 +18,9 @@ export default function SubjectBrowser (props) {
|
|||
|
||||
useEffect(() => {
|
||||
console.info('Fetching data')
|
||||
fetch(`${constants.apiUrl}data.json`)
|
||||
fetch(`${constants.apiUrl}data.json`, {
|
||||
credentials: 'include'
|
||||
})
|
||||
.then((resp) => {
|
||||
return resp.json()
|
||||
})
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.searchBar {
|
||||
margin: 10px;
|
||||
color: white;
|
||||
background-color: #212127;
|
||||
background-color: #222426;
|
||||
border: none;
|
||||
font-size: 18px;
|
||||
flex-grow: 1;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<style>
|
||||
:root{
|
||||
--size: 100px;
|
||||
--bgcolor: #212127;
|
||||
--bgcolor: #222426;
|
||||
--color: #fcff4f;
|
||||
--shadow: rgba(30,2,5,.2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue