feat: update version to 1.0.4RC5, enhance notification handling and smooth scroll behavior
All checks were successful
Chore App Build and Push Docker Images / build-and-push (push) Successful in 1m11s

This commit is contained in:
2026-02-19 11:00:14 -05:00
parent 725bf518ea
commit c18d202ecc
4 changed files with 31 additions and 4 deletions

View File

@@ -5,6 +5,7 @@
<ItemList
v-else
:key="refreshKey"
:fetchUrl="`/api/pending-rewards`"
itemKey="rewards"
:itemFields="PENDING_REWARD_FIELDS"
@@ -30,20 +31,43 @@
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { ref, onMounted, onUnmounted } from 'vue'
import { useRouter } from 'vue-router'
import ItemList from '../shared/ItemList.vue'
import MessageBlock from '../shared/MessageBlock.vue'
import type { PendingReward } from '@/common/models'
import type { PendingReward, Event, ChildRewardRequestEventPayload } from '@/common/models'
import { PENDING_REWARD_FIELDS } from '@/common/models'
import { eventBus } from '@/common/eventBus'
const router = useRouter()
const notificationListCountRef = ref(-1)
const refreshKey = ref(0)
function handleNotificationClick(item: PendingReward) {
router.push({ name: 'ParentView', params: { id: item.child_id } })
}
function handleRewardRequest(event: Event) {
const payload = event.payload as ChildRewardRequestEventPayload
if (
payload.operation === 'CREATED' ||
payload.operation === 'CANCELLED' ||
payload.operation === 'GRANTED'
) {
// Reset count and bump key to force ItemList to re-mount and refetch
notificationListCountRef.value = -1
refreshKey.value++
}
}
onMounted(() => {
eventBus.on('child_reward_request', handleRewardRequest)
})
onUnmounted(() => {
eventBus.off('child_reward_request', handleRewardRequest)
})
</script>
<style scoped>

View File

@@ -16,7 +16,7 @@
<div class="email-actions">
<input id="email" type="email" :value="modelValue" disabled class="readonly-input" />
<button type="button" class="btn-link btn-link-space" @click="goToChangeParentPin">
Change Parent Pin
Change Parent PIN
</button>
<button
type="button"

View File

@@ -175,6 +175,9 @@ const routes = [
const router = createRouter({
history: createWebHistory(),
routes,
scrollBehavior() {
return { top: 0, left: 0, behavior: 'smooth' }
},
})
// Auth guard