mirror of
https://github.com/dergigi/boris.git
synced 2026-02-23 16:04:29 +01:00
style(ui): replace all loading text with spinners per fontawesome rule
This commit is contained in:
@@ -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.
|
||||
@@ -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 (
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user