style: visual improvements

This commit is contained in:
4gray committed 2024-09-03 19:56:07 +02:00
1 parent 3ae3d46bd1
commit 1aea859660
5 files changed
+25 -3

No files matched your search

+1 -1
View File
@@ -2,6 +2,6 @@ import { Titlebar, TitlebarColor } from 'custom-electron-titlebar';
window.addEventListener('DOMContentLoaded', () => {
new Titlebar({
backgroundColor: TitlebarColor.fromHex('#000'),
backgroundColor: TitlebarColor.fromHex('#1b1c1c'),
});
});
@@ -44,7 +44,6 @@
}}
</div>
</mat-list-item>
<!-- <mat-divider /> -->
<app-playlist-item
*ngFor="
@@ -62,10 +62,11 @@
#skeleton-container {
padding-top: 10px;
width: 100%;
.skeleton-item {
display: flex;
padding-left: 25px;
padding: 0 20px;
height: 72px;
.text {
@@ -14,6 +14,7 @@
type="text"
id="serverUrl"
formControlName="serverUrl"
(input)="extractParams(form.value.serverUrl)"
/>
<mat-hint>{{
'HOME.XTREAM_PLAYLIST.URL_VALIDATION_ERROR' | translate
@@ -67,4 +67,25 @@ export class XtreamCodeImportComponent {
);
this.addClicked.emit();
}
extractParams(urlAsString: string): void {
if (
this.form.get('username').value !== '' ||
this.form.get('password').value !== ''
)
return;
try {
// Create a new URL object from the complete link
const url = new URL(urlAsString);
// Extract username and password from query parameters
const username = url.searchParams.get('username') || '';
const password = url.searchParams.get('password') || '';
this.form.get('username')?.setValue(username);
this.form.get('password')?.setValue(password);
} catch (error) {
console.error('Invalid URL', error);
}
}
}