Teaching: hide-notes-until share, session length check, slides export
- A study share link can hide the owner's notes until a chosen time: the server sends only passages and discussion questions until then, with a banner in the shared view (new share_reveal column, migrated on start). - Outline: a session length with "N of M min planned, X min over" and a marker on the point where the plan runs past it. - Export > Slides: printable 16:9 slides (title, passage, outline points with their verse, discussion questions) for one session or all; light or dark. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
67645cf1df
commit
2c7c7145c4
14 files changed
+303
-33
No files matched your search
@@ -6,14 +6,15 @@ export function useShareLink(projectId) {
|
||||
const [shareToken, setShareToken] = useState(null);
|
||||
const [expiresAt, setExpiresAt] = useState(null);
|
||||
const [hasPasscode, setHasPasscode] = useState(false);
|
||||
const [revealAt, setRevealAt] = useState(null);
|
||||
const [shareBusy, setShareBusy] = useState(false);
|
||||
const [shareCopied, setShareCopied] = useState(false);
|
||||
const [shareError, setShareError] = useState('');
|
||||
|
||||
const apply = (data) => { setShareToken(data.shareToken ?? null); setExpiresAt(data.expiresAt ?? null); setHasPasscode(!!data.hasPasscode); };
|
||||
const apply = (data) => { setShareToken(data.shareToken ?? null); setExpiresAt(data.expiresAt ?? null); setHasPasscode(!!data.hasPasscode); setRevealAt(data.revealAt ?? null); };
|
||||
|
||||
useEffect(() => {
|
||||
setShareToken(null); setExpiresAt(null); setHasPasscode(false); setShareError('');
|
||||
setShareToken(null); setExpiresAt(null); setHasPasscode(false); setRevealAt(null); setShareError('');
|
||||
if (!projectId) return undefined;
|
||||
let active = true;
|
||||
getShareStatus(projectId).then((result) => {
|
||||
@@ -26,7 +27,7 @@ export function useShareLink(projectId) {
|
||||
? `${window.location.origin}${window.location.pathname}?share=${shareToken}`
|
||||
: '';
|
||||
|
||||
// Turns the link on, or changes its rules: { expiresInDays?: number | null, passcode?: string | null }
|
||||
// Turns the link on, or changes its rules: { expiresInDays?: number | null, passcode?: string | null, revealAt?: number | null }
|
||||
const enable = async (options = {}) => {
|
||||
setShareBusy(true);
|
||||
setShareError('');
|
||||
@@ -52,5 +53,5 @@ export function useShareLink(projectId) {
|
||||
});
|
||||
};
|
||||
|
||||
return { shareToken, shareUrl, expiresAt, hasPasscode, shareBusy, shareCopied, shareError, enable, revoke, copy };
|
||||
return { shareToken, shareUrl, expiresAt, hasPasscode, revealAt, shareBusy, shareCopied, shareError, enable, revoke, copy };
|
||||
}
|
||||
Reference in new issue
Block a user