Skip to content

Commit

Permalink
Simplified by removing channel info from program
Browse files Browse the repository at this point in the history
As the information is not accurate
  • Loading branch information
LarsBergqvist committed Nov 29, 2023
1 parent e6e0a11 commit caca367
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 65 deletions.
13 changes: 0 additions & 13 deletions src/app/components/programs/program-favorites.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
<th class="min-title-column" pSortableColumn="name">{{'ProgramNameTitle' | translate | uppercase }}<p-sortIcon field="name">
</p-sortIcon>
</th>
<th pSortableColumn="channel.name">{{'ChannelNameTitle' | translate | uppercase }}<p-sortIcon
field="channel.name">
</p-sortIcon>
</th>

<th>{{'Description' | translate | uppercase}}</th>
</tr>
</ng-template>
Expand All @@ -21,9 +16,6 @@
<div class="p-grid" style="width:100%">
<span (click)="onProgramDetails(program)" class="clickable p-col-8">
<img class="image-thumb" src={{program.programimage}} />
<span *ngIf="program?.channel" class="prg-chan">
{{program.channel.name}}
</span>
<span class="prg-title">
{{program.name}}
</span>
Expand All @@ -35,11 +27,6 @@
</span>
</div>
</td>
<td class="prg-chan-td">
<div *ngIf="program?.channel">
{{program.channel.name}}
</div>
</td>
<td class="description-td" style="border:none">
{{program.description}}
</td>
Expand Down
17 changes: 1 addition & 16 deletions src/app/components/programs/programs-list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,7 @@
[globalFilterFields]="['name','channel.name','description']" styleClass="sr-table">
<ng-template pTemplate="header">
<tr>
<th class="min-title-column" pSortableColumn="name">{{'ProgramNameTitle' | translate | uppercase }}<p-sortIcon field="name">
</p-sortIcon>
</th>
<th pSortableColumn="channel.name">{{'ChannelNameTitle' | translate | uppercase }}<p-sortIcon
field="channel.name">
</p-sortIcon>
</th>

<th class="min-title-column">{{'ProgramNameTitle' | translate | uppercase }}</th>
<th>{{'Description' | translate | uppercase}}</th>
</tr>
</ng-template>
Expand All @@ -28,9 +21,6 @@
<div class="p-grid" style="width:100%">
<span (click)="onProgramDetails(program)" class="clickable p-col-8">
<img src={{program.programimage}} class="image-thumb" />
<span *ngIf="program?.channel" class="prg-chan">
{{program.channel.name}}
</span>
<span class="prg-title">
{{program.name}}
</span>
Expand All @@ -42,11 +32,6 @@
</span>
</div>
</td>
<td class="prg-chan-td">
<div *ngIf="program?.channel">
{{program.channel.name}}
</div>
</td>
<td class="description-td" style="border:none">
{{program.description}}
</td>
Expand Down
15 changes: 0 additions & 15 deletions src/app/components/programs/programs-list.component.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1 @@
.description-td {
overflow: hidden;
white-space: wrap;
text-overflow: ellipsis;
}

.prg-title {
font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.fav-checkbox {
vertical-align: middle;
}
3 changes: 0 additions & 3 deletions src/app/models/program.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { Channel } from './channel';

export interface Program {
name: string;
id: number;
description: string;
programimage: string;
programimagetemplate: string;
channel: Channel;
fav: boolean;
programcategory: {
id: number;
Expand Down
8 changes: 0 additions & 8 deletions src/app/services/programs.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ export class ProgramsService extends SRBaseService {
name: p.name,
id: p.id,
fav: false,
channel: {
id: p?.channel.id,
name: p?.channel.name === '[No channel]' ? '' : p?.channel.name
},
programimage: p.programimagetemplate + SRApiService.DefaultImagePreset,
description: p.description,
programcategory: p.programcategory
Expand All @@ -48,10 +44,6 @@ export class ProgramsService extends SRBaseService {
name: p.name,
id: p.id,
fav: this.srApiService.hasFavMarker(p.id),
channel: {
id: p?.channel.id,
name: p?.channel.name
},
programimage: p.programimagetemplate + SRApiService.DefaultImagePreset,
description: p.description,
programcategory: p.programcategory
Expand Down
24 changes: 14 additions & 10 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
max-width: 300px;
}

.prg-chan {
display: none;
}
.fav-chk {
max-width: 100px;
margin-right: 10px;
Expand Down Expand Up @@ -67,12 +64,6 @@
.channel-type {
display: none !important;
}
.prg-chan {
display: initial;
}
.prg-chan-td {
display: none !important;
}
.desc-col {
border: none !important;
}
Expand Down Expand Up @@ -170,4 +161,17 @@
border-right-width: 8px;
border-style: solid;
border-color: var(--surface-50);
}
}

.description-td {
overflow: hidden;
white-space: wrap;
text-overflow: ellipsis;
}

.prg-title {
font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

0 comments on commit caca367

Please sign in to comment.