Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/app/components/workspace/create-workspace.css
Original file line number Diff line number Diff line change
Expand Up @@ -450,3 +450,16 @@ label {
transform: translateY(0);
}
}

.spinner {
width: 18px;
height: 18px;
border: 2px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top-color: #ffffff;
animation: spin 0.8s linear infinite;
}

@keyframes spin {
to { transform: rotate(360deg); }
}
3 changes: 2 additions & 1 deletion src/app/components/workspace/create-workspace.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ <h1>Create Workspace</h1>

<div class="form-actions">
<button type="submit" [disabled]="isSubmitting || !workspaceForm.form.valid" class="premium-btn">
<span *ngIf="isSubmitting" class="spinner" aria-hidden="true"></span>
<span>{{ isSubmitting ? 'Creating...' : 'Create Workspace' }}</span>
<span aria-hidden="true">→</span>
<span *ngIf="!isSubmitting" aria-hidden="true">→</span>
</button>
</div>
</form>
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/workspace/create-workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ export class CreateWorkspace {
this.error = 'An error occurred while loading the dashboard.';
});
},
error: () => {
this.error = 'Unable to create workspace. Please try again.';
error: (err) => {
this.error = err.message || 'Unable to create workspace. Please try again.';
this.isSubmitting = false;
}
});
Expand Down
Loading