mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 09:25:27 +00:00
feat: Add option to show Send button on Desktop (#628)
This commit is contained in:
@@ -637,7 +637,11 @@ export default observer(({ channel }: Props) => {
|
||||
</Action>*/}
|
||||
<Action>
|
||||
<IconButton
|
||||
className="mobile"
|
||||
className={
|
||||
state.settings.get("appearance:show_send_button")
|
||||
? ""
|
||||
: "mobile"
|
||||
}
|
||||
onClick={send}
|
||||
onMouseDown={(e) => e.preventDefault()}>
|
||||
<Send size={20} />
|
||||
|
||||
@@ -211,6 +211,24 @@ export const DisplayLigaturesShim = observer(() => {
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* Component providing a way to toggle showing the send button on desktop.
|
||||
*/
|
||||
export const ShowSendButtonShim = observer(() => {
|
||||
const settings = useApplicationState().settings;
|
||||
|
||||
return (
|
||||
<Checkbox
|
||||
checked={settings.get("appearance:show_send_button") ?? false}
|
||||
onChange={(v) => settings.set("appearance:show_send_button", v)}
|
||||
description={
|
||||
<Text id="app.settings.pages.appearance.appearance_options.show_send_desc" />
|
||||
}>
|
||||
<Text id="app.settings.pages.appearance.appearance_options.show_send" />
|
||||
</Checkbox>
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* Component providing a way to toggle seasonal themes.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user