@ -137,15 +137,6 @@
|
|||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden-note .header {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card.note.hidden-note {
|
|
||||||
min-height: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.expand-note {
|
.expand-note {
|
||||||
padding: 0 0 16px 0;
|
padding: 0 0 16px 0;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
import messages from "../messages";
|
import useLogin from "@/Hooks/useLogin";
|
||||||
|
|
||||||
const HiddenNote = ({ children }: { children: React.ReactNode }) => {
|
const HiddenNote = ({ children }: { children: React.ReactNode }) => {
|
||||||
|
const hideMutedNotes = useLogin(s => s.appData.item.preferences.hideMutedNotes);
|
||||||
const [show, setShow] = useState(false);
|
const [show, setShow] = useState(false);
|
||||||
|
if (hideMutedNotes) return;
|
||||||
|
|
||||||
return show ? (
|
return show ? (
|
||||||
children
|
children
|
||||||
) : (
|
) : (
|
||||||
<div className="card note hidden-note p-0">
|
<div className="bb p flex items-center justify-between">
|
||||||
<div className="header">
|
<div className="text-sm text-secondary">
|
||||||
<p>
|
<FormattedMessage defaultMessage="This note has been muted" id="qfmMQh" />
|
||||||
<FormattedMessage defaultMessage="This note has been muted" id="qfmMQh" />
|
|
||||||
</p>
|
|
||||||
<button className="btn btn-sm btn-neutral" onClick={() => setShow(true)}>
|
|
||||||
<FormattedMessage {...messages.Show} />
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<button className="btn btn-sm btn-neutral" onClick={() => setShow(true)}>
|
||||||
|
<FormattedMessage defaultMessage="Show" id="K7AkdL" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -477,10 +477,10 @@ const PreferencesPage = () => {
|
|||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<div className="flex flex-col g8">
|
<div className="flex flex-col g8">
|
||||||
<h4>
|
<h4>
|
||||||
<FormattedMessage {...messages.HideMutedNotes} />
|
<FormattedMessage defaultMessage="Hide muted notes" id="9kO0VQ" />
|
||||||
</h4>
|
</h4>
|
||||||
<small>
|
<small>
|
||||||
<FormattedMessage {...messages.HideMutedNotesHelp} />
|
<FormattedMessage defaultMessage="Muted notes will not be shown" id="sfL/O+" />
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -76,9 +76,4 @@ export default defineMessages({
|
|||||||
ServiceWorkerNotRunning: { defaultMessage: "Service Worker Not Running", id: "RDha9y" },
|
ServiceWorkerNotRunning: { defaultMessage: "Service Worker Not Running", id: "RDha9y" },
|
||||||
SubscribedToPush: { defaultMessage: "Subscribed to Push", id: "G3A56c" },
|
SubscribedToPush: { defaultMessage: "Subscribed to Push", id: "G3A56c" },
|
||||||
NotSubscribedToPush: { defaultMessage: "Not Subscribed to Push", id: "d2ebEu" },
|
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",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user