feat: add persistent gift toast and responsive aigc layouts
update aigc page layouts to use viewport units and dynamic sizing instead of hardcoded 812px height for better device compatibility. replace fixed scss values with css custom properties for easier theming and responsive adjustments. refactor templatecarousel component to calculate dynamic card scale and layout based on screen dimensions. add local storage persistence for gift points toast so it stays closed after dismissal. update home page to respect the persisted toast state.
This commit is contained in:
@@ -2,6 +2,7 @@ import { currentClientType } from "@/constant/base";
|
||||
|
||||
const CLIENT_TYPE = currentClientType();
|
||||
const AIGC_CONSENT_AGREED = `${CLIENT_TYPE}_AIGC_CONSENT_AGREED`;
|
||||
const AIGC_GIFT_POINTS_TOAST_CLOSED = `${CLIENT_TYPE}_AIGC_GIFT_POINTS_TOAST_CLOSED`;
|
||||
|
||||
export const getAigcConsentAgreed = () => {
|
||||
return uni.getStorageSync(AIGC_CONSENT_AGREED);
|
||||
@@ -14,3 +15,15 @@ export const setAigcConsentAgreed = (agreed = true) => {
|
||||
export const removeAigcConsentAgreed = () => {
|
||||
return uni.removeStorageSync(AIGC_CONSENT_AGREED);
|
||||
};
|
||||
|
||||
export const getAigcGiftPointsToastClosed = () => {
|
||||
return uni.getStorageSync(AIGC_GIFT_POINTS_TOAST_CLOSED);
|
||||
};
|
||||
|
||||
export const setAigcGiftPointsToastClosed = (closed = true) => {
|
||||
return uni.setStorageSync(AIGC_GIFT_POINTS_TOAST_CLOSED, closed);
|
||||
};
|
||||
|
||||
export const removeAigcGiftPointsToastClosed = () => {
|
||||
return uni.removeStorageSync(AIGC_GIFT_POINTS_TOAST_CLOSED);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user