+
+
+
{({ onMouseEnter, onMouseLeave }) => {
+ return {
+ const index = activities.indexOf(currentActivity!);
+ if (index - 1 >= 0)
+ setCurrentActivity(activities[index - 1]);
+ }}
+ >
+
+ ;
+ }}
+
+
+ {activities.map((activity, index) => (
+
setCurrentActivity(activity)}
+ className={`dot ${currentActivity === activity ? "selected" : ""}`}
+ />
+ ))}
+
+
+
{({ onMouseEnter, onMouseLeave }) => {
+ return {
+ const index = activities.indexOf(currentActivity!);
+ if (index + 1 < activities.length)
+ setCurrentActivity(activities[index + 1]);
+ }}
+ >
+ = activities.length - 1}
+ direction="right"
+ />
+ ;
+ }}
+
+
+ );
+ },
+
patches: [
{
// Patch activity icons
@@ -321,7 +430,26 @@ export default definePlugin({
replacement: {
match: /null!=(\i)&&\i.some\(\i=>\(0,\i.default\)\(\i,\i\)\)\?/,
replace: "$self.patchActivityList(e),false?"
- }
+ },
+ predicate: () => settings.store.memberList,
},
+ {
+ // Show all activities in the profile panel
+ find: "Profile Panel: user cannot be undefined",
+ replacement: {
+ match: /(?<=\(0,\i\.jsx\)\()\i\.\i(?=,{activity:.+?,user:\i,channelId:\i.id,)/,
+ replace: "$self.showAllActivitiesComponent"
+ },
+ predicate: () => settings.store.profileSidebar,
+ },
+ {
+ // Show all activities in the user popout
+ find: "customStatusSection,",
+ replacement: {
+ match: /(?<=\(0,\i\.jsx\)\()\i\.\i(?=,{activity:\i,user:\i,guild:\i,channelId:\i,onClose:\i,)/,
+ replace: "$self.showAllActivitiesComponent"
+ },
+ predicate: () => settings.store.userPopout
+ }
],
});
diff --git a/src/plugins/betterActivities/popout.png b/src/plugins/betterActivities/popout.png
new file mode 100644
index 000000000..c7e572188
Binary files /dev/null and b/src/plugins/betterActivities/popout.png differ
diff --git a/src/plugins/memberListActivities/screenshot.png b/src/plugins/betterActivities/screenshot.png
similarity index 100%
rename from src/plugins/memberListActivities/screenshot.png
rename to src/plugins/betterActivities/screenshot.png
diff --git a/src/plugins/betterActivities/styles.css b/src/plugins/betterActivities/styles.css
new file mode 100644
index 000000000..743f5d213
--- /dev/null
+++ b/src/plugins/betterActivities/styles.css
@@ -0,0 +1,131 @@
+.vc-bactivities-row {
+ display: flex;
+ flex-wrap: nowrap;
+ align-items: center;
+ margin-left: 5px;
+ text-align: center;
+ gap: 3px;
+}
+
+.vc-bactivities-icon {
+ height: var(--icon-size);
+ width: var(--icon-size);
+}
+
+.vc-bactivities-icon img {
+ width: var(--icon-size);
+ height: var(--icon-size);
+ object-fit: cover;
+ border-radius: 50%;
+}
+
+.vc-bactivities-activity {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-wrap: wrap;
+ gap: 5px;
+}
+
+.vc-bactivities-activity-title {
+ font-weight: bold;
+ text-align: center;
+}
+
+.vc-bactivities-activity-image {
+ height: 20px;
+ width: 20px;
+ border-radius: 50%;
+ object-fit: cover;
+}
+
+.vc-bactivities-activity-divider {
+ width: 100%;
+ border-top: 1px dotted rgb(255 255 255 / 20%);
+ margin-top: 3px;
+ margin-bottom: 3px;
+}
+
+.vc-bactivities-activity-details {
+ display: flex;
+ flex-direction: column;
+ color: var(--text-muted);
+ word-break: break-word;
+}
+
+.vc-bactivities-activity-time-bar {
+ width: 100%;
+ margin-top: 3px;
+ margin-bottom: 3px;
+}
+
+.vc-bactivities-caret-left,
+.vc-bactivities-caret-right {
+ color: #ddd;
+}
+
+.vc-bactivities-caret-left {
+ transform: rotate(90deg);
+}
+
+.vc-bactivities-caret-right {
+ transform: rotate(-90deg);
+}
+
+.vc-bactivities-controls {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 5px;
+ background: var(--background-secondary-alt);
+ border-radius: 3px;
+ flex: 1 0;
+ margin-top: 10px;
+}
+
+.vc-bactivities-controls [class^="vc-activities-caret-"] {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ border-radius: 3px;
+ background-color: #ffffff4d;
+}
+
+.vc-bactivities-controls [class^="vc-activities-caret-"].disabled {
+ cursor: not-allowed;
+ opacity: 0.3;
+}
+
+.vc-bactivities-controls [class^="vc-activities-caret-"]:hover:not(.disabled) {
+ background: var(--background-modifier-accent);
+}
+
+.vc-bactivities-controls .carousell {
+ display: flex;
+ align-items: center;
+}
+
+.vc-bactivities-controls .carousell .dot {
+ margin: 0 4px;
+ width: 10px;
+ cursor: pointer;
+ height: 10px;
+ border-radius: 100px;
+ background: var(--interactive-muted);
+ transition: background 0.3s;
+ opacity: 0.6;
+}
+
+.vc-bactivities-controls .carousell .dot:hover:not(.selected) {
+ opacity: 1;
+}
+
+.vc-bactivities-controls .carousell .dot.selected {
+ opacity: 1;
+ background: var(--dot-color, var(--brand-experiment));
+}
+
+.vc-bactivities-controls-tooltip {
+ --background-floating: var(--background-secondary);
+}
diff --git a/src/plugins/memberListActivities/types.ts b/src/plugins/betterActivities/types.ts
similarity index 90%
rename from src/plugins/memberListActivities/types.ts
rename to src/plugins/betterActivities/types.ts
index 7f3f2b509..7e7421cb7 100644
--- a/src/plugins/memberListActivities/types.ts
+++ b/src/plugins/betterActivities/types.ts
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
-import type { ImgHTMLAttributes } from "react";
+import { CSSProperties, ImgHTMLAttributes } from "react";
export interface Timestamp {
start?: number;
@@ -76,3 +76,7 @@ export interface ActivityListIcon {
iconElement: JSX.Element;
tooltip?: JSX.Element | string;
}
+
+export interface IconCSSProperties extends CSSProperties {
+ "--icon-size": string;
+}
diff --git a/src/plugins/memberListActivities/README.md b/src/plugins/memberListActivities/README.md
deleted file mode 100644
index fe67bad79..000000000
--- a/src/plugins/memberListActivities/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# MemberListActivities
-
-Shows activity icons in the member list
-
-![Screenshot](screenshot.png)
diff --git a/src/plugins/memberListActivities/styles.css b/src/plugins/memberListActivities/styles.css
deleted file mode 100644
index 9caeb4319..000000000
--- a/src/plugins/memberListActivities/styles.css
+++ /dev/null
@@ -1,60 +0,0 @@
-.vc-mla-row {
- display: flex;
- flex-wrap: nowrap;
- align-items: center;
- margin-left: 5px;
- text-align: center;
- gap: 3px;
-}
-
-.vc-mla-icon {
- height: 20px;
- width: 20px;
-}
-
-.vc-mla-icon img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- border-radius: 50%;
-}
-
-.vc-mla-activity {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-wrap: wrap;
- gap: 5px;
-}
-
-.vc-mla-activity-title {
- font-weight: bold;
- text-align: center;
-}
-
-.vc-mla-activity-image {
- height: 20px;
- width: 20px;
- border-radius: 50%;
- object-fit: cover;
-}
-
-.vc-mla-activity-divider {
- width: 100%;
- border-top: 1px dotted rgb(255 255 255 / 20%);
- margin-top: 3px;
- margin-bottom: 3px;
-}
-
-.vc-mla-activity-details {
- display: flex;
- flex-direction: column;
- color: var(--text-muted);
- word-break: break-word;
-}
-
-.vc-mla-activity-time-bar {
- width: 100%;
- margin-top: 3px;
- margin-bottom: 3px;
-}