Merge branch 'develop' of https://codeberg.org/mkljczk/pl-fe into develop
Some checks are pending
Nicolium CI / Test and upload artifacts (22.x) (push) Waiting to run
Nicolium CI / release (push) Blocked by required conditions
Nicolium CI / deploy (push) Blocked by required conditions
pl-api CI / Test for pl-api formatting (22.x) (push) Waiting to run
pl-hooks CI / Test for a successful build (22.x) (push) Waiting to run
Some checks are pending
Nicolium CI / Test and upload artifacts (22.x) (push) Waiting to run
Nicolium CI / release (push) Blocked by required conditions
Nicolium CI / deploy (push) Blocked by required conditions
pl-api CI / Test for pl-api formatting (22.x) (push) Waiting to run
pl-hooks CI / Test for a successful build (22.x) (push) Waiting to run
This commit is contained in:
@@ -74,13 +74,11 @@ const createStatus = (
|
||||
editedId: string | null,
|
||||
redacting = false,
|
||||
) => {
|
||||
if (!params.preview) {
|
||||
if (!params.preview && !editedId) {
|
||||
usePendingStatusesStore.getState().actions.importStatus(params, idempotencyKey);
|
||||
useContextStore.getState().actions.importPendingStatus(params.in_reply_to_id, idempotencyKey);
|
||||
useTimelinesStore.getState().actions.importPendingStatus(params, idempotencyKey);
|
||||
if (!editedId) {
|
||||
incrementReplyCount(params, queryClient);
|
||||
}
|
||||
incrementReplyCount(params, queryClient);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -1488,7 +1488,7 @@ const StatusActionBar: React.FC<IStatusActionBar> = ({
|
||||
});
|
||||
}, []);
|
||||
|
||||
if (!status) {
|
||||
if (!status || !status.account) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@ const ContentTypeButton: React.FC<IContentTypeButton> = ({ composeId, compact })
|
||||
}))}
|
||||
>
|
||||
<button
|
||||
type='button'
|
||||
className='⁂-content-type-button'
|
||||
title={compact ? option?.text : intl.formatMessage(messages.changeContentType)}
|
||||
>
|
||||
|
||||
@@ -299,7 +299,7 @@ const LanguageDropdownButton: React.FC<ILanguageDropdownButton> = ({ composeId,
|
||||
|
||||
return (
|
||||
<DropdownMenu component={LanguageDropdown} className='⁂-language-dropdown'>
|
||||
<button title={intl.formatMessage(messages.languagePrompt)}>
|
||||
<button type='button' title={intl.formatMessage(messages.languagePrompt)}>
|
||||
<Icon src={iconTranslate} aria-hidden />
|
||||
{buttonLabel}
|
||||
<Icon src={iconCaretDown} aria-hidden />
|
||||
|
||||
@@ -230,7 +230,7 @@ const PrivacyDropdown: React.FC<IPrivacyDropdown> = ({ composeId, compact }) =>
|
||||
|
||||
return (
|
||||
<DropdownMenu items={items} width='16rem'>
|
||||
<button title={compact ? text : intl.formatMessage(messages.changePrivacy)}>
|
||||
<button type='button' title={compact ? text : intl.formatMessage(messages.changePrivacy)}>
|
||||
{valueOption?.icon && <Icon src={valueOption.icon} aria-hidden />}
|
||||
{compact ? undefined : text}
|
||||
<Icon src={iconCaretDown} aria-hidden />
|
||||
|
||||
@@ -10,7 +10,7 @@ const buildPoll = (draftPoll: DraftStatus['poll']) => {
|
||||
return v.parse(pollSchema, {
|
||||
...draftPoll,
|
||||
id: 'poll',
|
||||
options: draftPoll.options.map((title: string) => ({ title })).toArray(),
|
||||
options: draftPoll.options.map((title: string) => ({ title })),
|
||||
});
|
||||
} else {
|
||||
return null;
|
||||
|
||||
@@ -78,7 +78,7 @@ const useThemeCss = (overwriteConfig?: FrontendConfig) => {
|
||||
let baseTheme: Partial<FrontendConfig>;
|
||||
if (overwriteConfig) baseTheme = overwriteConfig;
|
||||
else if (demo) baseTheme = {};
|
||||
else baseTheme = theme ?? frontendConfig;
|
||||
else baseTheme = { ...frontendConfig, ...theme };
|
||||
|
||||
const colors = normalizeColors(baseTheme);
|
||||
|
||||
|
||||
@@ -15,6 +15,11 @@ import { adminAccountSchema } from './account';
|
||||
const adminReportSchema = v.pipe(
|
||||
v.any(),
|
||||
v.transform((report: any) => {
|
||||
report.statuses = report.statuses?.map((status: any) => ({
|
||||
...status,
|
||||
account: (report.actor ? report.account : report.target_account)?.account || status.account,
|
||||
}));
|
||||
|
||||
if (report.actor) {
|
||||
/**
|
||||
* Convert Pleroma report schema
|
||||
|
||||
Reference in New Issue
Block a user