From 13164b89aa92feb25197eba27426c4bfe9bea1f5 Mon Sep 17 00:00:00 2001 From: Zodiac Date: Mon, 29 Dec 2025 18:36:50 -0800 Subject: [PATCH] feat: Lock webchat to irc.supernets.org with simplified connect form This commit configures Hard Lounge as a dedicated webchat client for SuperNETs IRC, requiring only a nickname to connect. - Set `public: true` to enable public mode (no user accounts required) - Set `lockNetwork: true` to lock connections to irc.supernets.org only Users will automatically connect to irc.supernets.org:6697 (TLS) and join #superbowl upon entering a nickname. - Added simplified connect form for public + lockNetwork mode - Form now shows only the nickname field when both settings are enabled - Hidden fields: server, port, TLS, username, realname, channels, leave message, authentication options - Added CSS styling for proper spacing on simplified form - Pinned to Node 20 Alpine (from lts-alpine) for compatibility - Added py3-setuptools to fix distutils module error with Python 3.12 - Fixed file ownership with --chown=node:node on COPY commands - Moved USER node directive after COPY to fix permission issues - Pre-create /var/opt/hardlounge directory with correct ownership --- Dockerfile | 14 +- client/components/NetworkForm.vue | 236 +++++++++++++++++------------- defaults/config.js | 4 +- 3 files changed, 143 insertions(+), 111 deletions(-) diff --git a/Dockerfile b/Dockerfile index fff02ff1..7537170d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,20 @@ -FROM node:lts-alpine -RUN apk add --no-cache --virtual=build-dependencies build-base git python3-dev && \ +FROM node:20-alpine +RUN apk add --no-cache --virtual=build-dependencies build-base git python3-dev py3-setuptools && \ apk add --no-cache yarn -USER node WORKDIR /var/opt/hardlounge-src ENV THELOUNGE_HOME /var/opt/hardlounge -COPY package.json yarn.lock . +COPY --chown=node:node package.json yarn.lock . +USER node RUN yarn install -COPY . . +COPY --chown=node:node . . RUN NODE_ENV=production yarn build && \ yarn link && \ yarn --non-interactive cache clean && \ ln -s /var/opt/hardlounge-src/index.js /var/opt/hardlounge-src/hardlounge USER root -RUN apk del --purge build-dependencies +RUN apk del --purge build-dependencies && \ + mkdir -p /var/opt/hardlounge && \ + chown -R node:node /var/opt/hardlounge USER node EXPOSE 9000 CMD ["/var/opt/hardlounge-src/hardlounge", "start"] \ No newline at end of file diff --git a/client/components/NetworkForm.vue b/client/components/NetworkForm.vue index d55698f5..06f16f2c 100644 --- a/client/components/NetworkForm.vue +++ b/client/components/NetworkForm.vue @@ -206,122 +206,143 @@ -

User preferences

-
- - -
-