mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 21:20:29 +08:00
fix substore display name
This commit is contained in:
parent
a1d3558581
commit
7a1518c156
@ -79,7 +79,7 @@ const Profiles: React.FC = () => {
|
|||||||
subs.forEach((sub, index) => {
|
subs.forEach((sub, index) => {
|
||||||
items.push({
|
items.push({
|
||||||
key: `sub-${sub.name}`,
|
key: `sub-${sub.name}`,
|
||||||
name: sub.displayName,
|
name: sub.displayName || sub.name,
|
||||||
icon: sub.icon ? <img src={sub.icon} className="h-[18px] w-[18px]" /> : null,
|
icon: sub.icon ? <img src={sub.icon} className="h-[18px] w-[18px]" /> : null,
|
||||||
divider: index === subs.length - 1 && Boolean(collections) && collections.length > 0
|
divider: index === subs.length - 1 && Boolean(collections) && collections.length > 0
|
||||||
})
|
})
|
||||||
@ -89,7 +89,7 @@ const Profiles: React.FC = () => {
|
|||||||
collections.forEach((sub) => {
|
collections.forEach((sub) => {
|
||||||
items.push({
|
items.push({
|
||||||
key: `collection-${sub.name}`,
|
key: `collection-${sub.name}`,
|
||||||
name: sub.displayName,
|
name: sub.displayName || sub.name,
|
||||||
icon: sub.icon ? <img src={sub.icon} className="h-[18px] w-[18px]" /> : null,
|
icon: sub.icon ? <img src={sub.icon} className="h-[18px] w-[18px]" /> : null,
|
||||||
divider: false
|
divider: false
|
||||||
})
|
})
|
||||||
@ -278,7 +278,7 @@ const Profiles: React.FC = () => {
|
|||||||
(sub) => sub.name === key.toString().replace('sub-', '')
|
(sub) => sub.name === key.toString().replace('sub-', '')
|
||||||
)
|
)
|
||||||
await addProfileItem({
|
await addProfileItem({
|
||||||
name: sub?.displayName ?? '',
|
name: sub?.displayName || sub?.name || '',
|
||||||
type: 'remote',
|
type: 'remote',
|
||||||
url: useCustomSubStore
|
url: useCustomSubStore
|
||||||
? `${customSubStoreUrl}/download/${key.toString().replace('sub-', '')}?target=ClashMeta`
|
? `${customSubStoreUrl}/download/${key.toString().replace('sub-', '')}?target=ClashMeta`
|
||||||
@ -299,7 +299,7 @@ const Profiles: React.FC = () => {
|
|||||||
collection.name === key.toString().replace('collection-', '')
|
collection.name === key.toString().replace('collection-', '')
|
||||||
)
|
)
|
||||||
await addProfileItem({
|
await addProfileItem({
|
||||||
name: collection?.displayName ?? '',
|
name: collection?.displayName || collection?.name || '',
|
||||||
type: 'remote',
|
type: 'remote',
|
||||||
url: useCustomSubStore
|
url: useCustomSubStore
|
||||||
? `${customSubStoreUrl}/download/collection/${key.toString().replace('collection-', '')}?target=ClashMeta`
|
? `${customSubStoreUrl}/download/collection/${key.toString().replace('collection-', '')}?target=ClashMeta`
|
||||||
|
|||||||
2
src/shared/types.d.ts
vendored
2
src/shared/types.d.ts
vendored
@ -404,7 +404,7 @@ interface IProfileItem {
|
|||||||
|
|
||||||
interface ISubStoreSub {
|
interface ISubStoreSub {
|
||||||
name: string
|
name: string
|
||||||
displayName: sstring
|
displayName?: string
|
||||||
icon?: string
|
icon?: string
|
||||||
tag?: string[]
|
tag?: string[]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user