Fandom Developers Wiki
No edit summary
(oops)
Line 4: Line 4:
 
| Image file = UserStatus.png
 
| Image file = UserStatus.png
 
| Description = {{{description|Displays a user's status on their masthead.}}}
 
| Description = {{{description|Displays a user's status on their masthead.}}}
| Status = beta
+
| Status = stable
 
| Author = [[User:Americhino|Americhino]]
 
| Author = [[User:Americhino|Americhino]]
 
| Scope = s
 
| Scope = s

Revision as of 22:07, 23 August 2020

UserStatus is a script that displays a user's status on their masthead. It could be useful for community-based wikis. It is also configurable.

This script currently only works on UCP wikis. If your wiki has NOT been migrated yet, please do not use this script.


Installation

Changing your status

Your status is stored at User:USERNAME/status on your wiki. You can either:

  1. Type in a status and publish it. There should be no other page content. OR
  2. Use the dropdown menu which appears on your masthead under your bio/info.

The available statuses are:

  • online
  • away
  • dnd
  • offline

Please edit only your own status. A warning will display if you attempt to edit others' statuses.


Configuration

Settings are stored in the window.UserStatusSettings object. It can go into both personal and site-wide JS.

0 means off/false and 1 on/true.


Variable Description Available values Default value Notes
colorBlindMode Colorblind mode; adds icons to status indicators 0/1 1
lightTheme Light themed icons for colorblind mode 0/1 0 Requires colorBlindMode.
statusIndicator Display the circle next to a user's avatar 0/1 1 Not recommended if combined with MastheadRightsBadge.

An example configuration would be:

window.UserStatusSettings = {
    colorBlindMode: 1,
    lightTheme: 1,
    statusIndicator: 0,
};

Customization

Various elements can be customized via CSS:

  • .status-indicator - the circle next to a user's avatar
    • .status-indicator-online - the online status indicator
    • .status-indicator-away - the idle status indicator
    • .status-indicator-dnd - the do not disturb status indicator
    • .status-indicator-offline - the offline status indicator
  • .status-masthead - the text on the right side of the masthead
    • .status-masthead-online - text for online users
    • .status-masthead-away - text for idle users
    • .status-masthead-dnd - text for do not disturb users
    • .status-masthead-offline - text for offline users
  • .si-is-colorblind - colorblind status indicators
  • .si-is-blocked - status indicators for blocked users
    • .status-indicator-blocked - the blocked status indicator
    • .status-masthead-blocked - text for blocked users


Colors

  • Online#43b581for online users$online
  • Idle#faa61afor idle users$away
  • Do Not Disturb#f04747for users on Do Not Disturb$dnd
  • Offline/Unknown#747f8dfor offline/unknown users$offline
  • Blocked#8f0000for blocked users$blocked


Notes

Planned Features

  • Display notification when editing others' statuses
  • Built-in customizable status colors
  • Dropdown menu option to quickly switch statuses
  • Fully change status to blocked when a user is blocked (WIP)
  • i18n-js implementation
  • Light themed blocked icon
  • Add option to remove .status-indicator via config
  • Merge main script with subpages
  • "Reload profile" link for /banner.js
  • User-friendly settings page (?)
  • Non-Discord icons
  • Smoother animation for status menu


Text above can be found here (edit)