settingsPage Init selfhost (#4734)

# Description of Changes

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.

---------

Co-authored-by: James Brunton <[email protected]>
This commit is contained in:
Anthony Stirling
2025-10-28 14:47:41 +00:00
committed by GitHub
co-authored by James Brunton
parent d2b38ef4b8
commit d0c5d74471
68 changed files with 9133 additions and 282 deletions
+31 -6
View File
@@ -12,14 +12,19 @@ interface FooterProps {
}
export default function Footer({
privacyPolicy = 'https://www.stirling.com/legal/privacy-policy',
termsAndConditions = 'https://www.stirling.com/legal/terms-of-service',
accessibilityStatement = 'accessibility',
privacyPolicy,
termsAndConditions,
accessibilityStatement,
cookiePolicy,
impressum,
analyticsEnabled = false
}: FooterProps) {
const { t } = useTranslation();
const { showCookiePreferences } = useCookieConsent({ analyticsEnabled });
// Helper to check if a value is valid (not null/undefined/empty string)
const isValidLink = (link?: string) => link && link.trim().length > 0;
return (
<div style={{
height: 'var(--footer-height)',
@@ -43,7 +48,7 @@ export default function Footer({
>
{t('survey.nav', 'Survey')}
</a>
{privacyPolicy && (
{isValidLink(privacyPolicy) && (
<a
className="footer-link px-3"
target="_blank"
@@ -53,7 +58,7 @@ export default function Footer({
{t('legal.privacy', 'Privacy Policy')}
</a>
)}
{termsAndConditions && (
{isValidLink(termsAndConditions) && (
<a
className="footer-link px-3"
target="_blank"
@@ -63,7 +68,7 @@ export default function Footer({
{t('legal.terms', 'Terms and Conditions')}
</a>
)}
{accessibilityStatement && (
{isValidLink(accessibilityStatement) && (
<a
className="footer-link px-3"
target="_blank"
@@ -73,6 +78,26 @@ export default function Footer({
{t('legal.accessibility', 'Accessibility')}
</a>
)}
{isValidLink(cookiePolicy) && (
<a
className="footer-link px-3"
target="_blank"
rel="noopener noreferrer"
href={cookiePolicy}
>
{t('legal.cookie', 'Cookie Policy')}
</a>
)}
{isValidLink(impressum) && (
<a
className="footer-link px-3"
target="_blank"
rel="noopener noreferrer"
href={impressum}
>
{t('legal.impressum', 'Impressum')}
</a>
)}
{analyticsEnabled && (
<button
className="footer-link px-3"