mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-21 15:36:18 -05:00
Combining information messages into <InfoMessage/>.
This commit is contained in:
parent
7c238f5dfa
commit
81e661d14c
3 changed files with 40 additions and 26 deletions
|
|
@ -5,6 +5,7 @@ import {
|
|||
Card,
|
||||
Confirm,
|
||||
Container,
|
||||
Icon as SIcon,
|
||||
IconGroup,
|
||||
Input,
|
||||
Label,
|
||||
|
|
@ -1401,4 +1402,13 @@ export function APIButton({
|
|||
);
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
export function InfoMessage({children}) {
|
||||
return <Message info icon>
|
||||
<SIcon name='question'/>
|
||||
<Message.Content>
|
||||
{children}
|
||||
</Message.Content>
|
||||
</Message>
|
||||
}
|
||||
|
|
@ -1,5 +1,14 @@
|
|||
import React, {useContext} from "react";
|
||||
import {APIButton, HelpPopup, humanFileSize, PageContainer, TabLinks, useTitle, WROLModeMessage} from "./Common";
|
||||
import {
|
||||
APIButton,
|
||||
HelpPopup,
|
||||
humanFileSize,
|
||||
InfoMessage,
|
||||
PageContainer,
|
||||
TabLinks,
|
||||
useTitle,
|
||||
WROLModeMessage
|
||||
} from "./Common";
|
||||
import {Route, Routes} from "react-router-dom";
|
||||
import {getMapImportStatus, importMapFiles} from "../api";
|
||||
import {
|
||||
|
|
@ -59,26 +68,23 @@ function DockerMapImportWarning() {
|
|||
}
|
||||
|
||||
function DownloadMessage() {
|
||||
return <Message info icon>
|
||||
<SIcon name='question'/>
|
||||
<Message.Content>
|
||||
<Message.Header>
|
||||
Where do I get map files?
|
||||
</Message.Header>
|
||||
return <InfoMessage>
|
||||
<Message.Header>
|
||||
Where do I get map files?
|
||||
</Message.Header>
|
||||
|
||||
<p>You can download map files from
|
||||
<a href='https://download.geofabrik.de/'>https://download.geofabrik.de/</a>
|
||||
</p>
|
||||
<p>You can download map files from
|
||||
<a href='https://download.geofabrik.de/'>https://download.geofabrik.de/</a>
|
||||
</p>
|
||||
|
||||
<p><b>Download only the areas you need</b>. Large regions like all of Asia, or the entire
|
||||
planet are most likely <b>too large</b> and won't render quickly. It is recommend to only
|
||||
import files less than 1GB on a Raspberry Pi.</p>
|
||||
<p><b>Download only the areas you need</b>. Large regions like all of Asia, or the entire
|
||||
planet are most likely <b>too large</b> and won't render quickly. It is recommend to only
|
||||
import files less than 1GB on a Raspberry Pi.</p>
|
||||
|
||||
<p>Only <b>*.osm.pbf</b> files are supported!</p>
|
||||
<p>Only <b>*.osm.pbf</b> files are supported!</p>
|
||||
|
||||
<p>Place downloaded map files into <b>map/pbf</b> so they can be imported here.</p>
|
||||
</Message.Content>
|
||||
</Message>
|
||||
<p>Place downloaded map files into <b>map/pbf</b> so they can be imported here.</p>
|
||||
</InfoMessage>
|
||||
}
|
||||
|
||||
function SlowImportMessage() {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import {
|
|||
APIButton,
|
||||
encodeMediaPath,
|
||||
humanFileSize,
|
||||
InfoMessage,
|
||||
normalizeEstimate,
|
||||
PageContainer,
|
||||
Paginator,
|
||||
|
|
@ -315,16 +316,13 @@ export const ZimSearchView = ({estimates}) => {
|
|||
}
|
||||
|
||||
const ViewerMessage = () => {
|
||||
return <Message info icon>
|
||||
<SIcon name='hand point right'/>
|
||||
<Message.Content>
|
||||
<p>More Zim files are available from the full Kiwix library
|
||||
<a href='https://download.kiwix.org/'>https://download.kiwix.org/</a>
|
||||
</p>
|
||||
return <InfoMessage>
|
||||
<p>More Zim files are available from the full Kiwix library
|
||||
<a href='https://download.kiwix.org/'>https://download.kiwix.org/</a>
|
||||
</p>
|
||||
|
||||
<p>You can view your Zim files using the Kiwix app, or at <a href={VIEWER_URL}>{VIEWER_URL}</a></p>
|
||||
</Message.Content>
|
||||
</Message>
|
||||
<p>You can view your Zim files using the Kiwix app, or at <a href={VIEWER_URL}>{VIEWER_URL}</a></p>
|
||||
</InfoMessage>
|
||||
}
|
||||
|
||||
const ZimCatalogItemRow = ({item, subscriptions, iso_639_codes, fetchSubscriptions}) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue