Skip to content

Commit

Permalink
Fix the layout on tablets and mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
RodBrowning committed Apr 28, 2023
1 parent eef3b09 commit 42e0587
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Binary file modified build/webchatgpt-3.2.7-chrome.zip
Binary file not shown.
Binary file modified build/webchatgpt-3.2.7-firefox.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions src/components/toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ const Toolbar = ({ textarea }: ToolbarProps) => {
</div>

return (
<div className="wcg-flex wcg-flex-col wcg-gap-0">
<div className="wcg-toolbar wcg-flex wcg-items-center wcg-gap-2 wcg-rounded-md wcg-px-1">
<div className="wcg-flex wcg-flex-col wcg-gap-1 wcg-py-1">
<div className="wcg-toolbar wcg-flex wcg-justify-center wcg-items-center wcg-gap-2 wcg-rounded-md wcg-px-1">
<div className="wcg-btn-xs wcg-btn focus:wcg-ring-2 focus:wcg-ring-white"
tabIndex={0}
onClick={() => Browser.runtime.sendMessage("show_options")}
Expand Down
4 changes: 2 additions & 2 deletions src/content-scripts/mainUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ async function updateUI() {
async function renderToolbar() {

try {
const textareaParentParent = textarea?.parentElement?.parentElement
const textareaParentParent = textarea?.parentElement?.parentElement?.parentElement?.parentElement
const { shadowRootDiv, shadowRoot } = await createShadowRoot('content-scripts/mainUI.css')
shadowRootDiv.classList.add('wcg-toolbar')
textareaParentParent?.appendChild(shadowRootDiv)
textareaParentParent?.insertBefore(shadowRootDiv, textareaParentParent?.childNodes[1])
render(<Toolbar textarea={textarea} />, shadowRoot)

} catch (e) {
Expand Down

0 comments on commit 42e0587

Please sign in to comment.