diff --git a/common/styleguide.tsx b/common/styleguide.tsx
index 5c8d09fa7..dfab85e55 100644
--- a/common/styleguide.tsx
+++ b/common/styleguide.tsx
@@ -168,7 +168,7 @@ export const A = ({ href, target = '_blank', children, style, hoverStyle, ...res
const getLinkStyles = (isDark: boolean) => ({
color: isDark ? colors.white : colors.black,
backgroundColor: isDark ? darkColors.powder : colors.powder,
- textDecorationColor: isDark ? darkColors.pewter : colors.pewter,
+ textDecorationColor: isDark ? colors.gray5 : colors.pewter,
textDecorationLine: 'underline',
fontFamily: 'inherit',
});
@@ -176,7 +176,7 @@ const getLinkStyles = (isDark: boolean) => ({
const getLinkHoverStyles = (isDark: boolean) => ({
backgroundColor: isDark ? colors.primaryDark : colors.sky,
color: isDark ? darkColors.dark : colors.black,
- textDecorationColor: isDark ? darkColors.powder : colors.black,
+ textDecorationColor: isDark ? darkColors.powder : colors.gray4,
});
export const HoverEffect = ({ children }) => {
diff --git a/components/Library/MetaData.tsx b/components/Library/MetaData.tsx
index c6880f894..8254a15f5 100644
--- a/components/Library/MetaData.tsx
+++ b/components/Library/MetaData.tsx
@@ -4,21 +4,9 @@ import { StyleSheet, View } from 'react-native';
import { colors, A, P, Caption, darkColors } from '~/common/styleguide';
import CustomAppearanceContext from '~/context/CustomAppearanceContext';
import { Library as LibraryType } from '~/types';
-import { getTimeSinceToday } from '~/util/datetime';
import { DirectoryScore } from './DirectoryScore';
-import {
- Calendar,
- Star,
- Download,
- Eye,
- Issue,
- Web,
- License,
- Fork,
- Code,
- TypeScript,
-} from '../Icons';
+import { Star, Download, Eye, Issue, Web, License, Fork, Code, TypeScript } from '../Icons';
type Props = {
library: LibraryType;
@@ -41,15 +29,6 @@ function generateData({ github, score, npm, npmPkg }: LibraryType, isDark: boole
),
},
- {
- id: 'calendar',
- icon: ,
- content: (
-
- Updated {getTimeSinceToday(github.stats.pushedAt)}
-
- ),
- },
npm.downloads
? {
id: 'downloads',
diff --git a/components/Library/TrendingMark.tsx b/components/Library/TrendingMark.tsx
index 15e5be21a..e86c93ae6 100644
--- a/components/Library/TrendingMark.tsx
+++ b/components/Library/TrendingMark.tsx
@@ -45,7 +45,7 @@ const TrendingMark = ({ library, style, markOnly = false }: Props) => {
return markOnly ? (
{content}
) : (
-
+
{content}
);
diff --git a/components/Library/UnmaintainedLabel.tsx b/components/Library/UnmaintainedLabel.tsx
index 581ce9bfb..f13271187 100644
--- a/components/Library/UnmaintainedLabel.tsx
+++ b/components/Library/UnmaintainedLabel.tsx
@@ -70,7 +70,7 @@ const styles = StyleSheet.create({
unmaintainedTextContainer: {
alignItems: 'flex-start',
marginLeft: -20,
- marginBottom: 12,
+ marginBottom: 8,
paddingLeft: 20,
paddingRight: 12,
paddingVertical: 6,
diff --git a/components/Library/UpdateAtView.tsx b/components/Library/UpdateAtView.tsx
new file mode 100644
index 000000000..2d589d79f
--- /dev/null
+++ b/components/Library/UpdateAtView.tsx
@@ -0,0 +1,81 @@
+import { useContext } from 'react';
+import { StyleSheet, View } from 'react-native';
+
+import { A, colors, darkColors } from '~/common/styleguide';
+import Tooltip from '~/components/Tooltip';
+import CustomAppearanceContext from '~/context/CustomAppearanceContext';
+import { Library as LibraryType } from '~/types';
+import { getTimeSinceToday } from '~/util/datetime';
+
+import { Calendar } from '../Icons';
+
+type Props = {
+ library: LibraryType;
+};
+
+export default function UpdatedAtView({ library }: Props) {
+ const { isDark } = useContext(CustomAppearanceContext);
+
+ const iconColor = isDark ? darkColors.pewter : colors.secondary;
+ const textColor = isDark ? darkColors.secondary : colors.gray5;
+ const decorationColor = isDark ? colors.gray5 : colors.gray3;
+ const unmaintainedIconColor = isDark ? darkColors.warning : colors.warningDark;
+ const unmaintainedTextColor = isDark ? darkColors.warning : colors.warningDark;
+
+ return (
+
+
+
+
+ }>
+ Last update (based on git activity)
+
+
+ {getTimeSinceToday(library.github.stats.pushedAt)}
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ updatedAtContainer: {
+ gap: 8,
+ flexDirection: 'row',
+ alignItems: 'flex-start',
+ },
+ link: {
+ fontSize: 13,
+ fontWeight: 300,
+ backgroundColor: 'transparent',
+ textDecorationColor: 'transparent',
+ },
+});
diff --git a/components/Library/index.tsx b/components/Library/index.tsx
index 9bf522bcd..b858df51e 100644
--- a/components/Library/index.tsx
+++ b/components/Library/index.tsx
@@ -4,6 +4,7 @@ import { Linkify } from 'react-easy-linkify';
import { Platform, StyleSheet, View } from 'react-native';
import { colors, useLayout, A, darkColors, Headline } from '~/common/styleguide';
+import UpdatedAtView from '~/components/Library/UpdateAtView';
import CustomAppearanceContext from '~/context/CustomAppearanceContext';
import { Library as LibraryType } from '~/types';
@@ -46,25 +47,47 @@ const Library = ({ library, skipMetadata, showTrendingMark }: Props) => {
library.unmaintained && styles.unmaintained,
]}>
- {library.unmaintained && }
+ {library.unmaintained && (
+
+
+
+
+ )}
{showTrendingMark && library.popularity && (
-
-
-
+
- Trending Score is based on the last week to last month download rate.
-
+ }>
+ Trending Score is based on the last week to last month download rate.
+
+ {!library.unmaintained && }
+
)}
-
+
{libName}
+ {!showTrendingMark && !library.unmaintained && }
@@ -74,11 +97,7 @@ const Library = ({ library, skipMetadata, showTrendingMark }: Props) => {
(
-
- {children}
-
- ),
+ linkWrapper: ({ children, ...rest }) => {children},
}}>
{emoji.emojify(github.description)}
@@ -195,7 +214,7 @@ const styles = StyleSheet.create({
},
imagesContainer: {
flexWrap: 'wrap',
- marginTop: 12,
+ marginTop: 8,
},
secondaryStats: {
marginTop: 6,
@@ -240,6 +259,23 @@ const styles = StyleSheet.create({
opacity: 0.88,
},
trendingMarkContainer: {
+ justifyContent: 'space-between',
+ marginBottom: 4,
+ },
+ link: {
+ fontSize: 13,
+ fontWeight: 300,
+ backgroundColor: 'transparent',
+ },
+ updatedAtContainer: {
+ gap: 8,
+ flexDirection: 'row',
+ alignItems: 'flex-start',
+ justifyContent: 'space-between',
+ },
+ updatedAtContainerSmall: {
+ gap: 8,
+ justifyContent: 'flex-start',
alignSelf: 'flex-start',
},
});
diff --git a/pages/popular.tsx b/pages/popular.tsx
index 392ed98e1..c80cdbb14 100644
--- a/pages/popular.tsx
+++ b/pages/popular.tsx
@@ -65,13 +65,6 @@ const Popular = ({ data }) => {
data={data}
filter={lib => lib.macos === true}
/>
- lib.expoGo === true}
- />
- lib.fireos === true} />
{
data={data}
filter={lib => lib.windows === true}
/>
+ lib.expoGo === true}
+ />
+ lib.fireos === true} />
>
);