mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-13 08:55:48 +01:00
🔥 Remove logs and rephrase modal
This commit is contained in:
@@ -38,7 +38,8 @@ function ModalContent() {
|
|||||||
<Stack>
|
<Stack>
|
||||||
<Text size="sm">
|
<Text size="sm">
|
||||||
In order to toggle edit mode, you need to enter the password you entered in the
|
In order to toggle edit mode, you need to enter the password you entered in the
|
||||||
environment variable named <Code>EDIT_MODE_PASSWORD</Code>
|
environment variable named <Code>EDIT_MODE_PASSWORD</Code> . If it is not set, you are not
|
||||||
|
able to toggle edit mode on and off.
|
||||||
</Text>
|
</Text>
|
||||||
<PasswordInput
|
<PasswordInput
|
||||||
id="triedPassword"
|
id="triedPassword"
|
||||||
@@ -47,9 +48,7 @@ function ModalContent() {
|
|||||||
required
|
required
|
||||||
{...form.getInputProps('triedPassword')}
|
{...form.getInputProps('triedPassword')}
|
||||||
/>
|
/>
|
||||||
<Button type="submit">
|
<Button type="submit">Submit</Button>
|
||||||
Submit
|
|
||||||
</Button>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { NextApiRequest, NextApiResponse } from 'next';
|
|||||||
function Post(req: NextApiRequest, res: NextApiResponse) {
|
function Post(req: NextApiRequest, res: NextApiResponse) {
|
||||||
const { tried } = req.body;
|
const { tried } = req.body;
|
||||||
// Try to match the password with the EDIT_PASSWORD env variable
|
// Try to match the password with the EDIT_PASSWORD env variable
|
||||||
Consola.log(req.body, process.env.EDIT_MODE_PASSWORD);
|
|
||||||
if (tried === process.env.EDIT_MODE_PASSWORD) {
|
if (tried === process.env.EDIT_MODE_PASSWORD) {
|
||||||
process.env.DISABLE_EDIT_MODE = process.env.DISABLE_EDIT_MODE === 'true' ? 'false' : 'true';
|
process.env.DISABLE_EDIT_MODE = process.env.DISABLE_EDIT_MODE === 'true' ? 'false' : 'true';
|
||||||
return res.status(200).json({
|
return res.status(200).json({
|
||||||
|
|||||||
Reference in New Issue
Block a user