43 lines
2.3 KiB
Dart
43 lines
2.3 KiB
Dart
/// 약속: Tor 화면의 안내 - 공식 Tor Browser 가 아니라는 안내 창 ([showTorNotice]) · 웹 뷰 대신 보이는 안내 ([torMessage]).
|
|
library;
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../../l10n/tr.dart';
|
|
import '../theme.dart';
|
|
|
|
/// 처음 열 때 · 환경 설정에서: 공식 Tor Browser 가 아니라는 안내
|
|
Future<void> showTorNotice(BuildContext context) => showDialog<void>(
|
|
context: context,
|
|
builder: (ctx) => AlertDialog(
|
|
scrollable: true,
|
|
title: Text(tr('Tor 브라우저 안내')),
|
|
content: SizedBox(
|
|
width: 480,
|
|
child: Text(tr('이 화면은 앱 안 웹 뷰의 연결을 Tor 로 보내는 것이며, 공식 Tor Browser 가 아닙니다.\n\n'
|
|
'· 연결 (이름 찾기 포함) 은 모두 Tor 로 나가고, 쿠키 · 기록 · 캐시는 일반 브라우저와 따로 두며 닫으면 지웁니다 (환경 설정에서 남기기 가능).\n'
|
|
'· 하지만 브라우저 지문 (화면 크기 · 글꼴 · 기기 정보 등) 을 감추는 보호는 공식 Tor Browser 보다 약합니다. '
|
|
'사이트가 이 기기를 알아볼 수 있습니다.\n'
|
|
'· 강한 익명성이 필요하면 공식 Tor Browser (https://www.torproject.org) 를 쓰세요.')),
|
|
),
|
|
actions: [FilledButton(onPressed: () => Navigator.pop(ctx), child: Text(tr('확인')))],
|
|
),
|
|
);
|
|
|
|
/// 웹 뷰 대신 보이는 안내 (아이콘 또는 빙글이 · 제목 · 설명)
|
|
Widget torMessage(IconData icon, String title, String body, {bool busy = false}) => Center(
|
|
child: SingleChildScrollView(
|
|
padding: const EdgeInsets.all(24),
|
|
child: ConstrainedBox(
|
|
constraints: const BoxConstraints(maxWidth: 520),
|
|
child: Column(mainAxisSize: MainAxisSize.min, children: [
|
|
busy ? const SizedBox(width: 40, height: 40, child: CircularProgressIndicator()) : Icon(icon, size: 40, color: JjColors.textDim),
|
|
const SizedBox(height: 12),
|
|
Text(title, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600), textAlign: TextAlign.center),
|
|
const SizedBox(height: 8),
|
|
Text(body, style: TextStyle(color: JjColors.textDim), textAlign: TextAlign.center),
|
|
]),
|
|
),
|
|
),
|
|
);
|