mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
refactor: remove outdated code
This commit is contained in:
1 parent
beba76485e
commit
9c8562a842
3 files changed
-68
No files matched your search
@@ -58,28 +58,6 @@
|
||||
(refreshClicked)="refreshPlaylist($event)"
|
||||
(removeClicked)="removeClicked($event)"
|
||||
/>
|
||||
|
||||
<div *ngIf="isMigrationPossible" id="migration-container">
|
||||
<p>{{ migrationMessage }}</p>
|
||||
<button
|
||||
mat-button
|
||||
(click)="migratePlaylists()"
|
||||
class="migration-btn"
|
||||
color="accent"
|
||||
>
|
||||
<mat-icon>playlist_add</mat-icon>
|
||||
Migrate playlists</button
|
||||
>
|
||||
<button
|
||||
mat-button
|
||||
(click)="deleteMigratedPlaylists()"
|
||||
class="migration-btn"
|
||||
color="accent"
|
||||
>
|
||||
<mat-icon>delete</mat-icon>
|
||||
{{ 'SETTINGS.REMOVE_DIALOG.TITLE' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-nav-list>
|
||||
} @placeholder {
|
||||
|
||||
@@ -81,21 +81,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
#migration-container {
|
||||
padding: 10px;
|
||||
border: 1px solid #999;
|
||||
border-radius: 5px;
|
||||
margin: 5px;
|
||||
|
||||
p {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.migration-btn {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 599px) {
|
||||
.favorites-icon {
|
||||
padding-left: 0 !important;
|
||||
|
||||
@@ -37,10 +37,7 @@ import {
|
||||
import {
|
||||
AUTO_UPDATE_PLAYLISTS_RESPONSE,
|
||||
DELETE_ALL_PLAYLISTS,
|
||||
IS_PLAYLISTS_MIGRATION_POSSIBLE,
|
||||
IS_PLAYLISTS_MIGRATION_POSSIBLE_RESPONSE,
|
||||
MIGRATE_PLAYLISTS,
|
||||
MIGRATE_PLAYLISTS_RESPONSE,
|
||||
PLAYLIST_UPDATE,
|
||||
PLAYLIST_UPDATE_RESPONSE,
|
||||
} from './../../../../shared/ipc-commands';
|
||||
@@ -127,28 +124,6 @@ export class RecentPlaylistsComponent implements OnDestroy {
|
||||
);
|
||||
}
|
||||
),
|
||||
new IpcCommand(
|
||||
IS_PLAYLISTS_MIGRATION_POSSIBLE_RESPONSE,
|
||||
(response: { result: boolean; message: string }) => {
|
||||
this.isMigrationPossible = response.result;
|
||||
this.migrationMessage = response.message || '';
|
||||
}
|
||||
),
|
||||
new IpcCommand(
|
||||
MIGRATE_PLAYLISTS_RESPONSE,
|
||||
(response: { payload: Playlist[] }) => {
|
||||
this.store.dispatch(
|
||||
PlaylistActions.addManyPlaylists({
|
||||
playlists: response.payload,
|
||||
})
|
||||
);
|
||||
this.snackBar.open(
|
||||
`${response.payload.length} playlists were successfully migrated`,
|
||||
null,
|
||||
{ duration: 2000 }
|
||||
);
|
||||
}
|
||||
),
|
||||
new IpcCommand(
|
||||
AUTO_UPDATE_PLAYLISTS_RESPONSE,
|
||||
(playlists: Playlist[]) => {
|
||||
@@ -161,9 +136,6 @@ export class RecentPlaylistsComponent implements OnDestroy {
|
||||
),
|
||||
];
|
||||
|
||||
isMigrationPossible = false;
|
||||
migrationMessage = '';
|
||||
|
||||
constructor(
|
||||
private dialog: MatDialog,
|
||||
private dialogService: DialogService,
|
||||
@@ -177,9 +149,6 @@ export class RecentPlaylistsComponent implements OnDestroy {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.setRendererListeners();
|
||||
if (this.electronService.isElectron) {
|
||||
this.electronService.sendIpcEvent(IS_PLAYLISTS_MIGRATION_POSSIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user