From b497eb14ffefa1d578dcecab4afbaf7beed20284 Mon Sep 17 00:00:00 2001 From: Tee Date: Thu, 23 Nov 2023 14:56:46 +0100 Subject: [PATCH] fixed icons and audition --- src/client-src/components/Icons.jsx | 39 ++++++++++++++++++++++++++--- src/client-src/page/Preview.jsx | 6 ++--- src/host/AUDT.jsx | 19 +++++++++++--- src/rpc_client-src/client.js | 27 +------------------- 4 files changed, 55 insertions(+), 36 deletions(-) diff --git a/src/client-src/components/Icons.jsx b/src/client-src/components/Icons.jsx index 23fdaa3..a53e42a 100644 --- a/src/client-src/components/Icons.jsx +++ b/src/client-src/components/Icons.jsx @@ -1,3 +1,18 @@ +/* + * File: Icons.jsx + * Project: discord-rpc + * File Created: Thursday, 23rd November 2023 11:19:04 am + * Author: Tee (tee@stainless.love) + * Github: https://github.com/teeteeteeteetee + * Discord: Tee#0001 + * + * Last Modified: Thursday, 23rd November 2023 2:51:18 pm + * Modified By: Tee (tee@stainless.love) + * + * 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"; @@ -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, @@ -53,9 +84,9 @@ export function setCustom({url}){ } -export function getIcon({ className, version }) { +export default function getIcon ({ className, version }) { // - const client = require("../../rpc_client-src/client")[getApplicationID()] + - return ; -} + return +} \ No newline at end of file diff --git a/src/client-src/page/Preview.jsx b/src/client-src/page/Preview.jsx index a24f000..db9237c 100644 --- a/src/client-src/page/Preview.jsx +++ b/src/client-src/page/Preview.jsx @@ -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 (tee@stainless.love) * * Copyright (c) 2023 Tee, Stainless Love @@ -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() { @@ -54,7 +54,7 @@ export default function Preview() {

PLAYING A GAME

- + {/* */}
{activity.name != "" &&

{activity.name}

} diff --git a/src/host/AUDT.jsx b/src/host/AUDT.jsx index 1d07a06..fe844fa 100644 --- a/src/host/AUDT.jsx +++ b/src/host/AUDT.jsx @@ -1,3 +1,16 @@ +/* + * File: AUDT.jsx + * Project: discord-rpc + * File Created: Thursday, 23rd November 2023 11:19:04 am + * Author: Tee (tee@stainless.love) + * Github: https://github.com/teeteeteeteetee + * Discord: Tee#0001 + * + * Last Modified: Thursday, 23rd November 2023 2:56:13 pm + * Modified By: Tee (tee@stainless.love) + * + * Copyright (c) 2023 Tee, Demon Cat + */ function state(){ var x; try{ @@ -16,7 +29,7 @@ function state(){ } }catch(e){ - x = "No file."; + x = "Idling"; } return x; @@ -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."; } } diff --git a/src/rpc_client-src/client.js b/src/rpc_client-src/client.js index e73a74d..23fc8fa 100644 --- a/src/rpc_client-src/client.js +++ b/src/rpc_client-src/client.js @@ -6,7 +6,7 @@ * 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 (tee@stainless.love) * * Copyright (c) 2023 Tee, Stainless Love @@ -14,84 +14,59 @@ /** * @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] } } \ No newline at end of file