resume update + minor bug fix on discord parser
This commit is contained in:
parent
ecb12a7ede
commit
27e6497c08
|
@ -65,7 +65,7 @@ export default function DiscordActivity() {
|
||||||
}, [currentTs, loading, convertMsToHM, parsedStatus]);
|
}, [currentTs, loading, convertMsToHM, parsedStatus]);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!loading && parsedStatus
|
!loading && parsedStatus && status.discord_status !== "offline"
|
||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
<DicordActivityStyle>
|
<DicordActivityStyle>
|
||||||
|
|
|
@ -11,7 +11,7 @@ function Resume() {
|
||||||
path: "webviewer/lib",
|
path: "webviewer/lib",
|
||||||
mobileRedirect: true,
|
mobileRedirect: true,
|
||||||
initialDoc:
|
initialDoc:
|
||||||
"https://raw.githubusercontent.com/BRAVO68WEB/certificates/master/Jyotirmoy's%20Resume.pdf",
|
"https://s.b68.dev/resume",
|
||||||
},
|
},
|
||||||
viewer.current
|
viewer.current
|
||||||
).then((instance) => {
|
).then((instance) => {
|
||||||
|
|
|
@ -14,6 +14,12 @@ export default function parse(data) {
|
||||||
|
|
||||||
output.kv = data.kv;
|
output.kv = data.kv;
|
||||||
|
|
||||||
|
if(data.discord_status == "offline"){
|
||||||
|
return {
|
||||||
|
discord_status: "offline",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (data.listening_to_spotify) {
|
if (data.listening_to_spotify) {
|
||||||
output.spotify = {
|
output.spotify = {
|
||||||
album: data.spotify.album,
|
album: data.spotify.album,
|
||||||
|
@ -72,14 +78,14 @@ export default function parse(data) {
|
||||||
|
|
||||||
output.activity = act[0];
|
output.activity = act[0];
|
||||||
|
|
||||||
if(output.activity.prirority_id == 1){
|
if(output.activity?.prirority_id == 1){
|
||||||
output.activity.assets = {
|
output.activity.assets = {
|
||||||
large_image : output.spotify.album_art_url,
|
large_image : output.spotify.album_art_url,
|
||||||
small_image : "/images/brandlogos/SpotifyLogo.png"
|
small_image : "/images/brandlogos/SpotifyLogo.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(output.activity.prirority_id == 3){
|
else if(output.activity?.prirority_id == 3){
|
||||||
output.activity.assets = {
|
output.activity.assets = {
|
||||||
large_image : "/images/anime-profile-pic.png",
|
large_image : "/images/anime-profile-pic.png",
|
||||||
small_image : output.custom_status.emoji.emoji_url,
|
small_image : output.custom_status.emoji.emoji_url,
|
||||||
|
|
Loading…
Reference in New Issue