fix api app link

pull/24/head
Aevann1 2022-11-26 06:41:56 +02:00 committed by geese_suck
parent cfe112e67d
commit 93058079eb
Signed by: geese_suck
GPG Key ID: 4D09E4B0A7264746
4 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ class OauthApp(Base):
@property
@lazy
def permalink(self):
return f"{SITE_FULL}/admin/app/{self.id}/posts"
return f"{SITE_FULL}/admin/app/{self.id}"
@lazy
def idlist(self, db:scoped_session, page=1):

View File

@ -8,7 +8,7 @@
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="over18"><a href="{{app.permalink}}" {% if v and v.newtab %}data-target="t"target="_blank"{% endif %}>{{app.app_name}}</a></label>
<label for="over18"><a href="{{app.permalink}}/posts" {% if v and v.newtab %}data-target="t"target="_blank"{% endif %}>{{app.app_name}}</a></label>
</div>
<div class="body w-lg-100">

View File

@ -41,7 +41,7 @@
<button type="button" class="list-inline-item" data-bs-toggle="dropdown" aria-expanded="false"><i class="fas fa-ellipsis-h fa-fw"></i></button>
<ul class="dropdown-menu">
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] and p.oauth_app %}
<a class="dropdown-item list-inline-item text-info" href="{{p.oauth_app.permalink}}"><i class="fas fa-code"></i>API App</a>
<a class="dropdown-item list-inline-item text-info" href="{{p.oauth_app.permalink}}/posts"><i class="fas fa-code"></i>API App</a>
{% endif %}
{% if v.admin_level >= PERMS['POST_COMMENT_DISTINGUISH'] %}

View File

@ -10,7 +10,7 @@
<div class="modal-body">
<ul class="list-group post-actions">
{% if v.admin_level >= PERMS['APPS_MODERATION'] and p.oauth_app %}
<a href="{{p.oauth_app.permalink}}" class="nobackground btn btn-link btn-block btn-lg text-muted text-left text-info"><i class="far fa-code text-center text-info mr-2"></i>API App</a>
<a href="{{p.oauth_app.permalink}}/posts" class="nobackground btn btn-link btn-block btn-lg text-muted text-left text-info"><i class="far fa-code text-center text-info mr-2"></i>API App</a>
{% endif %}
{% if (request.path.startswith('/post/') or request.path.startswith('/h/')) and v.admin_level >= PERMS['POST_EDITING'] and p.id %}