You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vizality/renderer/src/builtins/addon-manager/commands/manage.js

31 lines
821 B

import React from 'react';
import { toPlural, toTitleCase } from '@vizality/util/string';
import { AddonsList } from '@vizality/components/addon';
import { FormTitle } from '@vizality/components';
export default {
command: 'manage',
description: 'Allows you to manage your addons directly in chat.',
icon: 'Wrench',
executor (_, type) {
const result = {
type: 'rich',
color: type === 'plugin' ? 0x42ffa7 : 0xb68aff,
provider: {
name: <>
<FormTitle tag='h2' className='vz-manager-command-addon-manage-header'>
{`Manage ${toTitleCase(toPlural(type))}`}
</FormTitle>
<AddonsList className='vz-addons-list-embed' type={type} display='compact' limit={8} />
</>
}
};
return {
send: false,
result
};
}
};