diff --git a/client/src/app/+accounts/accounts.component.html b/client/src/app/+accounts/accounts.component.html index c3d7dadd3..b90a1a97b 100644 --- a/client/src/app/+accounts/accounts.component.html +++ b/client/src/app/+accounts/accounts.component.html @@ -10,7 +10,7 @@
-

{{ account.displayName }}

+

{{ account.displayName }}

{{ follow.score }} - {{ follow.createdAt | date: 'short' }} + {{ follow.createdAt | ptDate: 'short' }} diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.ts b/client/src/app/+admin/follows/followers-list/followers-list.component.ts index de638f1b0..60f3f267b 100644 --- a/client/src/app/+admin/follows/followers-list/followers-list.component.ts +++ b/client/src/app/+admin/follows/followers-list/followers-list.component.ts @@ -1,18 +1,19 @@ -import { SortMeta, SharedModule } from 'primeng/api' +import { NgIf } from '@angular/common' import { Component, OnInit } from '@angular/core' import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' import { formatICU } from '@app/helpers' -import { ActorFollow } from '@peertube/peertube-models' -import { AutoColspanDirective } from '../../../shared/shared-main/common/auto-colspan.directive' -import { DeleteButtonComponent } from '../../../shared/shared-main/buttons/delete-button.component' -import { ButtonComponent } from '../../../shared/shared-main/buttons/button.component' -import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' -import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component' -import { ActionDropdownComponent, DropdownAction } from '../../../shared/shared-main/buttons/action-dropdown.component' -import { NgIf, DatePipe } from '@angular/common' -import { TableModule } from 'primeng/table' -import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component' import { InstanceFollowService } from '@app/shared/shared-instance/instance-follow.service' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' +import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' +import { ActorFollow } from '@peertube/peertube-models' +import { SharedModule, SortMeta } from 'primeng/api' +import { TableModule } from 'primeng/table' +import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component' +import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component' +import { ActionDropdownComponent, DropdownAction } from '../../../shared/shared-main/buttons/action-dropdown.component' +import { ButtonComponent } from '../../../shared/shared-main/buttons/button.component' +import { DeleteButtonComponent } from '../../../shared/shared-main/buttons/delete-button.component' +import { AutoColspanDirective } from '../../../shared/shared-main/common/auto-colspan.directive' @Component({ selector: 'my-followers-list', @@ -30,7 +31,7 @@ import { InstanceFollowService } from '@app/shared/shared-instance/instance-foll ButtonComponent, DeleteButtonComponent, AutoColspanDirective, - DatePipe + PTDatePipe ] }) export class FollowersListComponent extends RestTable implements OnInit { diff --git a/client/src/app/+admin/follows/following-list/following-list.component.html b/client/src/app/+admin/follows/following-list/following-list.component.html index b41baa5d4..f35bf6261 100644 --- a/client/src/app/+admin/follows/following-list/following-list.component.html +++ b/client/src/app/+admin/follows/following-list/following-list.component.html @@ -63,7 +63,7 @@ Rejected - {{ follow.createdAt | date: 'short' }} + {{ follow.createdAt | ptDate: 'short' }} Created on - {{ redundancyElement.createdAt | date: 'medium' }} + {{ redundancyElement.createdAt | ptDate: 'medium' }}
Expires on - {{ redundancyElement.expiresOn | date: 'medium' }} + {{ redundancyElement.expiresOn | ptDate: 'medium' }}
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.ts b/client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.ts index 7142cab44..a6e54ce80 100644 --- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.ts +++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.ts @@ -1,14 +1,14 @@ import { Component, Input } from '@angular/core' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { FileRedundancyInformation, StreamingPlaylistRedundancyInformation } from '@peertube/peertube-models' import { BytesPipe } from '../../../shared/shared-main/common/bytes.pipe' -import { DatePipe } from '@angular/common' @Component({ selector: 'my-video-redundancy-information', templateUrl: './video-redundancy-information.component.html', styleUrls: [ './video-redundancy-information.component.scss' ], standalone: true, - imports: [ DatePipe, BytesPipe ] + imports: [ PTDatePipe, BytesPipe ] }) export class VideoRedundancyInformationComponent { @Input() redundancyElement: FileRedundancyInformation | StreamingPlaylistRedundancyInformation diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts index 219308a70..2c87ed938 100644 --- a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts +++ b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts @@ -1,14 +1,14 @@ +import { NgIf } from '@angular/common' import { Component } from '@angular/core' -import { NgIf, DatePipe } from '@angular/common' -import { AutoColspanDirective } from '../../../shared/shared-main/common/auto-colspan.directive' -import { ActorAvatarComponent } from '../../../shared/shared-actor-image/actor-avatar.component' -import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' -import { AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component' -import { SharedModule } from 'primeng/api' -import { TableModule } from 'primeng/table' -import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { GenericAccountBlocklistComponent } from '@app/shared/shared-moderation/account-blocklist.component' import { BlocklistComponentType } from '@app/shared/shared-moderation/blocklist.service' +import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' +import { SharedModule } from 'primeng/api' +import { TableModule } from 'primeng/table' +import { ActorAvatarComponent } from '../../../shared/shared-actor-image/actor-avatar.component' +import { AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component' +import { AutoColspanDirective } from '../../../shared/shared-main/common/auto-colspan.directive' @Component({ selector: 'my-instance-account-blocklist', @@ -16,7 +16,6 @@ import { BlocklistComponentType } from '@app/shared/shared-moderation/blocklist. templateUrl: '../../../shared/shared-moderation/account-blocklist.component.html', standalone: true, imports: [ - GlobalIconComponent, TableModule, SharedModule, AdvancedInputFilterComponent, @@ -24,7 +23,7 @@ import { BlocklistComponentType } from '@app/shared/shared-moderation/blocklist. ActorAvatarComponent, AutoColspanDirective, NgIf, - DatePipe + PTDatePipe ] }) export class InstanceAccountBlocklistComponent extends GenericAccountBlocklistComponent { diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts index 7b4343c7d..32bef6d68 100644 --- a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts +++ b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts @@ -1,14 +1,15 @@ +import { NgIf } from '@angular/common' import { Component } from '@angular/core' -import { BatchDomainsModalComponent } from '../../../shared/shared-moderation/batch-domains-modal.component' -import { NgIf, DatePipe } from '@angular/common' -import { AutoColspanDirective } from '../../../shared/shared-main/common/auto-colspan.directive' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' +import { BlocklistComponentType } from '@app/shared/shared-moderation/blocklist.service' +import { GenericServerBlocklistComponent } from '@app/shared/shared-moderation/server-blocklist.component' import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' -import { AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component' import { SharedModule } from 'primeng/api' import { TableModule } from 'primeng/table' +import { AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component' import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component' -import { GenericServerBlocklistComponent } from '@app/shared/shared-moderation/server-blocklist.component' -import { BlocklistComponentType } from '@app/shared/shared-moderation/blocklist.service' +import { AutoColspanDirective } from '../../../shared/shared-main/common/auto-colspan.directive' +import { BatchDomainsModalComponent } from '../../../shared/shared-moderation/batch-domains-modal.component' @Component({ selector: 'my-instance-server-blocklist', @@ -24,7 +25,7 @@ import { BlocklistComponentType } from '@app/shared/shared-moderation/blocklist. AutoColspanDirective, NgIf, BatchDomainsModalComponent, - DatePipe + PTDatePipe ] }) export class InstanceServerBlocklistComponent extends GenericServerBlocklistComponent { diff --git a/client/src/app/+admin/moderation/registration-list/registration-list.component.html b/client/src/app/+admin/moderation/registration-list/registration-list.component.html index 054180fdf..508016150 100644 --- a/client/src/app/+admin/moderation/registration-list/registration-list.component.html +++ b/client/src/app/+admin/moderation/registration-list/registration-list.component.html @@ -100,7 +100,7 @@ {{ registration.moderationResponse }} - {{ registration.createdAt | date: 'short' }} + {{ registration.createdAt | ptDate: 'short' }} diff --git a/client/src/app/+admin/moderation/registration-list/registration-list.component.ts b/client/src/app/+admin/moderation/registration-list/registration-list.component.ts index 4069c9b49..3591f3dc3 100644 --- a/client/src/app/+admin/moderation/registration-list/registration-list.component.ts +++ b/client/src/app/+admin/moderation/registration-list/registration-list.component.ts @@ -1,20 +1,21 @@ -import { SortMeta, SharedModule } from 'primeng/api' +import { NgClass, NgIf } from '@angular/common' import { Component, OnInit, ViewChild } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' import { formatICU } from '@app/helpers' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' +import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' import { UserRegistration, UserRegistrationState } from '@peertube/peertube-models' +import { SharedModule, SortMeta } from 'primeng/api' +import { TableModule } from 'primeng/table' +import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component' +import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component' +import { ActionDropdownComponent, DropdownAction } from '../../../shared/shared-main/buttons/action-dropdown.component' +import { AutoColspanDirective } from '../../../shared/shared-main/common/auto-colspan.directive' +import { TableExpanderIconComponent } from '../../../shared/shared-tables/table-expander-icon.component' +import { UserEmailInfoComponent } from '../../shared/user-email-info.component' import { AdminRegistrationService } from './admin-registration.service' import { ProcessRegistrationModalComponent } from './process-registration-modal.component' -import { AutoColspanDirective } from '../../../shared/shared-main/common/auto-colspan.directive' -import { UserEmailInfoComponent } from '../../shared/user-email-info.component' -import { TableExpanderIconComponent } from '../../../shared/shared-tables/table-expander-icon.component' -import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' -import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component' -import { ActionDropdownComponent, DropdownAction } from '../../../shared/shared-main/buttons/action-dropdown.component' -import { NgIf, NgClass, DatePipe } from '@angular/common' -import { TableModule } from 'primeng/table' -import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component' @Component({ selector: 'my-registration-list', @@ -34,7 +35,7 @@ import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.co UserEmailInfoComponent, AutoColspanDirective, ProcessRegistrationModalComponent, - DatePipe + PTDatePipe ] }) export class RegistrationListComponent extends RestTable implements OnInit { diff --git a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.html b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.html index 861672661..e8f811c2f 100644 --- a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.html +++ b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.html @@ -62,7 +62,7 @@ - {{ videoBlock.createdAt | date: 'short' }} + {{ videoBlock.createdAt | ptDate: 'short' }} diff --git a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts index c033cff69..6b31dbd35 100644 --- a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts +++ b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts @@ -1,24 +1,25 @@ -import { SortMeta, SharedModule } from 'primeng/api' -import { switchMap } from 'rxjs/operators' -import { environment } from 'src/environments/environment' +import { NgClass, NgIf } from '@angular/common' import { Component, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' +import { VideoService } from '@app/shared/shared-main/video/video.service' +import { VideoBlockService } from '@app/shared/shared-moderation/video-block.service' +import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' import { buildVideoEmbedLink, decorateVideoLink } from '@peertube/peertube-core-utils' import { VideoBlacklist, VideoBlacklistType, VideoBlacklistType_Type } from '@peertube/peertube-models' import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' -import { EmbedComponent } from '../../../shared/shared-main/video/embed.component' -import { AutoColspanDirective } from '../../../shared/shared-main/common/auto-colspan.directive' -import { VideoCellComponent } from '../../../shared/shared-tables/video-cell.component' -import { ActionDropdownComponent, DropdownAction } from '../../../shared/shared-main/buttons/action-dropdown.component' -import { TableExpanderIconComponent } from '../../../shared/shared-tables/table-expander-icon.component' -import { NgIf, NgClass, DatePipe } from '@angular/common' -import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' -import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component' +import { SharedModule, SortMeta } from 'primeng/api' import { TableModule } from 'primeng/table' +import { switchMap } from 'rxjs/operators' +import { environment } from 'src/environments/environment' +import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component' import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component' -import { VideoService } from '@app/shared/shared-main/video/video.service' -import { VideoBlockService } from '@app/shared/shared-moderation/video-block.service' +import { ActionDropdownComponent, DropdownAction } from '../../../shared/shared-main/buttons/action-dropdown.component' +import { AutoColspanDirective } from '../../../shared/shared-main/common/auto-colspan.directive' +import { EmbedComponent } from '../../../shared/shared-main/video/embed.component' +import { TableExpanderIconComponent } from '../../../shared/shared-tables/table-expander-icon.component' +import { VideoCellComponent } from '../../../shared/shared-tables/video-cell.component' @Component({ selector: 'my-video-block-list', @@ -38,7 +39,7 @@ import { VideoBlockService } from '@app/shared/shared-moderation/video-block.ser VideoCellComponent, AutoColspanDirective, EmbedComponent, - DatePipe + PTDatePipe ] }) export class VideoBlockListComponent extends RestTable implements OnInit { diff --git a/client/src/app/+admin/overview/users/user-list/user-list.component.html b/client/src/app/+admin/overview/users/user-list/user-list.component.html index 4420c5733..48f344dd5 100644 --- a/client/src/app/+admin/overview/users/user-list/user-list.component.html +++ b/client/src/app/+admin/overview/users/user-list/user-list.component.html @@ -142,9 +142,9 @@ {{ user.pluginAuth }} - {{ user.createdAt | date: 'short' }} + {{ user.createdAt | ptDate: 'short' }} - {{ user.lastLoginDate | date: 'short' }} + {{ user.lastLoginDate | ptDate: 'short' }} diff --git a/client/src/app/+admin/overview/users/user-list/user-list.component.ts b/client/src/app/+admin/overview/users/user-list/user-list.component.ts index ac46127f0..af5577f78 100644 --- a/client/src/app/+admin/overview/users/user-list/user-list.component.ts +++ b/client/src/app/+admin/overview/users/user-list/user-list.component.ts @@ -1,14 +1,16 @@ -import { DatePipe, NgClass, NgIf } from '@angular/common' +import { NgClass, NgIf } from '@angular/common' import { Component, OnInit, ViewChild } from '@angular/core' import { FormsModule } from '@angular/forms' import { ActivatedRoute, Router, RouterLink } from '@angular/router' import { AuthService, ConfirmService, LocalStorageService, Notifier, RestPagination, RestTable } from '@app/core' import { formatICU, getAPIHost } from '@app/helpers' import { Actor } from '@app/shared/shared-main/account/actor.model' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' +import { ProgressBarComponent } from '@app/shared/shared-main/common/progress-bar.component' import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service' import { UserBanModalComponent } from '@app/shared/shared-moderation/user-ban-modal.component' import { UserAdminService } from '@app/shared/shared-users/user-admin.service' -import { NgbDropdown, NgbDropdownItem, NgbDropdownMenu, NgbDropdownToggle, NgbTooltip } from '@ng-bootstrap/ng-bootstrap' +import { NgbDropdown, NgbDropdownMenu, NgbDropdownToggle, NgbTooltip } from '@ng-bootstrap/ng-bootstrap' import { User, UserRole, UserRoleType } from '@peertube/peertube-models' import { logger } from '@root-helpers/logger' import { SharedModule, SortMeta } from 'primeng/api' @@ -18,9 +20,9 @@ import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../../s import { PeertubeCheckboxComponent } from '../../../../shared/shared-forms/peertube-checkbox.component' import { SelectCheckboxComponent } from '../../../../shared/shared-forms/select/select-checkbox.component' import { GlobalIconComponent } from '../../../../shared/shared-icons/global-icon.component' +import { ActionDropdownComponent, DropdownAction } from '../../../../shared/shared-main/buttons/action-dropdown.component' import { AutoColspanDirective } from '../../../../shared/shared-main/common/auto-colspan.directive' import { BytesPipe } from '../../../../shared/shared-main/common/bytes.pipe' -import { ActionDropdownComponent, DropdownAction } from '../../../../shared/shared-main/buttons/action-dropdown.component' import { AccountMutedStatus, UserModerationDisplayType, @@ -28,7 +30,6 @@ import { } from '../../../../shared/shared-moderation/user-moderation-dropdown.component' import { TableExpanderIconComponent } from '../../../../shared/shared-tables/table-expander-icon.component' import { UserEmailInfoComponent } from '../../../shared/user-email-info.component' -import { ProgressBarComponent } from '@app/shared/shared-main/common/progress-bar.component' type UserForList = User & { rawVideoQuota: number @@ -53,7 +54,6 @@ type UserForList = User & { NgbDropdown, NgbDropdownToggle, NgbDropdownMenu, - NgbDropdownItem, SelectCheckboxComponent, FormsModule, PeertubeCheckboxComponent, @@ -65,7 +65,7 @@ type UserForList = User & { UserEmailInfoComponent, AutoColspanDirective, UserBanModalComponent, - DatePipe, + PTDatePipe, BytesPipe, ProgressBarComponent ] diff --git a/client/src/app/+admin/overview/videos/video-list.component.html b/client/src/app/+admin/overview/videos/video-list.component.html index 7e6538451..87ccc5441 100644 --- a/client/src/app/+admin/overview/videos/video-list.component.html +++ b/client/src/app/+admin/overview/videos/video-list.component.html @@ -106,7 +106,7 @@ - {{ video.publishedAt | date: 'short' }} + {{ video.publishedAt | ptDate: 'short' }} diff --git a/client/src/app/+admin/overview/videos/video-list.component.ts b/client/src/app/+admin/overview/videos/video-list.component.ts index 63b314155..8b66b7969 100644 --- a/client/src/app/+admin/overview/videos/video-list.component.ts +++ b/client/src/app/+admin/overview/videos/video-list.component.ts @@ -1,8 +1,9 @@ -import { DatePipe, NgClass, NgFor, NgIf } from '@angular/common' +import { NgClass, NgFor, NgIf } from '@angular/common' import { Component, OnInit, ViewChild } from '@angular/core' import { ActivatedRoute, Router, RouterLink } from '@angular/router' import { AuthService, ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' import { formatICU } from '@app/helpers' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { VideoCaptionService } from '@app/shared/shared-main/video-caption/video-caption.service' import { VideoDetails } from '@app/shared/shared-main/video/video-details.model' import { VideoFileTokenService } from '@app/shared/shared-main/video/video-file-token.service' @@ -19,10 +20,10 @@ import { TableModule, TableRowExpandEvent } from 'primeng/table' import { finalize } from 'rxjs/operators' import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component' import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component' -import { AutoColspanDirective } from '../../../shared/shared-main/common/auto-colspan.directive' -import { BytesPipe } from '../../../shared/shared-main/common/bytes.pipe' import { ActionDropdownComponent, DropdownAction } from '../../../shared/shared-main/buttons/action-dropdown.component' import { ButtonComponent } from '../../../shared/shared-main/buttons/button.component' +import { AutoColspanDirective } from '../../../shared/shared-main/common/auto-colspan.directive' +import { BytesPipe } from '../../../shared/shared-main/common/bytes.pipe' import { EmbedComponent } from '../../../shared/shared-main/video/embed.component' import { TableExpanderIconComponent } from '../../../shared/shared-tables/table-expander-icon.component' import { VideoCellComponent } from '../../../shared/shared-tables/video-cell.component' @@ -54,7 +55,7 @@ import { VideoAdminService } from './video-admin.service' NgFor, EmbedComponent, VideoBlockComponent, - DatePipe, + PTDatePipe, RouterLink, BytesPipe ] diff --git a/client/src/app/+admin/system/logs/logs.component.html b/client/src/app/+admin/system/logs/logs.component.html index de603680b..7afc65e46 100644 --- a/client/src/app/+admin/system/logs/logs.component.html +++ b/client/src/app/+admin/system/logs/logs.component.html @@ -16,7 +16,7 @@ - {{ item.label }} ({{ item.id | date: item.dateFormat }} - now) + {{ item.label }} ({{ item.id | ptDate: item.dateFormat }} - now)
diff --git a/client/src/app/+admin/system/logs/logs.component.ts b/client/src/app/+admin/system/logs/logs.component.ts index ea2fe3876..d03e6d95b 100644 --- a/client/src/app/+admin/system/logs/logs.component.ts +++ b/client/src/app/+admin/system/logs/logs.component.ts @@ -1,9 +1,9 @@ -import { DatePipe, NgClass, NgFor, NgIf } from '@angular/common' +import { NgClass, NgFor, NgIf } from '@angular/common' import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' import { FormsModule } from '@angular/forms' import { LocalStorageService, Notifier } from '@app/core' import { SelectOptionsComponent } from '@app/shared/shared-forms/select/select-options.component' -import { GlobalIconComponent } from '@app/shared/shared-icons/global-icon.component' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { PeerTubeTemplateDirective } from '@app/shared/shared-main/common/peertube-template.directive' import { ServerLogLevel } from '@peertube/peertube-models' import { SelectTagsComponent } from '../../../shared/shared-forms/select/select-tags.component' @@ -23,9 +23,8 @@ import { LogsService } from './logs.service' NgClass, SelectTagsComponent, ButtonComponent, - DatePipe, + PTDatePipe, CopyButtonComponent, - GlobalIconComponent, SelectOptionsComponent, PeerTubeTemplateDirective ] diff --git a/client/src/app/+admin/system/runners/runner-list/runner-list.component.html b/client/src/app/+admin/system/runners/runner-list/runner-list.component.html index 08eb4ca42..b6d6e78ec 100644 --- a/client/src/app/+admin/system/runners/runner-list/runner-list.component.html +++ b/client/src/app/+admin/system/runners/runner-list/runner-list.component.html @@ -32,9 +32,9 @@ {{ runner.ip }} - {{ runner.lastContact | date: 'short' }} + {{ runner.lastContact | ptDate: 'short' }} - {{ runner.createdAt | date: 'short' }} + {{ runner.createdAt | ptDate: 'short' }} diff --git a/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts b/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts index 2e8736a2d..44d061632 100644 --- a/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts +++ b/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts @@ -1,29 +1,25 @@ -import { SortMeta, SharedModule } from 'primeng/api' import { Component, OnInit } from '@angular/core' import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' -import { Runner } from '@peertube/peertube-models' -import { RunnerService } from '../runner.service' -import { DatePipe } from '@angular/common' -import { AutoColspanDirective } from '../../../../shared/shared-main/common/auto-colspan.directive' -import { ActionDropdownComponent, DropdownAction } from '../../../../shared/shared-main/buttons/action-dropdown.component' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' +import { Runner } from '@peertube/peertube-models' +import { SharedModule, SortMeta } from 'primeng/api' import { TableModule } from 'primeng/table' -import { RouterLink } from '@angular/router' -import { GlobalIconComponent } from '../../../../shared/shared-icons/global-icon.component' +import { ActionDropdownComponent, DropdownAction } from '../../../../shared/shared-main/buttons/action-dropdown.component' +import { AutoColspanDirective } from '../../../../shared/shared-main/common/auto-colspan.directive' +import { RunnerService } from '../runner.service' @Component({ selector: 'my-runner-list', templateUrl: './runner-list.component.html', standalone: true, imports: [ - GlobalIconComponent, - RouterLink, TableModule, SharedModule, NgbTooltip, ActionDropdownComponent, AutoColspanDirective, - DatePipe + PTDatePipe ] }) export class RunnerListComponent extends RestTable implements OnInit { diff --git a/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.html b/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.html index 8455df7be..84635560b 100644 --- a/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.html +++ b/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.html @@ -41,7 +41,7 @@ > - {{ registrationToken.createdAt | date: 'short' }} + {{ registrationToken.createdAt | ptDate: 'short' }} {{ registrationToken.registeredRunnersCount }} diff --git a/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts b/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts index 69f2ab1d5..00c786718 100644 --- a/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts +++ b/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts @@ -1,17 +1,17 @@ -import { SortMeta, SharedModule } from 'primeng/api' import { Component, OnInit } from '@angular/core' +import { RouterLink } from '@angular/router' import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' +import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' import { RunnerRegistrationToken } from '@peertube/peertube-models' -import { RunnerService } from '../runner.service' -import { DatePipe } from '@angular/common' -import { AutoColspanDirective } from '../../../../shared/shared-main/common/auto-colspan.directive' -import { CopyButtonComponent } from '../../../../shared/shared-main/buttons/copy-button.component' +import { SharedModule, SortMeta } from 'primeng/api' +import { TableModule } from 'primeng/table' +import { GlobalIconComponent } from '../../../../shared/shared-icons/global-icon.component' import { ActionDropdownComponent, DropdownAction } from '../../../../shared/shared-main/buttons/action-dropdown.component' import { ButtonComponent } from '../../../../shared/shared-main/buttons/button.component' -import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' -import { TableModule } from 'primeng/table' -import { RouterLink } from '@angular/router' -import { GlobalIconComponent } from '../../../../shared/shared-icons/global-icon.component' +import { CopyButtonComponent } from '../../../../shared/shared-main/buttons/copy-button.component' +import { AutoColspanDirective } from '../../../../shared/shared-main/common/auto-colspan.directive' +import { RunnerService } from '../runner.service' @Component({ selector: 'my-runner-registration-token-list', @@ -28,7 +28,7 @@ import { GlobalIconComponent } from '../../../../shared/shared-icons/global-icon ActionDropdownComponent, CopyButtonComponent, AutoColspanDirective, - DatePipe + PTDatePipe ] }) export class RunnerRegistrationTokenListComponent extends RestTable implements OnInit { diff --git a/client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts b/client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts index 4edebd632..41eae74d8 100644 --- a/client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts +++ b/client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts @@ -1,21 +1,20 @@ +import { NgIf } from '@angular/common' import { Component } from '@angular/core' -import { NgIf, DatePipe } from '@angular/common' -import { AutoColspanDirective } from '../../shared/shared-main/common/auto-colspan.directive' -import { ActorAvatarComponent } from '../../shared/shared-actor-image/actor-avatar.component' -import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' -import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced-input-filter.component' -import { SharedModule } from 'primeng/api' -import { TableModule } from 'primeng/table' -import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { GenericAccountBlocklistComponent } from '@app/shared/shared-moderation/account-blocklist.component' import { BlocklistComponentType } from '@app/shared/shared-moderation/blocklist.service' +import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' +import { SharedModule } from 'primeng/api' +import { TableModule } from 'primeng/table' +import { ActorAvatarComponent } from '../../shared/shared-actor-image/actor-avatar.component' +import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced-input-filter.component' +import { AutoColspanDirective } from '../../shared/shared-main/common/auto-colspan.directive' @Component({ selector: 'my-account-blocklist', templateUrl: '../../shared/shared-moderation/account-blocklist.component.html', standalone: true, imports: [ - GlobalIconComponent, TableModule, SharedModule, AdvancedInputFilterComponent, @@ -23,7 +22,7 @@ import { BlocklistComponentType } from '@app/shared/shared-moderation/blocklist. ActorAvatarComponent, AutoColspanDirective, NgIf, - DatePipe + PTDatePipe ] }) export class MyAccountBlocklistComponent extends GenericAccountBlocklistComponent { diff --git a/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts b/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts index 74decf0a0..671049131 100644 --- a/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts +++ b/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts @@ -1,14 +1,15 @@ +import { NgIf } from '@angular/common' import { Component } from '@angular/core' -import { BatchDomainsModalComponent } from '../../shared/shared-moderation/batch-domains-modal.component' -import { NgIf, DatePipe } from '@angular/common' -import { AutoColspanDirective } from '../../shared/shared-main/common/auto-colspan.directive' -import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' -import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced-input-filter.component' -import { SharedModule } from 'primeng/api' -import { TableModule } from 'primeng/table' -import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { BlocklistComponentType } from '@app/shared/shared-moderation/blocklist.service' import { GenericServerBlocklistComponent } from '@app/shared/shared-moderation/server-blocklist.component' +import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' +import { SharedModule } from 'primeng/api' +import { TableModule } from 'primeng/table' +import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced-input-filter.component' +import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component' +import { AutoColspanDirective } from '../../shared/shared-main/common/auto-colspan.directive' +import { BatchDomainsModalComponent } from '../../shared/shared-moderation/batch-domains-modal.component' @Component({ selector: 'my-account-server-blocklist', @@ -24,7 +25,7 @@ import { GenericServerBlocklistComponent } from '@app/shared/shared-moderation/s AutoColspanDirective, NgIf, BatchDomainsModalComponent, - DatePipe + PTDatePipe ] }) export class MyAccountServerBlocklistComponent extends GenericServerBlocklistComponent { diff --git a/client/src/app/+my-account/my-account-import-export/my-account-export.component.html b/client/src/app/+my-account/my-account-import-export/my-account-export.component.html index ccb0ce607..703fabfcc 100644 --- a/client/src/app/+my-account/my-account-import-export/my-account-export.component.html +++ b/client/src/app/+my-account/my-account-import-export/my-account-export.component.html @@ -46,7 +46,7 @@ - {{ export.createdAt | date: 'medium' }} + {{ export.createdAt | ptDate: 'medium' }} {{ export.state.label }} @@ -54,7 +54,7 @@ - {{ export.expiresOn | date: 'medium' }} + {{ export.expiresOn | ptDate: 'medium' }} diff --git a/client/src/app/+my-account/my-account-import-export/my-account-export.component.ts b/client/src/app/+my-account/my-account-import-export/my-account-export.component.ts index 267455e83..0a232b4fd 100644 --- a/client/src/app/+my-account/my-account-import-export/my-account-export.component.ts +++ b/client/src/app/+my-account/my-account-import-export/my-account-export.component.ts @@ -1,8 +1,9 @@ -import { DatePipe, NgFor, NgIf } from '@angular/common' +import { NgFor, NgIf } from '@angular/common' import { Component, Input, OnInit, ViewChild } from '@angular/core' import { FormsModule } from '@angular/forms' import { AuthService, ServerService } from '@app/core' import { AlertComponent } from '@app/shared/shared-main/common/alert.component' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' import { PeerTubeProblemDocument, ServerErrorCode, UserExport, UserExportState } from '@peertube/peertube-models' import { concatMap, from, of, switchMap, toArray } from 'rxjs' @@ -16,7 +17,7 @@ import { UserImportExportService } from './user-import-export.service' templateUrl: './my-account-export.component.html', styleUrls: [ './my-account-export.component.scss' ], standalone: true, - imports: [ NgIf, NgFor, GlobalIconComponent, PeertubeCheckboxComponent, FormsModule, DatePipe, BytesPipe, AlertComponent ] + imports: [ NgIf, NgFor, GlobalIconComponent, PeertubeCheckboxComponent, FormsModule, PTDatePipe, BytesPipe, AlertComponent ] }) export class MyAccountExportComponent implements OnInit { @ViewChild('exportModal', { static: true }) exportModal: NgbModal diff --git a/client/src/app/+my-account/my-account-import-export/my-account-import.component.html b/client/src/app/+my-account/my-account-import-export/my-account-import.component.html index 9cca9df51..25bee31c2 100644 --- a/client/src/app/+my-account/my-account-import-export/my-account-import.component.html +++ b/client/src/app/+my-account/my-account-import-export/my-account-import.component.html @@ -39,7 +39,7 @@
- Latest import on: {{ latestImport.createdAt | date: 'medium' }} + Latest import on: {{ latestImport.createdAt | ptDate: 'medium' }}
diff --git a/client/src/app/+my-account/my-account-import-export/my-account-import.component.ts b/client/src/app/+my-account/my-account-import-export/my-account-import.component.ts index 6b1dae1ae..eb32c4a6d 100644 --- a/client/src/app/+my-account/my-account-import-export/my-account-import.component.ts +++ b/client/src/app/+my-account/my-account-import-export/my-account-import.component.ts @@ -1,10 +1,11 @@ -import { DatePipe, NgIf } from '@angular/common' +import { NgIf } from '@angular/common' import { HttpErrorResponse } from '@angular/common/http' import { Component, Input, OnDestroy, OnInit } from '@angular/core' import { AuthService, CanComponentDeactivate, Notifier, ServerService } from '@app/core' import { buildHTTPErrorResponse, genericUploadErrorHandler, getUploadXRetryConfig } from '@app/helpers' import { AlertComponent } from '@app/shared/shared-main/common/alert.component' import { BytesPipe } from '@app/shared/shared-main/common/bytes.pipe' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' import { HttpStatusCode, UserImport, UserImportState } from '@peertube/peertube-models' import { UploadState, UploaderX, UploadxService } from 'ngx-uploadx' @@ -17,7 +18,7 @@ import { UserImportExportService } from './user-import-export.service' templateUrl: './my-account-import.component.html', styleUrls: [ './my-account-import.component.scss' ], standalone: true, - imports: [ NgIf, UploadProgressComponent, NgbTooltip, DatePipe, AlertComponent ] + imports: [ NgIf, UploadProgressComponent, NgbTooltip, PTDatePipe, AlertComponent ] }) export class MyAccountImportComponent implements OnInit, OnDestroy, CanComponentDeactivate { @Input() videoQuotaUsed: number diff --git a/client/src/app/+my-library/my-ownership/my-ownership.component.html b/client/src/app/+my-library/my-ownership/my-ownership.component.html index 75902c269..6969ca99f 100644 --- a/client/src/app/+my-library/my-ownership/my-ownership.component.html +++ b/client/src/app/+my-library/my-ownership/my-ownership.component.html @@ -39,7 +39,7 @@ - {{ videoChangeOwnership.createdAt | date: 'short' }} + {{ videoChangeOwnership.createdAt | ptDate: 'short' }} - {{ videoChannelSync.createdAt | date: 'short' }} - {{ videoChannelSync.lastSyncAt | date: 'short' }} + {{ videoChannelSync.createdAt | ptDate: 'short' }} + {{ videoChannelSync.lastSyncAt | ptDate: 'short' }} diff --git a/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts b/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts index 1724d113f..db66387ab 100644 --- a/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts +++ b/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts @@ -1,10 +1,11 @@ -import { DatePipe, NgClass, NgIf } from '@angular/common' +import { NgClass, NgIf } from '@angular/common' import { Component, OnInit } from '@angular/core' import { RouterLink } from '@angular/router' import { AuthService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' import { VideoChannelSyncService } from '@app/shared/shared-main/channel/video-channel-sync.service' import { VideoChannelService } from '@app/shared/shared-main/channel/video-channel.service' import { AlertComponent } from '@app/shared/shared-main/common/alert.component' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' import { HTMLServerConfig, VideoChannelSync, VideoChannelSyncState, VideoChannelSyncStateType } from '@peertube/peertube-models' import { SharedModule, SortMeta } from 'primeng/api' @@ -27,7 +28,7 @@ import { ActionDropdownComponent, DropdownAction } from '../../shared/shared-mai ActionDropdownComponent, ActorAvatarComponent, NgClass, - DatePipe, + PTDatePipe, AlertComponent ] }) diff --git a/client/src/app/+my-library/my-video-imports/my-video-imports.component.html b/client/src/app/+my-library/my-video-imports/my-video-imports.component.html index 82fd1529c..d7d3485de 100644 --- a/client/src/app/+my-library/my-video-imports/my-video-imports.component.html +++ b/client/src/app/+my-library/my-video-imports/my-video-imports.component.html @@ -55,7 +55,7 @@ - {{ videoImport.createdAt | date: 'short' }} + {{ videoImport.createdAt | ptDate: 'short' }} diff --git a/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts b/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts index f70e583a1..20bfc85e9 100644 --- a/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts +++ b/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts @@ -1,28 +1,25 @@ -import { SortMeta, SharedModule } from 'primeng/api' +import { NgClass, NgIf } from '@angular/common' import { Component, OnInit } from '@angular/core' import { Notifier, RestPagination, RestTable } from '@app/core' -import { VideoImport, VideoImportState, VideoImportStateType } from '@peertube/peertube-models' -import { AutoColspanDirective } from '../../shared/shared-main/common/auto-colspan.directive' -import { EditButtonComponent } from '../../shared/shared-main/buttons/edit-button.component' -import { DeleteButtonComponent } from '../../shared/shared-main/buttons/delete-button.component' -import { ButtonComponent } from '../../shared/shared-main/buttons/button.component' -import { TableExpanderIconComponent } from '../../shared/shared-tables/table-expander-icon.component' -import { NgIf, NgClass, DatePipe } from '@angular/common' -import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' -import { TableModule } from 'primeng/table' -import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced-input-filter.component' -import { RouterLink } from '@angular/router' -import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { VideoImportService } from '@app/shared/shared-main/video/video-import.service' import { Video } from '@app/shared/shared-main/video/video.model' +import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' +import { VideoImport, VideoImportState, VideoImportStateType } from '@peertube/peertube-models' +import { SharedModule, SortMeta } from 'primeng/api' +import { TableModule } from 'primeng/table' +import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced-input-filter.component' +import { ButtonComponent } from '../../shared/shared-main/buttons/button.component' +import { DeleteButtonComponent } from '../../shared/shared-main/buttons/delete-button.component' +import { EditButtonComponent } from '../../shared/shared-main/buttons/edit-button.component' +import { AutoColspanDirective } from '../../shared/shared-main/common/auto-colspan.directive' +import { TableExpanderIconComponent } from '../../shared/shared-tables/table-expander-icon.component' @Component({ templateUrl: './my-video-imports.component.html', styleUrls: [ './my-video-imports.component.scss' ], standalone: true, imports: [ - GlobalIconComponent, - RouterLink, AdvancedInputFilterComponent, TableModule, SharedModule, @@ -34,7 +31,7 @@ import { Video } from '@app/shared/shared-main/video/video.model' EditButtonComponent, NgClass, AutoColspanDirective, - DatePipe + PTDatePipe ] }) export class MyVideoImportsComponent extends RestTable implements OnInit { diff --git a/client/src/app/+video-channels/video-channels.component.html b/client/src/app/+video-channels/video-channels.component.html index 639cbc706..288fb6186 100644 --- a/client/src/app/+video-channels/video-channels.component.html +++ b/client/src/app/+video-channels/video-channels.component.html @@ -64,7 +64,7 @@
-

{{ videoChannel.displayName }}

+

{{ videoChannel.displayName }}

diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts index 53020b0e1..ec875fa91 100644 --- a/client/src/app/+video-channels/video-channels.component.ts +++ b/client/src/app/+video-channels/video-channels.component.ts @@ -1,10 +1,11 @@ -import { DatePipe, NgClass, NgIf, NgTemplateOutlet } from '@angular/common' +import { NgClass, NgIf, NgTemplateOutlet } from '@angular/common' import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core' import { ActivatedRoute, RouterLink, RouterOutlet } from '@angular/router' import { AuthService, Hotkey, HotkeysService, MarkdownService, MetaService, RestExtractor, ScreenService } from '@app/core' import { Account } from '@app/shared/shared-main/account/account.model' import { VideoChannel } from '@app/shared/shared-main/channel/video-channel.model' import { VideoChannelService } from '@app/shared/shared-main/channel/video-channel.service' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { HorizontalMenuComponent, HorizontalMenuEntry } from '@app/shared/shared-main/menu/horizontal-menu.component' import { VideoService } from '@app/shared/shared-main/video/video.service' import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service' @@ -35,7 +36,7 @@ import { AccountBlockBadgesComponent } from '../shared/shared-moderation/account HorizontalMenuComponent, RouterOutlet, SupportModalComponent, - DatePipe + PTDatePipe ] }) export class VideoChannelsComponent implements OnInit, OnDestroy { diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.html b/client/src/app/+videos/+video-edit/shared/video-edit.component.html index 4c48df265..c31c2c4ee 100644 --- a/client/src/app/+videos/+video-edit/shared/video-edit.component.html +++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.html @@ -212,7 +212,7 @@ [href]="videoCaption.captionPath" >{{ getCaptionLabel(videoCaption) }} -
Already uploaded on {{ videoCaption.updatedAt | date }} ✔
+
Already uploaded on {{ videoCaption.updatedAt | ptDate }} ✔
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts index 035978cd8..75ba790c7 100644 --- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts +++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts @@ -1,4 +1,4 @@ -import { DatePipe, NgClass, NgFor, NgIf, NgTemplateOutlet } from '@angular/common' +import { NgClass, NgFor, NgIf, NgTemplateOutlet } from '@angular/common' import { ChangeDetectorRef, Component, @@ -12,6 +12,7 @@ import { booleanAttribute } from '@angular/core' import { AbstractControl, FormArray, FormGroup, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms' +import { RouterLink } from '@angular/router' import { ConfirmService, HooksService, PluginService, ServerService } from '@app/core' import { removeElementFromArray } from '@app/helpers' import { BuildFormArgument, BuildFormValidator } from '@app/shared/form-validators/form-validator.model' @@ -33,6 +34,7 @@ import { import { FormReactiveErrors, FormReactiveValidationMessages } from '@app/shared/shared-forms/form-reactive.service' import { FormValidatorService } from '@app/shared/shared-forms/form-validator.service' import { AlertComponent } from '@app/shared/shared-main/common/alert.component' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { InstanceService } from '@app/shared/shared-main/instance/instance.service' import { VideoCaptionEdit, VideoCaptionWithPathEdit } from '@app/shared/shared-main/video-caption/video-caption-edit.model' import { VideoChaptersEdit } from '@app/shared/shared-main/video/video-chapters-edit.model' @@ -63,7 +65,6 @@ import { DynamicFormFieldComponent } from '../../../shared/shared-forms/dynamic- import { InputTextComponent } from '../../../shared/shared-forms/input-text.component' import { MarkdownTextareaComponent } from '../../../shared/shared-forms/markdown-textarea.component' import { PeertubeCheckboxComponent } from '../../../shared/shared-forms/peertube-checkbox.component' -import { PreviewUploadComponent } from '../../../shared/shared-forms/preview-upload.component' import { SelectChannelComponent } from '../../../shared/shared-forms/select/select-channel.component' import { SelectOptionsComponent } from '../../../shared/shared-forms/select/select-options.component' import { SelectTagsComponent } from '../../../shared/shared-forms/select/select-tags.component' @@ -81,7 +82,6 @@ import { VideoCaptionEditModalContentComponent } from './caption/video-caption-e import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service' import { ThumbnailManagerComponent } from './thumbnail-manager/thumbnail-manager.component' import { VideoEditType } from './video-edit.type' -import { RouterLink } from '@angular/router' type PluginField = { pluginInfo: PluginInfo @@ -122,10 +122,9 @@ type PluginField = { DeleteButtonComponent, EmbedComponent, LiveDocumentationLinkComponent, - PreviewUploadComponent, NgbNavOutlet, VideoCaptionAddModalComponent, - DatePipe, + PTDatePipe, ThumbnailManagerComponent, EditButtonComponent, ButtonComponent, diff --git a/client/src/app/+videos/+video-watch/shared/information/video-alert.component.html b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.html index fc5c92cee..e34a2ad57 100644 --- a/client/src/app/+videos/+video-watch/shared/information/video-alert.component.html +++ b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.html @@ -1,5 +1,5 @@ - This video will be published on {{ video.scheduledUpdate.updateAt | date: 'full' }}. + This video will be published on {{ video.scheduledUpdate.updateAt | ptDate: 'full' }}. diff --git a/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts index b41192fce..e7ece7dd6 100644 --- a/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts +++ b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts @@ -1,7 +1,8 @@ -import { DatePipe, NgIf } from '@angular/common' +import { NgIf } from '@angular/common' import { Component, Input } from '@angular/core' import { AuthUser } from '@app/core' import { AlertComponent } from '@app/shared/shared-main/common/alert.component' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { VideoDetails } from '@app/shared/shared-main/video/video-details.model' import { VideoPrivacy, VideoState } from '@peertube/peertube-models' @@ -10,7 +11,7 @@ import { VideoPrivacy, VideoState } from '@peertube/peertube-models' templateUrl: './video-alert.component.html', standalone: true, styles: `my-alert { text-align: center }`, - imports: [ NgIf, DatePipe, AlertComponent ] + imports: [ NgIf, PTDatePipe, AlertComponent ] }) export class VideoAlertComponent { @Input() user: AuthUser diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.html b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.html index 54672c31a..4934fb305 100644 --- a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.html +++ b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.html @@ -20,12 +20,12 @@
Video re-upload - {{ video.inputFileUpdatedAt | date: 'short' }} + {{ video.inputFileUpdatedAt | ptDate: 'short' }}
Originally published - {{ video.originallyPublishedAt | date: 'shortDate' }} + {{ video.originallyPublishedAt | ptDate: 'shortDate' }}
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts index 60fafff5a..21beebbe8 100644 --- a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts +++ b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts @@ -1,7 +1,8 @@ -import { DatePipe, NgFor, NgIf } from '@angular/common' +import { NgFor, NgIf } from '@angular/common' import { Component, Input, OnChanges } from '@angular/core' import { RouterLink } from '@angular/router' import { HooksService } from '@app/core' +import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe' import { TimeDurationFormatterPipe } from '@app/shared/shared-main/date/time-duration-formatter.pipe' import { VideoDetails } from '@app/shared/shared-main/video/video-details.model' import { GlobalIconComponent } from '../../../../shared/shared-icons/global-icon.component' @@ -18,7 +19,7 @@ type PluginMetadata = { templateUrl: './video-attributes.component.html', styleUrls: [ './video-attributes.component.scss' ], standalone: true, - imports: [ NgIf, RouterLink, GlobalIconComponent, NgFor, DatePipe, TimeDurationFormatterPipe ] + imports: [ NgIf, RouterLink, GlobalIconComponent, NgFor, TimeDurationFormatterPipe, PTDatePipe ] }) export class VideoAttributesComponent implements OnChanges { @Input() video: VideoDetails diff --git a/client/src/app/shared/shared-abuse-list/abuse-details.component.html b/client/src/app/shared/shared-abuse-list/abuse-details.component.html index a53cbd027..b456aeed9 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-details.component.html +++ b/client/src/app/shared/shared-abuse-list/abuse-details.component.html @@ -44,7 +44,7 @@
Updated - +
diff --git a/client/src/app/shared/shared-abuse-list/abuse-details.component.ts b/client/src/app/shared/shared-abuse-list/abuse-details.component.ts index c34655504..fb3c45a1a 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-details.component.ts +++ b/client/src/app/shared/shared-abuse-list/abuse-details.component.ts @@ -1,19 +1,20 @@ +import { NgFor, NgIf } from '@angular/common' import { Component, Input, OnInit } from '@angular/core' +import { RouterLink } from '@angular/router' import { durationToString } from '@app/helpers' import { AbusePredefinedReasonsString } from '@peertube/peertube-models' -import { ProcessedAbuse } from './processed-abuse.model' -import { EmbedComponent } from '../shared-main/video/embed.component' -import { GlobalIconComponent } from '../shared-icons/global-icon.component' import { ActorAvatarComponent } from '../shared-actor-image/actor-avatar.component' -import { RouterLink } from '@angular/router' -import { NgIf, NgFor, DatePipe } from '@angular/common' +import { GlobalIconComponent } from '../shared-icons/global-icon.component' +import { PTDatePipe } from '../shared-main/common/date.pipe' +import { EmbedComponent } from '../shared-main/video/embed.component' +import { ProcessedAbuse } from './processed-abuse.model' @Component({ selector: 'my-abuse-details', templateUrl: './abuse-details.component.html', styleUrls: [ '../shared-moderation/moderation.scss', './abuse-details.component.scss' ], standalone: true, - imports: [ NgIf, RouterLink, ActorAvatarComponent, GlobalIconComponent, NgFor, EmbedComponent, DatePipe ] + imports: [ NgIf, RouterLink, ActorAvatarComponent, GlobalIconComponent, NgFor, EmbedComponent, PTDatePipe ] }) export class AbuseDetailsComponent implements OnInit { @Input() abuse: ProcessedAbuse diff --git a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.html b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.html index 32fdda023..19fb26a31 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.html +++ b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.html @@ -118,7 +118,7 @@ - {{ abuse.createdAt | date: 'short' }} + {{ abuse.createdAt | ptDate: 'short' }}
diff --git a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts index a348eabe7..0151bc4cc 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts +++ b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts @@ -1,33 +1,34 @@ -import debug from 'debug' -import { SortMeta, SharedModule } from 'primeng/api' +import { NgClass, NgIf } from '@angular/common' import { Component, Input, OnInit, ViewChild } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } from '@app/core' +import { formatICU } from '@app/helpers' +import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' import { AbuseState, AbuseStateType, AdminAbuse } from '@peertube/peertube-models' import { logger } from '@root-helpers/logger' -import { AbuseMessageModalComponent } from './abuse-message-modal.component' -import { ModerationCommentModalComponent } from './moderation-comment-modal.component' -import { ProcessedAbuse } from './processed-abuse.model' -import { AbuseDetailsComponent } from './abuse-details.component' -import { AutoColspanDirective } from '../shared-main/common/auto-colspan.directive' -import { GlobalIconComponent } from '../shared-icons/global-icon.component' -import { VideoCellComponent } from '../shared-tables/video-cell.component' -import { ActorAvatarComponent } from '../shared-actor-image/actor-avatar.component' -import { ActionDropdownComponent, DropdownAction } from '../shared-main/buttons/action-dropdown.component' -import { TableExpanderIconComponent } from '../shared-tables/table-expander-icon.component' -import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap' -import { NgIf, NgClass, DatePipe } from '@angular/common' -import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../shared-forms/advanced-input-filter.component' +import debug from 'debug' +import { SharedModule, SortMeta } from 'primeng/api' import { TableModule } from 'primeng/table' -import { Video } from '../shared-main/video/video.model' -import { Actor } from '../shared-main/account/actor.model' -import { VideoService } from '../shared-main/video/video.service' +import { ActorAvatarComponent } from '../shared-actor-image/actor-avatar.component' +import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../shared-forms/advanced-input-filter.component' +import { GlobalIconComponent } from '../shared-icons/global-icon.component' import { Account } from '../shared-main/account/account.model' +import { Actor } from '../shared-main/account/actor.model' +import { ActionDropdownComponent, DropdownAction } from '../shared-main/buttons/action-dropdown.component' +import { AutoColspanDirective } from '../shared-main/common/auto-colspan.directive' +import { PTDatePipe } from '../shared-main/common/date.pipe' +import { Video } from '../shared-main/video/video.model' +import { VideoService } from '../shared-main/video/video.service' import { AbuseService } from '../shared-moderation/abuse.service' import { BlocklistService } from '../shared-moderation/blocklist.service' import { VideoBlockService } from '../shared-moderation/video-block.service' +import { TableExpanderIconComponent } from '../shared-tables/table-expander-icon.component' +import { VideoCellComponent } from '../shared-tables/video-cell.component' import { VideoCommentService } from '../shared-video-comment/video-comment.service' -import { formatICU } from '@app/helpers' +import { AbuseDetailsComponent } from './abuse-details.component' +import { AbuseMessageModalComponent } from './abuse-message-modal.component' +import { ModerationCommentModalComponent } from './moderation-comment-modal.component' +import { ProcessedAbuse } from './processed-abuse.model' const debugLogger = debug('peertube:moderation:AbuseListTableComponent') @@ -52,7 +53,7 @@ const debugLogger = debug('peertube:moderation:AbuseListTableComponent') AbuseDetailsComponent, ModerationCommentModalComponent, AbuseMessageModalComponent, - DatePipe + PTDatePipe ] }) export class AbuseListTableComponent extends RestTable implements OnInit { diff --git a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.html b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.html index ce973efd9..224db1ed9 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.html +++ b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.html @@ -21,7 +21,7 @@
-
{{ message.createdAt | date }}
+
{{ message.createdAt | ptDate }}
diff --git a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts index 05a58c89f..03bd26df0 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts +++ b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts @@ -1,15 +1,16 @@ +import { NgClass, NgFor, NgIf } from '@angular/common' import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { AuthService, HtmlRendererService, Notifier } from '@app/core' import { FormReactive } from '@app/shared/shared-forms/form-reactive' import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' -import { logger } from '@root-helpers/logger' import { AbuseMessage, UserAbuse } from '@peertube/peertube-models' +import { logger } from '@root-helpers/logger' import { ABUSE_MESSAGE_VALIDATOR } from '../form-validators/abuse-validators' -import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { GlobalIconComponent } from '../shared-icons/global-icon.component' -import { NgIf, NgFor, NgClass, DatePipe } from '@angular/common' +import { PTDatePipe } from '../shared-main/common/date.pipe' import { AbuseService } from '../shared-moderation/abuse.service' @Component({ @@ -17,7 +18,7 @@ import { AbuseService } from '../shared-moderation/abuse.service' templateUrl: './abuse-message-modal.component.html', styleUrls: [ './abuse-message-modal.component.scss' ], standalone: true, - imports: [ NgIf, GlobalIconComponent, NgFor, NgClass, FormsModule, ReactiveFormsModule, DatePipe ] + imports: [ NgIf, GlobalIconComponent, NgFor, NgClass, FormsModule, ReactiveFormsModule, PTDatePipe ] }) export class AbuseMessageModalComponent extends FormReactive implements OnInit { @ViewChild('modal', { static: true }) modal: NgbModal diff --git a/client/src/app/shared/shared-main/common/date.pipe.ts b/client/src/app/shared/shared-main/common/date.pipe.ts new file mode 100644 index 000000000..da89d59f7 --- /dev/null +++ b/client/src/app/shared/shared-main/common/date.pipe.ts @@ -0,0 +1,31 @@ +import { DatePipe } from '@angular/common' +import { Inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core' + +// Re-implementation of the angular date pipe that use the web browser locale to display dates + +@Pipe({ + name: 'ptDate', + standalone: true, + pure: true +}) +export class PTDatePipe implements PipeTransform { + private angularPipe: DatePipe + private customLocaleId: string + + constructor (@Inject(LOCALE_ID) localeId: string) { + if (navigator.language.includes('-') && navigator.language.split('-')[0] === localeId.split('-')[0]) { + this.customLocaleId = navigator.language + } else { + this.customLocaleId = localeId + } + + this.angularPipe = new DatePipe(localeId) + } + + transform (value: Date | string | number | null | undefined, format?: string): string { + if (format === 'short') return new Date(value).toLocaleString(this.customLocaleId) + if (format === 'shortDate') return new Date(value).toLocaleDateString(this.customLocaleId) + + return this.angularPipe.transform(value, format) + } +} diff --git a/client/src/app/shared/shared-moderation/account-blocklist.component.html b/client/src/app/shared/shared-moderation/account-blocklist.component.html index 33ac003b2..6739607de 100644 --- a/client/src/app/shared/shared-moderation/account-blocklist.component.html +++ b/client/src/app/shared/shared-moderation/account-blocklist.component.html @@ -37,7 +37,7 @@ - {{ accountBlock.createdAt | date: 'short' }} + {{ accountBlock.createdAt | ptDate: 'short' }} diff --git a/client/src/app/shared/shared-moderation/server-blocklist.component.html b/client/src/app/shared/shared-moderation/server-blocklist.component.html index c8ab868c8..5f92bff04 100644 --- a/client/src/app/shared/shared-moderation/server-blocklist.component.html +++ b/client/src/app/shared/shared-moderation/server-blocklist.component.html @@ -39,7 +39,7 @@ - {{ serverBlock.createdAt | date: 'short' }} + {{ serverBlock.createdAt | ptDate: 'short' }} diff --git a/client/src/app/shared/shared-video-comment/video-comment-list-admin-owner.component.html b/client/src/app/shared/shared-video-comment/video-comment-list-admin-owner.component.html index e28c85887..5cb016d84 100644 --- a/client/src/app/shared/shared-video-comment/video-comment-list-admin-owner.component.html +++ b/client/src/app/shared/shared-video-comment/video-comment-list-admin-owner.component.html @@ -96,7 +96,7 @@ } - {{ videoComment.createdAt | date: 'short' }} + {{ videoComment.createdAt | ptDate: 'short' }} diff --git a/client/src/app/shared/shared-video-comment/video-comment-list-admin-owner.component.ts b/client/src/app/shared/shared-video-comment/video-comment-list-admin-owner.component.ts index 8dff7ea9f..70133962b 100644 --- a/client/src/app/shared/shared-video-comment/video-comment-list-admin-owner.component.ts +++ b/client/src/app/shared/shared-video-comment/video-comment-list-admin-owner.component.ts @@ -1,4 +1,4 @@ -import { DatePipe, NgClass, NgIf } from '@angular/common' +import { NgClass, NgIf } from '@angular/common' import { Component, Input, OnInit } from '@angular/core' import { ActivatedRoute, Router, RouterLink } from '@angular/router' import { AuthService, ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } from '@app/core' @@ -12,11 +12,10 @@ import { SharedModule, SortMeta } from 'primeng/api' import { TableModule } from 'primeng/table' import { ActorAvatarComponent } from '../shared-actor-image/actor-avatar.component' import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../shared-forms/advanced-input-filter.component' -import { GlobalIconComponent } from '../shared-icons/global-icon.component' -import { AutoColspanDirective } from '../shared-main/common/auto-colspan.directive' import { ActionDropdownComponent, DropdownAction } from '../shared-main/buttons/action-dropdown.component' import { ButtonComponent } from '../shared-main/buttons/button.component' -import { FeedComponent } from '../shared-main/feeds/feed.component' +import { AutoColspanDirective } from '../shared-main/common/auto-colspan.directive' +import { PTDatePipe } from '../shared-main/common/date.pipe' import { TableExpanderIconComponent } from '../shared-tables/table-expander-icon.component' @Component({ @@ -25,8 +24,6 @@ import { TableExpanderIconComponent } from '../shared-tables/table-expander-icon styleUrls: [ '../shared-moderation/moderation.scss', './video-comment-list-admin-owner.component.scss' ], standalone: true, imports: [ - GlobalIconComponent, - FeedComponent, TableModule, SharedModule, NgIf, @@ -38,7 +35,7 @@ import { TableExpanderIconComponent } from '../shared-tables/table-expander-icon NgClass, ActorAvatarComponent, AutoColspanDirective, - DatePipe, + PTDatePipe, RouterLink ] }) diff --git a/client/src/app/shared/shared-video-live/live-stream-information.component.html b/client/src/app/shared/shared-video-live/live-stream-information.component.html index 7be81e8d0..ece5d58b6 100644 --- a/client/src/app/shared/shared-video-live/live-stream-information.component.html +++ b/client/src/app/shared/shared-video-live/live-stream-information.component.html @@ -41,8 +41,8 @@ Success {{ getErrorLabel(session) }} - Started on {{ session.startDate | date:'medium' }} - Ended on {{ session.endDate | date:'medium' }} + Started on {{ session.startDate | ptDate:'medium' }} + Ended on {{ session.endDate | ptDate:'medium' }} Go to replay Replay is being processed...
diff --git a/client/src/app/shared/shared-video-live/live-stream-information.component.ts b/client/src/app/shared/shared-video-live/live-stream-information.component.ts index 77cdd6ba4..baf390f4c 100644 --- a/client/src/app/shared/shared-video-live/live-stream-information.component.ts +++ b/client/src/app/shared/shared-video-live/live-stream-information.component.ts @@ -1,4 +1,4 @@ -import { DatePipe, NgFor, NgIf } from '@angular/common' +import { NgFor, NgIf } from '@angular/common' import { Component, ElementRef, ViewChild } from '@angular/core' import { RouterLink } from '@angular/router' import { Video } from '@app/shared/shared-main/video/video.model' @@ -8,6 +8,7 @@ import { InputTextComponent } from '../shared-forms/input-text.component' import { GlobalIconComponent } from '../shared-icons/global-icon.component' import { EditButtonComponent } from '../shared-main/buttons/edit-button.component' import { AlertComponent } from '../shared-main/common/alert.component' +import { PTDatePipe } from '../shared-main/common/date.pipe' import { LiveDocumentationLinkComponent } from './live-documentation-link.component' import { LiveVideoService } from './live-video.service' @@ -24,7 +25,7 @@ import { LiveVideoService } from './live-video.service' NgFor, RouterLink, EditButtonComponent, - DatePipe, + PTDatePipe, AlertComponent ], providers: [ LiveVideoService ] diff --git a/client/src/app/shared/standalone-watched-words/watched-words-list-admin-owner.component.html b/client/src/app/shared/standalone-watched-words/watched-words-list-admin-owner.component.html index 46088d3db..c84ba094a 100644 --- a/client/src/app/shared/standalone-watched-words/watched-words-list-admin-owner.component.html +++ b/client/src/app/shared/standalone-watched-words/watched-words-list-admin-owner.component.html @@ -56,7 +56,7 @@ {{ list.words.length }} words - {{ list.updatedAt | date: 'short' }} + {{ list.updatedAt | ptDate: 'short' }} diff --git a/client/src/app/shared/standalone-watched-words/watched-words-list-admin-owner.component.ts b/client/src/app/shared/standalone-watched-words/watched-words-list-admin-owner.component.ts index 41808415b..50869806c 100644 --- a/client/src/app/shared/standalone-watched-words/watched-words-list-admin-owner.component.ts +++ b/client/src/app/shared/standalone-watched-words/watched-words-list-admin-owner.component.ts @@ -1,4 +1,4 @@ -import { DatePipe, NgClass, NgIf } from '@angular/common' +import { NgClass, NgIf } from '@angular/common' import { Component, Input, OnInit, ViewChild } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' import { AuthService, ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' @@ -8,9 +8,10 @@ import { SharedModule, SortMeta } from 'primeng/api' import { TableModule } from 'primeng/table' import { first } from 'rxjs' import { GlobalIconComponent } from '../shared-icons/global-icon.component' -import { AutoColspanDirective } from '../shared-main/common/auto-colspan.directive' import { ActionDropdownComponent, DropdownAction } from '../shared-main/buttons/action-dropdown.component' import { ButtonComponent } from '../shared-main/buttons/button.component' +import { AutoColspanDirective } from '../shared-main/common/auto-colspan.directive' +import { PTDatePipe } from '../shared-main/common/date.pipe' import { TableExpanderIconComponent } from '../shared-tables/table-expander-icon.component' import { WatchedWordsListSaveModalComponent } from './watched-words-list-save-modal.component' import { WatchedWordsListService } from './watched-words-list.service' @@ -29,7 +30,7 @@ import { WatchedWordsListService } from './watched-words-list.service' TableExpanderIconComponent, NgClass, AutoColspanDirective, - DatePipe, + PTDatePipe, NgbTooltip, WatchedWordsListSaveModalComponent ]