feat: basic support for liquid templates; liquid receipt "Day in History" added

This commit is contained in:
Benjamin Nussbaum 2025-03-17 22:52:35 +01:00
parent 88f90ff9ae
commit 9a9b5080d6
5 changed files with 321 additions and 1 deletions

View file

@ -23,9 +23,18 @@ class DatabaseSeeder extends Seeder
'password' => bcrypt('admin@example.com'),
]);
Device::factory(1)->create([
'mac_address' => '00:00:00:00:00:00',
'api_key' => 'test-api-key'
]);
// Device::factory(5)->create();
// Plugin::factory(3)->create();
$this->call([
ExampleReceiptsSeeder::class,
]);
}
}
}

View file

@ -68,5 +68,24 @@ class ExampleReceiptsSeeder extends Seeder
'flux_icon_name' => 'chat-bubble-bottom-center',
]
);
Plugin::create(
[
'uuid' => '8d472959-400f-46ee-afb2-4a9f1cfd521f',
'name' => 'This Day in History',
'user_id' => '1',
'data_payload' => null,
'data_stale_minutes' => 720,
'data_strategy' => 'polling',
'polling_url' => 'https://raw.githubusercontent.com/jvivona/tidbyt-data/refs/heads/main/thisdayinhistwikipedia/thisdayinhist.json',
'polling_verb' => 'get',
'polling_header' => null,
'render_markup' => null,
'render_markup_view' => 'receipts.day-in-history',
'detail_view_route' => null,
'icon_url' => null,
'flux_icon_name' => 'calendar',
]
);
}
}