caelum0x 6ee7ff4033 fix(ritgram): rebrand Gitgram->Ritgram everywhere user-visible, fix OG/sitemap base URL, real 404s
- sitemap.xml, robots.txt, og:url, og:image, twitter:image, metadataBase all
  resolve from NEXT_PUBLIC_SITE_URL with a https://ritgram.ereboslab.com
  default instead of the dead gitgram.app (NXDOMAIN).
- Page titles, OG copy, PWA manifest, offline.html, service-worker push
  notification title: Gitgram -> Ritgram. Left internal SW cache-name/tag
  strings (gitgram-static-, gitgram-sync, etc.) alone as low-risk code
  identifiers.
- /[owner]/page.tsx (top-level profile route) converted to an async Server
  Component that calls fetchProfile() + notFound() before any HTML streams,
  so a GET on any nonexistent username now returns a real 404 instead of a
  200 loading-shell (the same pattern [owner]/[name]/page.tsx already used
  one level down).
- apps/ritgram/backend: matching Gitgram->Ritgram string rename sweep across
  controllers/services/config comments and defaults (EMAIL_FROM,
  AITM_API_URL description, etc.) — no behavior change.
- apps/ritgram/mobile: matching user-visible string rename sweep.

tsc --noEmit clean on both web and backend.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-17 03:20:08 +03:00

161 lines
3.8 KiB
TypeScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from 'react';
import {
View,
Text,
StyleSheet,
ScrollView,
TouchableOpacity,
Linking,
} from 'react-native';
import { Colors } from '../../../constants/Colors';
import Header from '../../../components/navigation/Header';
import Icon from 'react-native-vector-icons/MaterialIcons';
import Constants from 'expo-constants';
import { logger } from '../../../utils/logger';
export default function AboutScreen() {
const appVersion = Constants.expoConfig?.version || '1.0.0';
const links = [
{
id: 'terms',
label: 'Terms of Service',
icon: 'description',
url: 'https://ritgram.ereboslab.com/terms',
},
{
id: 'privacy',
label: 'Privacy Policy',
icon: 'privacy-tip',
url: 'https://ritgram.ereboslab.com/privacy',
},
{
id: 'github',
label: 'GitHub Repository',
icon: 'code',
url: 'https://github.com/gitgram/gitgram',
},
{
id: 'support',
label: 'Support',
icon: 'help',
url: 'https://ritgram.ereboslab.com/support',
},
];
const handleLinkPress = async (url: string) => {
try {
await Linking.openURL(url);
} catch (error) {
logger.error('Failed to open URL:', error);
}
};
return (
<ScrollView style={styles.container}>
<Header title="About" />
<View style={styles.content}>
<View style={styles.logoContainer}>
<Text style={styles.logo}>📱</Text>
<Text style={styles.appName}>Ritgram</Text>
<Text style={styles.version}>Version {appVersion}</Text>
</View>
<Text style={styles.description}>
Ritgram is a social platform for GitHub projects. Share your code, discover amazing projects, and connect with developers around the world.
</Text>
<View style={styles.section}>
<Text style={styles.sectionTitle}>Legal</Text>
{links.map((link) => (
<TouchableOpacity
key={link.id}
style={styles.linkItem}
onPress={() => handleLinkPress(link.url)}
>
<Icon name={link.icon} size={24} color={Colors.accent} />
<Text style={styles.linkLabel}>{link.label}</Text>
<Icon name="open-in-new" size={20} color={Colors.textSecondary} />
</TouchableOpacity>
))}
</View>
<View style={styles.section}>
<Text style={styles.sectionTitle}>Credits</Text>
<Text style={styles.creditText}>
Built with ❤️ by the Ritgram team
</Text>
<Text style={styles.creditText}>
© {new Date().getFullYear()} Ritgram. All rights reserved.
</Text>
</View>
</View>
</ScrollView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: Colors.background,
},
content: {
padding: 20,
},
logoContainer: {
alignItems: 'center',
marginBottom: 32,
},
logo: {
fontSize: 64,
marginBottom: 16,
},
appName: {
fontSize: 32,
fontWeight: 'bold',
color: Colors.text,
marginBottom: 8,
},
version: {
fontSize: 14,
color: Colors.textSecondary,
},
description: {
fontSize: 16,
color: Colors.text,
lineHeight: 24,
textAlign: 'center',
marginBottom: 32,
},
section: {
marginBottom: 32,
},
sectionTitle: {
fontSize: 18,
fontWeight: '600',
color: Colors.text,
marginBottom: 16,
},
linkItem: {
flexDirection: 'row',
alignItems: 'center',
padding: 16,
backgroundColor: Colors.surface,
borderRadius: 8,
marginBottom: 12,
gap: 12,
},
linkLabel: {
flex: 1,
fontSize: 16,
color: Colors.text,
},
creditText: {
fontSize: 14,
color: Colors.textSecondary,
textAlign: 'center',
marginBottom: 8,
},
});