mirror of
				https://git.sr.ht/~tsileo/microblog.pub
				synced 2025-06-05 21:59:23 +02:00 
			
		
		
		
	Add error handling for admin lookups
This commit is contained in:
		@@ -16,6 +16,18 @@
 | 
			
		||||
    </form>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    {% if error %}
 | 
			
		||||
    <div class="box error-box">
 | 
			
		||||
        {% if error.value == "NOT_FOUND" %}
 | 
			
		||||
        <p>The remote object was deleted.</p>
 | 
			
		||||
        {% elif error.value == "TIMEOUT" %}
 | 
			
		||||
        <p>Lookup timed out, please try refreshing the page.</p>
 | 
			
		||||
        {% else %}
 | 
			
		||||
        <p>Unexpected error, please check the logs and report an issue if needed.</p>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
    </div>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
 | 
			
		||||
    {% if ap_object and ap_object.ap_type in actor_types %}
 | 
			
		||||
    {{ utils.display_actor(ap_object, actors_metadata) }}
 | 
			
		||||
    {% elif ap_object %}
 | 
			
		||||
 
 | 
			
		||||
@@ -297,12 +297,12 @@
 | 
			
		||||
        <p class="p-summary">{{ object.summary | clean_html(object) | safe }}</p>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
 | 
			
		||||
    {% if object.sensitive and object.summary and object.permalink_id not in request.query_params.getlist("show_more") %}
 | 
			
		||||
    {% if object.sensitive and object.permalink_id not in request.query_params.getlist("show_more") %}
 | 
			
		||||
        {{ show_more_button(object.permalink_id) }} 
 | 
			
		||||
    {% endif %}
 | 
			
		||||
 | 
			
		||||
    {% if not object.sensitive or (object.sensitive and object.summary and object.permalink_id in request.query_params.getlist("show_more")) %}
 | 
			
		||||
        {% if object.sensitive and object.summary %}
 | 
			
		||||
    {% if not object.sensitive or (object.sensitive and object.permalink_id in request.query_params.getlist("show_more")) %}
 | 
			
		||||
        {% if object.sensitive %}
 | 
			
		||||
            {{ show_less_button(object.permalink_id) }} 
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        <div class="e-content">
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user