feat: Enhance hook management and session handling
- Update hook model to include last_triggered_at field. - Modify API endpoints to support updating hooks with new fields. - Implement session management UI improvements with toggle functionality. - Add new JavaScript functions for better session detail visibility. - Refactor hook storage logic to handle last triggered timestamps. - Introduce new favicon and logo for branding. - Update styles for improved layout and user experience. - Enhance tests to cover new functionality and ensure reliability.
This commit is contained in:
@@ -32,6 +32,23 @@ footer {
|
||||
padding: 2rem clamp(1rem, 6vw, 4rem);
|
||||
}
|
||||
|
||||
.site-identity {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: clamp(1rem, 4vw, 1.75rem);
|
||||
}
|
||||
|
||||
.site-logo {
|
||||
width: clamp(3.25rem, 8vw, 4.75rem);
|
||||
height: auto;
|
||||
filter: drop-shadow(0 12px 24px rgba(24, 40, 92, 0.55));
|
||||
}
|
||||
|
||||
.site-title {
|
||||
display: grid;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
margin: 0;
|
||||
font-size: clamp(2rem, 5vw, 3.5rem);
|
||||
@@ -45,10 +62,10 @@ header h1 {
|
||||
}
|
||||
|
||||
main {
|
||||
display: grid;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
padding: 0 clamp(1rem, 6vw, 4rem) 4rem;
|
||||
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||
}
|
||||
|
||||
.card {
|
||||
@@ -86,6 +103,52 @@ main {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.session-summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.session-summary-main {
|
||||
display: grid;
|
||||
gap: 0.5rem;
|
||||
justify-items: start;
|
||||
}
|
||||
|
||||
.session-status-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.session-summary-text {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.session-toggle {
|
||||
align-self: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.session-details {
|
||||
margin-top: 1.5rem;
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
#session-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: stretch;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
margin-bottom: 1.5rem;
|
||||
color: var(--muted);
|
||||
@@ -144,12 +207,15 @@ button:active {
|
||||
}
|
||||
|
||||
.icon-button {
|
||||
padding: 0.6rem;
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
width: 2.75rem;
|
||||
height: 2.75rem;
|
||||
min-width: 2.75rem;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.25rem;
|
||||
border-radius: 12px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.icon {
|
||||
@@ -206,7 +272,14 @@ button:active {
|
||||
|
||||
.hook-list {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
gap: 1.25rem;
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
@media (min-width: 900px) {
|
||||
.hook-list {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
.hook-card {
|
||||
@@ -237,12 +310,26 @@ button:active {
|
||||
}
|
||||
|
||||
.hook-meta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.35rem;
|
||||
}
|
||||
|
||||
.hook-heading {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
align-items: flex-start;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.hook-timestamps {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
gap: 0.25rem;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.hook-meta h3 {
|
||||
margin: 0;
|
||||
font-size: 1rem;
|
||||
@@ -254,6 +341,11 @@ button:active {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.hook-last-run {
|
||||
font-size: 0.85rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.hook-message {
|
||||
white-space: pre-wrap;
|
||||
font-family: "JetBrains Mono", "Fira Code", monospace;
|
||||
@@ -271,6 +363,33 @@ button:active {
|
||||
user-select: all;
|
||||
}
|
||||
|
||||
.edit-hook-form {
|
||||
margin-top: 0.75rem;
|
||||
display: grid;
|
||||
gap: 0.75rem;
|
||||
padding: 0.85rem;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.edit-hook-form label {
|
||||
display: grid;
|
||||
gap: 0.35rem;
|
||||
font-size: 0.85rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.edit-hook-actions {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.edit-hook-form .save-edit {
|
||||
min-width: 8rem;
|
||||
}
|
||||
|
||||
.hook-feedback {
|
||||
margin: 0.35rem 0 0;
|
||||
min-height: 1rem;
|
||||
@@ -297,7 +416,13 @@ button:active {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hook-actions {
|
||||
.site-identity {
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.hook-actions {
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user