Skip to content

Commit 8c32ad0

Browse files
author
Garrett Downs
committed
fix(import): fix styling and subscribe behavior
1 parent 6b9e2d6 commit 8c32ad0

4 files changed

Lines changed: 18 additions & 14 deletions

File tree

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"date-fns": "^2.25.0",
3838
"foxcasts-core": "^3.0.0",
3939
"lodash.kebabcase": "^4.1.1",
40-
"mai-ui": "^0.2.0",
40+
"mai-ui": "^0.2.1",
4141
"preact": "^10.3.1",
4242
"preact-render-to-string": "^5.1.4",
4343
"preact-router": "^3.2.1",
@@ -86,4 +86,4 @@
8686
"path": "./node_modules/cz-conventional-changelog"
8787
}
8888
}
89-
}
89+
}

src/routes/Import.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
padding: 5px;
1414
}
1515

16+
.row[data-selected] {
17+
background-color: var(--highlight-bg-color);
18+
color: var(--highlight-text-color);
19+
}
20+
1621
.actions {
1722
padding: 5px;
1823
}

src/routes/Import.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { route } from 'preact-router';
99
import { useEffect, useState } from 'preact/hooks';
1010
import { FoxcastsAppMenu } from '../components/FoxcastsAppMenu';
1111
import { SelectablePriority } from '../enums';
12-
import { Core } from '../services/core';
12+
import { subscribe } from '../services/core';
1313
import { OPML } from '../services/opml';
1414
import styles from './Import.module.css';
1515

@@ -47,8 +47,7 @@ export default function Import(props: Props): VNode {
4747
setSubscribing(true);
4848
for (const podcast of feeds.filter((a) => a.selected)) {
4949
console.log(`Subscribing to ${podcast.title}`);
50-
await Core.podcasts
51-
.subscribe({ feedUrl: podcast.feedUrl })
50+
await subscribe({ feedUrl: podcast.feedUrl })
5251
.then(() => console.log(`Subscribed to ${podcast.title}`))
5352
.catch((err) =>
5453
console.log(`Failed to subscribe to ${podcast.title}`, err)

0 commit comments

Comments
 (0)