feat(p2v): 무빙 포스터·롱컷 통합 및 상세·소셜 기능 연결
This commit is contained in:
1 parent
cd71f6d9d3
commit
c06018d88c
42 files changed
+3020
-1610
No files matched your search
@@ -0,0 +1,52 @@
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { GATE_ORDER } from '../../utils/playreelApi';
|
||||
import { AUTO_APPROVABLE, setAutoApprove, useAutoApprove } from '../../utils/playreelPrefs';
|
||||
|
||||
/**
|
||||
* 게이트 자동 승인 설정 — 롱컷 시작 화면에 놓는다(playreel 원본과 같은 자리).
|
||||
* 스위치는 되돌릴 수 있는 ①·③ 만 있고, 나머지는 잠금으로 이유를 알려준다.
|
||||
*/
|
||||
const PlayreelAutoApprovePanel: React.FC = () => {
|
||||
const { t } = useTranslation();
|
||||
const prefs = useAutoApprove();
|
||||
|
||||
return (
|
||||
<div className="pr-auto">
|
||||
<p className="p2v-label">{t('playreel.auto.title')}</p>
|
||||
<div className="p2v-panel">
|
||||
{AUTO_APPROVABLE.map((gate) => {
|
||||
const name = t(`playreel.gates.${gate}.name`);
|
||||
return (
|
||||
<div key={gate} className="pr-auto__row">
|
||||
<div className="pr-auto__text">
|
||||
<p className="pr-strong">
|
||||
{t('playreel.auto.gate', { step: GATE_ORDER.indexOf(gate) + 1, name })}
|
||||
</p>
|
||||
<p className="p2v-note">{t(`playreel.auto.${gate}`)}</p>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
role="switch"
|
||||
aria-checked={!!prefs[gate]}
|
||||
aria-label={t('playreel.auto.switchLabel', { name })}
|
||||
className={`pr-switch${prefs[gate] ? ' on' : ''}`}
|
||||
onClick={() => setAutoApprove(gate, !prefs[gate])}
|
||||
>
|
||||
<span className="pr-switch__knob" />
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
<div className="pr-auto__row pr-auto__row--locked">
|
||||
<div className="pr-auto__text">
|
||||
<p className="pr-strong">{t('playreel.auto.lockedTitle')}</p>
|
||||
<p className="p2v-note">{t('playreel.auto.lockedDesc')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PlayreelAutoApprovePanel;
|
||||
Reference in new issue
Block a user