Refactor components to use ModalDialog and StatusMessage; update styles and remove unused files
Some checks failed
Gitea Actions Demo / build-and-push (push) Failing after 9s

- Replaced inline modal dialogs in ParentView with a reusable ModalDialog component.
- Introduced StatusMessage component for loading and error states in ParentView.
- Updated styles to use new colors.css and styles.css for consistent theming.
- Removed ChildRewardList.vue and ChildTaskList.vue components as they were no longer needed.
- Adjusted RewardAssignView and TaskAssignView to use new styles and shared button styles.
- Cleaned up imports across components to reflect the new styles and removed unused CSS files.
This commit is contained in:
2026-01-22 16:37:53 -05:00
parent a0a059472b
commit 63769fbe32
20 changed files with 438 additions and 674 deletions

View File

@@ -1,20 +1,3 @@
.actions {
display: flex;
gap: 3rem;
justify-content: center;
margin-top: 0.5rem;
}
.actions button {
padding: 1rem 2.2rem;
border-radius: 12px;
border: 0;
cursor: pointer;
font-weight: 700;
font-size: 1.25rem;
transition: background 0.18s;
min-width: 120px;
}
/* Unified error style */
.error {
color: var(--error);
@@ -25,17 +8,6 @@
padding: 1rem;
}
@media (max-width: 480px) {
.actions {
gap: 1.2rem;
}
.actions button {
padding: 0.8rem 1.2rem;
font-size: 1.05rem;
min-width: 90px;
}
}
/* Error message */
.error-message {
color: var(--error, #e53e3e);

View File

@@ -1,65 +1,3 @@
/* Base button style */
.btn {
font-weight: 600;
border: none;
border-radius: 8px;
padding: 0.7rem 1.5rem;
font-size: 1.1rem;
cursor: pointer;
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
transition:
background 0.18s,
color 0.18s;
display: inline-block;
}
/* Primary button (e.g., Save, Confirm) */
.btn-primary {
background: var(--btn-primary);
color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
background: var(--btn-primary-hover);
}
.btn-primary:disabled,
.btn-primary[disabled] {
background: var(--btn-secondary, #f3f3f3);
color: var(--btn-secondary-text, #666);
cursor: not-allowed;
opacity: 0.7;
}
/* Secondary button (e.g., Cancel) */
.btn-secondary {
background: var(--btn-secondary);
color: var(--btn-secondary-text);
}
.btn-secondary:hover,
.btn-secondary:focus {
background: var(--btn-secondary-hover);
}
/* Danger button (e.g., Delete) */
.btn-danger {
background: var(--btn-danger);
color: #fff;
}
.btn-danger:hover,
.btn-danger:focus {
background: var(--btn-danger-hover);
}
/* Green button (e.g., Confirm) */
.btn-green {
background: var(--btn-green);
color: #fff;
}
.btn-green:hover,
.btn-green:focus {
background: var(--btn-green-hover);
}
.form-btn {
padding: 0.6rem 1rem;
border-radius: 8px;
@@ -81,41 +19,3 @@
background: var(--btn-primary-hover, #5a67d8);
transform: translateY(-1px);
}
/* Link-style button */
.btn-link {
color: var(--btn-primary);
text-decoration: underline;
background: none;
border: none;
padding: 0;
cursor: pointer;
font-weight: 600;
margin-left: 6px;
}
.btn-link:disabled {
text-decoration: none;
opacity: 0.75;
cursor: default;
pointer-events: none;
color: var(--btn-primary);
}
.round-btn {
background: var(--sign-in-btn-bg);
color: var(--sign-in-btn-color);
border: 2px solid var(--sign-in-btn-border);
border-radius: 6px;
font-size: 0.85rem;
font-weight: 600;
padding: 0.2rem 0.5rem;
margin-right: 0.1rem;
cursor: pointer;
transition:
background 0.18s,
color 0.18s;
}
.round-btn:hover {
background: var(--sign-in-btn-hover-bg);
color: var(--sign-in-btn-hover-color);
}

View File

@@ -37,8 +37,8 @@
--list-item-border-reward: #38c172;
--list-item-border-bad: #e53e3e;
--list-item-border-good: #00e1ff;
--list-item-bg-reward: #94ffb1;
--list-item-bg-bad: #ffc5c5;
--list-item-bg-reward: #4ed271;
--list-item-bg-bad: #f98a8a;
--list-item-bg-good: #8dabfd;
--list-image-bg: #eee;
--delete-btn-hover-bg: #ffeaea;

View File

@@ -0,0 +1,100 @@
/*buttons*/
.btn {
font-weight: 600;
border: none;
border-radius: 8px;
padding: 0.7rem 1.5rem;
font-size: 1.1rem;
cursor: pointer;
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
transition:
background 0.18s,
color 0.18s;
display: inline-block;
}
/* Primary button (e.g., Save, Confirm) */
.btn-primary {
background: var(--btn-primary);
color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
background: var(--btn-primary-hover);
}
.btn-primary:disabled,
.btn-primary[disabled] {
background: var(--btn-secondary, #f3f3f3);
color: var(--btn-secondary-text, #666);
cursor: not-allowed;
opacity: 0.7;
}
/* Secondary button (e.g., Cancel) */
.btn-secondary {
background: var(--btn-secondary);
color: var(--btn-secondary-text);
}
.btn-secondary:hover,
.btn-secondary:focus {
background: var(--btn-secondary-hover);
}
/* Danger button (e.g., Delete) */
.btn-danger {
background: var(--btn-danger);
color: #fff;
}
.btn-danger:hover,
.btn-danger:focus {
background: var(--btn-danger-hover);
}
/* Green button (e.g., Confirm) */
.btn-green {
background: var(--btn-green);
color: #fff;
}
.btn-green:hover,
.btn-green:focus {
background: var(--btn-green-hover);
}
/* Link-style button */
.btn-link {
color: var(--btn-primary);
text-decoration: underline;
background: none;
border: none;
padding: 0;
cursor: pointer;
font-weight: 600;
margin-left: 6px;
}
.btn-link:disabled {
text-decoration: none;
opacity: 0.75;
cursor: default;
pointer-events: none;
color: var(--btn-primary);
}
/* Rounded button */
.round-btn {
background: var(--sign-in-btn-bg);
color: var(--sign-in-btn-color);
border: 2px solid var(--sign-in-btn-border);
border-radius: 6px;
font-size: 0.85rem;
font-weight: 600;
padding: 0.2rem 0.5rem;
margin-right: 0.1rem;
cursor: pointer;
transition:
background 0.18s,
color 0.18s;
}
.round-btn:hover {
background: var(--sign-in-btn-hover-bg);
color: var(--sign-in-btn-hover-color);
}

View File

@@ -41,20 +41,6 @@
text-align: center;
}
/* Dialog Message */
.dialog-message {
font-size: 1.08rem;
color: var(--dialog-message);
font-weight: 500;
margin-bottom: 1.2rem;
text-align: center;
}
.dialog-message .child-name {
color: var(--dialog-child-name);
font-weight: 700;
margin-left: 2px;
}
/* Info Sections (Reward/Task) */
.info,
.reward-info,