Enhance: Update Activity component and ProseIcon styles

- Added optional 'assets' field to LanyardActivity interface for small text.
- Introduced 'Cursor' IDE to the IDEs list.
- Improved color variant styles in ProseIcon component for better visibility.
- Refactored Activity component to handle 'Cursor' IDE and updated activity message formatting.
This commit is contained in:
2025-04-06 20:06:54 +02:00
parent 9aa904e18a
commit d3a8243abf
4 changed files with 50 additions and 41 deletions

View File

@@ -32,6 +32,9 @@ interface LanyardActivity {
timestamps: {
start: number
}
assets?: {
small_text: string
}
}
export interface Activity {
@@ -45,6 +48,7 @@ export const IDEs = [
{ name: 'IntelliJ IDEA Ultimate', icon: 'i-logos:intellij-idea' },
{ name: 'WebStorm', icon: 'i-logos:webstorm' },
{ name: 'PyCharm Professional', icon: 'i-logos:pycharm' },
{ name: 'Cursor', icon: 'i-vscode-icons-file-type-cursorrules' },
]
export const activityMessages = {
@@ -66,13 +70,13 @@ export const activityMessages = {
invalid: '',
},
fr: {
justNow: 'à linstant',
justNow: 'à l\'instant',
past: (n: string) => (n.match(/\d/) ? `il y a ${n}` : n),
future: (n: string) => (n.match(/\d/) ? `dans ${n}` : n),
month: (n: number, past: boolean) =>
n === 1 ? (past ? 'le mois dernier' : 'le mois prochain') : `${n} mois`,
year: (n: number, past: boolean) =>
n === 1 ? (past ? 'lannée dernière' : 'lannée prochaine') : `${n} ans`,
n === 1 ? (past ? 'l\'année dernière' : 'l\'année prochaine') : `${n} ans`,
day: (n: number, past: boolean) =>
n === 1 ? (past ? 'hier' : 'demain') : `${n} jours`,
week: (n: number, past: boolean) =>