From 2c5d2f86e46a52223f07d573b152bad5174ee2d9 Mon Sep 17 00:00:00 2001 From: zyachel Date: Sat, 28 Jan 2023 19:06:21 +0530 Subject: [PATCH] feat: add info related to the current instance this commit adds additional info about instance like release tag and instance maintainer contact. fix: https://codeberg.org/zyachel/libremdb/issues/8 --- .env.local.example | 8 +++ src/pages/contact/index.tsx | 72 ++++++++++++------- src/pages/privacy/index.tsx | 44 +++++++++--- .../modules/pages/contact/contact.module.scss | 8 +-- .../modules/pages/privacy/privacy.module.scss | 2 +- 5 files changed, 95 insertions(+), 39 deletions(-) diff --git a/.env.local.example b/.env.local.example index 1fb22b1..da493b4 100644 --- a/.env.local.example +++ b/.env.local.example @@ -28,3 +28,11 @@ NEXT_TELEMETRY_DISABLED=1 # USE_REDIS=true ## for docker, just set the domain to the container name, default is 'libremdb_redis' REDIS_URL=localhost:6379 + +################################################################################ +### 4. INSTANCE META FIELDS(not required but good to have) +################################################################################ +## example: 'https://iket.me'. +NEXT_PUBLIC_INSTANCE_MAIN_URL= +## eg: 'zyachel' +NEXT_PUBLIC_INSTANCE_NAME= \ No newline at end of file diff --git a/src/pages/contact/index.tsx b/src/pages/contact/index.tsx index c298b96..ab25ea3 100644 --- a/src/pages/contact/index.tsx +++ b/src/pages/contact/index.tsx @@ -7,38 +7,58 @@ const Contact = () => { return ( <> - +

Contact

-
-

- You can use{' '} - - GitHub - {' '} - or{' '} - - Codeberg - {' '} - for general issues, questions, or requests. -

-

- In case you wish to contact me personally, I'm reachable via{' '} - - [matrix] - {' '} - and{' '} - - email - - . -

+
+

+ For any issues, questions, bugs, or requests regarding the + service, you can go to{' '} + + GitHub + + . +

+

+ Alternatively, you can visit{' '} + + the repository on Codeberg + + . +

+
+ {process.env.NEXT_PUBLIC_INSTANCE_MAIN_URL && ( +
+

+ If you have some questions related to this instance,{' '} + + contact instance maintainer(s) + + . +

+
+ )} +
+

+ In case you wish to contact me(the dev) personally,{' '} + + here you go + + :) +

+
diff --git a/src/pages/privacy/index.tsx b/src/pages/privacy/index.tsx index 2246d41..fd1585c 100644 --- a/src/pages/privacy/index.tsx +++ b/src/pages/privacy/index.tsx @@ -1,14 +1,14 @@ import Meta from '../../components/meta/Meta'; import Layout from '../../layouts/Layout'; - +import packageInfo from '../../../package.json'; import styles from '../../styles/modules/pages/privacy/privacy.module.scss'; const Privacy = () => { return ( <>
@@ -16,15 +16,15 @@ const Privacy = () => { Privacy Policy
-
+

Information collected

No information is collected.

-
-
+
+

@@ -40,12 +40,40 @@ const Privacy = () => { prefrences, either turn off JavaScript or disable access to Local Storage for libremdb.

- +

+
+

+ Instance information +

+ {process.env.NEXT_PUBLIC_INSTANCE_NAME && + process.env.NEXT_PUBLIC_INSTANCE_MAIN_URL && ( +

+ Operated by:  + + {process.env.NEXT_PUBLIC_INSTANCE_NAME} + +

+ )} +

+ Version:  + + {packageInfo.version} + +

+