* Feature 🚀 : Ability to delete messages in chat channels - Sending message ID to frontend - Deleting Message - Use pusher to delete message realtime * Minor Bug 🐞: Show message action only for current user - User can delete or edit their own messages * Test cases added * Bug 🐞: Update message id for receiver Message id was not sent to receiver by pusher * Refactoring🛠: Message controller refactoring * Test Cases📝 : Specs for Delete message added * Feature 🚀 : Ability to edit messages * Test Cases📝 : Specs for Edit message added * Merge conflict resolved * fix video content issue * add UI for membership management * add api to update memberahip role * add methods for manage membership * Add integration test cases * add emoji for admin * Open member profile in sidecar only * 🐞 Problem with direct channel sidecar * 🐞 Few other UI enhancements * fix mod typo * add limit upto 4 for display active memberships * fix UI issues * fix action ui for membership * fix sidebar redirection issue * fix svg buttons * add test cases * fixed broken spec * fix PR suggestions * remove not used code * fix typo * fix PR suggestion * fix typos * add invitation url expiry * fix specs * fix PR suggestions * removed unused gem * remove presenter format * handle invitation link expiry with redis * fix PR suggestions * user can view non-discoverable channel invitation link * fix typos * remove commented code * add spacing * PR suggestions * remove class from button * replace componentDidMount with commen function * remove action button for single membership * add chat message on update role * add spece between lines Co-authored-by: Narender Singh <narender2031@gmail.com> Co-authored-by: Fernando Valverde <fdov88@gmail.com>
62 lines
1.7 KiB
JavaScript
62 lines
1.7 KiB
JavaScript
import { h } from 'preact';
|
|
import PropTypes from 'prop-types';
|
|
import { Button } from '@crayons';
|
|
|
|
const SettingsFrom = ({
|
|
channelDescription,
|
|
handleDescriptionChange,
|
|
channelDiscoverable,
|
|
handleChannelDiscoverableStatus,
|
|
handleChannelDescriptionChanges,
|
|
}) => {
|
|
return (
|
|
<div
|
|
data-testid="settings-form"
|
|
className="crayons-card p-4 grid gap-2 mb-4 settings-section"
|
|
>
|
|
<h3>Channel Settings</h3>
|
|
<div className="crayons-field">
|
|
<label
|
|
className="crayons-field__label"
|
|
htmlFor="chat_channel_description"
|
|
>
|
|
Description
|
|
</label>
|
|
<textarea
|
|
className="crayons-textfield"
|
|
name="description"
|
|
id="chat_channel_description"
|
|
value={channelDescription}
|
|
onChange={handleDescriptionChange}
|
|
/>
|
|
</div>
|
|
<div className="crayons-field crayons-field--checkbox">
|
|
<input
|
|
type="checkbox"
|
|
id="c2"
|
|
className="crayons-checkbox"
|
|
checked={channelDiscoverable}
|
|
onChange={handleChannelDiscoverableStatus}
|
|
/>
|
|
<label htmlFor="c2" className="crayons-field__label">
|
|
Channel Discoverable
|
|
</label>
|
|
</div>
|
|
<div>
|
|
<Button type="submit" onClick={handleChannelDescriptionChanges}>
|
|
Submit
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
SettingsFrom.propTypes = {
|
|
channelDescription: PropTypes.string.isRequired,
|
|
handleDescriptionChange: PropTypes.func.isRequired,
|
|
handleChannelDiscoverableStatus: PropTypes.func.isRequired,
|
|
handleChannelDescriptionChanges: PropTypes.func.isRequired,
|
|
channelDiscoverable: PropTypes.bool.isRequired,
|
|
};
|
|
|
|
export default SettingsFrom;
|