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:
@ -71,6 +71,8 @@ class SignInForm extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final isSubmitting = context.read<SignInBloc>().state.isSubmitting;
|
||||||
|
const indicatorMinHeight = 4.0;
|
||||||
return Align(
|
return Align(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: AuthFormContainer(
|
child: AuthFormContainer(
|
||||||
@ -104,13 +106,19 @@ class SignInForm extends StatelessWidget {
|
|||||||
const VSpace(10),
|
const VSpace(10),
|
||||||
const ThirdPartySignInButtons(),
|
const ThirdPartySignInButtons(),
|
||||||
const VSpace(20),
|
const VSpace(20),
|
||||||
|
|
||||||
// loading status
|
// loading status
|
||||||
if (context.read<SignInBloc>().state.isSubmitting) ...[
|
...isSubmitting
|
||||||
const SizedBox(height: 8),
|
? [
|
||||||
const LinearProgressIndicator(value: null),
|
const VSpace(indicatorMinHeight),
|
||||||
const VSpace(20),
|
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
const iconSize = 26.0;
|
const iconSize = 26.0;
|
||||||
|
const textPadding = 4.0;
|
||||||
return MouseRegion(
|
return MouseRegion(
|
||||||
onEnter: (event) => setState(() => onHover = true),
|
onEnter: (event) => setState(() => onHover = true),
|
||||||
onExit: (event) => setState(() => onHover = false),
|
onExit: (event) => setState(() => onHover = false),
|
||||||
@ -99,8 +100,10 @@ class _PersonalFolderHeaderState extends State<PersonalFolderHeader> {
|
|||||||
FlowyTextButton(
|
FlowyTextButton(
|
||||||
LocaleKeys.sideBar_personal.tr(),
|
LocaleKeys.sideBar_personal.tr(),
|
||||||
tooltip: LocaleKeys.sideBar_clickToHidePersonal.tr(),
|
tooltip: LocaleKeys.sideBar_clickToHidePersonal.tr(),
|
||||||
constraints: const BoxConstraints(maxHeight: iconSize),
|
constraints: const BoxConstraints(
|
||||||
padding: const EdgeInsets.all(4),
|
minHeight: iconSize + textPadding * 2,
|
||||||
|
),
|
||||||
|
padding: const EdgeInsets.all(textPadding),
|
||||||
fillColor: Colors.transparent,
|
fillColor: Colors.transparent,
|
||||||
onPressed: widget.onPressed,
|
onPressed: widget.onPressed,
|
||||||
),
|
),
|
||||||
|
@ -30,6 +30,7 @@ class SettingsUserView extends StatelessWidget {
|
|||||||
// Called when the user open a historical user in the setting dialog
|
// Called when the user open a historical user in the setting dialog
|
||||||
final VoidCallback didOpenUser;
|
final VoidCallback didOpenUser;
|
||||||
final UserProfilePB user;
|
final UserProfilePB user;
|
||||||
|
|
||||||
SettingsUserView(
|
SettingsUserView(
|
||||||
this.user, {
|
this.user, {
|
||||||
required this.didLogin,
|
required this.didLogin,
|
||||||
@ -44,7 +45,8 @@ class SettingsUserView extends StatelessWidget {
|
|||||||
create: (context) => getIt<SettingsUserViewBloc>(param1: user)
|
create: (context) => getIt<SettingsUserViewBloc>(param1: user)
|
||||||
..add(const SettingsUserEvent.initial()),
|
..add(const SettingsUserEvent.initial()),
|
||||||
child: BlocBuilder<SettingsUserViewBloc, SettingsUserState>(
|
child: BlocBuilder<SettingsUserViewBloc, SettingsUserState>(
|
||||||
builder: (context, state) => Column(
|
builder: (context, state) => SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
@ -55,12 +57,12 @@ class SettingsUserView extends StatelessWidget {
|
|||||||
_renderCurrentOpenaiKey(context),
|
_renderCurrentOpenaiKey(context),
|
||||||
const VSpace(20),
|
const VSpace(20),
|
||||||
_renderHistoricalUser(context),
|
_renderHistoricalUser(context),
|
||||||
const Spacer(),
|
|
||||||
_renderLoginOrLogoutButton(context, state),
|
_renderLoginOrLogoutButton(context, state),
|
||||||
const VSpace(20),
|
const VSpace(20),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,10 +109,13 @@ class SettingsUserView extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _renderLogoutButton(BuildContext context) {
|
Widget _renderLogoutButton(BuildContext context) {
|
||||||
return FlowyButton(
|
return Tooltip(
|
||||||
useIntrinsicWidth: true,
|
message: LocaleKeys.settings_user_clickToLogout.tr(),
|
||||||
text: FlowyText(
|
child: FlowyButton(
|
||||||
|
margin: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 2.0),
|
||||||
|
text: FlowyText.medium(
|
||||||
LocaleKeys.settings_menu_logout.tr(),
|
LocaleKeys.settings_menu_logout.tr(),
|
||||||
|
fontSize: 13,
|
||||||
),
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
NavigatorAlertDialog(
|
NavigatorAlertDialog(
|
||||||
@ -121,6 +126,7 @@ class SettingsUserView extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
).show(context);
|
).show(context);
|
||||||
},
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,7 +296,8 @@
|
|||||||
"name": "Name",
|
"name": "Name",
|
||||||
"icon": "Icon",
|
"icon": "Icon",
|
||||||
"selectAnIcon": "Select an 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": {
|
"shortcuts": {
|
||||||
"shortcutsLabel": "Shortcuts",
|
"shortcutsLabel": "Shortcuts",
|
||||||
|
@ -21,3 +21,9 @@ Source: "AppFlowy\data\*";DestDir: "{app}\data\"; Flags: recursesubdirs
|
|||||||
[Icons]
|
[Icons]
|
||||||
Name: "{userdesktop}\AppFlowy"; Filename: "{app}\AppFlowy.exe"
|
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"""
|
Reference in New Issue
Block a user