mirror of
https://github.com/screentinker/screentinker.git
synced 2026-06-17 03:32:32 -06:00
feat(ui): surface the API docs link in Settings -> API Tokens (#73)
A meaningful link to /docs right under the section header (where someone's creating a token), opening in a new tab (target=_blank rel=noopener) so it doesn't navigate them away from the token they're mid-creating. "New to the API? See the full documentation ->" across all 5 locales. /docs (Redoc) already existed; this just makes it discoverable. Confirmed /docs -> 200 Redoc and /openapi.yaml -> 200. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
57d78dd1fa
commit
02859eb1aa
|
|
@ -353,6 +353,7 @@ export default {
|
||||||
// API-Tokens
|
// API-Tokens
|
||||||
'apitoken.title': 'API-Tokens',
|
'apitoken.title': 'API-Tokens',
|
||||||
'apitoken.desc': 'Persönliche Zugriffstokens für die öffentliche API, beschränkt auf diesen Arbeitsbereich. Behandeln Sie sie wie Passwörter – wer das Token hat, kann hier in Ihrem Namen handeln.',
|
'apitoken.desc': 'Persönliche Zugriffstokens für die öffentliche API, beschränkt auf diesen Arbeitsbereich. Behandeln Sie sie wie Passwörter – wer das Token hat, kann hier in Ihrem Namen handeln.',
|
||||||
|
'apitoken.docs_link': 'Neu bei der API? Zur vollständigen Dokumentation →',
|
||||||
'apitoken.name_placeholder': 'z. B. Agentur-Integration',
|
'apitoken.name_placeholder': 'z. B. Agentur-Integration',
|
||||||
'apitoken.scope_read': 'Nur Lesen',
|
'apitoken.scope_read': 'Nur Lesen',
|
||||||
'apitoken.scope_write': 'Lesen & Schreiben',
|
'apitoken.scope_write': 'Lesen & Schreiben',
|
||||||
|
|
|
||||||
|
|
@ -389,6 +389,7 @@ export default {
|
||||||
// API Tokens
|
// API Tokens
|
||||||
'apitoken.title': 'API Tokens',
|
'apitoken.title': 'API Tokens',
|
||||||
'apitoken.desc': 'Personal access tokens for the public API, scoped to this workspace. Treat them like passwords — anyone with the token can act as you here.',
|
'apitoken.desc': 'Personal access tokens for the public API, scoped to this workspace. Treat them like passwords — anyone with the token can act as you here.',
|
||||||
|
'apitoken.docs_link': 'New to the API? See the full documentation →',
|
||||||
'apitoken.name_placeholder': 'e.g. Agency integration',
|
'apitoken.name_placeholder': 'e.g. Agency integration',
|
||||||
'apitoken.scope_read': 'Read only',
|
'apitoken.scope_read': 'Read only',
|
||||||
'apitoken.scope_write': 'Read & write',
|
'apitoken.scope_write': 'Read & write',
|
||||||
|
|
|
||||||
|
|
@ -352,6 +352,7 @@ export default {
|
||||||
// Tokens de API
|
// Tokens de API
|
||||||
'apitoken.title': 'Tokens de API',
|
'apitoken.title': 'Tokens de API',
|
||||||
'apitoken.desc': 'Tokens de acceso personal para la API pública, limitados a este espacio de trabajo. Trátalos como contraseñas: cualquiera que tenga el token puede actuar como tú aquí.',
|
'apitoken.desc': 'Tokens de acceso personal para la API pública, limitados a este espacio de trabajo. Trátalos como contraseñas: cualquiera que tenga el token puede actuar como tú aquí.',
|
||||||
|
'apitoken.docs_link': '¿Nuevo en la API? Consulta la documentación completa →',
|
||||||
'apitoken.name_placeholder': 'p. ej. Integración de agencia',
|
'apitoken.name_placeholder': 'p. ej. Integración de agencia',
|
||||||
'apitoken.scope_read': 'Solo lectura',
|
'apitoken.scope_read': 'Solo lectura',
|
||||||
'apitoken.scope_write': 'Lectura y escritura',
|
'apitoken.scope_write': 'Lectura y escritura',
|
||||||
|
|
|
||||||
|
|
@ -353,6 +353,7 @@ export default {
|
||||||
// Jetons d'API
|
// Jetons d'API
|
||||||
'apitoken.title': "Jetons d'API",
|
'apitoken.title': "Jetons d'API",
|
||||||
'apitoken.desc': "Jetons d'accès personnels pour l'API publique, limités à cet espace de travail. Traitez-les comme des mots de passe : toute personne disposant du jeton peut agir en votre nom ici.",
|
'apitoken.desc': "Jetons d'accès personnels pour l'API publique, limités à cet espace de travail. Traitez-les comme des mots de passe : toute personne disposant du jeton peut agir en votre nom ici.",
|
||||||
|
'apitoken.docs_link': "Nouveau sur l'API ? Voir la documentation complète →",
|
||||||
'apitoken.name_placeholder': 'p. ex. Intégration agence',
|
'apitoken.name_placeholder': 'p. ex. Intégration agence',
|
||||||
'apitoken.scope_read': 'Lecture seule',
|
'apitoken.scope_read': 'Lecture seule',
|
||||||
'apitoken.scope_write': 'Lecture et écriture',
|
'apitoken.scope_write': 'Lecture et écriture',
|
||||||
|
|
|
||||||
|
|
@ -353,6 +353,7 @@ export default {
|
||||||
// Tokens de API
|
// Tokens de API
|
||||||
'apitoken.title': 'Tokens de API',
|
'apitoken.title': 'Tokens de API',
|
||||||
'apitoken.desc': 'Tokens de acesso pessoal para a API pública, restritos a este espaço de trabalho. Trate-os como senhas — qualquer pessoa com o token pode agir como você aqui.',
|
'apitoken.desc': 'Tokens de acesso pessoal para a API pública, restritos a este espaço de trabalho. Trate-os como senhas — qualquer pessoa com o token pode agir como você aqui.',
|
||||||
|
'apitoken.docs_link': 'Novo na API? Veja a documentação completa →',
|
||||||
'apitoken.name_placeholder': 'ex.: Integração da agência',
|
'apitoken.name_placeholder': 'ex.: Integração da agência',
|
||||||
'apitoken.scope_read': 'Somente leitura',
|
'apitoken.scope_read': 'Somente leitura',
|
||||||
'apitoken.scope_write': 'Leitura e escrita',
|
'apitoken.scope_write': 'Leitura e escrita',
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,8 @@ export async function render(container) {
|
||||||
|
|
||||||
<div class="settings-section">
|
<div class="settings-section">
|
||||||
<h3>${t('apitoken.title')}</h3>
|
<h3>${t('apitoken.title')}</h3>
|
||||||
<p style="color:var(--text-muted);font-size:12px;margin-bottom:16px">${t('apitoken.desc')}</p>
|
<p style="color:var(--text-muted);font-size:12px;margin-bottom:8px">${t('apitoken.desc')}</p>
|
||||||
|
<p style="font-size:13px;margin-bottom:16px"><a href="/docs" target="_blank" rel="noopener" style="color:var(--accent)">${t('apitoken.docs_link')}</a></p>
|
||||||
<div style="display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;margin-bottom:16px">
|
<div style="display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;margin-bottom:16px">
|
||||||
<div class="form-group" style="margin-bottom:0;flex:1;min-width:180px">
|
<div class="form-group" style="margin-bottom:0;flex:1;min-width:180px">
|
||||||
<label>${t('apitoken.col_name')}</label>
|
<label>${t('apitoken.col_name')}</label>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue