Compare commits
3 Commits
90f789b2b6
...
f7d59d2ea3
| Author | SHA1 | Date | |
|---|---|---|---|
| f7d59d2ea3 | |||
| 1a328fad6c | |||
| 11c1747a68 |
Binary file not shown.
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 6.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 19 KiB |
@@ -59,6 +59,14 @@ describe("FeedbackScreen", () => {
|
|||||||
container.querySelector<HTMLInputElement>('input[value="problem"]')
|
container.querySelector<HTMLInputElement>('input[value="problem"]')
|
||||||
?.checked,
|
?.checked,
|
||||||
).toBe(true);
|
).toBe(true);
|
||||||
|
expect(container.textContent).toContain(
|
||||||
|
"Minimum 10 characters required.",
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
container
|
||||||
|
.querySelector("textarea")
|
||||||
|
?.getAttribute("aria-describedby"),
|
||||||
|
).toBe("feedback-content-hint");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("submits valid text and renders the feedback id", async () => {
|
it("submits valid text and renders the feedback id", async () => {
|
||||||
|
|||||||
@@ -238,6 +238,14 @@ h2.fieldLabel {
|
|||||||
font-weight: 570;
|
font-weight: 570;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.contentHint {
|
||||||
|
margin: -6px 0 0;
|
||||||
|
color: #998b90;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 570;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
.imageCount {
|
.imageCount {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
color: #8d7c82;
|
color: #8d7c82;
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import {
|
|||||||
FEEDBACK_IMAGE_LIMIT,
|
FEEDBACK_IMAGE_LIMIT,
|
||||||
} from "./feedback-image";
|
} from "./feedback-image";
|
||||||
import {
|
import {
|
||||||
|
FEEDBACK_CONTENT_MIN_LENGTH,
|
||||||
FEEDBACK_CONTENT_MAX_LENGTH,
|
FEEDBACK_CONTENT_MAX_LENGTH,
|
||||||
useFeedbackSubmission,
|
useFeedbackSubmission,
|
||||||
} from "./use-feedback-submission";
|
} from "./use-feedback-submission";
|
||||||
@@ -143,9 +144,13 @@ export function FeedbackScreen() {
|
|||||||
<label className={styles.fieldLabel} htmlFor="feedback-content">
|
<label className={styles.fieldLabel} htmlFor="feedback-content">
|
||||||
Describe your feedback
|
Describe your feedback
|
||||||
</label>
|
</label>
|
||||||
|
<p id="feedback-content-hint" className={styles.contentHint}>
|
||||||
|
Minimum {FEEDBACK_CONTENT_MIN_LENGTH} characters required.
|
||||||
|
</p>
|
||||||
<div className={styles.textareaFrame}>
|
<div className={styles.textareaFrame}>
|
||||||
<textarea
|
<textarea
|
||||||
id="feedback-content"
|
id="feedback-content"
|
||||||
|
aria-describedby="feedback-content-hint"
|
||||||
value={form.content}
|
value={form.content}
|
||||||
maxLength={FEEDBACK_CONTENT_MAX_LENGTH}
|
maxLength={FEEDBACK_CONTENT_MAX_LENGTH}
|
||||||
disabled={form.isSubmitting}
|
disabled={form.isSubmitting}
|
||||||
|
|||||||
@@ -31,10 +31,7 @@
|
|||||||
padding:
|
padding:
|
||||||
calc(var(--page-padding-y, 20px) + var(--app-safe-top, 0px))
|
calc(var(--page-padding-y, 20px) + var(--app-safe-top, 0px))
|
||||||
calc(var(--page-padding-x, 26px) + var(--app-safe-right, 0px))
|
calc(var(--page-padding-x, 26px) + var(--app-safe-right, 0px))
|
||||||
calc(
|
calc(var(--page-padding-y, 20px) + var(--app-safe-bottom, 0px))
|
||||||
var(--spacing-md, 12px) + var(--app-safe-bottom, 0px) +
|
|
||||||
var(--app-bottom-nav-height, 64px)
|
|
||||||
)
|
|
||||||
calc(var(--page-padding-x, 26px) + var(--app-safe-left, 0px));
|
calc(var(--page-padding-x, 26px) + var(--app-safe-left, 0px));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,29 +2,31 @@
|
|||||||
|
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
|
|
||||||
import { AppBottomNav, MobileShell } from "@/app/_components/core";
|
import { MobileShell } from "@/app/_components/core";
|
||||||
|
// import { AppBottomNav } from "@/app/_components/core";
|
||||||
import { useAppNavigator } from "@/router/use-app-navigator";
|
import { useAppNavigator } from "@/router/use-app-navigator";
|
||||||
import {
|
import {
|
||||||
useActiveCharacter,
|
useActiveCharacter,
|
||||||
useActiveCharacterRoutes,
|
useActiveCharacterRoutes,
|
||||||
} from "@/providers/character-provider";
|
} from "@/providers/character-provider";
|
||||||
import { useAuthState } from "@/stores/auth/auth-context";
|
// import { useAuthState } from "@/stores/auth/auth-context";
|
||||||
import { pwaUtil } from "@/utils/pwa";
|
import { pwaUtil } from "@/utils/pwa";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
SplashBackground,
|
SplashBackground,
|
||||||
SplashButton,
|
SplashButton,
|
||||||
SplashContent,
|
SplashContent,
|
||||||
SplashLatestMessage,
|
// SplashLatestMessage,
|
||||||
SplashLogo,
|
SplashLogo,
|
||||||
} from "./components";
|
} from "./components";
|
||||||
import { useSplashLatestMessage } from "./hooks/use-splash-latest-message";
|
// import { useSplashLatestMessage } from "./hooks/use-splash-latest-message";
|
||||||
import styles from "./components/splash-screen.module.css";
|
import styles from "./components/splash-screen.module.css";
|
||||||
|
|
||||||
export function SplashScreen() {
|
export function SplashScreen() {
|
||||||
const navigator = useAppNavigator();
|
const navigator = useAppNavigator();
|
||||||
const character = useActiveCharacter();
|
const character = useActiveCharacter();
|
||||||
const characterRoutes = useActiveCharacterRoutes();
|
const characterRoutes = useActiveCharacterRoutes();
|
||||||
|
/*
|
||||||
const authState = useAuthState();
|
const authState = useAuthState();
|
||||||
const latestMessage = useSplashLatestMessage({
|
const latestMessage = useSplashLatestMessage({
|
||||||
characterId: character.id,
|
characterId: character.id,
|
||||||
@@ -32,14 +34,17 @@ export function SplashScreen() {
|
|||||||
isAuthLoading: authState.isLoading,
|
isAuthLoading: authState.isLoading,
|
||||||
loginStatus: authState.loginStatus,
|
loginStatus: authState.loginStatus,
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
const handleStartChat = () => {
|
const handleStartChat = () => {
|
||||||
navigator.openChat({ replace: true });
|
navigator.openChat({ replace: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
const handleOpenPrivateRoom = () => {
|
const handleOpenPrivateRoom = () => {
|
||||||
navigator.push(characterRoutes.privateRoom, { scroll: false });
|
navigator.push(characterRoutes.privateRoom, { scroll: false });
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
const handleOpenSplash = () => {
|
const handleOpenSplash = () => {
|
||||||
navigator.push(characterRoutes.splash, { scroll: false });
|
navigator.push(characterRoutes.splash, { scroll: false });
|
||||||
@@ -58,6 +63,7 @@ export function SplashScreen() {
|
|||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
<SplashLogo />
|
<SplashLogo />
|
||||||
<div className={styles.spacer} />
|
<div className={styles.spacer} />
|
||||||
|
{/*
|
||||||
<SplashLatestMessage
|
<SplashLatestMessage
|
||||||
message={latestMessage.message}
|
message={latestMessage.message}
|
||||||
characterName={character.shortName}
|
characterName={character.shortName}
|
||||||
@@ -65,6 +71,7 @@ export function SplashScreen() {
|
|||||||
isLoading={latestMessage.isLoading}
|
isLoading={latestMessage.isLoading}
|
||||||
onOpenChat={handleStartChat}
|
onOpenChat={handleStartChat}
|
||||||
/>
|
/>
|
||||||
|
*/}
|
||||||
<SplashContent />
|
<SplashContent />
|
||||||
<div className={styles.buttonArea}>
|
<div className={styles.buttonArea}>
|
||||||
<SplashButton onStartChat={handleStartChat} />
|
<SplashButton onStartChat={handleStartChat} />
|
||||||
@@ -75,12 +82,14 @@ export function SplashScreen() {
|
|||||||
24/7 online | Chat | Companion | Heal | Sweet moments
|
24/7 online | Chat | Companion | Heal | Sweet moments
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
{/*
|
||||||
<AppBottomNav
|
<AppBottomNav
|
||||||
activeItem="chat"
|
activeItem="chat"
|
||||||
privateRoomLabel={character.copy.privateRoomTitle}
|
privateRoomLabel={character.copy.privateRoomTitle}
|
||||||
onChatClick={handleOpenSplash}
|
onChatClick={handleOpenSplash}
|
||||||
onPrivateRoomClick={handleOpenPrivateRoom}
|
onPrivateRoomClick={handleOpenPrivateRoom}
|
||||||
/>
|
/>
|
||||||
|
*/}
|
||||||
</div>
|
</div>
|
||||||
</MobileShell>
|
</MobileShell>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user