mirror of
https://github.com/element-hq/element-web
synced 2024-10-26 12:45:53 +03:00
add missing commands to the Autocomplete CommandProvider
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
cddac3516b
commit
9dba628f10
2 changed files with 38 additions and 0 deletions
|
@ -21,6 +21,7 @@ import AutocompleteProvider from './AutocompleteProvider';
|
||||||
import Fuse from 'fuse.js';
|
import Fuse from 'fuse.js';
|
||||||
import {TextualCompletion} from './Components';
|
import {TextualCompletion} from './Components';
|
||||||
|
|
||||||
|
// TODO merge this with the factory mechanics of SlashCommands?
|
||||||
// Warning: Since the description string will be translated in _t(result.description), all these strings below must be in i18n/strings/en_EN.json file
|
// Warning: Since the description string will be translated in _t(result.description), all these strings below must be in i18n/strings/en_EN.json file
|
||||||
const COMMANDS = [
|
const COMMANDS = [
|
||||||
{
|
{
|
||||||
|
@ -33,6 +34,16 @@ const COMMANDS = [
|
||||||
args: '<user-id> [reason]',
|
args: '<user-id> [reason]',
|
||||||
description: 'Bans user with given id',
|
description: 'Bans user with given id',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
command: '/unban',
|
||||||
|
args: '<user-id> [reason]',
|
||||||
|
description: 'Unbans user with given id',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
command: '/op',
|
||||||
|
args: '<user-id>',
|
||||||
|
description: 'Ops user with given id',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
command: '/deop',
|
command: '/deop',
|
||||||
args: '<user-id>',
|
args: '<user-id>',
|
||||||
|
@ -48,6 +59,16 @@ const COMMANDS = [
|
||||||
args: '<room-alias>',
|
args: '<room-alias>',
|
||||||
description: 'Joins room with given alias',
|
description: 'Joins room with given alias',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
command: '/part',
|
||||||
|
args: '<room-alias>',
|
||||||
|
description: 'Leaves room with given alias',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
command: '/topic',
|
||||||
|
args: '<topic>',
|
||||||
|
description: 'Sets the room topic',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
command: '/kick',
|
command: '/kick',
|
||||||
args: '<user-id> [reason]',
|
args: '<user-id> [reason]',
|
||||||
|
@ -63,6 +84,17 @@ const COMMANDS = [
|
||||||
args: '<query>',
|
args: '<query>',
|
||||||
description: 'Searches DuckDuckGo for results',
|
description: 'Searches DuckDuckGo for results',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
command: '/tint',
|
||||||
|
args: '<color1> [<color2>]',
|
||||||
|
description: 'Change colourscheme of current room',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
command: '/verify',
|
||||||
|
args: '<userId> <deviceId> <deviceSigningKey>',
|
||||||
|
description: 'Verify a user, device, and pubkey tuple',
|
||||||
|
},
|
||||||
|
// Omitting `/markdown` as it only seems to apply to OldComposer
|
||||||
];
|
];
|
||||||
|
|
||||||
const COMMAND_RE = /(^\/\w*)/g;
|
const COMMAND_RE = /(^\/\w*)/g;
|
||||||
|
|
|
@ -187,6 +187,7 @@
|
||||||
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.": "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.",
|
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.": "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.",
|
||||||
"Can't load user settings": "Can't load user settings",
|
"Can't load user settings": "Can't load user settings",
|
||||||
"Change Password": "Change Password",
|
"Change Password": "Change Password",
|
||||||
|
"Change colourscheme of current room": "Change colourscheme of current room",
|
||||||
"%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.": "%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.",
|
"%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.": "%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.",
|
||||||
"%(senderName)s changed their profile picture.": "%(senderName)s changed their profile picture.",
|
"%(senderName)s changed their profile picture.": "%(senderName)s changed their profile picture.",
|
||||||
"%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s changed the power level of %(powerLevelDiffText)s.",
|
"%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s changed the power level of %(powerLevelDiffText)s.",
|
||||||
|
@ -376,6 +377,7 @@
|
||||||
"Labs": "Labs",
|
"Labs": "Labs",
|
||||||
"Last seen": "Last seen",
|
"Last seen": "Last seen",
|
||||||
"Leave room": "Leave room",
|
"Leave room": "Leave room",
|
||||||
|
"Leaves room with given alias": "Leaves room with given alias",
|
||||||
"left and rejoined": "left and rejoined",
|
"left and rejoined": "left and rejoined",
|
||||||
"left": "left",
|
"left": "left",
|
||||||
"%(targetName)s left the room.": "%(targetName)s left the room.",
|
"%(targetName)s left the room.": "%(targetName)s left the room.",
|
||||||
|
@ -507,6 +509,7 @@
|
||||||
"%(senderName)s set their display name to %(displayName)s.": "%(senderName)s set their display name to %(displayName)s.",
|
"%(senderName)s set their display name to %(displayName)s.": "%(senderName)s set their display name to %(displayName)s.",
|
||||||
"Set": "Set",
|
"Set": "Set",
|
||||||
"Settings": "Settings",
|
"Settings": "Settings",
|
||||||
|
"Sets the room topic": "Sets the room topic",
|
||||||
"Show panel": "Show panel",
|
"Show panel": "Show panel",
|
||||||
"Show Text Formatting Toolbar": "Show Text Formatting Toolbar",
|
"Show Text Formatting Toolbar": "Show Text Formatting Toolbar",
|
||||||
"Show timestamps in 12 hour format (e.g. 2:30pm)": "Show timestamps in 12 hour format (e.g. 2:30pm)",
|
"Show timestamps in 12 hour format (e.g. 2:30pm)": "Show timestamps in 12 hour format (e.g. 2:30pm)",
|
||||||
|
@ -581,6 +584,7 @@
|
||||||
"Unable to restore previous session": "Unable to restore previous session",
|
"Unable to restore previous session": "Unable to restore previous session",
|
||||||
"Unable to verify email address.": "Unable to verify email address.",
|
"Unable to verify email address.": "Unable to verify email address.",
|
||||||
"Unban": "Unban",
|
"Unban": "Unban",
|
||||||
|
"Unbans user with given id": "Unbans user with given id",
|
||||||
"%(senderName)s unbanned %(targetName)s.": "%(senderName)s unbanned %(targetName)s.",
|
"%(senderName)s unbanned %(targetName)s.": "%(senderName)s unbanned %(targetName)s.",
|
||||||
"Unable to ascertain that the address this invite was sent to matches one associated with your account.": "Unable to ascertain that the address this invite was sent to matches one associated with your account.",
|
"Unable to ascertain that the address this invite was sent to matches one associated with your account.": "Unable to ascertain that the address this invite was sent to matches one associated with your account.",
|
||||||
"Unable to capture screen": "Unable to capture screen",
|
"Unable to capture screen": "Unable to capture screen",
|
||||||
|
@ -803,6 +807,7 @@
|
||||||
"Analytics": "Analytics",
|
"Analytics": "Analytics",
|
||||||
"Opt out of analytics": "Opt out of analytics",
|
"Opt out of analytics": "Opt out of analytics",
|
||||||
"Options": "Options",
|
"Options": "Options",
|
||||||
|
"Ops user with given id": "Ops user with given id",
|
||||||
"Riot collects anonymous analytics to allow us to improve the application.": "Riot collects anonymous analytics to allow us to improve the application.",
|
"Riot collects anonymous analytics to allow us to improve the application.": "Riot collects anonymous analytics to allow us to improve the application.",
|
||||||
"Passphrases must match": "Passphrases must match",
|
"Passphrases must match": "Passphrases must match",
|
||||||
"Passphrase must not be empty": "Passphrase must not be empty",
|
"Passphrase must not be empty": "Passphrase must not be empty",
|
||||||
|
@ -835,6 +840,7 @@
|
||||||
"If it matches, press the verify button below. If it doesn't, then someone else is intercepting this device and you probably want to press the blacklist button instead.": "If it matches, press the verify button below. If it doesn't, then someone else is intercepting this device and you probably want to press the blacklist button instead.",
|
"If it matches, press the verify button below. If it doesn't, then someone else is intercepting this device and you probably want to press the blacklist button instead.": "If it matches, press the verify button below. If it doesn't, then someone else is intercepting this device and you probably want to press the blacklist button instead.",
|
||||||
"In future this verification process will be more sophisticated.": "In future this verification process will be more sophisticated.",
|
"In future this verification process will be more sophisticated.": "In future this verification process will be more sophisticated.",
|
||||||
"Verify device": "Verify device",
|
"Verify device": "Verify device",
|
||||||
|
"Verify a user, device, and pubkey tuple": "Verify a user, device, and pubkey tuple",
|
||||||
"I verify that the keys match": "I verify that the keys match",
|
"I verify that the keys match": "I verify that the keys match",
|
||||||
"We encountered an error trying to restore your previous session. If you continue, you will need to log in again, and encrypted chat history will be unreadable.": "We encountered an error trying to restore your previous session. If you continue, you will need to log in again, and encrypted chat history will be unreadable.",
|
"We encountered an error trying to restore your previous session. If you continue, you will need to log in again, and encrypted chat history will be unreadable.": "We encountered an error trying to restore your previous session. If you continue, you will need to log in again, and encrypted chat history will be unreadable.",
|
||||||
"Unable to restore session": "Unable to restore session",
|
"Unable to restore session": "Unable to restore session",
|
||||||
|
|
Loading…
Reference in a new issue