Merge remote-tracking branch 'kamal/enhancements/snort#702'
This commit is contained in:
commit
3fe6ed952c
@ -8,12 +8,12 @@ const HiddenNote = ({ children }: { children: React.ReactNode }) => {
|
||||
return show ? (
|
||||
children
|
||||
) : (
|
||||
<div className="card note hidden-note">
|
||||
<div className="card note hidden-note p-0">
|
||||
<div className="header">
|
||||
<p>
|
||||
<FormattedMessage defaultMessage="This note has been muted" id="qfmMQh" />
|
||||
</p>
|
||||
<button type="button" onClick={() => setShow(true)}>
|
||||
<button className="btn btn-sm btn-neutral" onClick={() => setShow(true)}>
|
||||
<FormattedMessage {...messages.Show} />
|
||||
</button>
|
||||
</div>
|
||||
|
@ -474,6 +474,23 @@ const PreferencesPage = () => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<div className="flex flex-col g8">
|
||||
<h4>
|
||||
<FormattedMessage {...messages.HideMutedNotes} />
|
||||
</h4>
|
||||
<small>
|
||||
<FormattedMessage {...messages.HideMutedNotesHelp} />
|
||||
</small>
|
||||
</div>
|
||||
<div>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={perf.hideMutedNotes}
|
||||
onChange={e => updatePreferences(id, { ...perf, hideMutedNotes: e.target.checked })}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -76,4 +76,9 @@ export default defineMessages({
|
||||
ServiceWorkerNotRunning: { defaultMessage: "Service Worker Not Running", id: "RDha9y" },
|
||||
SubscribedToPush: { defaultMessage: "Subscribed to Push", id: "G3A56c" },
|
||||
NotSubscribedToPush: { defaultMessage: "Not Subscribed to Push", id: "d2ebEu" },
|
||||
HideMutedNotes: { defaultMessage: "Hide Muted Notes", id: "M3Oira" },
|
||||
HideMutedNotesHelp: {
|
||||
defaultMessage: "Muted notes will not be shown",
|
||||
id: "MBAYRA",
|
||||
},
|
||||
});
|
||||
|
@ -96,6 +96,12 @@ export interface UserPreferences {
|
||||
* Auto-translate when available
|
||||
*/
|
||||
autoTranslate?: boolean;
|
||||
|
||||
/**
|
||||
* Hides muted notes when selected
|
||||
*/
|
||||
hideMutedNotes: boolean;
|
||||
|
||||
}
|
||||
|
||||
export const DefaultPreferences = {
|
||||
@ -116,4 +122,5 @@ export const DefaultPreferences = {
|
||||
showStatus: true,
|
||||
checkSigs: true,
|
||||
autoTranslate: true,
|
||||
hideMutedNotes:false
|
||||
} as UserPreferences;
|
||||
|
Loading…
Reference in New Issue
Block a user