add mcp
This commit is contained in:
@@ -5,7 +5,18 @@
|
||||
{% for meal in meals %}
|
||||
<section class="food-meal" id="meal-{{ meal.key }}" aria-labelledby="meal-title-{{ meal.key }}">
|
||||
<div class="food-meal-heading"><div><h2 id="meal-title-{{ meal.key }}">{{ meal.label }}</h2><p>{{ meal.calories|floatformat:0 }} kcal</p></div><a class="food-add-meal" href="{% url 'food:add' %}?date={{ day|date:'Y-m-d' }}&meal={{ meal.key }}" aria-label="Add food to {{ meal.label }}">+</a></div>
|
||||
{% if meal.entries %}<ul class="food-entry-list">{% for entry in meal.entries %}<li class="food-entry"><div class="food-entry-main">{% if entry.product and entry.product.image_url %}<img src="{{ entry.product.image_url }}" alt="" loading="lazy">{% endif %}<div><strong>{{ entry.product_name_snapshot }}</strong>{% if entry.brand_snapshot %}<span>{{ entry.brand_snapshot }}</span>{% endif %}<small>{% if entry.calories_kcal is not None %}{{ entry.calories_kcal|floatformat:0 }} kcal{% else %}— kcal{% endif %} · {% if entry.portion_label_snapshot %}{{ entry.portion_label_snapshot }} {% endif %}({{ entry.amount|floatformat:-3 }} {{ entry.unit }})</small></div></div><a href="{% url 'food:edit' entry.pk %}" aria-label="Edit {{ entry.product_name_snapshot }}">Edit</a></li>{% endfor %}</ul>{% else %}<p class="food-empty">Nothing logged yet.</p>{% endif %}
|
||||
{% if meal.entries %}<ul class="food-entry-list">{% for entry in meal.entries %}
|
||||
<li class="food-entry">
|
||||
<div class="food-entry-main">
|
||||
{% with images=entry.attachments.all %}
|
||||
{% if images %}<div class="food-entry-images">{% for attachment in images %}<a href="{% url 'food:attachment-file' attachment.api_id %}" target="_blank" rel="noopener" aria-label="View attached image{% if attachment.caption %}: {{ attachment.caption }}{% else %} for {{ entry.product_name_snapshot }}{% endif %}"><img src="{% url 'food:attachment-file' attachment.api_id %}" alt="" loading="lazy"></a>{% endfor %}</div>
|
||||
{% elif entry.product and entry.product.image_url %}<img src="{{ entry.product.image_url }}" alt="" loading="lazy">{% endif %}
|
||||
{% endwith %}
|
||||
<div><strong>{{ entry.product_name_snapshot }}</strong>{% if entry.brand_snapshot %}<span>{{ entry.brand_snapshot }}</span>{% endif %}<small>{% if entry.calories_kcal is not None %}{{ entry.calories_kcal|floatformat:0 }} kcal{% else %}— kcal{% endif %} · {% if entry.portion_label_snapshot %}{{ entry.portion_label_snapshot }} {% endif %}({{ entry.amount|floatformat:-3 }} {{ entry.unit }})</small></div>
|
||||
</div>
|
||||
<a href="{% url 'food:edit' entry.pk %}" aria-label="Edit {{ entry.product_name_snapshot }}">Edit</a>
|
||||
</li>
|
||||
{% endfor %}</ul>{% else %}<p class="food-empty">Nothing logged yet.</p>{% endif %}
|
||||
</section>
|
||||
{% endfor %}
|
||||
<a class="button" href="{% url 'food:add' %}?date={{ day|date:'Y-m-d' }}">Add food</a>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<p>Compatible assistants can use your Food and Kitchen data through MCP. Access is limited to the permissions you grant.</p>
|
||||
<div class="form-field">
|
||||
<label for="mcp-server-url">MCP server URL</label>
|
||||
<input id="mcp-server-url" type="url" value="{{ mcp_url }}" readonly data-mcp-url>
|
||||
<input id="mcp-server-url" type="url" readonly data-mcp-url>
|
||||
<button class="button button--secondary" type="button" data-mcp-copy-url>Copy URL</button>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
|
||||
Reference in New Issue
Block a user