{* SPDX-FileCopyrightText: © 2025 Olivier Meunier SPDX-License-Identifier: AGPL-3.0-only *} {{ extends "./base" }} {{ import "/_libs/forms" }} {{ import "/_libs/list"}} {{ block title() }}{{ gettext("Applications") }}{{ end }} {{ block mainContent() }}

{{ yield title() }}

{{ gettext(` Applications are registered clients that have permissions to access your Readeck account. If there are applications you do not recognize here, or an application is misbehaving, you can revoke its access. `) }}

{{ if len(.Tokens) == 0 }}

{{ gettext(`You have no registered application at the moment.`) }}

{{ else }} {{ include "/_libs/pagination" .Pagination }} {{ yield list() content }} {{ range .Tokens }} {{ yield list_item(class="flex gap-2 items-start hfw:bg-gray-100 max-md:block") content }}
{{- if .ClientLogo != "" -}} {{- else -}} {{ yield icon(name="o-applications", class="text-gray-700", svgClass="w-8 h-8") }} {{- end -}}

{{ .ClientName }}

{{ .ClientURI }}

{{ gettext("Authorized on: %s", date(.Created, pgettext("datetime", "%e %B %Y"))) }} {{- if .LastUsed -}}
{{ gettext("Last used on: %s", date(.LastUsed, "%c")) }} {{- end -}}

{{ gettext("Permissions") }}

    {{- range .RoleNames -}}
  • {{ yield icon(name="o-check-on", class="svgicon text-green-700") }} {{ . }}
  • {{- end -}}
{{- if .IsDeleted -}}
{{ gettext("This client will be revoked in a few seconds.") }}
{{- else -}}
{{- end -}} {{ end }} {{ end }} {{ end }}
{{ include "/_libs/pagination" .Pagination }} {{ end }} {{- yield message(type="info") content -}}
{{ gettext(`Developer information`) }}

{{ gettext(` If you plan to build an application, please refer to the API Documentation. `, html(urlFor("/docs/api") + "#overview--authentication-with-oauth")) | raw }}

{{- end -}} {{ end }}