Skip to content

Commit

Permalink
fix: ChatGPTNextWeb#1401 try to disable zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidadaa committed May 11, 2023
1 parent b4c687a commit 560d90f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const metadata = {
title: "ChatGPT Next Web",
statusBarStyle: "default",
},
themeColor: "#fafafa",
viewport: "width=device-width, initial-scale=1, maximum-scale=1",
};

export default function RootLayout({
Expand All @@ -25,8 +25,9 @@ export default function RootLayout({
<html lang="en">
<head>
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
name="theme-color"
content="#fafafa"
media="(prefers-color-scheme: light)"
/>
<meta
name="theme-color"
Expand Down
2 changes: 1 addition & 1 deletion app/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const makeRequestParam = (
};
};

function getHeaders() {
export function getHeaders() {
const accessStore = useAccessStore.getState();
let headers: Record<string, string> = {};

Expand Down
4 changes: 4 additions & 0 deletions app/store/access.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { create } from "zustand";
import { persist } from "zustand/middleware";
import { StoreKey } from "../constant";
import { getHeaders } from "../requests";
import { BOT_HELLO } from "./chat";
import { ALL_MODELS } from "./config";

Expand Down Expand Up @@ -55,6 +56,9 @@ export const useAccessStore = create<AccessControlStore>()(
fetch("/api/config", {
method: "post",
body: null,
headers: {
...getHeaders(),
},
})
.then((res) => res.json())
.then((res: DangerConfig) => {
Expand Down

0 comments on commit 560d90f

Please sign in to comment.