Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d2394c002 | ||
|
|
de65316205 | ||
|
|
59a8f9ead8 | ||
|
|
3b2bb5435e | ||
|
|
3511ba2de9 |
@@ -7,7 +7,6 @@
|
|||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:taskAffinity=""
|
|
||||||
android:theme="@style/LaunchTheme"
|
android:theme="@style/LaunchTheme"
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import 'auth_repository.dart';
|
|||||||
/// - 개인정보처리방침은 동의 항목이 아니라 고지다 — 체크 칸 없이 하단 버튼 위에 안내와 보기 링크만 둔다.
|
/// - 개인정보처리방침은 동의 항목이 아니라 고지다 — 체크 칸 없이 하단 버튼 위에 안내와 보기 링크만 둔다.
|
||||||
///
|
///
|
||||||
/// 약관 본문은 확정 문구를 받기 전까지 시안의 자리 표시 문구다 — 받으면
|
/// 약관 본문은 확정 문구를 받기 전까지 시안의 자리 표시 문구다 — 받으면
|
||||||
/// [termsPlaceholderBody] 와 [signupTermsVersion] 을 함께 바꾼다(동의 기록에 버전이 남는다).
|
/// 항목별 본문 · [privacyPolicyPlaceholderBody] 와 [signupTermsVersion] 을 함께 바꾼다(동의 기록에 버전이 남는다).
|
||||||
class TermsScreen extends StatefulWidget {
|
class TermsScreen extends StatefulWidget {
|
||||||
const TermsScreen({super.key, this.onAgreed, this.onBack, this.busy = false});
|
const TermsScreen({super.key, this.onAgreed, this.onBack, this.busy = false});
|
||||||
|
|
||||||
@@ -38,22 +38,53 @@ const signupTermsVersion = 'draft-1';
|
|||||||
List<String> get signupTermKeys => [for (final t in _Term.values) t.name];
|
List<String> get signupTermKeys => [for (final t in _Term.values) t.name];
|
||||||
|
|
||||||
enum _Term {
|
enum _Term {
|
||||||
service('서비스 이용약관 (필수)', required: true, body: true),
|
service('서비스 이용약관 (필수)', required: true, body: _serviceBody),
|
||||||
privacy('개인정보 수집·이용 동의 (필수)', required: true, body: true),
|
privacy('개인정보 수집·이용 동의 (필수)', required: true, body: _privacyBody),
|
||||||
age('만 14세 이상입니다. (필수)', required: true, body: false),
|
age('만 14세 이상입니다. (필수)', required: true),
|
||||||
marketing('마케팅 정보 및 이벤트 알림 수신 동의 (선택)', required: false, body: true);
|
marketing(
|
||||||
|
'마케팅 정보 및 이벤트 알림 수신 동의 (선택)',
|
||||||
|
required: false,
|
||||||
|
body: _marketingBody,
|
||||||
|
);
|
||||||
|
|
||||||
const _Term(this.label, {required this.required, required this.body});
|
const _Term(this.label, {required this.required, this.body});
|
||||||
|
|
||||||
final String label;
|
final String label;
|
||||||
final bool required;
|
final bool required;
|
||||||
final bool body;
|
|
||||||
|
/// 항목 아래에 보이는 본문. 없으면 체크 줄만 그린다.
|
||||||
|
final String? body;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 약관 본문 자리 표시 문구.
|
// 약관·방침 본문 자리 표시 문구 — 항목마다 제목이 다르다(한 문구를 돌려 쓰면 방침 창에 약관 제목이 뜬다).
|
||||||
const termsPlaceholderBody =
|
// 정식 문안을 받으면 이 문구와 [signupTermsVersion] 을 함께 바꾼다.
|
||||||
|
const _serviceBody =
|
||||||
'FANUZU 서비스 이용약관\n\n제1조 (적용범위)\n서비스 이용약관에 대한 더미 텍스트 입니다.\n'
|
'FANUZU 서비스 이용약관\n\n제1조 (적용범위)\n서비스 이용약관에 대한 더미 텍스트 입니다.\n'
|
||||||
'추후 작성해주시기 바랍니다. 서비스 이용약관에 대한 더미 텍스트 입니다.';
|
'추후 작성해주시기 바랍니다. 서비스 이용약관에 대한 더미 텍스트 입니다.';
|
||||||
|
const _privacyBody =
|
||||||
|
'FANUZU 개인정보 수집·이용 동의\n\n정식 문안을 받기 전 임시 문구입니다.\n\n'
|
||||||
|
'수집 항목\n정식 문안을 받으면 기재합니다.\n\n'
|
||||||
|
'이용 목적\n정식 문안을 받으면 기재합니다.\n\n'
|
||||||
|
'보유 및 이용 기간\n정식 문안을 받으면 기재합니다.\n\n'
|
||||||
|
'동의를 거부할 권리와 거부 시 불이익\n정식 문안을 받으면 기재합니다.';
|
||||||
|
const _marketingBody =
|
||||||
|
'FANUZU 마케팅 정보 수신 동의\n\n정식 문안을 받기 전 임시 문구입니다.\n\n'
|
||||||
|
'수신 내용\n정식 문안을 받으면 기재합니다.\n\n'
|
||||||
|
'수신 방법\n정식 문안을 받으면 기재합니다.\n\n'
|
||||||
|
'보유 및 이용 기간\n정식 문안을 받으면 기재합니다.\n\n'
|
||||||
|
'동의 철회 방법\n정식 문안을 받으면 기재합니다.';
|
||||||
|
|
||||||
|
/// 개인정보처리방침 본문 자리 표시 문구 — 동의 항목이 아니라 하단 고지의 「보기」로 연다.
|
||||||
|
const privacyPolicyPlaceholderBody =
|
||||||
|
'FANUZU 개인정보처리방침\n\n정식 문안을 받기 전 임시 문구입니다.\n\n'
|
||||||
|
'1. 수집하는 개인정보 항목\n정식 문안을 받으면 기재합니다.\n\n'
|
||||||
|
'2. 개인정보의 이용 목적\n정식 문안을 받으면 기재합니다.\n\n'
|
||||||
|
'3. 개인정보의 보유 및 이용 기간\n정식 문안을 받으면 기재합니다.\n\n'
|
||||||
|
'4. 개인정보 처리 위탁 및 국외 이전\n정식 문안을 받으면 기재합니다.\n\n'
|
||||||
|
'5. 개인정보의 파기\n정식 문안을 받으면 기재합니다.\n\n'
|
||||||
|
'6. 이용자의 권리와 행사 방법\n정식 문안을 받으면 기재합니다.\n\n'
|
||||||
|
'7. 개인정보 보호책임자 및 문의처\n정식 문안을 받으면 기재합니다.\n\n'
|
||||||
|
'8. 시행일\n정식 문안을 받으면 기재합니다.';
|
||||||
|
|
||||||
const _stroke = Color(0xFF545454);
|
const _stroke = Color(0xFF545454);
|
||||||
|
|
||||||
@@ -79,7 +110,9 @@ class _TermsScreenState extends State<TermsScreen> {
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (context) => AlertDialog(
|
builder: (context) => AlertDialog(
|
||||||
title: const Text('개인정보처리방침'),
|
title: const Text('개인정보처리방침'),
|
||||||
content: const SingleChildScrollView(child: Text(termsPlaceholderBody)),
|
content: const SingleChildScrollView(
|
||||||
|
child: Text(privacyPolicyPlaceholderBody),
|
||||||
|
),
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
@@ -194,7 +227,7 @@ class _TermsScreenState extends State<TermsScreen> {
|
|||||||
for (final t in _Term.values) ...[
|
for (final t in _Term.values) ...[
|
||||||
const SizedBox(height: AppSpace.s3),
|
const SizedBox(height: AppSpace.s3),
|
||||||
_Box(
|
_Box(
|
||||||
child: t.body
|
child: t.body != null
|
||||||
? Column(
|
? Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
@@ -209,15 +242,17 @@ class _TermsScreenState extends State<TermsScreen> {
|
|||||||
onTap: () => _toggle(t),
|
onTap: () => _toggle(t),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: AppSpace.s4),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
vertical: AppSpace.s4,
|
||||||
|
),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 80,
|
height: 80,
|
||||||
child: ClipRect(
|
child: ClipRect(
|
||||||
child: Text(
|
child: Text(
|
||||||
termsPlaceholderBody,
|
t.body!,
|
||||||
overflow: TextOverflow.clip,
|
overflow: TextOverflow.clip,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: AppFonts.display,
|
fontFamily: AppFonts.display,
|
||||||
fontFamilyFallback: [AppFonts.body],
|
fontFamilyFallback: [AppFonts.body],
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
name: fancake
|
name: fancake
|
||||||
description: "FANUZU — 팬덤 플랫폼 앱 (골격). 발주사 (주)팬케이크 / 수행사 스위치 주식회사"
|
description: "FANUZU — 팬덤 플랫폼 앱 (골격). 발주사 (주)팬케이크 / 수행사 스위치 주식회사"
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 0.1.1+11
|
version: 0.1.1+14
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.11.5
|
sdk: ^3.11.5
|
||||||
|
|||||||
@@ -117,6 +117,24 @@ void main() {
|
|||||||
expect(find.text('개인정보처리방침'), findsOneWidget);
|
expect(find.text('개인정보처리방침'), findsOneWidget);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
testWidgets('개인정보처리방침 보기는 약관 문구가 아닌 처리방침 문구를 보여 준다', (tester) async {
|
||||||
|
await tester.pumpWidget(const MaterialApp(home: TermsScreen()));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
await tester.tap(find.byKey(const ValueKey('privacy-policy-link')));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
|
final body = tester
|
||||||
|
.widget<Text>(
|
||||||
|
find.descendant(
|
||||||
|
of: find.byType(AlertDialog),
|
||||||
|
matching: find.textContaining('임시 문구'),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.data!;
|
||||||
|
expect(body, contains('개인정보처리방침'));
|
||||||
|
expect(body, isNot(contains('서비스 이용약관')));
|
||||||
|
});
|
||||||
|
|
||||||
testWidgets('이미 동의한 계정은 약관 없이 HOME', (tester) async {
|
testWidgets('이미 동의한 계정은 약관 없이 HOME', (tester) async {
|
||||||
final auth = AuthRepository(
|
final auth = AuthRepository(
|
||||||
providers: [
|
providers: [
|
||||||
|
|||||||
@@ -69,6 +69,18 @@ void main() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Android — MainActivity 가 패키지 기본 task 에 있어 LINE 로그인 후 앱으로 돌아온다', () {
|
||||||
|
// LINE SDK 는 lineauth:// 복귀 시 결과 화면을 NEW_TASK|CLEAR_TOP 으로 띄워 패키지
|
||||||
|
// affinity 의 task 를 찾는다. MainActivity 의 taskAffinity 가 비어 있으면 새 task 가
|
||||||
|
// 생겨 Chrome 맞춤 탭이 앱 위에 남는다(사용자가 X 를 눌러야 로그인이 끝난다).
|
||||||
|
final manifest = _read('android/app/src/main/AndroidManifest.xml');
|
||||||
|
final mainActivity = RegExp(
|
||||||
|
r'<activity\s[^>]*android:name="\.MainActivity"[^>]*>',
|
||||||
|
).firstMatch(manifest)?.group(0);
|
||||||
|
expect(mainActivity, isNotNull);
|
||||||
|
expect(mainActivity, isNot(contains('taskAffinity')));
|
||||||
|
});
|
||||||
|
|
||||||
test('설정·서명 자산을 git 이 추적하지 않는다', () {
|
test('설정·서명 자산을 git 이 추적하지 않는다', () {
|
||||||
final result = Process.runSync('git', [
|
final result = Process.runSync('git', [
|
||||||
'ls-files',
|
'ls-files',
|
||||||
|
|||||||
Reference in New Issue
Block a user