style(ui): replace all loading text with spinners per fontawesome rule

This commit is contained in:
Gigi
2025-10-05 22:02:01 +01:00
parent 29906397db
commit e710391962
4 changed files with 11 additions and 4 deletions

View File

@@ -3,4 +3,6 @@ description: when creating or modifying UI elements, especially related to icons
alwaysApply: false
---
We use FontAwesome. If you can use a fa-icon (instead of text) use a fa-icon. Always strive to keep the UI modern, beautiful, and minimalistic. Shy away from using too many colors, borders, glow, and animations.
We use FontAwesome. If you can use a fa-icon (instead of text) use a fa-icon. Always strive to keep the UI modern, beautiful, and minimalistic. Shy away from using too many colors, borders, glow, and animations.
Never write "Loading" - always show a spinner, and just a spinner.

View File

@@ -1,5 +1,7 @@
import { useState, useEffect } from 'react'
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faSpinner } from '@fortawesome/free-solid-svg-icons'
import { EventStoreProvider, AccountsProvider } from 'applesauce-react'
import { EventStore } from 'applesauce-core'
import { AccountManager } from 'applesauce-accounts'
@@ -104,7 +106,11 @@ function App() {
}, [])
if (!eventStore || !accountManager || !relayPool) {
return <div>Loading...</div>
return (
<div className="loading">
<FontAwesomeIcon icon={faSpinner} spin />
</div>
)
}
return (

View File

@@ -144,7 +144,6 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
<div className="reader loading">
<div className="loading-spinner">
<FontAwesomeIcon icon={faSpinner} spin />
<span>Loading content</span>
</div>
</div>
)

View File

@@ -199,7 +199,7 @@ export const HighlightsPanel: React.FC<HighlightsPanelProps> = ({
{loading ? (
<div className="highlights-loading">
<p>Loading highlights...</p>
<FontAwesomeIcon icon={faHighlighter} spin />
</div>
) : filteredHighlights.length === 0 ? (
<div className="highlights-empty">