diff --git a/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.html b/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.html new file mode 100644 index 0000000..6a6e0a6 --- /dev/null +++ b/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.html @@ -0,0 +1,32 @@ +
+ + + + + Twitter + + + + + + + + @{{ twitter.username }} + + + + + + +
diff --git a/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.scss b/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.scss new file mode 100644 index 0000000..71cb1d3 --- /dev/null +++ b/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.scss @@ -0,0 +1,11 @@ +.twitter { + background-image: url("../../../../assets/twitter.png"); + background-size: cover; +} + +.platform-title { + display: grid; + grid-template-columns: 1fr 40px; + width: 100%; + align-items: center; +} diff --git a/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.spec.ts b/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.spec.ts new file mode 100644 index 0000000..3b81986 --- /dev/null +++ b/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TwitterBotCardComponent } from './twitter-bot-card.component'; + +describe('TwitterBotCardComponent', () => { + let component: TwitterBotCardComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [TwitterBotCardComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TwitterBotCardComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.ts b/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.ts new file mode 100644 index 0000000..ffd2673 --- /dev/null +++ b/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-card.component.ts @@ -0,0 +1,27 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { TwitterService } from 'src/app/core/api'; +import { TwitterBotInfoDialogComponent } from './twitter-bot-info-dialog/twitter-bot-info-dialog.component'; +import { MatDialog } from '@angular/material/dialog'; + +@Component({ + selector: 'app-twitter-bot-card', + templateUrl: './twitter-bot-card.component.html', + styleUrls: ['./twitter-bot-card.component.scss'], +}) +export class TwitterBotCardComponent implements OnInit { + @Input() hoodId; + twitters$; + + constructor( + private twitterService: TwitterService, + private dialog: MatDialog + ) {} + + ngOnInit(): void { + this.twitters$ = this.twitterService.getTwittersPublic(this.hoodId); + } + + onInfoClick() { + this.dialog.open(TwitterBotInfoDialogComponent); + } +} diff --git a/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-info-dialog/twitter-bot-info-dialog.component.html b/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-info-dialog/twitter-bot-info-dialog.component.html new file mode 100644 index 0000000..0b116ea --- /dev/null +++ b/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-info-dialog/twitter-bot-info-dialog.component.html @@ -0,0 +1 @@ +

twitter-bot-info-dialog works!

diff --git a/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-info-dialog/twitter-bot-info-dialog.component.scss b/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-info-dialog/twitter-bot-info-dialog.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-info-dialog/twitter-bot-info-dialog.component.ts b/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-info-dialog/twitter-bot-info-dialog.component.ts new file mode 100644 index 0000000..f7ac2e0 --- /dev/null +++ b/kibicara-frontend/src/app/platforms/twitter/twitter-bot-card/twitter-bot-info-dialog/twitter-bot-info-dialog.component.ts @@ -0,0 +1,12 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-twitter-bot-info-dialog', + templateUrl: './twitter-bot-info-dialog.component.html', + styleUrls: ['./twitter-bot-info-dialog.component.scss'], +}) +export class TwitterBotInfoDialogComponent implements OnInit { + constructor() {} + + ngOnInit(): void {} +} diff --git a/kibicara-frontend/src/assets/twitter.png b/kibicara-frontend/src/assets/twitter.png new file mode 100755 index 0000000..bd2cea3 Binary files /dev/null and b/kibicara-frontend/src/assets/twitter.png differ