diff --git a/.gitignore b/.gitignore index fc1e19ea1..bd79404ae 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,6 @@ cypress/ test-cypress/logs/ logs/ .downloads + +# skip fonts as they are copied after the instalation of the @awesome.me packages. +src/js/lib/awesome_me diff --git a/package.json b/package.json index 82ced5d2d..c502eaf27 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "less:watch": "less-watch-compiler --config=./less-watch-compiler.config.json", "less:preprocess": "less-watch-compiler --config=./less-compiler.config.json", "license-report": "license-checker --production --json --customPath license-checker-format.json --out dist/license-checker.json", + "postinstall": "copyfiles -u 4 'node_modules/@awesome.me/kit-94ffd2fc4a/icons/css/*.min.css' 'node_modules/@awesome.me/kit-94ffd2fc4a/icons/webfonts/**/*' src/js/lib/awesome_me/", "postbuild": "npm run license-report && copyfiles -V -f license-checker/license-checker-static.json dist/" }, "files": [ diff --git a/src/js/angular/core/filters/readableTimestamp.js b/src/js/angular/core/filters/readableTimestamp.js deleted file mode 100644 index 580dd9fd6..000000000 --- a/src/js/angular/core/filters/readableTimestamp.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Filter that takes a timestamp and returns a human-readable string for dates that are today or yesterday. Otherwise, - * it returns the date in the format "MM/DD/YYYY". - */ -angular.module('graphdb.framework.core.filters.readable_titmestamp', []) - .filter('readableTimestamp', function ($translate) { - return function (timestamp) { - const date = new Date(timestamp); - const today = new Date(); - - // Get start of today - const todayStart = new Date(today.getFullYear(), today.getMonth(), today.getDate()); - - // Get start of yesterday - const yesterdayStart = new Date(todayStart); - yesterdayStart.setDate(todayStart.getDate() - 1); - - // Get start of the timestamp's day - const dateStart = new Date(date.getFullYear(), date.getMonth(), date.getDate()); - - if (dateStart.getTime() === todayStart.getTime()) { - return $translate.instant('common.dates.today'); - } else if (dateStart.getTime() === yesterdayStart.getTime()) { - return $translate.instant('common.dates.yesterday'); - } else { - // returns in format like "8/16/2024" - return date.toLocaleDateString(); - } - }; - }); diff --git a/src/js/angular/ttyg/directives/chat-list.directive.js b/src/js/angular/ttyg/directives/chat-list.directive.js index ec7a13b31..0a96eadd0 100644 --- a/src/js/angular/ttyg/directives/chat-list.directive.js +++ b/src/js/angular/ttyg/directives/chat-list.directive.js @@ -1,10 +1,8 @@ -import 'angular/core/filters/readableTimestamp'; import 'angular/core/directives/inline-editable-text/inline-editable-text.directive'; import {decodeHTML} from "../../../../app"; import {TTYGEventName} from "../services/ttyg-context.service"; const modules = [ - 'graphdb.framework.core.filters.readable_titmestamp', 'graphdb.framework.core.directives.inline-editable-text' ]; diff --git a/src/js/angular/ttyg/templates/chat-list.html b/src/js/angular/ttyg/templates/chat-list.html index f8788e5fb..1505215b1 100644 --- a/src/js/angular/ttyg/templates/chat-list.html +++ b/src/js/angular/ttyg/templates/chat-list.html @@ -2,7 +2,7 @@