get rid of /tint for now

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2019-08-06 17:04:02 +01:00
parent e400053b69
commit 734ca0df6e
1 changed files with 25 additions and 24 deletions

View File

@ -274,30 +274,31 @@ export const CommandMap = {
}, },
}), }),
tint: new Command({ // Room Tint has been unsupported since the redesign
name: 'tint', // tint: new Command({
args: '<color1> [<color2>]', // name: 'tint',
description: _td('Changes colour scheme of current room'), // args: '<color1> [<color2>]',
runFn: function(roomId, args) { // description: _td('Changes colour scheme of current room'),
if (args) { // runFn: function(roomId, args) {
const matches = args.match(/^(#([\da-fA-F]{3}|[\da-fA-F]{6}))( +(#([\da-fA-F]{3}|[\da-fA-F]{6})))?$/); // if (args) {
if (matches) { // const matches = args.match(/^(#([\da-fA-F]{3}|[\da-fA-F]{6}))( +(#([\da-fA-F]{3}|[\da-fA-F]{6})))?$/);
Tinter.tint(matches[1], matches[4]); // if (matches) {
const colorScheme = {}; // Tinter.tint(matches[1], matches[4]);
colorScheme.primary_color = matches[1]; // const colorScheme = {};
if (matches[4]) { // colorScheme.primary_color = matches[1];
colorScheme.secondary_color = matches[4]; // if (matches[4]) {
} else { // colorScheme.secondary_color = matches[4];
colorScheme.secondary_color = colorScheme.primary_color; // } else {
} // colorScheme.secondary_color = colorScheme.primary_color;
return success( // }
SettingsStore.setValue('roomColor', roomId, SettingLevel.ROOM_ACCOUNT, colorScheme), // return success(
); // SettingsStore.setValue('roomColor', roomId, SettingLevel.ROOM_ACCOUNT, colorScheme),
} // );
} // }
return reject(this.getUsage()); // }
}, // return reject(this.getUsage());
}), // },
// }),
topic: new Command({ topic: new Command({
name: 'topic', name: 'topic',