Merge branch 'develop' of https://codeberg.org/mkljczk/pl-fe into develop
This commit is contained in:
@@ -279,10 +279,6 @@ const Header: React.FC<IHeader> = ({ account }) => {
|
||||
unblockDomain(domain);
|
||||
};
|
||||
|
||||
const onProfileExternal = (url: string) => {
|
||||
window.open(url, '_blank');
|
||||
};
|
||||
|
||||
const onAddToList = () => {
|
||||
openModal('LIST_ADDER', {
|
||||
accountId: account.id,
|
||||
@@ -380,7 +376,7 @@ const Header: React.FC<IHeader> = ({ account }) => {
|
||||
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.profileExternal, { domain }),
|
||||
action: () => onProfileExternal(account.url),
|
||||
href: account.url,
|
||||
icon: require('@phosphor-icons/core/regular/arrow-square-out.svg'),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -191,10 +191,6 @@ const EventHeader: React.FC<IEventHeader> = ({ status }) => {
|
||||
dispatch(initReport(ReportableEntities.STATUS, account, { status }));
|
||||
};
|
||||
|
||||
const handleModerateStatus = () => {
|
||||
window.open(`/pleroma/admin/#/statuses/${status.id}/`, '_blank');
|
||||
};
|
||||
|
||||
const handleToggleStatusSensitivity = () => {
|
||||
dispatch(toggleStatusSensitivityModal(intl, status.id, status.sensitive));
|
||||
};
|
||||
@@ -349,7 +345,7 @@ const EventHeader: React.FC<IEventHeader> = ({ status }) => {
|
||||
if (isAdmin && features.pleromaAdminStatuses) {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.adminStatus),
|
||||
action: handleModerateStatus,
|
||||
href: `/pleroma/admin/#/statuses/${status.id}/`,
|
||||
icon: require('@phosphor-icons/core/regular/pencil-simple.svg'),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ const ModalRoot: React.FC = () => {
|
||||
const index = modals.length - 1;
|
||||
|
||||
const onClickClose = (type?: ModalType, all?: boolean) => {
|
||||
console.log('Closing modal:', type, all);
|
||||
switch (type) {
|
||||
case 'COMPOSE':
|
||||
dispatch(cancelReplyCompose());
|
||||
|
||||
@@ -12,8 +12,8 @@ import Icon from 'pl-fe/components/ui/icon';
|
||||
import Stack from 'pl-fe/components/ui/stack';
|
||||
import Text from 'pl-fe/components/ui/text';
|
||||
import Emojify from 'pl-fe/features/emoji/emojify';
|
||||
import { useAcct } from 'pl-fe/hooks/use-acct';
|
||||
import { useAppSelector } from 'pl-fe/hooks/use-app-selector';
|
||||
import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config';
|
||||
import { accountScrobbleQueryOptions } from 'pl-fe/queries/accounts/account-scrobble';
|
||||
import { capitalize } from 'pl-fe/utils/strings';
|
||||
|
||||
@@ -40,7 +40,7 @@ interface IProfileInfoPanel {
|
||||
/** User profile metadata, such as location, birthday, etc. */
|
||||
const ProfileInfoPanel: React.FC<IProfileInfoPanel> = ({ account, username }) => {
|
||||
const intl = useIntl();
|
||||
const { displayFqn } = usePlFeConfig();
|
||||
const acct = useAcct(account);
|
||||
const me = useAppSelector(state => state.me);
|
||||
const ownAccount = account?.id === me;
|
||||
|
||||
@@ -152,7 +152,7 @@ const ProfileInfoPanel: React.FC<IProfileInfoPanel> = ({ account, username }) =>
|
||||
|
||||
<HStack alignItems='center' space={0.5}>
|
||||
<Text size='sm' theme='muted' direction='ltr' truncate>
|
||||
@{displayFqn ? account.fqn : account.acct}
|
||||
@{acct}
|
||||
</Text>
|
||||
|
||||
{account.locked && (
|
||||
|
||||
@@ -11,11 +11,9 @@ import Stack from 'pl-fe/components/ui/stack';
|
||||
import Text from 'pl-fe/components/ui/text';
|
||||
import VerificationBadge from 'pl-fe/components/verification-badge';
|
||||
import Emojify from 'pl-fe/features/emoji/emojify';
|
||||
import { useAppSelector } from 'pl-fe/hooks/use-app-selector';
|
||||
import { useAcct } from 'pl-fe/hooks/use-acct';
|
||||
import { useSettings } from 'pl-fe/stores/settings';
|
||||
import { getAcct } from 'pl-fe/utils/accounts';
|
||||
import { shortNumberFormat } from 'pl-fe/utils/numbers';
|
||||
import { displayFqn } from 'pl-fe/utils/state';
|
||||
|
||||
const messages = defineMessages({
|
||||
account_locked: { id: 'account.locked_info', defaultMessage: 'This account privacy status is set to locked. The owner manually reviews who can follow them.' },
|
||||
@@ -32,7 +30,7 @@ const UserPanel: React.FC<IUserPanel> = ({ accountId, action, badges, domain })
|
||||
const intl = useIntl();
|
||||
const { demetricator, disableUserProvidedMedia } = useSettings();
|
||||
const { account } = useAccount(accountId);
|
||||
const fqn = useAppSelector((state) => displayFqn(state));
|
||||
const displayedAcct = useAcct(account);
|
||||
|
||||
if (!account) return null;
|
||||
const acct = !account.acct.includes('@') && domain ? `${account.acct}@${domain}` : account.acct;
|
||||
@@ -96,7 +94,7 @@ const UserPanel: React.FC<IUserPanel> = ({ accountId, action, badges, domain })
|
||||
|
||||
<HStack alignItems='center' space={1}>
|
||||
<Text size='sm' theme='muted' direction='ltr' truncate>
|
||||
@{getAcct(account, fqn)}
|
||||
@{displayedAcct}
|
||||
</Text>
|
||||
|
||||
{account.locked && (
|
||||
|
||||
Reference in New Issue
Block a user