forked from jsnbuchanan/crowd-funder-for-time-pwa
feat: show a better emoji-confirmation message, hide all emoji stuff from unregistered on items without emojis
This commit is contained in:
@@ -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) {
|
||||
|
||||
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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user