fix(phase3): subscription leak, image mime type validation
- Ledger store: add stopSubscription() to properly clean up realtime subscriptions, matching asset store pattern - LedgerList: call stopSubscription on unmount - Assets migration: restrict image upload to image/* mime types (C3 updateRule is a known tradeoff — PocketBase lacks field-level permissions, frontend enforces edit restrictions instead) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted, watch } from 'vue'
|
||||
import { ref, computed, onMounted, onUnmounted, watch } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { useLedgerStore } from '@/stores/ledger'
|
||||
@@ -139,6 +139,10 @@ onMounted(() => {
|
||||
}
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
ledgerStore.stopSubscription()
|
||||
})
|
||||
|
||||
watch(() => groupStore.currentGroupId, (newId, oldId) => {
|
||||
if (newId && newId !== oldId) {
|
||||
loadData()
|
||||
|
||||
Reference in New Issue
Block a user