From 2b1bec776d215c499759dfc1db5608778476e395 Mon Sep 17 00:00:00 2001 From: Alexey Panashchenko Date: Tue, 26 Feb 2019 13:19:57 +0200 Subject: [PATCH 1/2] Add them unlink button and italic fron for post timestamp --- .../episode-details.component.css | 15 +++- .../episode-details.component.html | 83 ++++++++++--------- .../episode-details.component.ts | 4 + .../post-details/post-details.component.html | 4 +- src/app/service/episode.service.ts | 4 + 5 files changed, 70 insertions(+), 40 deletions(-) diff --git a/src/app/episode-details/episode-details.component.css b/src/app/episode-details/episode-details.component.css index 0c78f80..1c7c99f 100644 --- a/src/app/episode-details/episode-details.component.css +++ b/src/app/episode-details/episode-details.component.css @@ -2,4 +2,17 @@ margin-left: 15px; width: 100px; float:right; -} \ No newline at end of file +} + +.them-name { + cursor: pointer; + width: 100%; + display: flex; + padding: 10px; + vertical-align: center; +} + +.them-name:hover { + box-shadow: 0 0 5px rgba(0,0,0,0.5); + border-radius: 10px; +} diff --git a/src/app/episode-details/episode-details.component.html b/src/app/episode-details/episode-details.component.html index 1efaf7e..902750e 100644 --- a/src/app/episode-details/episode-details.component.html +++ b/src/app/episode-details/episode-details.component.html @@ -1,18 +1,18 @@
-
- -
+
+
+
-
- Current: {{ now | date:'hh:mm:ss EEEE dd LLL' }} -
+
+ Current: {{ now | date:'hh:mm:ss EEEE dd LLL' }} +
-
-
- Started: {{ episode.startTime | date:'hh:mm:ss EEEE dd LLL'}} -
+
+
+ Started: {{ episode.startTime | date:'hh:mm:ss EEEE dd LLL'}} +
@@ -28,38 +28,47 @@

{{episode.name}}

- +
- -
+ +
-
-
- - - - - - - - - - - - - - - - -
Theme list
Timecode
{{ theme.timecode }}
-
+
+
+ + + + + + + + + + + + + + + + +
Theme list
Timecode
{{ theme.timecode }} + + +
+
-
- -
+
+ +
-
\ No newline at end of file +
diff --git a/src/app/episode-details/episode-details.component.ts b/src/app/episode-details/episode-details.component.ts index cb5cbd8..37e2e29 100644 --- a/src/app/episode-details/episode-details.component.ts +++ b/src/app/episode-details/episode-details.component.ts @@ -93,4 +93,8 @@ export class EpisodeDetailsComponent implements OnInit { }); } + unlinkThemes(id: number, theme: Theme) { + this.episodeService.unlinkThemesToEpisode(id, theme).subscribe(data => { this.getEpisodeDetails()}); + } + } diff --git a/src/app/post-details/post-details.component.html b/src/app/post-details/post-details.component.html index 9ff0b22..9856ba3 100644 --- a/src/app/post-details/post-details.component.html +++ b/src/app/post-details/post-details.component.html @@ -24,7 +24,7 @@
Гости:
Темы:
    -
  • {{theme.title}} - {{theme.timecode}}
  • +
  • {{theme.title}} - {{theme.timecode}}
@@ -68,4 +68,4 @@
Стать патроном: - + diff --git a/src/app/episode-details/episode-details.component.ts b/src/app/episode-details/episode-details.component.ts index 37e2e29..c0d35ec 100644 --- a/src/app/episode-details/episode-details.component.ts +++ b/src/app/episode-details/episode-details.component.ts @@ -93,8 +93,8 @@ export class EpisodeDetailsComponent implements OnInit { }); } - unlinkThemes(id: number, theme: Theme) { - this.episodeService.unlinkThemesToEpisode(id, theme).subscribe(data => { this.getEpisodeDetails()}); + unlinkThemes(id: number, themeId: number) { + this.episodeService.unlinkThemesToEpisode(id, themeId).subscribe(data => { this.getEpisodeDetails()}); } } diff --git a/src/app/service/episode.service.ts b/src/app/service/episode.service.ts index b399b3b..eed375c 100644 --- a/src/app/service/episode.service.ts +++ b/src/app/service/episode.service.ts @@ -57,8 +57,8 @@ export class EpisodeService { return this.apiClient.post(`${this.baseUrl}/${episode.id}`, selectedThemeIds) } - unlinkThemesToEpisode(id: Number, theme: Theme): Observable { - return this.apiClient.post(`${this.baseUrl}/${id}/unlink`, theme) + unlinkThemesToEpisode(id: number, themeId: number): Observable { + return this.apiClient.post(`${this.baseUrl}/${id}/theme/${themeId}/unlink`, {}) } removeEpisode(id: Number): Observable {