Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
825
Issues
825
List
Boards
Labels
Service Desk
Milestones
Merge Requests
43
Merge Requests
43
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
1ea56bb9
Commit
1ea56bb9
authored
23 minutes ago
by
Marcelo Rivera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(chore): simplify repeated code on Social Profiles component and pro
parent
6974cdf7
epic/minds-pro
1 merge request
!528
WIP: (feat): Minds Pro
Pipeline
#82527166
failed with stages
in 4 minutes and 32 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
250 additions
and
456 deletions
+250
-456
meta.ts
src/app/modules/channels/social-profiles/meta.ts
+230
-0
social-profiles.ts
src/app/modules/channels/social-profiles/social-profiles.ts
+12
-234
footer.component.ts
src/app/modules/pro/channel/footer/footer.component.ts
+8
-222
No files found.
src/app/modules/channels/social-profiles/meta.ts
0 → 100644
View file @
1ea56bb9
export
interface
SocialProfileMeta
{
key
:
string
;
label
:
string
;
link
:
string
;
icon
:
string
;
customIcon
?:
boolean
;
domain
:
string
;
}
export
const
socialProfileMeta
:
SocialProfileMeta
[]
=
[
{
key
:
'
facebook
'
,
label
:
'
Facebook
'
,
link
:
'
https://www.facebook.com/:value
'
,
icon
:
'
facebook-official
'
,
domain
:
'
facebook.com
'
,
},
{
key
:
'
github
'
,
label
:
'
Github
'
,
link
:
'
https://github.com/:value
'
,
icon
:
'
github
'
,
domain
:
'
github.com
'
,
},
{
key
:
'
twitch
'
,
label
:
'
Twitch
'
,
link
:
'
https://www.twitch.tv/:value
'
,
icon
:
'
twitch
'
,
domain
:
'
twitch.tv
'
,
},
{
key
:
'
linkedin
'
,
label
:
'
LinkedIn
'
,
link
:
'
https://linkedin.com/in/:value
'
,
icon
:
'
linkedin
'
,
domain
:
'
linkedin.com
'
,
},
{
key
:
'
youtube_channel
'
,
label
:
'
YouTube Channel
'
,
link
:
'
https://www.youtube.com/channel/:value
'
,
icon
:
'
youtube
'
,
domain
:
'
youtube.com
'
,
},
{
key
:
'
minds
'
,
label
:
'
Minds
'
,
link
:
'
https://www.minds.com/:value
'
,
icon
:
'
minds
'
,
customIcon
:
true
,
domain
:
'
minds.com
'
,
},
{
key
:
'
reddit
'
,
label
:
'
Reddit
'
,
link
:
'
https://www.reddit.com/u/:value
'
,
icon
:
'
reddit
'
,
domain
:
'
reddit.com
'
,
},
{
key
:
'
soundcloud
'
,
label
:
'
SoundCloud
'
,
link
:
'
https://soundcloud.com/:value
'
,
icon
:
'
soundcloud
'
,
domain
:
'
soundcloud.com
'
,
},
{
key
:
'
tumblr
'
,
label
:
'
Tumblr Site
'
,
link
:
'
https://:value.tumblr.com
'
,
icon
:
'
tumblr
'
,
domain
:
'
tumblr.com
'
,
},
{
key
:
'
twitter
'
,
label
:
'
Twitter
'
,
link
:
'
https://twitter.com/:value
'
,
icon
:
'
twitter
'
,
domain
:
'
twitter.com
'
,
},
{
key
:
'
github
'
,
label
:
'
Github
'
,
link
:
'
https://github.com/:value
'
,
icon
:
'
github
'
,
domain
:
'
github.com
'
,
},
{
key
:
'
instagram
'
,
label
:
'
Instagram
'
,
link
:
'
https://www.instagram.com/:value
'
,
icon
:
'
instagram
'
,
domain
:
'
instagram.com
'
,
},
{
key
:
'
wikipedia_user
'
,
label
:
'
Wikipedia User
'
,
link
:
'
https://wikipedia.org/wiki/:value
'
,
icon
:
'
wikipedia-w
'
,
domain
:
'
wikipedia.com
'
,
},
{
key
:
'
imdb_user
'
,
label
:
'
IMDb User
'
,
link
:
'
https://www.imdb.com/name/:value
'
,
icon
:
'
imdb
'
,
domain
:
'
imdb.com
'
,
},
{
key
:
'
steam
'
,
label
:
'
Steam Profile
'
,
link
:
'
https://steamcommunity.com/id/:value/
'
,
icon
:
'
steam
'
,
domain
:
'
steamcommunity.com
'
,
},
{
key
:
'
deviantart
'
,
label
:
'
Deviantart User
'
,
link
:
'
https://:value.deviantart.com/
'
,
icon
:
'
deviantart
'
,
domain
:
'
deviantart.com
'
,
},
{
key
:
'
discord
'
,
label
:
'
Discord Server
'
,
link
:
'
https://discord.me/:value
'
,
icon
:
'
discord
'
,
domain
:
'
discord.me
'
,
},
{
key
:
'
flickr
'
,
label
:
'
Flickr Profile
'
,
link
:
'
https://www.flickr.com/photos/:value/
'
,
icon
:
'
flickr
'
,
domain
:
'
flickr.com
'
,
},
{
key
:
'
flipboard
'
,
label
:
'
Flipboard Profile
'
,
link
:
'
https://www.flipboard.com/:value
'
,
icon
:
'
flipboard
'
,
domain
:
'
flipboard.com
'
,
},
{
key
:
'
gitlab
'
,
label
:
'
Gitlab Profile
'
,
link
:
'
https://www.gitlab.com/:value
'
,
icon
:
'
gitlab
'
,
domain
:
'
gitlab.com
'
,
},
{
key
:
'
gitter
'
,
label
:
'
Gitter Profile
'
,
link
:
'
https://gitter.im/:value
'
,
icon
:
'
gitter
'
,
domain
:
'
gitter.im
'
,
},
{
key
:
'
goodreads
'
,
label
:
'
Goodreads Profile
'
,
link
:
'
https://www.goodreads.com/user/show/:value
'
,
icon
:
'
goodreads
'
,
domain
:
'
goodreads.com
'
,
},
{
key
:
'
google_plus
'
,
label
:
'
Google Plus Profile
'
,
link
:
'
https://plus.google.com/:value
'
,
icon
:
'
google-plus
'
,
domain
:
'
google.com
'
,
},
{
key
:
'
mastodon
'
,
label
:
'
Mastodon Profile
'
,
link
:
'
https://mastodon.social/:value
'
,
icon
:
'
mastodon
'
,
domain
:
'
mastodon.social
'
,
},
{
key
:
'
medium
'
,
label
:
'
Medium Profile
'
,
link
:
'
https://medium.com/:value
'
,
icon
:
'
medium-m
'
,
domain
:
'
medium.com
'
,
},
{
key
:
'
patreon
'
,
label
:
'
Patreon Profile
'
,
link
:
'
https://www.patreon.com/:value
'
,
icon
:
'
patreon
'
,
domain
:
'
patreon.com
'
,
},
{
key
:
'
slack
'
,
label
:
'
Slack Channel
'
,
link
:
'
https://:value.slack.com
'
,
icon
:
'
slack
'
,
domain
:
'
slack.com
'
,
},
{
key
:
'
other
'
,
label
:
'
Other
'
,
link
:
''
,
icon
:
'
link
'
,
domain
:
''
,
},
];
export
function
getSocialProfileMeta
(
key
:
string
):
SocialProfileMeta
{
let
defaultMeta
:
SocialProfileMeta
=
{
key
:
''
,
label
:
''
,
link
:
'
#
'
,
icon
:
'
link
'
,
domain
:
''
,
};
if
(
!
key
)
{
return
defaultMeta
;
}
for
(
let
i
in
this
.
socialProfilesMeta
)
{
if
(
this
.
socialProfilesMeta
[
i
].
key
===
key
)
{
return
this
.
socialProfilesMeta
[
i
];
}
}
return
defaultMeta
;
}
This diff is collapsed.
Click to expand it.
src/app/modules/channels/social-profiles/social-profiles.ts
View file @
1ea56bb9
import
{
Component
,
EventEmitter
}
from
'
@angular/core
'
;
import
{
KeyVal
}
from
'
../../../interfaces/entities
'
;
export
interface
SocialProfileMeta
{
key
:
string
;
label
:
string
;
link
:
string
;
icon
:
string
;
customIcon
?:
boolean
;
domain
:
string
;
}
import
{
getSocialProfileMeta
,
SocialProfileMeta
,
socialProfileMeta
,
}
from
'
./meta
'
;
@
Component
({
moduleId
:
module
.
id
,
...
...
@@ -24,205 +20,9 @@ export class ChannelSocialProfiles {
changed
:
EventEmitter
<
any
>
=
new
EventEmitter
();
url
:
string
=
''
;
private
socialProfileMeta
:
SocialProfileMeta
[]
=
[
{
key
:
'
facebook
'
,
label
:
'
Facebook
'
,
link
:
'
https://www.facebook.com/:value
'
,
icon
:
'
facebook-official
'
,
domain
:
'
facebook.com
'
,
},
{
key
:
'
github
'
,
label
:
'
Github
'
,
link
:
'
https://github.com/:value
'
,
icon
:
'
github
'
,
domain
:
'
github.com
'
,
},
{
key
:
'
twitch
'
,
label
:
'
Twitch
'
,
link
:
'
https://www.twitch.tv/:value
'
,
icon
:
'
twitch
'
,
domain
:
'
twitch.tv
'
,
},
{
key
:
'
linkedin
'
,
label
:
'
LinkedIn
'
,
link
:
'
https://linkedin.com/in/:value
'
,
icon
:
'
linkedin
'
,
domain
:
'
linkedin.com
'
,
},
{
key
:
'
youtube_channel
'
,
label
:
'
YouTube Channel
'
,
link
:
'
https://www.youtube.com/channel/:value
'
,
icon
:
'
youtube
'
,
domain
:
'
youtube.com
'
,
},
{
key
:
'
minds
'
,
label
:
'
Minds
'
,
link
:
'
https://www.minds.com/:value
'
,
icon
:
'
minds
'
,
customIcon
:
true
,
domain
:
'
minds.com
'
,
},
{
key
:
'
reddit
'
,
label
:
'
Reddit
'
,
link
:
'
https://www.reddit.com/u/:value
'
,
icon
:
'
reddit
'
,
domain
:
'
reddit.com
'
,
},
{
key
:
'
soundcloud
'
,
label
:
'
SoundCloud
'
,
link
:
'
https://soundcloud.com/:value
'
,
icon
:
'
soundcloud
'
,
domain
:
'
soundcloud.com
'
,
},
{
key
:
'
tumblr
'
,
label
:
'
Tumblr Site
'
,
link
:
'
https://:value.tumblr.com
'
,
icon
:
'
tumblr
'
,
domain
:
'
tumblr.com
'
,
},
{
key
:
'
twitter
'
,
label
:
'
Twitter
'
,
link
:
'
https://twitter.com/:value
'
,
icon
:
'
twitter
'
,
domain
:
'
twitter.com
'
,
},
{
key
:
'
github
'
,
label
:
'
Github
'
,
link
:
'
https://github.com/:value
'
,
icon
:
'
github
'
,
domain
:
'
github.com
'
,
},
{
key
:
'
instagram
'
,
label
:
'
Instagram
'
,
link
:
'
https://www.instagram.com/:value
'
,
icon
:
'
instagram
'
,
domain
:
'
instagram.com
'
,
},
{
key
:
'
wikipedia_user
'
,
label
:
'
Wikipedia User
'
,
link
:
'
https://wikipedia.org/wiki/:value
'
,
icon
:
'
wikipedia-w
'
,
domain
:
'
wikipedia.com
'
,
},
{
key
:
'
imdb_user
'
,
label
:
'
IMDb User
'
,
link
:
'
https://www.imdb.com/name/:value
'
,
icon
:
'
imdb
'
,
domain
:
'
imdb.com
'
,
},
{
key
:
'
steam
'
,
label
:
'
Steam Profile
'
,
link
:
'
https://steamcommunity.com/id/:value/
'
,
icon
:
'
steam
'
,
domain
:
'
steamcommunity.com
'
,
},
{
key
:
'
deviantart
'
,
label
:
'
Deviantart User
'
,
link
:
'
https://:value.deviantart.com/
'
,
icon
:
'
deviantart
'
,
domain
:
'
deviantart.com
'
,
},
{
key
:
'
discord
'
,
label
:
'
Discord Server
'
,
link
:
'
https://discord.me/:value
'
,
icon
:
'
discord
'
,
domain
:
'
discord.me
'
,
},
{
key
:
'
flickr
'
,
label
:
'
Flickr Profile
'
,
link
:
'
https://www.flickr.com/photos/:value/
'
,
icon
:
'
flickr
'
,
domain
:
'
flickr.com
'
,
},
{
key
:
'
flipboard
'
,
label
:
'
Flipboard Profile
'
,
link
:
'
https://www.flipboard.com/:value
'
,
icon
:
'
flipboard
'
,
domain
:
'
flipboard.com
'
,
},
{
key
:
'
gitlab
'
,
label
:
'
Gitlab Profile
'
,
link
:
'
https://www.gitlab.com/:value
'
,
icon
:
'
gitlab
'
,
domain
:
'
gitlab.com
'
,
},
{
key
:
'
gitter
'
,
label
:
'
Gitter Profile
'
,
link
:
'
https://gitter.im/:value
'
,
icon
:
'
gitter
'
,
domain
:
'
gitter.im
'
,
},
{
key
:
'
goodreads
'
,
label
:
'
Goodreads Profile
'
,
link
:
'
https://www.goodreads.com/user/show/:value
'
,
icon
:
'
goodreads
'
,
domain
:
'
goodreads.com
'
,
},
{
key
:
'
google_plus
'
,
label
:
'
Google Plus Profile
'
,
link
:
'
https://plus.google.com/:value
'
,
icon
:
'
google-plus
'
,
domain
:
'
google.com
'
,
},
{
key
:
'
mastodon
'
,
label
:
'
Mastodon Profile
'
,
link
:
'
https://mastodon.social/:value
'
,
icon
:
'
mastodon
'
,
domain
:
'
mastodon.social
'
,
},
{
key
:
'
medium
'
,
label
:
'
Medium Profile
'
,
link
:
'
https://medium.com/:value
'
,
icon
:
'
medium-m
'
,
domain
:
'
medium.com
'
,
},
{
key
:
'
patreon
'
,
label
:
'
Patreon Profile
'
,
link
:
'
https://www.patreon.com/:value
'
,
icon
:
'
patreon
'
,
domain
:
'
patreon.com
'
,
},
{
key
:
'
slack
'
,
label
:
'
Slack Channel
'
,
link
:
'
https://:value.slack.com
'
,
icon
:
'
slack
'
,
domain
:
'
slack.com
'
,
},
{
key
:
'
other
'
,
label
:
'
Other
'
,
link
:
''
,
icon
:
'
link
'
,
domain
:
''
,
},
];
get
socialProfilesMeta
()
{
return
socialProfileMeta
;
}
set
_user
(
value
:
any
)
{
this
.
socialProfiles
=
this
.
polyfillLegacy
(
value
.
social_profiles
)
||
[];
...
...
@@ -256,7 +56,7 @@ export class ChannelSocialProfiles {
}
getSocialProfileIconClass
({
key
=
''
})
{
let
meta
=
this
.
getSocialProfileMeta
(
key
),
let
meta
=
getSocialProfileMeta
(
key
),
domClass
;
if
(
meta
.
customIcon
)
{
...
...
@@ -268,7 +68,7 @@ export class ChannelSocialProfiles {
}
matchSocialProfile
(
index
)
{
for
(
let
sm
of
this
.
socialProfileMeta
)
{
for
(
let
sm
of
this
.
socialProfile
s
Meta
)
{
if
(
this
.
url
.
includes
(
sm
.
domain
))
{
this
.
socialProfiles
[
index
].
key
=
sm
.
key
;
this
.
socialProfiles
[
index
].
value
=
this
.
url
;
...
...
@@ -280,7 +80,7 @@ export class ChannelSocialProfiles {
polyfillLegacy
(
profiles
)
{
for
(
let
i
in
profiles
)
{
let
meta
=
this
.
getSocialProfileMeta
(
profiles
[
i
].
key
);
let
meta
=
getSocialProfileMeta
(
profiles
[
i
].
key
);
if
(
profiles
[
i
].
key
!=
'
other
'
&&
!
profiles
[
i
].
value
.
includes
(
'
/
'
))
{
profiles
[
i
].
value
=
this
.
buildSocialProfileLink
(
profiles
[
i
]);
}
...
...
@@ -290,30 +90,8 @@ export class ChannelSocialProfiles {
}
private
buildSocialProfileLink
({
key
=
''
,
value
=
''
})
{
let
link
=
this
.
getSocialProfileMeta
(
key
).
link
;
let
link
=
getSocialProfileMeta
(
key
).
link
;
return
link
.
replace
(
'
:value
'
,
value
);
}
private
getSocialProfileMeta
(
key
:
string
):
SocialProfileMeta
{
let
defaultMeta
:
SocialProfileMeta
=
{
key
:
''
,
label
:
''
,
link
:
'
#
'
,
icon
:
'
link
'
,
domain
:
''
,
};
if
(
!
key
)
{
return
defaultMeta
;
}
for
(
let
i
in
this
.
socialProfileMeta
)
{
if
(
this
.
socialProfileMeta
[
i
].
key
===
key
)
{
return
this
.
socialProfileMeta
[
i
];
}
}
return
defaultMeta
;
}
}
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/footer/footer.component.ts
View file @
1ea56bb9
...
...
@@ -3,6 +3,10 @@ import { ProChannelService } from '../channel.service';
import
{
Session
}
from
'
../../../../services/session
'
;
import
{
AuthService
}
from
'
../../../../services/auth.service
'
;
import
{
SiteService
}
from
'
../../../../services/site.service
'
;
import
{
getSocialProfileMeta
,
socialProfileMeta
,
}
from
'
../../../channels/social-profiles/meta
'
;
export
interface
SocialProfileMeta
{
key
:
string
;
...
...
@@ -25,205 +29,9 @@ export class ProChannelFooterComponent {
protected
site
:
SiteService
)
{}
private
socialProfileMeta
:
SocialProfileMeta
[]
=
[
{
key
:
'
facebook
'
,
label
:
'
Facebook
'
,
link
:
'
https://www.facebook.com/:value
'
,
icon
:
'
facebook-official
'
,
domain
:
'
facebook.com
'
,
},
{
key
:
'
github
'
,
label
:
'
Github
'
,
link
:
'
https://github.com/:value
'
,
icon
:
'
github
'
,
domain
:
'
github.com
'
,
},
{
key
:
'
twitch
'
,
label
:
'
Twitch
'
,
link
:
'
https://www.twitch.tv/:value
'
,
icon
:
'
twitch
'
,
domain
:
'
twitch.tv
'
,
},
{
key
:
'
linkedin
'
,
label
:
'
LinkedIn
'
,
link
:
'
https://linkedin.com/in/:value
'
,
icon
:
'
linkedin
'
,
domain
:
'
linkedin.com
'
,
},
{
key
:
'
youtube_channel
'
,
label
:
'
YouTube Channel
'
,
link
:
'
https://www.youtube.com/channel/:value
'
,
icon
:
'
youtube
'
,
domain
:
'
youtube.com
'
,
},
{
key
:
'
minds
'
,
label
:
'
Minds
'
,
link
:
'
https://www.minds.com/:value
'
,
icon
:
'
minds
'
,
customIcon
:
true
,
domain
:
'
minds.com
'
,
},
{
key
:
'
reddit
'
,
label
:
'
Reddit
'
,
link
:
'
https://www.reddit.com/u/:value
'
,
icon
:
'
reddit
'
,
domain
:
'
reddit.com
'
,
},
{
key
:
'
soundcloud
'
,
label
:
'
SoundCloud
'
,
link
:
'
https://soundcloud.com/:value
'
,
icon
:
'
soundcloud
'
,
domain
:
'
soundcloud.com
'
,
},
{
key
:
'
tumblr
'
,
label
:
'
Tumblr Site
'
,
link
:
'
https://:value.tumblr.com
'
,
icon
:
'
tumblr
'
,
domain
:
'
tumblr.com
'
,
},
{
key
:
'
twitter
'
,
label
:
'
Twitter
'
,
link
:
'
https://twitter.com/:value
'
,
icon
:
'
twitter
'
,
domain
:
'
twitter.com
'
,
},
{
key
:
'
github
'
,
label
:
'
Github
'
,
link
:
'
https://github.com/:value
'
,
icon
:
'
github
'
,
domain
:
'
github.com
'
,
},
{
key
:
'
instagram
'
,
label
:
'
Instagram
'
,
link
:
'
https://www.instagram.com/:value
'
,
icon
:
'
instagram
'
,
domain
:
'
instagram.com
'
,
},
{
key
:
'
wikipedia_user
'
,
label
:
'
Wikipedia User
'
,
link
:
'
https://wikipedia.org/wiki/:value
'
,
icon
:
'
wikipedia-w
'
,
domain
:
'
wikipedia.com
'
,
},
{
key
:
'
imdb_user
'
,
label
:
'
IMDb User
'
,
link
:
'
https://www.imdb.com/name/:value
'
,
icon
:
'
imdb
'
,
domain
:
'
imdb.com
'
,
},
{
key
:
'
steam
'
,
label
:
'
Steam Profile
'
,
link
:
'
https://steamcommunity.com/id/:value/
'
,
icon
:
'
steam
'
,
domain
:
'
steamcommunity.com
'
,
},
{
key
:
'
deviantart
'
,
label
:
'
Deviantart User
'
,
link
:
'
https://:value.deviantart.com/
'
,
icon
:
'
deviantart
'
,
domain
:
'
deviantart.com
'
,
},
{
key
:
'
discord
'
,
label
:
'
Discord Server
'
,
link
:
'
https://discord.me/:value
'
,
icon
:
'
discord
'
,
domain
:
'
discord.me
'
,
},
{
key
:
'
flickr
'
,
label
:
'
Flickr Profile
'
,
link
:
'
https://www.flickr.com/photos/:value/
'
,
icon
:
'
flickr
'
,
domain
:
'
flickr.com
'
,
},
{
key
:
'
flipboard
'
,
label
:
'
Flipboard Profile
'
,
link
:
'
https://www.flipboard.com/:value
'
,
icon
:
'
flipboard
'
,
domain
:
'
flipboard.com
'
,
},
{
key
:
'
gitlab
'
,
label
:
'
Gitlab Profile
'
,
link
:
'
https://www.gitlab.com/:value
'
,
icon
:
'
gitlab
'
,
domain
:
'
gitlab.com
'
,
},
{
key
:
'
gitter
'
,
label
:
'
Gitter Profile
'
,
link
:
'
https://gitter.im/:value
'
,
icon
:
'
gitter
'
,
domain
:
'
gitter.im
'
,
},
{
key
:
'
goodreads
'
,
label
:
'
Goodreads Profile
'
,
link
:
'
https://www.goodreads.com/user/show/:value
'
,
icon
:
'
goodreads
'
,
domain
:
'
goodreads.com
'
,
},
{
key
:
'
google_plus
'
,
label
:
'
Google Plus Profile
'
,
link
:
'
https://plus.google.com/:value
'
,
icon
:
'
google-plus
'
,
domain
:
'
google.com
'
,
},
{
key
:
'
mastodon
'
,
label
:
'
Mastodon Profile
'
,
link
:
'
https://mastodon.social/:value
'
,
icon
:
'
mastodon
'
,
domain
:
'
mastodon.social
'
,
},
{
key
:
'
medium
'
,
label
:
'
Medium Profile
'
,
link
:
'
https://medium.com/:value
'
,
icon
:
'
medium-m
'
,
domain
:
'
medium.com
'
,
},
{
key
:
'
patreon
'
,
label
:
'
Patreon Profile
'
,
link
:
'
https://www.patreon.com/:value
'
,
icon
:
'
patreon
'
,
domain
:
'
patreon.com
'
,
},
{
key
:
'
slack
'
,
label
:
'
Slack Channel
'
,
link
:
'
https://:value.slack.com
'
,
icon
:
'
slack
'
,
domain
:
'
slack.com
'
,
},
{
key
:
'
other
'
,
label
:
'
Other
'
,
link
:
''
,
icon
:
'
link
'
,
domain
:
''
,
},
];
get
socialProfilesMeta
()
{
return
socialProfileMeta
;
}
get
footerLinks
()
{
return
this
.
channelService
.
currentChannel
.
pro_settings
.
footer_links
;
...
...
@@ -246,7 +54,7 @@ export class ProChannelFooterComponent {
}
getSocialProfileIconClass
({
key
=
''
})
{
let
meta
=
this
.
getSocialProfileMeta
(
key
),
let
meta
=
getSocialProfileMeta
(
key
),
domClass
;
if
(
meta
.
customIcon
)
{
...
...
@@ -261,28 +69,6 @@ export class ProChannelFooterComponent {
this
.
auth
.
logout
();
}
private
getSocialProfileMeta
(
key
:
string
):
SocialProfileMeta
{
let
defaultMeta
:
SocialProfileMeta
=
{
key
:
''
,
label
:
''
,
link
:
'
#
'
,
icon
:
'
link
'
,
domain
:
''
,
};
if
(
!
key
)
{
return
defaultMeta
;
}
for
(
let
i
in
this
.
socialProfileMeta
)
{
if
(
this
.
socialProfileMeta
[
i
].
key
===
key
)
{
return
this
.
socialProfileMeta
[
i
];
}
}
return
defaultMeta
;
}
get
user
()
{
return
this
.
channelService
.
currentChannel
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment