Add badge for public functions and move function link to right
This commit is contained in:
@@ -20,6 +20,15 @@
|
|||||||
<div class="flex-grow flex items-center gap-2 cursor-pointer"
|
<div class="flex-grow flex items-center gap-2 cursor-pointer"
|
||||||
hx-get="{{ url_for('http.editor', function_id=function['id']) }}" hx-target="#container" hx-swap="innerHTML"
|
hx-get="{{ url_for('http.editor', function_id=function['id']) }}" hx-target="#container" hx-swap="innerHTML"
|
||||||
hx-push-url="true">
|
hx-push-url="true">
|
||||||
|
{% if function.is_public %}
|
||||||
|
<span
|
||||||
|
class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
|
||||||
|
<svg class="w-2 h-2 mr-1.5 fill-current" viewBox="0 0 8 8">
|
||||||
|
<circle cx="4" cy="4" r="3" />
|
||||||
|
</svg>
|
||||||
|
Public
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
<span class="font-medium">{{ function.name.split('/')[-1] }}</span>
|
<span class="font-medium">{{ function.name.split('/')[-1] }}</span>
|
||||||
<span class="bg-blue-100 text-blue-800 text-xs font-medium px-2.5 py-0.5 rounded-full">
|
<span class="bg-blue-100 text-blue-800 text-xs font-medium px-2.5 py-0.5 rounded-full">
|
||||||
v{{ function.version_number }}
|
v{{ function.version_number }}
|
||||||
@@ -41,14 +50,6 @@
|
|||||||
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<a href="{{ url_for('execute_http_function', user_id=function.user_id, function=function.name) }}"
|
|
||||||
target="_blank" class="p-1 text-gray-400 hover:text-gray-600">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
|
|
||||||
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
|
|
||||||
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
|
||||||
</svg>
|
|
||||||
</a>
|
|
||||||
<button class="p-1 text-gray-400 hover:text-gray-600"
|
<button class="p-1 text-gray-400 hover:text-gray-600"
|
||||||
hx-get="{{ url_for('http.client', function_id=function['id']) }}" hx-target="#container"
|
hx-get="{{ url_for('http.client', function_id=function['id']) }}" hx-target="#container"
|
||||||
hx-swap="innerHTML" hx-push-url="true">
|
hx-swap="innerHTML" hx-push-url="true">
|
||||||
@@ -60,6 +61,14 @@
|
|||||||
d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
<a href="{{ url_for('execute_http_function', user_id=function.user_id, function=function.name) }}"
|
||||||
|
target="_blank" class="p-1 text-gray-400 hover:text-gray-600">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
|
||||||
|
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
|
||||||
|
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user