Skip to content

Commit

Permalink
fixed icons and audition
Browse files Browse the repository at this point in the history
  • Loading branch information
teeteeteeteetee committed Nov 23, 2023
1 parent 49a2e47 commit b497eb1
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 36 deletions.
39 changes: 35 additions & 4 deletions src/client-src/components/Icons.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* File: Icons.jsx
* Project: discord-rpc
* File Created: Thursday, 23rd November 2023 11:19:04 am
* Author: Tee ([email protected])
* Github: https://github.com/teeteeteeteetee
* Discord: Tee#0001
*
* Last Modified: Thursday, 23rd November 2023 2:51:18 pm
* Modified By: Tee ([email protected])
*
* Copyright (c) 2023 Tee, Demon Cat
*/

import React from "react";
import { getApplicationID } from "..";
import AEFT from "../../assets/AEFT.png";
import AEFT1 from "../../assets/AEFT1.png";
Expand All @@ -23,6 +38,22 @@ import PRLD from "../../assets/PRLD.png";
import RUSH from "../../assets/RUSH.png"
import RUSH1 from "../../assets/RUSH1.png"

const icons = {
AEFT: [AEFT, AEFT1],
AICY: [AICY, AICY1],
AUDT: [AUDT, AUDT1],
DRWV: [DRWV, DRWV1],
FLPR: [FLPR, FLPR1],
IDSN: [IDSN, IDSN1],
ILST: [ILST, ILST1],
MEDIA_ENCODER: [MEDIA_ENCODER, MEDIA_ENCODER1],
PHXS: [PHXS, PHXS1],
PHSP: [PHXS, PHXS1],
PPRO: [PPRO, PPRO1],
PRLD: [PRLD],
RUSH: [RUSH, RUSH1],
}

export {
AEFT,
AEFT1,
Expand Down Expand Up @@ -53,9 +84,9 @@ export function setCustom({url}){

}

export function getIcon({ className, version }) {
export default function getIcon ({ className, version }) {
// <img className="rounded-sm w-[60px] h-[60px]" src="../../assets/AEFT.png" />
const client = require("../../rpc_client-src/client")[getApplicationID()]


return <img className={className} src={client.icons[version]}></img>;
}
return <img className={className} src={icons[getApplicationID()][version]} />
}
6 changes: 3 additions & 3 deletions src/client-src/page/Preview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Github: https://github.com/lolitee
* Discord: Tee#0001
*
* Last Modified: Wednesday, 10th May 2023 12:58:02 pm
* Last Modified: Thursday, 23rd November 2023 2:52:08 pm
* Modified By: Tee ([email protected])
*
* Copyright (c) 2023 Tee, Stainless Love
Expand All @@ -16,7 +16,7 @@ import React, { useEffect, useState } from "react";
import Avatar from "../components/Avatar";
import Banner from "../components/Banner";
import { dispatchEvent } from "..";
import { getIcon } from "../components/Icons";
import Icons from "../components/Icons";

export default function Preview() {

Expand Down Expand Up @@ -54,7 +54,7 @@ export default function Preview() {
<p className="text-white font-medium tracking-tighter">PLAYING A GAME</p>
</div>
<div className="flex gap-2 pt-2 pb-5">
<getIcon className="rounded-sm w-[60px] h-[60px]" version={1}/>
<Icons className="rounded-sm w-[60px] h-[60px]" version={1}/>
{/* <img className="rounded-sm w-[60px] h-[60px]" src="../../assets/AEFT.png" /> */}
<div className="flex flex-col text-white text-xs font-azeri_regular justify-center">
{activity.name != "" && <p className="font-azeri_bold">{activity.name}</p>}
Expand Down
19 changes: 16 additions & 3 deletions src/host/AUDT.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/*
* File: AUDT.jsx
* Project: discord-rpc
* File Created: Thursday, 23rd November 2023 11:19:04 am
* Author: Tee ([email protected])
* Github: https://github.com/teeteeteeteetee
* Discord: Tee#0001
*
* Last Modified: Thursday, 23rd November 2023 2:56:13 pm
* Modified By: Tee ([email protected])
*
* Copyright (c) 2023 Tee, Demon Cat
*/
function state(){
var x;
try{
Expand All @@ -16,7 +29,7 @@ function state(){
}

}catch(e){
x = "No file.";
x = "Idling";
}

return x;
Expand All @@ -30,11 +43,11 @@ function details(){
if(app.activeDocument && app.activeDocument.displayName){
return app.activeDocument.displayName;
}else{
return "";
return "No file.";
}

}catch(e){
return "";
return "No file.";
}

}
Expand Down
27 changes: 1 addition & 26 deletions src/rpc_client-src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,92 +6,67 @@
* Github: https://github.com/teeteeteeteetee
* Discord: Tee#0001
*
* Last Modified: Wednesday, 5th July 2023 10:32:30 am
* Last Modified: Thursday, 23rd November 2023 12:26:09 pm
* Modified By: Tee ([email protected])
*
* Copyright (c) 2023 Tee, Stainless Love
*/
/**
* @author Tee
*/
import { AEFT, AEFT1,
AICY, AICY1,
AUDT, AUDT1,
DRWV, DRWV1,
FLPR, FLPR1,
IDSN, IDSN1,
ILST, ILST1,
PHXS, PHXS1,
PPRO, PPRO1,
PRLD, MEDIA_ENCODER,
MEDIA_ENCODER1,
} from "../client-src/components/Icons"

module.exports = {
AEFT: {
name: 'After Effects',
id: '748568089939148832',
icons: [AEFT, AEFT1]
},
AICY: {
name: 'InCopy',
id: '756139390924750859',
icons: [AICY, AICY1]

},
AUDT: {
name: 'Audition',
id: '750462631176830977',
icons: [AUDT, AUDT1]
},
DRWV: {
name: 'Dreamweaver',
id: '756169802766221502',
icons: [DRWV, DRWV1]
},
FLPR: {
name: 'Animate',
id: '756143118604173384',
icons: [FLPR, FLPR1]
},
IDSN: {
name: 'InDesign',
id: '753663267137912953',
icons: [IDSN, IDSN1]
},
ILST: {
name: 'Illustrator',
id: '751430009716998144',
icons: [ILST, ILST1]
},
PHSP: {
name: 'Photoshop',
id: '748586506888806460',
icons: [PHXS, PHXS1]
},
PHXS: {
name: 'Photoshop',
id: '748586506888806460',
icons: [PHXS, PHXS1]
},
PPRO: {
name: 'Premiere Pro',
id: '748580494324662353',
icons: [PPRO, PPRO1]
},
PRLD: {
name: 'Prelude',
id: '756139699051036797',
icons: [PRLD]
},
RUSH: {
name: 'Premiere Rush',
id: '756158973241196595',
icons: [RUSH, RUSH1]
},
MEDIA_ENCODER: {
name: 'Media Encoder',
id: '756149565429776453',
icons: [MEDIA_ENCODER, MEDIA_ENCODER1]
}
}

0 comments on commit b497eb1

Please sign in to comment.