Files
nc_bot_webhooks/css/adminSettings.css
T
kyle aa06394aa9 feat: enhance webhook settings UI and security: Mostly working, just final post not functioning
- Add CSS styles for token URL input and hints
- Implement safe data attribute parsing in settings.js
- Refactor room fetching logic to use promise chains and auto-fetch on load
- Display full webhook URLs in the settings UI instead of raw tokens
- Generate URL-safe base64 tokens to prevent encoding issues
- Add #[PublicPage] attribute to WebhookController for unauthenticated delivery
- Filter out internal Nextcloud Talk system rooms from the room picker
- Add OCS-ApiRequest header to bot API requests
- Sanitize data attributes in templates to prevent XSS
2026-06-11 10:55:30 -07:00

94 lines
1.9 KiB
CSS

.nc-settings-section {
margin-bottom: 2em;
padding: 1em;
border: 1px solid var(--color-border);
border-radius: 4px;
}
.nc-settings-section h3 {
margin-top: 0;
}
.nc-room-item {
display: flex;
align-items: center;
gap: 8px;
padding: 4px 0;
}
.nc-room-item span {
font-size: 0.9em;
}
.nc-room-tokens {
margin-left: 24px;
margin-top: 8px;
padding: 8px;
background: var(--color-background-dark);
border-radius: 4px;
}
.nc-token-row {
display: flex;
gap: 4px;
margin-bottom: 4px;
}
.nc-token-input {
flex: 1;
font-family: monospace;
font-size: 0.85em;
background: var(--color-main-background);
border: 1px solid var(--color-border);
padding: 4px 8px;
border-radius: 3px;
}
.nc-token-url-input {
flex: 1;
font-family: monospace;
font-size: 0.8em;
background: var(--color-main-background);
border: 1px solid var(--color-border);
padding: 4px 8px;
border-radius: 3px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.nc-token-hint {
color: var(--color-text-lighter);
font-size: 0.85em;
margin: 4px 0;
}
.nc-token-copy {
padding: 4px 8px;
background: var(--color-primary-element);
color: white;
border: none;
border-radius: 3px;
cursor: pointer;
font-size: 0.85em;
}
.nc-token-revoke {
padding: 4px 8px;
background: var(--color-error);
color: white;
border: none;
border-radius: 3px;
cursor: pointer;
font-size: 0.85em;
}
.nc-generate-token {
margin-top: 8px;
padding: 4px 12px;
background: var(--color-primary-element);
color: white;
border: none;
border-radius: 3px;
cursor: pointer;
}
.nc-empty {
color: var(--color-text-lighter);
font-style: italic;
}
.nc-status-success { color: var(--color-success); }
.nc-status-error { color: var(--color-error); }
.nc-hint {
font-size: 0.85em;
color: var(--color-text-lighter);
}