mirror of
https://github.com/Casvt/MIND.git
synced 2026-04-03 03:00:22 -04:00
Added admin panel
* Added API and UI base for panel * Added option to disable registration (Fixes #27) * Added settings for login duration (Resolves #39) * Added user management and download database button
This commit is contained in:
259
frontend/static/css/admin.css
Normal file
259
frontend/static/css/admin.css
Normal file
@@ -0,0 +1,259 @@
|
||||
main {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
--spacing: .5rem;
|
||||
|
||||
position: absolute;
|
||||
margin: var(--spacing);
|
||||
inset: 0 0 auto 0;
|
||||
height: var(--nav-width);
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: calc(var(--spacing) * 3);
|
||||
|
||||
padding: var(--spacing);
|
||||
border-radius: 4px;
|
||||
background-color: var(--color-gray);
|
||||
}
|
||||
|
||||
.action-buttons > button {
|
||||
height: 100%;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
padding: .5rem;
|
||||
border-radius: 4px;
|
||||
background-color: var(--color-dark);
|
||||
color: var(--color-light);
|
||||
|
||||
transition: background-color .1s ease-in-out;
|
||||
}
|
||||
|
||||
.action-buttons > button:hover {
|
||||
background-color: var(--color-gray);
|
||||
}
|
||||
|
||||
.action-buttons > button > svg {
|
||||
height: 1.8rem;
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
.form-container {
|
||||
height: calc(100vh - var(--header-height));
|
||||
overflow-y: auto;
|
||||
|
||||
padding: .5rem;
|
||||
padding-top: calc(1rem + var(--nav-width));
|
||||
}
|
||||
|
||||
#settings-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
width: 100%;
|
||||
|
||||
border-bottom: 1px solid var(--color-gray);
|
||||
padding: 1rem 1rem 0rem 1rem;
|
||||
|
||||
font-size: clamp(1rem, 10vw, 2rem);
|
||||
}
|
||||
|
||||
.table-container {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.settings-table {
|
||||
--max-width: 55rem;
|
||||
width: 100%;
|
||||
max-width: var(--max-width);
|
||||
min-width: 20rem;
|
||||
|
||||
border-spacing: 0px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.settings-table td {
|
||||
--middle-spacing: .75rem;
|
||||
padding-bottom: 1rem;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.settings-table td:first-child {
|
||||
width: 50%;
|
||||
padding-right: var(--middle-spacing);
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.settings-table td:nth-child(2) {
|
||||
min-width: calc(var(--max-width) * 0.5);
|
||||
padding-left: var(--middle-spacing);
|
||||
}
|
||||
|
||||
.settings-table td p {
|
||||
color: var(--color-light-gray);
|
||||
font-size: .9rem;
|
||||
}
|
||||
|
||||
.number-input {
|
||||
width: fit-content;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
border: 2px solid var(--color-gray);
|
||||
border-radius: 4px;
|
||||
|
||||
box-shadow: var(--default-shadow);
|
||||
}
|
||||
|
||||
.number-input > input {
|
||||
width: auto;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.number-input > p {
|
||||
padding: .75rem .75rem .75rem 0rem;
|
||||
}
|
||||
|
||||
.settings-table select {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.add-user-container,
|
||||
.database-container {
|
||||
margin-bottom: 1rem;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#add-user-button,
|
||||
#download-db-button {
|
||||
margin-top: 2rem;
|
||||
|
||||
width: min(15rem, 100%);
|
||||
height: 2rem;
|
||||
|
||||
padding: .5rem 1rem;
|
||||
border-radius: 4px;
|
||||
background-color: var(--color-gray);
|
||||
|
||||
box-shadow: var(--default-shadow);
|
||||
}
|
||||
|
||||
#download-db-button {
|
||||
height: unset;
|
||||
}
|
||||
|
||||
#add-user-button > svg {
|
||||
aspect-ratio: 1/1;
|
||||
height: 1rem;
|
||||
width: min-content;
|
||||
}
|
||||
|
||||
#user-table {
|
||||
min-width: 25rem;
|
||||
border-spacing: 0px;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
#user-table th,
|
||||
#user-table td {
|
||||
padding: .25rem .5rem;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#user-table tr td {
|
||||
border-top: 1px solid var(--color-gray);
|
||||
}
|
||||
|
||||
#user-table th:first-child,
|
||||
#user-table td:first-child {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
#user-table th:last-child,
|
||||
#user-table td:last-child {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
padding-right: 2rem;
|
||||
}
|
||||
|
||||
#user-table td:first-child {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#user-table svg {
|
||||
aspect-ratio: 1/1;
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
}
|
||||
|
||||
#new-username-input,
|
||||
#new-password-input {
|
||||
width: 40%;
|
||||
padding: .25rem;
|
||||
}
|
||||
|
||||
#user-list form {
|
||||
margin-top: .5rem;
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
#user-list input[type="password"] {
|
||||
padding: .25rem;
|
||||
}
|
||||
|
||||
@media (max-width: 40rem) {
|
||||
#settings-form,
|
||||
.table-container {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
padding-inline: 0;
|
||||
}
|
||||
|
||||
.settings-table tbody {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.settings-table tr {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.settings-table td {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.settings-table td:first-child {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.settings-table td:nth-child(2) {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
#user-table {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user