Browse Source

Merge branch 'main' into refactor/reuse-value-component-platform

pull/6470/head
Thomas Kaul 4 weeks ago
committed by GitHub
parent
commit
cfa48e6bdf
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 8
      apps/api/src/services/twitter-bot/twitter-bot.service.ts
  3. 2
      apps/client/src/app/components/admin-settings/admin-settings.component.html
  4. 6
      apps/client/src/app/components/admin-tag/admin-tag.component.html
  5. 6
      apps/client/src/app/components/admin-tag/admin-tag.component.ts

1
CHANGELOG.md

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Reused the value component in the platform management of the admin control panel
- Reused the value component in the tag management of the admin control panel
- Upgraded `jsonpath` from version `1.1.1` to `1.2.1`
## 2.247.0 - 2026-03-04

8
apps/api/src/services/twitter-bot/twitter-bot.service.ts

@ -10,19 +10,21 @@ import {
resolveMarketCondition
} from '@ghostfolio/common/helper';
import { Injectable, Logger } from '@nestjs/common';
import { Injectable, Logger, OnModuleInit } from '@nestjs/common';
import { isWeekend } from 'date-fns';
import { TwitterApi, TwitterApiReadWrite } from 'twitter-api-v2';
@Injectable()
export class TwitterBotService {
export class TwitterBotService implements OnModuleInit {
private twitterClient: TwitterApiReadWrite;
public constructor(
private readonly benchmarkService: BenchmarkService,
private readonly configurationService: ConfigurationService,
private readonly symbolService: SymbolService
) {
) {}
public onModuleInit() {
this.twitterClient = new TwitterApi({
accessSecret: this.configurationService.get(
'TWITTER_ACCESS_TOKEN_SECRET'

2
apps/client/src/app/components/admin-settings/admin-settings.component.html

@ -199,7 +199,7 @@
<div class="row">
<div class="col">
<h2 class="text-center" i18n>Tags</h2>
<gf-admin-tag />
<gf-admin-tag [locale]="user?.settings?.locale" />
</div>
</div>
</div>

6
apps/client/src/app/components/admin-tag/admin-tag.component.html

@ -45,7 +45,11 @@
<ng-container i18n>Activities</ng-container>
</th>
<td *matCellDef="let element" class="px-1 text-right" mat-cell>
{{ element.activityCount }}
<gf-value
class="d-inline-block justify-content-end"
[locale]="locale"
[value]="element.activityCount"
/>
</td>
</ng-container>

6
apps/client/src/app/components/admin-tag/admin-tag.component.ts

@ -1,13 +1,16 @@
import { UserService } from '@ghostfolio/client/services/user/user.service';
import { CreateTagDto, UpdateTagDto } from '@ghostfolio/common/dtos';
import { ConfirmationDialogType } from '@ghostfolio/common/enums';
import { getLocale } from '@ghostfolio/common/helper';
import { NotificationService } from '@ghostfolio/ui/notifications';
import { DataService } from '@ghostfolio/ui/services';
import { GfValueComponent } from '@ghostfolio/ui/value';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
Input,
OnDestroy,
OnInit,
ViewChild
@ -36,6 +39,7 @@ import { CreateOrUpdateTagDialogParams } from './create-or-update-tag-dialog/int
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
GfValueComponent,
IonIcon,
MatButtonModule,
MatMenuModule,
@ -48,6 +52,8 @@ import { CreateOrUpdateTagDialogParams } from './create-or-update-tag-dialog/int
templateUrl: './admin-tag.component.html'
})
export class GfAdminTagComponent implements OnDestroy, OnInit {
@Input() locale = getLocale();
@ViewChild(MatSort) sort: MatSort;
public dataSource = new MatTableDataSource<Tag>();

Loading…
Cancel
Save