fix: resolve JS errors on messages and platform-homepage pages

- messages.js: Add missing `error` property required by error_state macro
- platform-homepage.html: Use `<template x-if>` instead of `x-show` to
  prevent Alpine from evaluating `page.template` when `page` is null

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-21 22:08:28 +01:00
parent e364167c45
commit 6de80a2d62
2 changed files with 4 additions and 1 deletions

View File

@@ -33,7 +33,8 @@
{{ alert_dynamic(type='success', message_var='successMessage', show_condition='successMessage') }}
<!-- Main Form -->
<div x-show="!loading && page" class="bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden">
<template x-if="!loading && page">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden">
<form @submit.prevent="savePage()">
<!-- Template Selection -->
<div class="p-6 border-b border-gray-200 dark:border-gray-700">
@@ -213,6 +214,7 @@
</div>
</form>
</div>
</template>
{% endblock %}
{% block extra_scripts %}

View File

@@ -20,6 +20,7 @@ function adminMessages(initialConversationId = null) {
// Loading states
loading: true,
error: null,
loadingConversations: false,
loadingMessages: false,
sendingMessage: false,