sforkowany z mirror/soapbox
Compose: preliminary toast upon submission
rodzic
b6fa728b8d
commit
09f57447c6
|
@ -72,6 +72,7 @@ const messages = defineMessages({
|
||||||
uploadErrorLimit: { id: 'upload_error.limit', defaultMessage: 'File upload limit exceeded.' },
|
uploadErrorLimit: { id: 'upload_error.limit', defaultMessage: 'File upload limit exceeded.' },
|
||||||
uploadErrorPoll: { id: 'upload_error.poll', defaultMessage: 'File upload not allowed with polls.' },
|
uploadErrorPoll: { id: 'upload_error.poll', defaultMessage: 'File upload not allowed with polls.' },
|
||||||
scheduleError: { id: 'compose.invalid_schedule', defaultMessage: 'You must schedule a post at least 5 minutes out.' },
|
scheduleError: { id: 'compose.invalid_schedule', defaultMessage: 'You must schedule a post at least 5 minutes out.' },
|
||||||
|
success: { id: 'compose.submit_success', defaultMessage: 'Your post was sent' },
|
||||||
});
|
});
|
||||||
|
|
||||||
const COMPOSE_PANEL_BREAKPOINT = 600 + (285 * 1) + (10 * 1);
|
const COMPOSE_PANEL_BREAKPOINT = 600 + (285 * 1) + (10 * 1);
|
||||||
|
@ -154,6 +155,7 @@ export function handleComposeSubmit(dispatch, getState, data, status) {
|
||||||
|
|
||||||
dispatch(insertIntoTagHistory(data.tags || [], status));
|
dispatch(insertIntoTagHistory(data.tags || [], status));
|
||||||
dispatch(submitComposeSuccess({ ...data }));
|
dispatch(submitComposeSuccess({ ...data }));
|
||||||
|
dispatch(snackbar.show('post', messages.success));
|
||||||
}
|
}
|
||||||
|
|
||||||
const needsDescriptions = state => {
|
const needsDescriptions = state => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { ALERT_SHOW } from './alerts';
|
import { ALERT_SHOW } from './alerts';
|
||||||
|
|
||||||
const show = (severity, message) => ({
|
export const show = (severity, message) => ({
|
||||||
type: ALERT_SHOW,
|
type: ALERT_SHOW,
|
||||||
message,
|
message,
|
||||||
severity,
|
severity,
|
||||||
|
@ -22,4 +22,5 @@ export default {
|
||||||
info,
|
info,
|
||||||
success,
|
success,
|
||||||
error,
|
error,
|
||||||
|
show,
|
||||||
};
|
};
|
||||||
|
|
|
@ -32,6 +32,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--post {
|
||||||
|
background-color: #0482d8 !important;
|
||||||
|
}
|
||||||
|
|
||||||
&--success {
|
&--success {
|
||||||
background-color: #199e5a !important;
|
background-color: #199e5a !important;
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue