From c643583018f5ecd32764e1681bc4d92baa6f6cea Mon Sep 17 00:00:00 2001 From: 4gray Date: Mon, 22 Aug 2022 17:55:01 +0200 Subject: [PATCH] refactor: code style improvements --- src/app/home/home.component.html | 22 +++++++--- src/app/home/home.component.scss | 6 +++ src/app/home/home.component.ts | 17 +------- .../playlist-item/playlist-item.component.ts | 2 +- .../recent-playlists.component.spec.ts | 2 +- .../recent-playlists.component.ts | 2 +- .../components/header/header.component.html | 40 +++++++++++-------- .../components/header/header.component.scss | 36 ++++++++++++++--- src/app/shared/playlist-meta.type.ts | 16 ++++++++ 9 files changed, 95 insertions(+), 48 deletions(-) create mode 100644 src/app/shared/playlist-meta.type.ts diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index f7832eba6..3a9decb21 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -15,15 +15,21 @@ list - {{ 'HOME.TABS.RECENTLY_ADDED' | translate }} +
+ {{ 'HOME.TABS.RECENTLY_ADDED' | translate }} +
+
+ + + - -
attach_file - {{ 'HOME.TABS.FILE_UPLOAD' | translate }} +
+ {{ 'HOME.TABS.FILE_UPLOAD' | translate }} +
link - {{ 'HOME.TABS.URL_UPLOAD' | translate }} +
+ {{ 'HOME.TABS.URL_UPLOAD' | translate }} +
text_format - {{ 'HOME.TABS.TEXT_IMPORT' | translate }} +
+ {{ 'HOME.TABS.TEXT_IMPORT' | translate }} +
; - @Component({ selector: 'app-home', templateUrl: './home.component.html', diff --git a/src/app/home/recent-playlists/playlist-item/playlist-item.component.ts b/src/app/home/recent-playlists/playlist-item/playlist-item.component.ts index ef312734c..15e478835 100644 --- a/src/app/home/recent-playlists/playlist-item/playlist-item.component.ts +++ b/src/app/home/recent-playlists/playlist-item/playlist-item.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; -import { PlaylistMeta } from '../../home.component'; +import { PlaylistMeta } from '../../../shared/playlist-meta.type'; @Component({ selector: 'app-playlist-item', diff --git a/src/app/home/recent-playlists/recent-playlists.component.spec.ts b/src/app/home/recent-playlists/recent-playlists.component.spec.ts index ca927a4f2..1fe5f197d 100644 --- a/src/app/home/recent-playlists/recent-playlists.component.spec.ts +++ b/src/app/home/recent-playlists/recent-playlists.component.spec.ts @@ -14,7 +14,7 @@ import { import { DataService } from '../../services/data.service'; import { DialogService } from '../../services/dialog.service'; import { ElectronServiceStub } from '../../services/electron.service.stub'; -import { PlaylistMeta } from '../home.component'; +import { PlaylistMeta } from '../../shared/playlist-meta.type'; import { RecentPlaylistsComponent } from './recent-playlists.component'; describe('RecentPlaylistsComponent', () => { diff --git a/src/app/home/recent-playlists/recent-playlists.component.ts b/src/app/home/recent-playlists/recent-playlists.component.ts index 453bdd75e..a348e6897 100644 --- a/src/app/home/recent-playlists/recent-playlists.component.ts +++ b/src/app/home/recent-playlists/recent-playlists.component.ts @@ -15,7 +15,7 @@ import { PLAYLIST_UPDATE_POSITIONS, } from './../../../../shared/ipc-commands'; import { DialogService } from './../../services/dialog.service'; -import { PlaylistMeta } from './../home.component'; +import { PlaylistMeta } from './../../shared/playlist-meta.type'; import { PlaylistInfoComponent } from './playlist-info/playlist-info.component'; @Component({ diff --git a/src/app/shared/components/header/header.component.html b/src/app/shared/components/header/header.component.html index 58b4a89d3..ddc86baa2 100644 --- a/src/app/shared/components/header/header.component.html +++ b/src/app/shared/components/header/header.component.html @@ -1,13 +1,11 @@ -
+ -
-
-
{{ title }}
-
{{ subtitle }}
-
+
+
{{ title }}
+
{{ subtitle }}
-
+