lot of work in rfp again
This commit is contained in:
parent
2d396110bd
commit
fe892d55b3
@ -45,7 +45,7 @@ class PremiumAuth {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
initAuth() {
|
initAuth({required String product}) {
|
||||||
try {
|
try {
|
||||||
_sub ??= uriLinkStream.listen(
|
_sub ??= uriLinkStream.listen(
|
||||||
(Uri? uri) {
|
(Uri? uri) {
|
||||||
@ -62,7 +62,7 @@ class PremiumAuth {
|
|||||||
);
|
);
|
||||||
|
|
||||||
launchUrl(
|
launchUrl(
|
||||||
Uri.parse("${FilcAPI.payment}/stripe-create-checkout?product=asdasd"),
|
Uri.parse("${FilcAPI.payment}/stripe-create-checkout?product=$product"),
|
||||||
mode: LaunchMode.externalApplication,
|
mode: LaunchMode.externalApplication,
|
||||||
);
|
);
|
||||||
} catch (err, sta) {
|
} catch (err, sta) {
|
||||||
|
@ -2,7 +2,6 @@ import 'package:refilc/theme/colors/colors.dart';
|
|||||||
import 'package:refilc_plus/providers/premium_provider.dart';
|
import 'package:refilc_plus/providers/premium_provider.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
@ -25,6 +24,7 @@ class _ActivationDashboardState extends State<ActivationDashboard> {
|
|||||||
manualActivationLoading = true;
|
manualActivationLoading = true;
|
||||||
});
|
});
|
||||||
final result =
|
final result =
|
||||||
|
// ignore: use_build_context_synchronously
|
||||||
await context.read<PremiumProvider>().auth.finishAuth(data.text!);
|
await context.read<PremiumProvider>().auth.finishAuth(data.text!);
|
||||||
setState(() {
|
setState(() {
|
||||||
manualActivationLoading = false;
|
manualActivationLoading = false;
|
||||||
@ -51,17 +51,51 @@ class _ActivationDashboardState extends State<ActivationDashboard> {
|
|||||||
children: [
|
children: [
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Center(
|
Center(
|
||||||
child: SvgPicture.asset(
|
child: Image.asset(
|
||||||
"assets/images/github.svg",
|
"assets/icons/ic_rounded.png",
|
||||||
height: 64.0,
|
height: 64.0,
|
||||||
),
|
),
|
||||||
|
// child: SvgPicture.asset(
|
||||||
|
// "assets/images/github.svg",
|
||||||
|
// height: 64.0,
|
||||||
|
// ),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 32.0),
|
const SizedBox(height: 32.0),
|
||||||
const Text(
|
const Text(
|
||||||
"Jelentkezz be a Gitbub felületén és adj hozzáférést a reFilc-nek, hogy aktiváld a reFilc+ szinted.",
|
"Válassz fizetési módot, majd folytasd a fizetést a Stripe felületén, hogy aktiváld az előfizetésed.",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(fontWeight: FontWeight.w700, fontSize: 18.0),
|
style: TextStyle(fontWeight: FontWeight.w700, fontSize: 18.0),
|
||||||
),
|
),
|
||||||
|
// const SizedBox(height: 12.0),
|
||||||
|
// Card(
|
||||||
|
// shape: RoundedRectangleBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(14.0)),
|
||||||
|
// child: const Padding(
|
||||||
|
// padding: EdgeInsets.all(16.0),
|
||||||
|
// child: Column(
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
// children: [
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// Icon(FeatherIcons.alertTriangle,
|
||||||
|
// size: 20.0, color: Colors.orange),
|
||||||
|
// SizedBox(width: 12.0),
|
||||||
|
// Text(
|
||||||
|
// "Figyelem!",
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 18.0, fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// SizedBox(height: 6.0),
|
||||||
|
// Text(
|
||||||
|
// "Az automatikus visszairányítás az alkalmazásba nem mindig működik. Ebben az esetben kérjük nyomd meg lent a \"Manuális aktiválás\" gombot!",
|
||||||
|
// style: TextStyle(fontSize: 16.0),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
const SizedBox(height: 12.0),
|
const SizedBox(height: 12.0),
|
||||||
Card(
|
Card(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
@ -85,37 +119,7 @@ class _ActivationDashboardState extends State<ActivationDashboard> {
|
|||||||
),
|
),
|
||||||
SizedBox(height: 6.0),
|
SizedBox(height: 6.0),
|
||||||
Text(
|
Text(
|
||||||
"Csak akkor érzékeli a reFilc a támogatói státuszod, ha Github-on nem állítod privátra!",
|
"Az aktiválás azonnal történik, amint kifizetted a szolgáltatás díját. A szolgáltatás automatikusan megújul, lemondásra a beállításokban lesz lehetőséget.",
|
||||||
style: TextStyle(fontSize: 16.0),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 12.0),
|
|
||||||
Card(
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(14.0)),
|
|
||||||
child: const Padding(
|
|
||||||
padding: EdgeInsets.all(16.0),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Icon(FeatherIcons.alertTriangle,
|
|
||||||
size: 20.0, color: Colors.orange),
|
|
||||||
SizedBox(width: 12.0),
|
|
||||||
Text(
|
|
||||||
"Figyelem!",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 18.0, fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 6.0),
|
|
||||||
Text(
|
|
||||||
"Az aktiválás azonnal történik, ha már támogató vagy, viszont ha még nem, előbb nyomj a neked tetsző szintre, majd fizesd ki Github-on és utána kapcsold össze a fiókod!",
|
|
||||||
style: TextStyle(fontSize: 16.0),
|
style: TextStyle(fontSize: 16.0),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -132,7 +136,7 @@ class _ActivationDashboardState extends State<ActivationDashboard> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const Text(
|
const Text(
|
||||||
"Ha bejelentkezés után a Github nem irányít vissza az alkalmazásba automatikusan, aktiválhatod a támogatásod a hitelesítő token-nel.",
|
"Ha fizetés után a Stripe nem irányít vissza az alkalmazásba automatikusan, aktiválhatod a támogatásod a munkamenet azonosítóval, melyet kimásolhatsz a hibás URL \"session_id\" paraméteréből.",
|
||||||
style:
|
style:
|
||||||
TextStyle(fontSize: 15.0, fontWeight: FontWeight.w500),
|
TextStyle(fontSize: 15.0, fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
@ -150,15 +154,15 @@ class _ActivationDashboardState extends State<ActivationDashboard> {
|
|||||||
),
|
),
|
||||||
icon: manualActivationLoading
|
icon: manualActivationLoading
|
||||||
? const SizedBox(
|
? const SizedBox(
|
||||||
child: CircularProgressIndicator(),
|
|
||||||
height: 16.0,
|
height: 16.0,
|
||||||
width: 16.0,
|
width: 16.0,
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
)
|
)
|
||||||
: const Icon(FeatherIcons.key, size: 20.0),
|
: const Icon(FeatherIcons.key, size: 20.0),
|
||||||
label: const Padding(
|
label: const Padding(
|
||||||
padding: EdgeInsets.only(left: 8.0),
|
padding: EdgeInsets.only(left: 8.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
"Aktiválás tokennel",
|
"Aktiválás azonosítóval",
|
||||||
style: TextStyle(fontSize: 16.0),
|
style: TextStyle(fontSize: 16.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -6,7 +6,9 @@ import 'package:lottie/lottie.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class PremiumActivationView extends StatefulWidget {
|
class PremiumActivationView extends StatefulWidget {
|
||||||
const PremiumActivationView({super.key});
|
const PremiumActivationView({super.key, required this.product});
|
||||||
|
|
||||||
|
final String product;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<PremiumActivationView> createState() => _PremiumActivationViewState();
|
State<PremiumActivationView> createState() => _PremiumActivationViewState();
|
||||||
@ -20,7 +22,7 @@ class _PremiumActivationViewState extends State<PremiumActivationView>
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
context.read<PremiumProvider>().auth.initAuth();
|
context.read<PremiumProvider>().auth.initAuth(product: widget.product);
|
||||||
|
|
||||||
animation =
|
animation =
|
||||||
AnimationController(vsync: this, duration: const Duration(seconds: 2));
|
AnimationController(vsync: this, duration: const Duration(seconds: 2));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user