Merge remote-tracking branch 'parent/main' into kb_migration
This commit is contained in:
commit
fbb1a69a65
19 changed files with 317 additions and 70 deletions
|
@ -18,6 +18,7 @@ import {
|
|||
importFetchedStatuses,
|
||||
} from './importer';
|
||||
import { submitMarkers } from './markers';
|
||||
import { register as registerPushNotifications } from './push_notifications';
|
||||
import { saveSettings } from './settings';
|
||||
import { STATUS_EMOJI_REACTION_UPDATE } from './statuses';
|
||||
|
||||
|
@ -305,6 +306,10 @@ export function requestBrowserPermission(callback = noOp) {
|
|||
requestNotificationPermission((permission) => {
|
||||
dispatch(setBrowserPermission(permission));
|
||||
callback(permission);
|
||||
|
||||
if (permission === 'granted') {
|
||||
dispatch(registerPushNotifications());
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ function main() {
|
|||
console.error(err);
|
||||
}
|
||||
|
||||
if (registration) {
|
||||
if (registration && 'Notification' in window && Notification.permission === 'granted') {
|
||||
const registerPushNotifications = await import('mastodon/actions/push_notifications');
|
||||
|
||||
store.dispatch(registerPushNotifications.register());
|
||||
|
|
|
@ -73,6 +73,7 @@ export default function relationships(state = initialState, action) {
|
|||
case ACCOUNT_UNMUTE_SUCCESS:
|
||||
case ACCOUNT_PIN_SUCCESS:
|
||||
case ACCOUNT_UNPIN_SUCCESS:
|
||||
return normalizeRelationship(state, action.relationship);
|
||||
case RELATIONSHIPS_FETCH_SUCCESS:
|
||||
return normalizeRelationships(state, action.relationships);
|
||||
case submitAccountNote.fulfilled:
|
||||
|
|
|
@ -5,7 +5,7 @@ import { showAlertForError } from '../../actions/alerts';
|
|||
|
||||
const defaultFailSuffix = 'FAIL';
|
||||
|
||||
export const errorsMiddleware: Middleware<Record<string, never>, RootState> =
|
||||
export const errorsMiddleware: Middleware<unknown, RootState> =
|
||||
({ dispatch }) =>
|
||||
(next) =>
|
||||
(action: AnyAction & { skipAlert?: boolean; skipNotFound?: boolean }) => {
|
||||
|
|
|
@ -15,7 +15,7 @@ const defaultTypeSuffixes: Config['promiseTypeSuffixes'] = [
|
|||
|
||||
export const loadingBarMiddleware = (
|
||||
config: Config = {},
|
||||
): Middleware<Record<string, never>, RootState> => {
|
||||
): Middleware<unknown, RootState> => {
|
||||
const promiseTypeSuffixes = config.promiseTypeSuffixes ?? defaultTypeSuffixes;
|
||||
|
||||
return ({ dispatch }) =>
|
||||
|
|
|
@ -34,10 +34,7 @@ const play = (audio: HTMLAudioElement) => {
|
|||
void audio.play();
|
||||
};
|
||||
|
||||
export const soundsMiddleware = (): Middleware<
|
||||
Record<string, never>,
|
||||
RootState
|
||||
> => {
|
||||
export const soundsMiddleware = (): Middleware<unknown, RootState> => {
|
||||
const soundCache: Record<string, HTMLAudioElement> = {};
|
||||
|
||||
void ready(() => {
|
||||
|
|
|
@ -12,5 +12,4 @@ export const createAppAsyncThunk = createAsyncThunk.withTypes<{
|
|||
state: RootState;
|
||||
dispatch: AppDispatch;
|
||||
rejectValue: string;
|
||||
extra: { s: string; n: number };
|
||||
}>();
|
||||
|
|
|
@ -5274,6 +5274,11 @@ a.status-card {
|
|||
font-weight: 700;
|
||||
color: $primary-text-color;
|
||||
}
|
||||
|
||||
span {
|
||||
overflow: inherit;
|
||||
text-overflow: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue