This commit is contained in:
ct
2025-07-17 14:55:15 +08:00
parent a6f34ea8fa
commit a7a3c6e6f6
9 changed files with 894 additions and 7 deletions

View File

@@ -30,7 +30,7 @@ const EditorControls = ({ className = '', onEditClick = () => {}, isEditActive =
const handleRefresh = () => {
handleReset();
init();
init(true);
};
const togglePlayPause = () => {

View File

@@ -133,7 +133,7 @@ const useMediaStore = create(
set({ keywords: [] });
},
init: async () => {
init: async (skipCache = false) => {
const state = get();
// Skip API call completely if ALL initial values were set via props
@@ -142,7 +142,12 @@ const useMediaStore = create(
}
try {
const response = await axiosInstance.post(route('api.app.init'));
const params = {};
if (skipCache) {
params.sc = '1';
}
const response = await axiosInstance.post(route('api.app.init'), params);
if (response?.data?.success?.data?.init) {
const updates = {};

File diff suppressed because one or more lines are too long