Skip to content

Commit

Permalink
browser adapter: using margin instead of gap to avoid browser compati…
Browse files Browse the repository at this point in the history
…bility issues
  • Loading branch information
zmh-program committed Oct 22, 2023
1 parent cb5829b commit dd048b6
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
7 changes: 4 additions & 3 deletions app/src/assets/editor.less
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@
}

.editor-toolbar {
display: flex;
flex-direction: row;
display: grid;
grid-auto-flow: column;
align-items: flex-end;
gap: 4px;
margin: 4px 0;
width: max-content;
margin: 4px 0 4px auto;
}
3 changes: 1 addition & 2 deletions app/src/assets/generation.less
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
align-items: center;
flex-grow: 1;
padding: 15vh 0;
gap: 2rem;

.box {
display: flex;
Expand Down Expand Up @@ -148,7 +147,7 @@
display: flex;
flex-direction: row;
width: 80%;
margin: 0 auto;
margin: 2rem auto;
max-width: 680px;

.input {
Expand Down
12 changes: 10 additions & 2 deletions app/src/assets/home.less
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,15 @@
touch-action: pan-y;
padding: 18px;
scrollbar-width: thin;
gap: 8px;

// using margin instead of gap to avoid browser compatibility issues
& > * {
margin-bottom: 8px;

&:last-child {
margin-bottom: 0;
}
}

&::-webkit-scrollbar {
width: 6px;
Expand Down Expand Up @@ -325,7 +333,7 @@
}

.input-options {
margin: 16px auto 2px;
margin: 6px auto 2px;
display: flex;
flex-direction: row;
align-items: center;
Expand Down
9 changes: 8 additions & 1 deletion app/src/assets/navbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@
flex-direction: row;
align-content: center;
vertical-align: center;
gap: 10px;

& > * {
margin-right: 8px;

&:last-child {
margin-right: 0;
}
}
}

.logo {
Expand Down
2 changes: 1 addition & 1 deletion app/src/routes/Quota.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ function Quota() {
<div className={`tip`}>
<p>{t("buy.tip")}</p>
<Button variant={`outline`} asChild>
<a href={`https://openai.com/pricing`} target={`_blank`}>
<a href={`https://docs.chatnio.net`} target={`_blank`}>
<ExternalLink className={`h-4 w-4 mr-2`} />
{t("buy.learn-more")}
</a>
Expand Down

0 comments on commit dd048b6

Please sign in to comment.