Fix locale date format
Use the complete web browser locale instead of locale defined by the client (so en-US page can correctly display short dates for en-GB users)
This commit is contained in:
parent
0f2c182975
commit
57d9e96d63
|
@ -10,7 +10,7 @@
|
|||
<div class="actor-info">
|
||||
<div>
|
||||
<div class="actor-display-name align-items-center">
|
||||
<h1 i18n-title [title]="'Created on ' + (account.createdAt | date)">{{ account.displayName }}</h1>
|
||||
<h1 i18n-title [title]="'Created on ' + (account.createdAt | ptDate)">{{ account.displayName }}</h1>
|
||||
|
||||
<my-user-moderation-dropdown
|
||||
class="mx-3" [prependActions]="prependModerationActions"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { DatePipe, NgClass, NgIf } from '@angular/common'
|
||||
import { NgClass, NgIf } from '@angular/common'
|
||||
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'
|
||||
import { ActivatedRoute, Router, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'
|
||||
import { AuthService, MarkdownService, MetaService, Notifier, RedirectService, RestExtractor, ScreenService, UserService } from '@app/core'
|
||||
|
@ -7,6 +7,7 @@ import { AccountService } from '@app/shared/shared-main/account/account.service'
|
|||
import { DropdownAction } from '@app/shared/shared-main/buttons/action-dropdown.component'
|
||||
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'
|
||||
|
@ -41,7 +42,7 @@ import { SubscribeButtonComponent } from '../shared/shared-user-subscription/sub
|
|||
SimpleSearchInputComponent,
|
||||
RouterOutlet,
|
||||
AccountReportComponent,
|
||||
DatePipe,
|
||||
PTDatePipe,
|
||||
HorizontalMenuComponent
|
||||
]
|
||||
})
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
</td>
|
||||
|
||||
<td>{{ follow.score }}</td>
|
||||
<td>{{ follow.createdAt | date: 'short' }}</td>
|
||||
<td>{{ follow.createdAt | ptDate: 'short' }}</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -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 <ActorFollow> implements OnInit {
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<span *ngIf="follow.state === 'rejected'" class="pt-badge badge-red" i18n>Rejected</span>
|
||||
</td>
|
||||
|
||||
<td>{{ follow.createdAt | date: 'short' }}</td>
|
||||
<td>{{ follow.createdAt | ptDate: 'short' }}</td>
|
||||
<td>
|
||||
<my-redundancy-checkbox
|
||||
*ngIf="isInstanceFollowing(follow)"
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { DatePipe, NgIf } from '@angular/common'
|
||||
import { NgIf } from '@angular/common'
|
||||
import { Component, OnInit, ViewChild } from '@angular/core'
|
||||
import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
|
||||
import { formatICU } from '@app/helpers'
|
||||
import { InstanceFollowService } from '@app/shared/shared-instance/instance-follow.service'
|
||||
import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe'
|
||||
import { ActorFollow } from '@peertube/peertube-models'
|
||||
import { SharedModule, SortMeta } from 'primeng/api'
|
||||
import { TableModule } from 'primeng/table'
|
||||
|
@ -30,7 +31,7 @@ import { FollowModalComponent } from './follow-modal.component'
|
|||
RedundancyCheckboxComponent,
|
||||
AutoColspanDirective,
|
||||
FollowModalComponent,
|
||||
DatePipe,
|
||||
PTDatePipe,
|
||||
ButtonComponent
|
||||
]
|
||||
})
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
<div>
|
||||
<span class="label">Created on</span>
|
||||
<span>{{ redundancyElement.createdAt | date: 'medium' }}</span>
|
||||
<span>{{ redundancyElement.createdAt | ptDate: 'medium' }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="label">Expires on</span>
|
||||
<span>{{ redundancyElement.expiresOn | date: 'medium' }}</span>
|
||||
<span>{{ redundancyElement.expiresOn | ptDate: 'medium' }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
{{ registration.moderationResponse }}
|
||||
</td>
|
||||
|
||||
<td class="c-hand" [pRowToggler]="registration">{{ registration.createdAt | date: 'short' }}</td>
|
||||
<td class="c-hand" [pRowToggler]="registration">{{ registration.createdAt | ptDate: 'short' }}</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -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 <UserRegistration> implements OnInit {
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
</td>
|
||||
|
||||
<td>
|
||||
{{ videoBlock.createdAt | date: 'short' }}
|
||||
{{ videoBlock.createdAt | ptDate: 'short' }}
|
||||
</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -142,9 +142,9 @@
|
|||
<span *ngIf="user.pluginAuth" [ngbTooltip]="user.pluginAuth">{{ user.pluginAuth }}</span>
|
||||
</td>
|
||||
|
||||
<td *ngIf="isSelected('createdAt')" [title]="user.createdAt">{{ user.createdAt | date: 'short' }}</td>
|
||||
<td *ngIf="isSelected('createdAt')" [title]="user.createdAt">{{ user.createdAt | ptDate: 'short' }}</td>
|
||||
|
||||
<td *ngIf="isSelected('lastLoginDate')" [title]="user.lastLoginDate">{{ user.lastLoginDate | date: 'short' }}</td>
|
||||
<td *ngIf="isSelected('lastLoginDate')" [title]="user.lastLoginDate">{{ user.lastLoginDate | ptDate: 'short' }}</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
</td>
|
||||
|
||||
<td>
|
||||
{{ video.publishedAt | date: 'short' }}
|
||||
{{ video.publishedAt | ptDate: 'short' }}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
<my-select-options inputId="log-start-date" [items]="timeChoices" [(ngModel)]="startDate" (ngModelChange)="refresh()">
|
||||
<ng-template ptTemplate="item" let-item>
|
||||
{{ item.label }} ({{ item.id | date: item.dateFormat }} - <span i18n>now</span>)
|
||||
{{ item.label }} ({{ item.id | ptDate: item.dateFormat }} - <span i18n>now</span>)
|
||||
</ng-template>
|
||||
</my-select-options>
|
||||
</div>
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
|
||||
<td>{{ runner.ip }}</td>
|
||||
|
||||
<td>{{ runner.lastContact | date: 'short' }}</td>
|
||||
<td>{{ runner.lastContact | ptDate: 'short' }}</td>
|
||||
|
||||
<td>{{ runner.createdAt | date: 'short' }}</td>
|
||||
<td>{{ runner.createdAt | ptDate: 'short' }}</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -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 <Runner> implements OnInit {
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
></my-copy-button>
|
||||
</td>
|
||||
|
||||
<td>{{ registrationToken.createdAt | date: 'short' }}</td>
|
||||
<td>{{ registrationToken.createdAt | ptDate: 'short' }}</td>
|
||||
|
||||
<td>{{ registrationToken.registeredRunnersCount }}</td>
|
||||
</tr>
|
||||
|
|
|
@ -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 <RunnerRegistrationToken> implements OnInit {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
</tr>
|
||||
|
||||
<tr *ngFor="let export of userExports">
|
||||
<td>{{ export.createdAt | date: 'medium' }}</td>
|
||||
<td>{{ export.createdAt | ptDate: 'medium' }}</td>
|
||||
<td>{{ export.state.label }}</td>
|
||||
|
||||
<td>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</td>
|
||||
|
||||
<td>
|
||||
<ng-container *ngIf="export.expiresOn">{{ export.expiresOn | date: 'medium' }}</ng-container>
|
||||
<ng-container *ngIf="export.expiresOn">{{ export.expiresOn | ptDate: 'medium' }}</ng-container>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<div class="mb-3" *ngIf="latestImport">
|
||||
<div>
|
||||
<strong>Latest import on:</strong> {{ latestImport.createdAt | date: 'medium' }}
|
||||
<strong>Latest import on:</strong> {{ latestImport.createdAt | ptDate: 'medium' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<my-video-cell [video]="videoChangeOwnership.video"></my-video-cell>
|
||||
</td>
|
||||
|
||||
<td>{{ videoChangeOwnership.createdAt | date: 'short' }}</td>
|
||||
<td>{{ videoChangeOwnership.createdAt | ptDate: 'short' }}</td>
|
||||
|
||||
<td>
|
||||
<span class="pt-badge"
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
import { DatePipe, NgClass, NgIf } from '@angular/common'
|
||||
import { NgClass, NgIf } from '@angular/common'
|
||||
import { Component, OnInit, ViewChild } from '@angular/core'
|
||||
import { Notifier, RestPagination, RestTable } from '@app/core'
|
||||
import { Account } from '@app/shared/shared-main/account/account.model'
|
||||
import { PTDatePipe } from '@app/shared/shared-main/common/date.pipe'
|
||||
import { VideoOwnershipService } from '@app/shared/shared-main/video/video-ownership.service'
|
||||
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { VideoChangeOwnership, VideoChangeOwnershipStatus, VideoChangeOwnershipStatusType } from '@peertube/peertube-models'
|
||||
import { SharedModule, SortMeta } from 'primeng/api'
|
||||
import { TableModule } from 'primeng/table'
|
||||
import { ActorAvatarComponent } from '../../shared/shared-actor-image/actor-avatar.component'
|
||||
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
|
||||
import { AutoColspanDirective } from '../../shared/shared-main/common/auto-colspan.directive'
|
||||
import { ButtonComponent } from '../../shared/shared-main/buttons/button.component'
|
||||
import { AutoColspanDirective } from '../../shared/shared-main/common/auto-colspan.directive'
|
||||
import { VideoCellComponent } from '../../shared/shared-tables/video-cell.component'
|
||||
import { MyAcceptOwnershipComponent } from './my-accept-ownership/my-accept-ownership.component'
|
||||
|
||||
|
@ -18,7 +18,6 @@ import { MyAcceptOwnershipComponent } from './my-accept-ownership/my-accept-owne
|
|||
templateUrl: './my-ownership.component.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
GlobalIconComponent,
|
||||
TableModule,
|
||||
SharedModule,
|
||||
NgbTooltip,
|
||||
|
@ -28,7 +27,7 @@ import { MyAcceptOwnershipComponent } from './my-accept-ownership/my-accept-owne
|
|||
NgClass,
|
||||
AutoColspanDirective,
|
||||
MyAcceptOwnershipComponent,
|
||||
DatePipe,
|
||||
PTDatePipe,
|
||||
VideoCellComponent
|
||||
]
|
||||
})
|
||||
|
|
|
@ -70,8 +70,8 @@
|
|||
</span>
|
||||
</td>
|
||||
|
||||
<td>{{ videoChannelSync.createdAt | date: 'short' }}</td>
|
||||
<td>{{ videoChannelSync.lastSyncAt | date: 'short' }}</td>
|
||||
<td>{{ videoChannelSync.createdAt | ptDate: 'short' }}</td>
|
||||
<td>{{ videoChannelSync.lastSyncAt | ptDate: 'short' }}</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -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
|
||||
]
|
||||
})
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
</span>
|
||||
</td>
|
||||
|
||||
<td>{{ videoImport.createdAt | date: 'short' }}</td>
|
||||
<td>{{ videoImport.createdAt | ptDate: 'short' }}</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<div class="actor-info">
|
||||
<div>
|
||||
<div class="actor-display-name">
|
||||
<h1 i18n-title [title]="'Channel created on ' + (videoChannel.createdAt | date)">{{ videoChannel.displayName }}</h1>
|
||||
<h1 i18n-title [title]="'Channel created on ' + (videoChannel.createdAt | ptDate)">{{ videoChannel.displayName }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="actor-handle">
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -212,7 +212,7 @@
|
|||
[href]="videoCaption.captionPath"
|
||||
>{{ getCaptionLabel(videoCaption) }}</a>
|
||||
|
||||
<div i18n class="caption-entry-state">Already uploaded on {{ videoCaption.updatedAt | date }} ✔</div>
|
||||
<div i18n class="caption-entry-state">Already uploaded on {{ videoCaption.updatedAt | ptDate }} ✔</div>
|
||||
|
||||
<my-edit-button i18n-label label="Edit" class="me-2" (click)="openEditCaptionModal(videoCaption)"></my-edit-button>
|
||||
<my-delete-button label (click)="deleteCaption(videoCaption)"></my-delete-button>
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<my-alert rounded="false" type="primary" i18n *ngIf="hasVideoScheduledPublication()">
|
||||
This video will be published on {{ video.scheduledUpdate.updateAt | date: 'full' }}.
|
||||
This video will be published on {{ video.scheduledUpdate.updateAt | ptDate: 'full' }}.
|
||||
</my-alert>
|
||||
|
||||
<my-alert rounded="false" type="primary" i18n *ngIf="isWaitingForLive()">
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -20,12 +20,12 @@
|
|||
|
||||
<div *ngIf="!!video.inputFileUpdatedAt" class="attribute attribute-re-uploaded-on">
|
||||
<span i18n class="attribute-label">Video re-upload</span>
|
||||
<span class="attribute-value">{{ video.inputFileUpdatedAt | date: 'short' }}</span>
|
||||
<span class="attribute-value">{{ video.inputFileUpdatedAt | ptDate: 'short' }}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="!!video.originallyPublishedAt" class="attribute attribute-originally-published-at">
|
||||
<span i18n class="attribute-label">Originally published</span>
|
||||
<span class="attribute-value">{{ video.originallyPublishedAt | date: 'shortDate' }}</span>
|
||||
<span class="attribute-value">{{ video.originallyPublishedAt | ptDate: 'shortDate' }}</span>
|
||||
</div>
|
||||
|
||||
<div class="attribute attribute-category">
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
<div class="d-flex" *ngIf="abuse.updatedAt">
|
||||
<span class="moderation-expanded-label" i18n>Updated</span>
|
||||
<time class="moderation-expanded-text abuse-details-date-updated">{{ abuse.updatedAt | date: 'medium' }}</time>
|
||||
<time class="moderation-expanded-text abuse-details-date-updated">{{ abuse.updatedAt | ptDate: 'medium' }}</time>
|
||||
</div>
|
||||
|
||||
<!-- report text -->
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
|
||||
</ng-container>
|
||||
|
||||
<td class="c-hand" [pRowToggler]="abuse">{{ abuse.createdAt | date: 'short' }}</td>
|
||||
<td class="c-hand" [pRowToggler]="abuse">{{ abuse.createdAt | ptDate: 'short' }}</td>
|
||||
|
||||
<td class="c-hand abuse-states" [pRowToggler]="abuse">
|
||||
<div *ngIf="isAbuseAccepted(abuse)" [title]="abuse.state.label" class="pt-badge badge-success">
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<div class="bubble">
|
||||
<div class="content" [innerHTML]="message.messageHtml"></div>
|
||||
<div class="date">{{ message.createdAt | date }}</div>
|
||||
<div class="date">{{ message.createdAt | ptDate }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
|
@ -37,7 +37,7 @@
|
|||
</a>
|
||||
</td>
|
||||
|
||||
<td>{{ accountBlock.createdAt | date: 'short' }}</td>
|
||||
<td>{{ accountBlock.createdAt | ptDate: 'short' }}</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<my-global-icon iconName="external-link"></my-global-icon>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ serverBlock.createdAt | date: 'short' }}</td>
|
||||
<td>{{ serverBlock.createdAt | ptDate: 'short' }}</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
}
|
||||
</td>
|
||||
|
||||
<td class="c-hand" [pRowToggler]="videoComment">{{ videoComment.createdAt | date: 'short' }}</td>
|
||||
<td class="c-hand" [pRowToggler]="videoComment">{{ videoComment.createdAt | ptDate: 'short' }}</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -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
|
||||
]
|
||||
})
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
<span i18n class="pt-badge badge-success" *ngIf="!getErrorLabel(session)">Success</span>
|
||||
<span class="pt-badge badge-danger" *ngIf="getErrorLabel(session)">{{ getErrorLabel(session) }}</span>
|
||||
|
||||
<span i18n>Started on {{ session.startDate | date:'medium' }}</span>
|
||||
<span i18n *ngIf="session.endDate">Ended on {{ session.endDate | date:'medium' }}</span>
|
||||
<span i18n>Started on {{ session.startDate | ptDate:'medium' }}</span>
|
||||
<span i18n *ngIf="session.endDate">Ended on {{ session.endDate | ptDate:'medium' }}</span>
|
||||
<a i18n *ngIf="session.replayVideo" [routerLink]="getVideoUrl(session.replayVideo)" target="_blank">Go to replay</a>
|
||||
<span i18n *ngIf="isReplayBeingProcessed(session)">Replay is being processed...</span>
|
||||
</div>
|
||||
|
|
|
@ -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 ]
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
{{ list.words.length }} words
|
||||
</td>
|
||||
|
||||
<td>{{ list.updatedAt | date: 'short' }}</td>
|
||||
<td>{{ list.updatedAt | ptDate: 'short' }}</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue