Merge branch 'dev' into feature/oidc-env-config

This commit is contained in:
MartinNYHC
2026-07-31 08:20:49 +02:00
committed by GitHub
96 changed files with 7583 additions and 492 deletions
@@ -160,6 +160,15 @@ export function AddNotificationModal({ provider, onClose }: AddNotificationModal
}
}
// Telegram forum topic must be a plain integer (#1518) — type="number"
// still lets "1e5" and "-" through, and Telegram would 400 on those.
if (providerType === 'telegram' && config.message_thread_id?.trim()) {
if (!/^\d+$/.test(config.message_thread_id.trim())) {
setError(t('notifications.telegramThreadIdInvalid'));
return;
}
}
const finalConfig: Record<string, unknown> =
providerType === 'ntfy' && Object.keys(eventPriorities).length > 0
? { ...config, event_priorities: eventPriorities }
@@ -245,6 +254,16 @@ export function AddNotificationModal({ provider, onClose }: AddNotificationModal
return [
{ key: 'bot_token', label: 'Bot Token', placeholder: 'Bot token from @BotFather', type: 'password', required: true },
{ key: 'chat_id', label: 'Chat ID', placeholder: 'Your chat or group ID', type: 'text', required: true },
// Optional forum topic (#1518). Left empty, Telegram posts to the
// group's General topic exactly as before.
{
key: 'message_thread_id',
label: t('notifications.telegramThreadId'),
placeholder: '123',
type: 'number',
required: false,
help: t('notifications.telegramThreadIdHelp'),
},
];
case 'email':
return [
@@ -423,6 +442,9 @@ export function AddNotificationModal({ provider, onClose }: AddNotificationModal
className="w-full px-3 py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white focus:border-bambu-green focus:outline-none"
/>
)}
{'help' in field && (field as { help?: string }).help && (
<p className="text-xs text-bambu-gray mt-1">{(field as { help?: string }).help}</p>
)}
</div>
))}
</div>
+8 -2
View File
@@ -316,10 +316,16 @@ export function SliceModal({ source, onClose }: SliceModalProps) {
const filamentReqsQuery = useQuery({
queryKey: ['sliceFilamentReqs', source.kind, source.id, effectivePlateId],
queryFn: async () => {
// `fullSlots`: one row per project slot, not only the ones this plate
// prints with. The list below is positional all the way to the CLI's
// filament_N.json parts, so a source whose only used slot is 4 has to
// present four rows — otherwise the single pick binds to slot 1 and
// slot 4 slices with whatever the source had baked in (#2712). The
// unused rows stay disabled exactly as before.
if (source.kind === 'libraryFile') {
return api.getLibraryFileFilamentRequirements(source.id, effectivePlateId, previewRequestId);
return api.getLibraryFileFilamentRequirements(source.id, effectivePlateId, previewRequestId, true);
}
return api.getArchiveFilamentRequirements(source.id, effectivePlateId, previewRequestId);
return api.getArchiveFilamentRequirements(source.id, effectivePlateId, previewRequestId, true);
},
enabled: !needsPlatePicker,
staleTime: 60_000,