mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-26 07:24:50 -06:00
refac
This commit is contained in:
@@ -67,11 +67,11 @@
|
||||
const weeks = Math.floor(days / 7);
|
||||
const years = Math.floor(days / 365);
|
||||
|
||||
if (years > 0) return $i18n.t('{{COUNT}}y', { count: years, context: 'time_ago' });
|
||||
if (weeks > 0) return $i18n.t('{{COUNT}}w', { count: weeks, context: 'time_ago' });
|
||||
if (days > 0) return $i18n.t('{{COUNT}}d', { count: days, context: 'time_ago' });
|
||||
if (hours > 0) return $i18n.t('{{COUNT}}h', { count: hours, context: 'time_ago' });
|
||||
if (minutes > 0) return $i18n.t('{{COUNT}}m', { count: minutes, context: 'time_ago' });
|
||||
if (years > 0) return $i18n.t('{{COUNT}}y', { COUNT: years, context: 'time_ago' });
|
||||
if (weeks > 0) return $i18n.t('{{COUNT}}w', { COUNT: weeks, context: 'time_ago' });
|
||||
if (days > 0) return $i18n.t('{{COUNT}}d', { COUNT: days, context: 'time_ago' });
|
||||
if (hours > 0) return $i18n.t('{{COUNT}}h', { COUNT: hours, context: 'time_ago' });
|
||||
if (minutes > 0) return $i18n.t('{{COUNT}}m', { COUNT: minutes, context: 'time_ago' });
|
||||
return $i18n.t('1m', { context: 'time_ago' });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user