Browse Source

feat: show a better emoji-confirmation message, hide all emoji stuff from unregistered on items without emojis

pull/209/head
Trent Larson 2 days ago
parent
commit
499fbd2cb3
  1. 20
      src/components/ActivityListItem.vue
  2. 4
      src/services/platforms/WebPlatformService.ts

20
src/components/ActivityListItem.vue

@ -79,6 +79,7 @@
<!-- Emoji Section -->
<div
v-if="hasEmojis || isRegistered"
class="float-right ml-3 mb-1 bg-white rounded border border-slate-300 px-1.5 py-0.5 max-w-[240px]"
>
<div class="flex items-center justify-between gap-1">
@ -503,11 +504,20 @@ export default class ActivityListItem extends Vue {
);
if (userHasEmoji) {
// User already has this emoji, ask for confirmation to remove
const confirmed = confirm(`Do you want to remove your ${emoji} emoji?`);
if (confirmed) {
await this.removeEmoji(emoji);
}
this.$notify(
{
group: "modal",
type: "confirm",
title: "Remove Emoji",
text: `Do you want to remove your ${emoji} ?`,
yesText: "Remove",
onYes: async () => {
await this.removeEmoji(emoji);
},
},
TIMEOUTS.MODAL,
);
} else {
// User doesn't have this emoji, add it
await this.submitEmoji(emoji);

4
src/services/platforms/WebPlatformService.ts

@ -52,7 +52,9 @@ export class WebPlatformService implements PlatformService {
// Only initialize SharedArrayBuffer setup for web platforms
if (this.isWorker()) {
logger.debug("[WebPlatformService] Skipping initBackend call in worker context");
logger.debug(
"[WebPlatformService] Skipping initBackend call in worker context",
);
return;
}

Loading…
Cancel
Save