mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 04:55:42 +09:00
fix: repair CI failures and remove slowmode reset (#1588)
This commit is contained in:
1 parent
70509fb978
commit
d56c1e5674
3 files changed
+9
-7
No files matched your search
+1
-5
@@ -5,7 +5,7 @@ import {SettingsControlRow} from '@app/features/channel/components/modals/channe
|
|||||||
import type {FormInputs} from '@app/features/channel/components/modals/channel_tabs/channel_overview_tab/shared';
|
import type {FormInputs} from '@app/features/channel/components/modals/channel_tabs/channel_overview_tab/shared';
|
||||||
import {getCachedNumberFormat} from '@app/features/i18n/utils/IntlCache';
|
import {getCachedNumberFormat} from '@app/features/i18n/utils/IntlCache';
|
||||||
import {formatPermissionLabel} from '@app/features/permissions/utils/PermissionUtils';
|
import {formatPermissionLabel} from '@app/features/permissions/utils/PermissionUtils';
|
||||||
import {RESET_SLIDER_TO_DEFAULT_VALUE_DESCRIPTOR, Slider} from '@app/features/ui/components/Slider';
|
import {Slider} from '@app/features/ui/components/Slider';
|
||||||
import {Permissions} from '@fluxer/constants/src/ChannelConstants';
|
import {Permissions} from '@fluxer/constants/src/ChannelConstants';
|
||||||
import {CHANNEL_RATE_LIMIT_PER_USER_MAX, CHANNEL_RATE_LIMIT_PER_USER_MIN} from '@fluxer/constants/src/LimitConstants';
|
import {CHANNEL_RATE_LIMIT_PER_USER_MAX, CHANNEL_RATE_LIMIT_PER_USER_MIN} from '@fluxer/constants/src/LimitConstants';
|
||||||
import {SECONDS_PER_HOUR, SECONDS_PER_MINUTE} from '@fluxer/date_utils/src/DateConstants';
|
import {SECONDS_PER_HOUR, SECONDS_PER_MINUTE} from '@fluxer/date_utils/src/DateConstants';
|
||||||
@@ -71,7 +71,6 @@ export const SlowmodeControl: React.FC<SlowmodeControlProps> = ({form}) => {
|
|||||||
const {i18n} = useLingui();
|
const {i18n} = useLingui();
|
||||||
const slowmodeLabel = i18n._(SLOWMODE_DESCRIPTOR);
|
const slowmodeLabel = i18n._(SLOWMODE_DESCRIPTOR);
|
||||||
const bypassSlowmodePermissionLabel = formatPermissionLabel(i18n, Permissions.BYPASS_SLOWMODE);
|
const bypassSlowmodePermissionLabel = formatPermissionLabel(i18n, Permissions.BYPASS_SLOWMODE);
|
||||||
const resetSliderLabel = i18n._(RESET_SLIDER_TO_DEFAULT_VALUE_DESCRIPTOR);
|
|
||||||
return (
|
return (
|
||||||
<Controller
|
<Controller
|
||||||
name="slowmode"
|
name="slowmode"
|
||||||
@@ -110,9 +109,6 @@ export const SlowmodeControl: React.FC<SlowmodeControlProps> = ({form}) => {
|
|||||||
}}
|
}}
|
||||||
onValueRender={(seconds) => formatSlowmodeDuration(i18n, Math.round(seconds))}
|
onValueRender={(seconds) => formatSlowmodeDuration(i18n, Math.round(seconds))}
|
||||||
onValueChange={(seconds) => field.onChange(Math.round(seconds))}
|
onValueChange={(seconds) => field.onChange(Math.round(seconds))}
|
||||||
showResetButton={true}
|
|
||||||
onReset={() => field.onChange(0)}
|
|
||||||
resetTooltip={resetSliderLabel}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</SettingsControlRow>
|
</SettingsControlRow>
|
||||||
|
|||||||
@@ -122,6 +122,13 @@ export const localTypingStateMachine = setup({
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (context.remoteSendAt != null) {
|
if (context.remoteSendAt != null) {
|
||||||
|
if (context.lastRemoteSentAt == null) {
|
||||||
|
return {
|
||||||
|
lastChangeAt: event.now,
|
||||||
|
remoteSendAt: event.now + LOCAL_TYPING_REMOTE_SEND_DELAY_MS,
|
||||||
|
remotePendingVersion: context.remotePendingVersion + 1,
|
||||||
|
};
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
lastChangeAt: event.now,
|
lastChangeAt: event.now,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -42,8 +42,7 @@ pub fn is_inline_viewable(content_type: &str) -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn is_scriptable_document(mime: &str) -> bool {
|
fn is_scriptable_document(mime: &str) -> bool {
|
||||||
mime.eq_ignore_ascii_case("image/svg+xml")
|
mime.eq_ignore_ascii_case("image/svg+xml") || mime.eq_ignore_ascii_case("application/pdf")
|
||||||
|| mime.eq_ignore_ascii_case("application/pdf")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_safe_quoted_filename(s: &str) -> bool {
|
fn is_safe_quoted_filename(s: &str) -> bool {
|
||||||
|
|||||||
Reference in new issue
Block a user