Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class _MobileHomeSettingPageState extends State<MobileHomeSettingPage> {
const AboutSettingGroup(),
UserSessionSettingGroup(
userProfile: userProfile,
showThirdPartyLogin: isLocalAuthEnabled,
showThirdPartyLogin: false,
),
const VSpace(20),
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import 'package:flutter/material.dart';

import 'package:appflowy/env/cloud_env.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/mobile/presentation/bottom_sheet/bottom_sheet.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/workspace/application/user/prelude.dart';
import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

import '../widgets/widgets.dart';

import 'personal_info.dart';

class PersonalInfoSettingGroup extends StatelessWidget {
Expand All @@ -32,7 +30,7 @@ class PersonalInfoSettingGroup extends StatelessWidget {
selector: (state) => state.userProfile.name,
builder: (context, userName) {
return MobileSettingGroup(
groupTitle: LocaleKeys.settings_mobile_personalInfo.tr(),
groupTitle: LocaleKeys.settings_accountPage_title.tr(),
settingItemList: [
MobileSettingItem(
name: userName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:appflowy/mobile/presentation/setting/launch_settings_page.dart';
import 'package:appflowy/user/application/sign_in_bloc.dart';
import 'package:appflowy/user/presentation/screens/sign_in_screen/widgets/anonymous_sign_in_button.dart';
import 'package:appflowy/user/presentation/screens/sign_in_screen/widgets/widgets.dart';
import 'package:appflowy/user/presentation/widgets/flowy_logo_title.dart';
import 'package:appflowy_ui/appflowy_ui.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
Expand All @@ -22,33 +23,30 @@ class MobileSignInScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
const double spacing = 16;
final colorScheme = Theme.of(context).colorScheme;

return BlocBuilder<SignInBloc, SignInState>(
builder: (context, state) {
final theme = AppFlowyTheme.of(context);
return Scaffold(
resizeToAvoidBottomInset: false,
body: Padding(
padding: const EdgeInsets.symmetric(vertical: 38, horizontal: 40),
child: Column(
children: [
const Spacer(flex: 4),
_buildLogo(),
const VSpace(spacing),
_buildAppNameText(colorScheme),
const VSpace(spacing * 2),
const Spacer(),
FlowyLogoTitle(title: LocaleKeys.welcomeText.tr()),
VSpace(theme.spacing.xxl),
isLocalAuthEnabled
? const SignInAnonymousButtonV3()
: const ContinueWithEmailAndPassword(),
const VSpace(spacing),
if (isAuthEnabled) _buildThirdPartySignInButtons(context),
const VSpace(spacing * 1.5),
VSpace(theme.spacing.xxl),
if (isAuthEnabled) ...[
_buildThirdPartySignInButtons(context),
VSpace(theme.spacing.xxl),
],
const SignInAgreement(),
const VSpace(spacing),
if (!isAuthEnabled) const Spacer(flex: 2),
const Spacer(flex: 2),
const Spacer(),
Expanded(child: _buildSettingsButton(context)),
if (Platform.isAndroid) const Spacer(),
_buildSettingsButton(context),
],
),
),
Expand All @@ -57,24 +55,6 @@ class MobileSignInScreen extends StatelessWidget {
);
}

Widget _buildLogo() {
return const FlowySvg(
FlowySvgs.flowy_logo_xl,
size: Size.square(56),
blendMode: null,
);
}

Widget _buildAppNameText(ColorScheme colorScheme) {
return FlowyText(
LocaleKeys.appName.tr(),
textAlign: TextAlign.center,
fontSize: 28,
color: const Color(0xFF00BCF0),
fontWeight: FontWeight.w700,
);
}

Widget _buildThirdPartySignInButtons(BuildContext context) {
final theme = AppFlowyTheme.of(context);
return Column(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SignInAnonymousButtonV3 extends StatelessWidget {
},
child: BlocBuilder<AnonUserBloc, AnonUserState>(
builder: (context, state) {
final text = LocaleKeys.signUp_getStartedText.tr();
final text = LocaleKeys.signIn_continueWithLocalModel.tr();
final onTap = state.anonUsers.isEmpty
? () {
context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:appflowy/core/helpers/url_launcher.dart';
import 'package:appflowy/env/cloud_env.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy_ui/appflowy_ui.dart';
import 'package:easy_localization/easy_localization.dart';
Expand All @@ -25,9 +24,7 @@ class SignInAgreement extends StatelessWidget {
text: TextSpan(
children: [
TextSpan(
text: isLocalAuthEnabled
? LocaleKeys.web_signInLocalAgreement.tr()
: LocaleKeys.web_signInAgreement.tr(),
text: LocaleKeys.web_signInAgreement.tr(),
style: textStyle,
),
TextSpan(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ChangeCloudModeButton extends StatelessWidget {
Widget build(BuildContext context) {
final theme = AppFlowyTheme.of(context);
return AFGhostIconTextButton(
text: 'Cloud',
text: LocaleKeys.signIn_switchToAppFlowyCloud.tr(),
textColor: (context, isHovering, disabled) {
return theme.textColorScheme.secondary;
},
Expand All @@ -97,7 +97,7 @@ class ChangeCloudModeButton extends StatelessWidget {
},
iconBuilder: (context, isHovering, disabled) {
return FlowySvg(
FlowySvgs.settings_s,
FlowySvgs.cloud_mode_m,
size: Size.square(20),
color: theme.textColorScheme.secondary,
);
Expand Down
3 changes: 3 additions & 0 deletions frontend/resources/flowy_icons/20x/cloud_mode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions frontend/resources/flowy_icons/20x/sign_in_settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion frontend/resources/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"loginButtonText": "Login",
"loginStartWithAnonymous": "Continue with an anonymous session",
"continueAnonymousUser": "Continue with an anonymous session",
"anonymous": "Anonymous",
"continueWithLocalModel": "Continue with local model",
"switchToAppFlowyCloud": "AppFlowy Cloud",
"anonymousMode": "Anonymous mode",
"buttonText": "Sign In",
"signingInText": "Signing in...",
Expand Down
Loading