Node.js based forum software built for the modern web
feat: icon replacing user status for remote users, denoting that they are from outside the local instance, #12688
Julian Lama81ef609302b
diff --git a/install/package.json b/install/package.jsonindex 71f51b8bc2..e90227f0ef 100644--- a/install/package.json+++ b/install/package.json@@ -105,7 +105,7 @@"nodebb-plugin-ntfy": "1.7.4","nodebb-plugin-spam-be-gone": "2.2.2","nodebb-rewards-essentials": "1.0.0",- "nodebb-theme-harmony": "2.0.0-pre.30",+ "nodebb-theme-harmony": "2.0.0-pre.31","nodebb-theme-lavender": "7.1.8","nodebb-theme-peace": "2.2.6","nodebb-theme-persona": "13.3.24",diff --git a/public/language/en-GB/global.json b/public/language/en-GB/global.jsonindex c947bb92ae..4ca7816332 100644--- a/public/language/en-GB/global.json+++ b/public/language/en-GB/global.json@@ -132,6 +132,8 @@"invisible": "Invisible","offline": "Offline",+ "remote-user": "This user is from outside of this forum",+"email": "Email","language": "Language",diff --git a/public/openapi/components/schemas/Chats.yaml b/public/openapi/components/schemas/Chats.yamlindex 8dc6349a6d..dc84aca4ef 100644--- a/public/openapi/components/schemas/Chats.yaml+++ b/public/openapi/components/schemas/Chats.yaml@@ -61,6 +61,9 @@ MessageObject:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user account@@ -122,6 +125,9 @@ RoomUserList:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user accountdiff --git a/public/openapi/components/schemas/FlagObject.yaml b/public/openapi/components/schemas/FlagObject.yamlindex 7c488198d3..38e27e8f9e 100644--- a/public/openapi/components/schemas/FlagObject.yaml+++ b/public/openapi/components/schemas/FlagObject.yaml@@ -58,6 +58,9 @@ FlagObject:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.icon:text:type: stringdescription: A single-letter representation of a username. This is used in the@@ -122,6 +125,9 @@ FlagHistoryObject:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.icon:text:type: stringdescription: A single-letter representation of a username. This is used in the@@ -175,6 +181,9 @@ FlagNotesObject:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.icon:text:type: stringdescription: A single-letter representation of a username. This is used in thediff --git a/public/openapi/components/schemas/PostObject.yaml b/public/openapi/components/schemas/PostObject.yamlindex 914ca40837..fec938e820 100644--- a/public/openapi/components/schemas/PostObject.yaml+++ b/public/openapi/components/schemas/PostObject.yaml@@ -40,6 +40,9 @@ PostObject:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user accountdiff --git a/public/openapi/components/schemas/TopicObject.yaml b/public/openapi/components/schemas/TopicObject.yamlindex ee34558ffc..3789aa9518 100644--- a/public/openapi/components/schemas/TopicObject.yaml+++ b/public/openapi/components/schemas/TopicObject.yaml@@ -35,6 +35,9 @@ TopicObject:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user accountdiff --git a/public/openapi/components/schemas/UserObject.yaml b/public/openapi/components/schemas/UserObject.yamlindex 820e77c0a2..e78c106365 100644--- a/public/openapi/components/schemas/UserObject.yaml+++ b/public/openapi/components/schemas/UserObject.yaml@@ -5,6 +5,9 @@ UserObject:type: numberdescription: A user identifierexample: 1+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user account@@ -209,6 +212,9 @@ UserObjectFull:type: numberdescription: A user identifierexample: 1+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user account@@ -540,6 +546,9 @@ UserObjectSlim:type: numberdescription: A user identifierexample: 1+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user account@@ -628,6 +637,9 @@ UserObjectACP:type: numberdescription: A user identifierexample: 1+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user accountdiff --git a/public/openapi/read/admin/manage/digest.yaml b/public/openapi/read/admin/manage/digest.yamlindex f094a3f7b6..34010e8152 100644--- a/public/openapi/read/admin/manage/digest.yaml+++ b/public/openapi/read/admin/manage/digest.yaml@@ -45,6 +45,9 @@ get:type: stringsetting:type: boolean+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.default:type: stringrequired:diff --git a/public/openapi/read/categories.yaml b/public/openapi/read/categories.yamlindex f1126e9dfb..37c0c09d31 100644--- a/public/openapi/read/categories.yaml+++ b/public/openapi/read/categories.yaml@@ -151,6 +151,9 @@ get:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user account@@ -220,6 +223,9 @@ get:uid:type: numberexample: 1+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringexample: Dragon Fruitdiff --git a/public/openapi/read/index.yaml b/public/openapi/read/index.yamlindex a984fb35dc..f6c09d7c21 100644--- a/public/openapi/read/index.yaml+++ b/public/openapi/read/index.yaml@@ -178,6 +178,9 @@ get:`icon:text` for the user'sauto-generated iconexample: "#f44336"+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.index:type: numbercid:@@ -242,6 +245,9 @@ get:'icon:bgColor':type: stringexample: '#9c27b0'+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.imageClass:type: string- $ref: ../components/schemas/Pagination.yaml#/Paginationdiff --git a/public/openapi/read/notifications.yaml b/public/openapi/read/notifications.yamlindex 14c0d054ce..015b6fae33 100644--- a/public/openapi/read/notifications.yaml+++ b/public/openapi/read/notifications.yaml@@ -49,6 +49,9 @@ get:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.icon:text:type: stringdescription: A single-letter representation of a username. This is used in thediff --git a/public/openapi/read/topic/topic_id.yaml b/public/openapi/read/topic/topic_id.yamlindex 3c04bf5b08..a4fb127d59 100644--- a/public/openapi/read/topic/topic_id.yaml+++ b/public/openapi/read/topic/topic_id.yaml@@ -90,6 +90,9 @@ get:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user account@@ -428,6 +431,9 @@ get:type: stringdisplayname:type: string+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.- type: objectdescription: Optional properties that may or may not be present (except for `tid`, which is always present, and is only here as a hack to pass validation)properties:diff --git a/public/openapi/read/unread.yaml b/public/openapi/read/unread.yamlindex 307a85b3b6..e916231d65 100644--- a/public/openapi/read/unread.yaml+++ b/public/openapi/read/unread.yaml@@ -66,6 +66,9 @@ get:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user accountdiff --git a/public/openapi/read/user/userslug/chats/roomid.yaml b/public/openapi/read/user/userslug/chats/roomid.yamlindex bd0ae278fd..51788d3150 100644--- a/public/openapi/read/user/userslug/chats/roomid.yaml+++ b/public/openapi/read/user/userslug/chats/roomid.yaml@@ -90,6 +90,9 @@ get:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user account@@ -141,6 +144,9 @@ get:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user account@@ -213,6 +219,9 @@ get:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user account@@ -268,6 +277,9 @@ get:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user account@@ -306,6 +318,9 @@ get:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user account@@ -366,6 +381,9 @@ get:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user account@@ -419,6 +437,9 @@ get:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user account@@ -457,6 +478,9 @@ get:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user accountdiff --git a/public/openapi/read/users.yaml b/public/openapi/read/users.yamlindex 160aa927d0..7fb7e7011c 100644--- a/public/openapi/read/users.yaml+++ b/public/openapi/read/users.yaml@@ -35,6 +35,9 @@ get:uid:type: numberdescription: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user accountdiff --git a/public/openapi/write/categories/cid/moderator/uid.yaml b/public/openapi/write/categories/cid/moderator/uid.yamlindex 3cbcd4951b..78ca52ca96 100644--- a/public/openapi/write/categories/cid/moderator/uid.yaml+++ b/public/openapi/write/categories/cid/moderator/uid.yaml@@ -64,6 +64,9 @@ put:type: numberdescription: A user identifierexample: 1+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.username:type: stringdescription: A friendly name for a given user accountdiff --git a/src/user/data.js b/src/user/data.jsindex 162a65317f..6ce3df70e3 100644--- a/src/user/data.js+++ b/src/user/data.js@@ -285,6 +285,8 @@ module.exports = function (User) {user.banned = false;}}++ user.isLocal = utils.isNumber(user.uid);});if (unbanUids.length) {await User.bans.unban(unbanUids, '[[user:info.ban-expired]]');