mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
Merge pull request #3140 from LucasXu0/url_protocol_in_windows_installer
This commit is contained in:
commit
e2dd179001
@ -71,6 +71,8 @@ class SignInForm extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isSubmitting = context.read<SignInBloc>().state.isSubmitting;
|
||||
const indicatorMinHeight = 4.0;
|
||||
return Align(
|
||||
alignment: Alignment.center,
|
||||
child: AuthFormContainer(
|
||||
@ -104,13 +106,19 @@ class SignInForm extends StatelessWidget {
|
||||
const VSpace(10),
|
||||
const ThirdPartySignInButtons(),
|
||||
const VSpace(20),
|
||||
|
||||
// loading status
|
||||
if (context.read<SignInBloc>().state.isSubmitting) ...[
|
||||
const SizedBox(height: 8),
|
||||
const LinearProgressIndicator(value: null),
|
||||
const VSpace(20),
|
||||
],
|
||||
...isSubmitting
|
||||
? [
|
||||
const VSpace(indicatorMinHeight),
|
||||
const LinearProgressIndicator(
|
||||
value: null,
|
||||
minHeight: indicatorMinHeight,
|
||||
),
|
||||
]
|
||||
: [
|
||||
const VSpace(indicatorMinHeight * 2.0)
|
||||
], // add the same space when there's no loading status.
|
||||
const VSpace(20)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -90,6 +90,7 @@ class _PersonalFolderHeaderState extends State<PersonalFolderHeader> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const iconSize = 26.0;
|
||||
const textPadding = 4.0;
|
||||
return MouseRegion(
|
||||
onEnter: (event) => setState(() => onHover = true),
|
||||
onExit: (event) => setState(() => onHover = false),
|
||||
@ -99,8 +100,10 @@ class _PersonalFolderHeaderState extends State<PersonalFolderHeader> {
|
||||
FlowyTextButton(
|
||||
LocaleKeys.sideBar_personal.tr(),
|
||||
tooltip: LocaleKeys.sideBar_clickToHidePersonal.tr(),
|
||||
constraints: const BoxConstraints(maxHeight: iconSize),
|
||||
padding: const EdgeInsets.all(4),
|
||||
constraints: const BoxConstraints(
|
||||
minHeight: iconSize + textPadding * 2,
|
||||
),
|
||||
padding: const EdgeInsets.all(textPadding),
|
||||
fillColor: Colors.transparent,
|
||||
onPressed: widget.onPressed,
|
||||
),
|
||||
|
@ -30,6 +30,7 @@ class SettingsUserView extends StatelessWidget {
|
||||
// Called when the user open a historical user in the setting dialog
|
||||
final VoidCallback didOpenUser;
|
||||
final UserProfilePB user;
|
||||
|
||||
SettingsUserView(
|
||||
this.user, {
|
||||
required this.didLogin,
|
||||
@ -44,21 +45,22 @@ class SettingsUserView extends StatelessWidget {
|
||||
create: (context) => getIt<SettingsUserViewBloc>(param1: user)
|
||||
..add(const SettingsUserEvent.initial()),
|
||||
child: BlocBuilder<SettingsUserViewBloc, SettingsUserState>(
|
||||
builder: (context, state) => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
_renderUserNameInput(context),
|
||||
const VSpace(20),
|
||||
_renderCurrentIcon(context),
|
||||
const VSpace(20),
|
||||
_renderCurrentOpenaiKey(context),
|
||||
const VSpace(20),
|
||||
_renderHistoricalUser(context),
|
||||
const Spacer(),
|
||||
_renderLoginOrLogoutButton(context, state),
|
||||
const VSpace(20),
|
||||
],
|
||||
builder: (context, state) => SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
_renderUserNameInput(context),
|
||||
const VSpace(20),
|
||||
_renderCurrentIcon(context),
|
||||
const VSpace(20),
|
||||
_renderCurrentOpenaiKey(context),
|
||||
const VSpace(20),
|
||||
_renderHistoricalUser(context),
|
||||
_renderLoginOrLogoutButton(context, state),
|
||||
const VSpace(20),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
@ -107,20 +109,24 @@ class SettingsUserView extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _renderLogoutButton(BuildContext context) {
|
||||
return FlowyButton(
|
||||
useIntrinsicWidth: true,
|
||||
text: FlowyText(
|
||||
LocaleKeys.settings_menu_logout.tr(),
|
||||
return Tooltip(
|
||||
message: LocaleKeys.settings_user_clickToLogout.tr(),
|
||||
child: FlowyButton(
|
||||
margin: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 2.0),
|
||||
text: FlowyText.medium(
|
||||
LocaleKeys.settings_menu_logout.tr(),
|
||||
fontSize: 13,
|
||||
),
|
||||
onTap: () async {
|
||||
NavigatorAlertDialog(
|
||||
title: LocaleKeys.settings_menu_logoutPrompt.tr(),
|
||||
confirm: () async {
|
||||
await getIt<AuthService>().signOut();
|
||||
didLogout();
|
||||
},
|
||||
).show(context);
|
||||
},
|
||||
),
|
||||
onTap: () async {
|
||||
NavigatorAlertDialog(
|
||||
title: LocaleKeys.settings_menu_logoutPrompt.tr(),
|
||||
confirm: () async {
|
||||
await getIt<AuthService>().signOut();
|
||||
didLogout();
|
||||
},
|
||||
).show(context);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -296,7 +296,8 @@
|
||||
"name": "Name",
|
||||
"icon": "Icon",
|
||||
"selectAnIcon": "Select an icon",
|
||||
"pleaseInputYourOpenAIKey": "please input your OpenAI key"
|
||||
"pleaseInputYourOpenAIKey": "please input your OpenAI key",
|
||||
"clickToLogout": "Click to logout the current user"
|
||||
},
|
||||
"shortcuts": {
|
||||
"shortcutsLabel": "Shortcuts",
|
||||
|
@ -20,4 +20,10 @@ Source: "AppFlowy\data\*";DestDir: "{app}\data\"; Flags: recursesubdirs
|
||||
|
||||
[Icons]
|
||||
Name: "{userdesktop}\AppFlowy"; Filename: "{app}\AppFlowy.exe"
|
||||
Name: "{group}\AppFlowy"; Filename: "{app}\AppFlowy.exe"
|
||||
Name: "{group}\AppFlowy"; Filename: "{app}\AppFlowy.exe"
|
||||
|
||||
[Registry]
|
||||
Root: HKCR; Subkey: "AppFlowy"; ValueType: "string"; ValueData: "URL:Custom Protocol"; Flags: uninsdeletekey
|
||||
Root: HKCR; Subkey: "AppFlowy"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
|
||||
Root: HKCR; Subkey: "AppFlowy\DefaultIcon"; ValueType: "string"; ValueData: "{app}\AppFlowy.exe,0"
|
||||
Root: HKCR; Subkey: "AppFlowy\shell\open\command"; ValueType: "string"; ValueData: """{app}\AppFlowy.exe"" ""%1"""
|
Loading…
Reference in New Issue
Block a user