From 734ca0df6e37ef1895527e3cb03a5385791e5c02 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 6 Aug 2019 17:04:02 +0100 Subject: [PATCH] get rid of /tint for now Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/SlashCommands.js | 49 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/src/SlashCommands.js b/src/SlashCommands.js index bcf6d9c5a6..dd3cb10c09 100644 --- a/src/SlashCommands.js +++ b/src/SlashCommands.js @@ -274,30 +274,31 @@ export const CommandMap = { }, }), - tint: new Command({ - name: 'tint', - args: ' []', - description: _td('Changes colour scheme of current room'), - runFn: function(roomId, args) { - if (args) { - const matches = args.match(/^(#([\da-fA-F]{3}|[\da-fA-F]{6}))( +(#([\da-fA-F]{3}|[\da-fA-F]{6})))?$/); - if (matches) { - Tinter.tint(matches[1], matches[4]); - const colorScheme = {}; - colorScheme.primary_color = matches[1]; - if (matches[4]) { - colorScheme.secondary_color = matches[4]; - } else { - colorScheme.secondary_color = colorScheme.primary_color; - } - return success( - SettingsStore.setValue('roomColor', roomId, SettingLevel.ROOM_ACCOUNT, colorScheme), - ); - } - } - return reject(this.getUsage()); - }, - }), + // Room Tint has been unsupported since the redesign + // tint: new Command({ + // name: 'tint', + // args: ' []', + // description: _td('Changes colour scheme of current room'), + // runFn: function(roomId, args) { + // if (args) { + // const matches = args.match(/^(#([\da-fA-F]{3}|[\da-fA-F]{6}))( +(#([\da-fA-F]{3}|[\da-fA-F]{6})))?$/); + // if (matches) { + // Tinter.tint(matches[1], matches[4]); + // const colorScheme = {}; + // colorScheme.primary_color = matches[1]; + // if (matches[4]) { + // colorScheme.secondary_color = matches[4]; + // } else { + // colorScheme.secondary_color = colorScheme.primary_color; + // } + // return success( + // SettingsStore.setValue('roomColor', roomId, SettingLevel.ROOM_ACCOUNT, colorScheme), + // ); + // } + // } + // return reject(this.getUsage()); + // }, + // }), topic: new Command({ name: 'topic',