mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
* allowed_resources_sql plugin hook and infrastructure * New methods for checking permissions with the new system * New /-/allowed and /-/check and /-/rules special endpoints Still needs to be integrated more deeply into Datasette, especially for listing visible tables. Refs: #2502 --------- Co-authored-by: Claude <noreply@anthropic.com>
145 lines
2.7 KiB
HTML
145 lines
2.7 KiB
HTML
<style>
|
|
.permission-form {
|
|
background-color: #f5f5f5;
|
|
border: 1px solid #ddd;
|
|
border-radius: 5px;
|
|
padding: 1.5em;
|
|
margin-bottom: 2em;
|
|
}
|
|
.form-section {
|
|
margin-bottom: 1em;
|
|
}
|
|
.form-section label {
|
|
display: block;
|
|
margin-bottom: 0.3em;
|
|
font-weight: bold;
|
|
}
|
|
.form-section input[type="text"],
|
|
.form-section select {
|
|
width: 100%;
|
|
max-width: 500px;
|
|
padding: 0.5em;
|
|
box-sizing: border-box;
|
|
border: 1px solid #ccc;
|
|
border-radius: 3px;
|
|
}
|
|
.form-section input[type="text"]:focus,
|
|
.form-section select:focus {
|
|
outline: 2px solid #0066cc;
|
|
border-color: #0066cc;
|
|
}
|
|
.form-section small {
|
|
display: block;
|
|
margin-top: 0.3em;
|
|
color: #666;
|
|
}
|
|
.form-actions {
|
|
margin-top: 1em;
|
|
}
|
|
.submit-btn {
|
|
padding: 0.6em 1.5em;
|
|
font-size: 1em;
|
|
background-color: #0066cc;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
}
|
|
.submit-btn:hover {
|
|
background-color: #0052a3;
|
|
}
|
|
.submit-btn:disabled {
|
|
background-color: #ccc;
|
|
cursor: not-allowed;
|
|
}
|
|
.results-container {
|
|
margin-top: 2em;
|
|
}
|
|
.results-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 1em;
|
|
}
|
|
.results-count {
|
|
font-size: 0.9em;
|
|
color: #666;
|
|
}
|
|
.results-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
background-color: white;
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
}
|
|
.results-table th {
|
|
background-color: #f5f5f5;
|
|
padding: 0.75em;
|
|
text-align: left;
|
|
font-weight: bold;
|
|
border-bottom: 2px solid #ddd;
|
|
}
|
|
.results-table td {
|
|
padding: 0.75em;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
.results-table tr:hover {
|
|
background-color: #f9f9f9;
|
|
}
|
|
.results-table tr.allow-row {
|
|
background-color: #f1f8f4;
|
|
}
|
|
.results-table tr.allow-row:hover {
|
|
background-color: #e8f5e9;
|
|
}
|
|
.results-table tr.deny-row {
|
|
background-color: #fef5f5;
|
|
}
|
|
.results-table tr.deny-row:hover {
|
|
background-color: #ffebee;
|
|
}
|
|
.resource-path {
|
|
font-family: monospace;
|
|
background-color: #f5f5f5;
|
|
padding: 0.2em 0.4em;
|
|
border-radius: 3px;
|
|
}
|
|
.pagination {
|
|
margin-top: 1.5em;
|
|
display: flex;
|
|
gap: 1em;
|
|
align-items: center;
|
|
}
|
|
.pagination a {
|
|
padding: 0.5em 1em;
|
|
background-color: #0066cc;
|
|
color: white;
|
|
text-decoration: none;
|
|
border-radius: 3px;
|
|
}
|
|
.pagination a:hover {
|
|
background-color: #0052a3;
|
|
}
|
|
.pagination span {
|
|
color: #666;
|
|
}
|
|
.no-results {
|
|
padding: 2em;
|
|
text-align: center;
|
|
color: #666;
|
|
background-color: #f9f9f9;
|
|
border: 1px solid #ddd;
|
|
border-radius: 5px;
|
|
}
|
|
.error-message {
|
|
padding: 1em;
|
|
background-color: #ffebee;
|
|
border: 2px solid #f44336;
|
|
border-radius: 5px;
|
|
color: #c62828;
|
|
}
|
|
.loading {
|
|
padding: 2em;
|
|
text-align: center;
|
|
color: #666;
|
|
}
|
|
</style>
|