From 8c857a85ac9af08ebec1c94031ca7c54bed34c38 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 4 Dec 2021 21:36:02 -0500 Subject: [PATCH] pad: Use `null` as default for `userName`, `userColor` options These options are used as strings, so it doesn't make sense to default them to a boolean value. Note that this change has no effect due to a bug in how pad options are processed; that bug will be fixed in a future commit. --- doc/docker.md | 4 ++-- settings.json.docker | 4 ++-- settings.json.template | 4 ++-- src/node/utils/Settings.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/docker.md b/doc/docker.md index 238b2cfb..b6697d75 100644 --- a/doc/docker.md +++ b/doc/docker.md @@ -116,8 +116,8 @@ If your database needs additional settings, you will have to use a personalized | `PAD_OPTIONS_SHOW_CHAT` | | `true` | | `PAD_OPTIONS_SHOW_LINE_NUMBERS` | | `true` | | `PAD_OPTIONS_USE_MONOSPACE_FONT` | | `false` | -| `PAD_OPTIONS_USER_NAME` | | `false` | -| `PAD_OPTIONS_USER_COLOR` | | `false` | +| `PAD_OPTIONS_USER_NAME` | | `null` | +| `PAD_OPTIONS_USER_COLOR` | | `null` | | `PAD_OPTIONS_RTL` | | `false` | | `PAD_OPTIONS_ALWAYS_SHOW_CHAT` | | `false` | | `PAD_OPTIONS_CHAT_AND_USERS` | | `false` | diff --git a/settings.json.docker b/settings.json.docker index 338bfc95..1642579e 100644 --- a/settings.json.docker +++ b/settings.json.docker @@ -234,8 +234,8 @@ "showChat": "${PAD_OPTIONS_SHOW_CHAT:true}", "showLineNumbers": "${PAD_OPTIONS_SHOW_LINE_NUMBERS:true}", "useMonospaceFont": "${PAD_OPTIONS_USE_MONOSPACE_FONT:false}", - "userName": "${PAD_OPTIONS_USER_NAME:false}", - "userColor": "${PAD_OPTIONS_USER_COLOR:false}", + "userName": "${PAD_OPTIONS_USER_NAME:null}", + "userColor": "${PAD_OPTIONS_USER_COLOR:null}", "rtl": "${PAD_OPTIONS_RTL:false}", "alwaysShowChat": "${PAD_OPTIONS_ALWAYS_SHOW_CHAT:false}", "chatAndUsers": "${PAD_OPTIONS_CHAT_AND_USERS:false}", diff --git a/settings.json.template b/settings.json.template index 9bb04091..b802248f 100644 --- a/settings.json.template +++ b/settings.json.template @@ -235,8 +235,8 @@ "showChat": true, "showLineNumbers": true, "useMonospaceFont": false, - "userName": false, - "userColor": false, + "userName": null, + "userColor": null, "rtl": false, "alwaysShowChat": false, "chatAndUsers": false, diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index 4beba396..42d29edb 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -165,8 +165,8 @@ exports.padOptions = { showChat: true, showLineNumbers: true, useMonospaceFont: false, - userName: false, - userColor: false, + userName: null, + userColor: null, rtl: false, alwaysShowChat: false, chatAndUsers: false,