Skip to content

Commit

Permalink
Merge pull request #25 from nattvara/fix-header
Browse files Browse the repository at this point in the history
Fix header buttons and disable caching
  • Loading branch information
nattvara authored Mar 5, 2023
2 parents e5ef8a8 + 5b43a65 commit 0bf1938
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
2 changes: 2 additions & 0 deletions proxy/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_no_cache 1;
proxy_cache_bypass 1;
}

location /api {
Expand Down
2 changes: 2 additions & 0 deletions web-ui/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ server {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
proxy_no_cache 1;
proxy_cache_bypass 1;
}
}
8 changes: 8 additions & 0 deletions web-ui/src/components/main/frame.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,11 @@ h1.huge {
.logo {
border-radius: 5px;
}

.header_btn {
width: fit-content;
float: left;
margin-left: 5px;
margin-right: 5px;
margin-top: 5px;
}
12 changes: 8 additions & 4 deletions web-ui/src/components/main/frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,20 @@ function Frame(props: FrameProps) {
<h1 className={styles.subtitle}>
Ask GPT-3 questions about KTH lectures
</h1>
<div className={styles.subtitle}>
<Space direction="horizontal">
<Row className={styles.subtitle} justify="center">
<Col className={styles.header_btn}>
<Button type="dashed" onClick={() => goToGithub()}>
<GithubOutlined /> Source Code
</Button>
</Col>
<Col className={styles.header_btn}>
<Link href="/about">
<Button type="dashed">
<FileTextOutlined /> About
</Button>
</Link>
</Col>
<Col className={styles.header_btn}>
<Link
href="https://github.com/nattvara/kthGPT/releases"
target="_blank"
Expand All @@ -77,8 +81,8 @@ function Frame(props: FrameProps) {
{!isProduction && <>Development build</>}
</Button>
</Link>
</Space>
</div>
</Col>
</Row>
</>
)}
</div>
Expand Down

0 comments on commit 0bf1938

Please sign in to comment.