2024-03-06 15:34:00 +00:00
|
|
|
import { md, mdi } from '../filters.ts';
|
|
|
|
|
|
|
|
const badges = [
|
|
|
|
"support",
|
|
|
|
"backups",
|
|
|
|
"anonymousUsage",
|
|
|
|
"zeroKnowledge",,
|
|
|
|
"loggingMinimized",
|
|
|
|
"decentralized",
|
|
|
|
"storageEncrypted",
|
|
|
|
] as string[];
|
|
|
|
|
|
|
|
export default ({ data, language, className = '', }) => {
|
|
|
|
const { services, strings } = data;
|
|
|
|
return <>
|
|
|
|
{services.map((service, i) => {
|
|
|
|
return <section key={i} className={`${className} ps-service`}>
|
|
|
|
<header className="ps-service--header">
|
2024-06-06 18:26:50 +00:00
|
|
|
<a href={service.link} className="ps-service--title-link" target="_blank">
|
2024-06-06 17:53:52 +00:00
|
|
|
<h2 className="ps-service--title" id={service.id}>{service.name} ↗</h2>
|
|
|
|
</a>
|
2024-03-06 15:34:00 +00:00
|
|
|
|
|
|
|
<div className="ps-service--links">
|
2024-04-11 16:18:14 +00:00
|
|
|
{service.wiki ? <a href={service.wiki} target="_blank">{ strings.wiki_help_page[language.slug] }</a> : null}
|
2024-03-06 15:34:00 +00:00
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<div
|
|
|
|
className="ps-service--description"
|
|
|
|
dangerouslySetInnerHTML={{ __html: md(service.description[language.slug]) }}
|
|
|
|
></div>
|
|
|
|
|
|
|
|
<div className="ps-service--badges">
|
|
|
|
{badges.map((badge, i) => {
|
|
|
|
const { status, comment } = service[badge];
|
|
|
|
|
|
|
|
return <details key={i} className={`ps-service--badge ps-service--badge_${status}`}>
|
|
|
|
<summary className="ps-service--badge-header">
|
|
|
|
<div className="ps-service--badge-title">{strings[badge].name[language.slug]}</div>
|
|
|
|
<div className="ps-service--badge-status">{strings.states[status][language.slug]}</div>
|
|
|
|
</summary>
|
|
|
|
|
|
|
|
<p dangerouslySetInnerHTML={{ __html: md(strings[badge].description[language.slug]) }}></p>
|
|
|
|
|
|
|
|
<p dangerouslySetInnerHTML={{ __html: md(strings[badge].states[status][language.slug]) }}></p>
|
|
|
|
|
|
|
|
{comment ? <p dangerouslySetInnerHTML={{ __html: md(comment[language.slug]) }}></p> : null }
|
|
|
|
</details>;
|
|
|
|
})}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</section>;
|
|
|
|
})}
|
|
|
|
</>;
|
|
|
|
};
|