feat: test menu dropdown, split text/media messages, target settings, provider URL links
- Replace 3 test buttons with unified dropdown menu (basic/periodic/scheduled/memory) - Send text message first, then assets as reply (not combined caption+media) - Pass all target config settings to Telegram client (disable_url_preview, max_media, chunk_delay, etc.) - Real data test notifications for periodic/scheduled/memory (fetch from Immich) - Provider card URL is now a clickable hyperlink - Localized test type labels (EN/RU) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,9 +6,11 @@
|
||||
import Card from '$lib/components/Card.svelte';
|
||||
import Loading from '$lib/components/Loading.svelte';
|
||||
import MdiIcon from '$lib/components/MdiIcon.svelte';
|
||||
import EventChart from '$lib/components/EventChart.svelte';
|
||||
|
||||
let status = $state<any>(null);
|
||||
let providers = $state<any[]>([]);
|
||||
let chartDays = $state<any[]>([]);
|
||||
let loaded = $state(false);
|
||||
let error = $state('');
|
||||
|
||||
@@ -33,7 +35,7 @@
|
||||
function calcPageSize(): number {
|
||||
if (typeof window === 'undefined') return 8;
|
||||
const EVENT_ROW_HEIGHT = 50; // px per event row (content + gap)
|
||||
const FIXED_OVERHEAD = 390; // header + stats + events header + filters + paginator + padding
|
||||
const FIXED_OVERHEAD = 600; // header + stats + chart + events header + filters + paginator + padding
|
||||
const available = window.innerHeight - FIXED_OVERHEAD;
|
||||
return Math.max(3, Math.floor(available / EVENT_ROW_HEIGHT));
|
||||
}
|
||||
@@ -108,10 +110,14 @@
|
||||
|
||||
async function loadInitial() {
|
||||
try {
|
||||
[status, providers] = await Promise.all([
|
||||
const [statusRes, providersRes, chartRes] = await Promise.all([
|
||||
api<any>(`/status?limit=${eventsLimit}`),
|
||||
api<any[]>('/providers'),
|
||||
api<any>('/status/chart'),
|
||||
]);
|
||||
status = statusRes;
|
||||
providers = providersRes;
|
||||
chartDays = chartRes.days || [];
|
||||
setTimeout(() => {
|
||||
animateCount(0, status.providers, (v) => displayProviders = v);
|
||||
animateCount(0, status.trackers.active, (v) => displayActive = v);
|
||||
@@ -200,6 +206,8 @@
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<EventChart days={chartDays} />
|
||||
|
||||
<h3 class="text-base font-semibold mb-3 flex items-center gap-2">
|
||||
<MdiIcon name="mdiPulse" size={18} />
|
||||
{t('dashboard.recentEvents')}
|
||||
|
||||
Reference in New Issue
Block a user