commit 154c3af36b7db5502fec26ad380079c712de0756 parent ca1154898acf5826d4093d7f6a6f5066a517b26e Author: MTRNord <mtrnord1@gmail.com> Date: Sun, 9 Jan 2022 19:27:31 +0100 Fix matrix server var not being correctly passed and add autocomplete fields Diffstat:
| M | helpers/matrix_client.ts | | | 2 | +- |
| M | pages/login.tsx | | | 4 | ++-- |
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/helpers/matrix_client.ts b/helpers/matrix_client.ts @@ -2,7 +2,7 @@ import { MatrixEvent } from './event_types'; import Storage from './storage'; -export const constMatrixArtServer = process.env.NEXT_PUBLIC_DEFAULT_SERVER_URL as string; +export const constMatrixArtServer = process.env.NEXT_PUBLIC_DEFAULT_SERVER_URL || "https://matrix.art.midnightthoughts.space"; export default class MatrixClient { private joinedRooms: Map<any, any>; diff --git a/pages/login.tsx b/pages/login.tsx @@ -153,13 +153,13 @@ class Login extends PureComponent<Props, State> { <label className="block"> <span className="text-gray-900 dark:text-gray-200 visually-hidden">Username:</span> <div className="bg-teal-600 mt-1 w-full flex flex-row box-border items-center cursor-text duration-300 rounded-sm border dark:border-slate-400 border-slate-500 py-1.5 px-2 focus-within:border-teal-400"> - <input placeholder="Username" className=" bg-transparent min-w-[1.25rem] focus:outline-none flex-[1] border-none text-gray-900 dark:text-gray-200 placeholder:text-gray-900" type="text" name="mxid" value={mxid} onChange={this.handleInputChange} /> + <input placeholder="Username" autoComplete="username" className=" bg-transparent min-w-[1.25rem] focus:outline-none flex-[1] border-none text-gray-900 dark:text-gray-200 placeholder:text-gray-900" type="text" name="mxid" value={mxid} onChange={this.handleInputChange} /> </div> </label> <label className="block"> <span className="text-gray-900 dark:text-gray-200 visually-hidden">Password:</span> <div className="bg-teal-600 mt-1 w-full flex flex-row box-border items-center cursor-text duration-300 rounded-sm border dark:border-slate-400 border-slate-500 py-1.5 px-2 focus-within:border-teal-400"> - <input placeholder="Password" className="bg-transparent min-w-[1.25rem] focus:outline-none flex-[1] border-none text-gray-900 dark:text-gray-200 placeholder:text-gray-900" type="password" name="password" value={password} onChange={this.handleInputChange} /> + <input placeholder="Password" autoComplete="current-password" className="bg-transparent min-w-[1.25rem] focus:outline-none flex-[1] border-none text-gray-900 dark:text-gray-200 placeholder:text-gray-900" type="password" name="password" value={password} onChange={this.handleInputChange} /> </div> </label>