feat: add aigc record, video preview & custom recharge
- create useAigcRecordStore to centralize current AIGC generation record state - add video media type support to ResultPreview component - update RecordCard to only display view button for completed tasks - implement custom recharge amount with input validation and 9999 max limit - refactor detail page to load record from Pinia store instead of mock data - clean up TemplateCarousel markup and remove unused badge styles - fix minor formatting and code style issues
This commit is contained in:
15
src/store/modules/aigcRecord.js
Normal file
15
src/store/modules/aigcRecord.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
export const useAigcRecordStore = defineStore("aigcRecord", {
|
||||
state() {
|
||||
return {
|
||||
currentRecord: null,
|
||||
};
|
||||
},
|
||||
|
||||
actions: {
|
||||
setCurrentRecord(record) {
|
||||
this.currentRecord = record ? { ...record } : null;
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useAppStore } from "./app";
|
||||
import { useSelectedDateStore } from "./selectedDate";
|
||||
import { usePictureStore } from "./picture";
|
||||
import { useLocationStore } from "./location";
|
||||
|
||||
export { useAppStore, useSelectedDateStore, usePictureStore, useLocationStore };
|
||||
import { useAppStore } from "./app";
|
||||
import { useAigcRecordStore } from "./aigcRecord";
|
||||
import { useSelectedDateStore } from "./selectedDate";
|
||||
import { usePictureStore } from "./picture";
|
||||
import { useLocationStore } from "./location";
|
||||
|
||||
export { useAppStore, useAigcRecordStore, useSelectedDateStore, usePictureStore, useLocationStore };
|
||||
|
||||
Reference in New Issue
Block a user