Skip to content

Commit 4e3d085

Browse files
committed
Merge branch 'main' into fix/launch_review
2 parents 8a61b04 + e028e45 commit 4e3d085

File tree

8 files changed

+90
-34
lines changed

8 files changed

+90
-34
lines changed

frontend/appflowy_flutter/lib/mobile/presentation/base/mobile_view_page.dart

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -370,15 +370,45 @@ class _MobileViewPageState extends State<MobileViewPage> {
370370
},
371371
builder: (context, state) {
372372
if (state.isLocked) {
373-
return FlowySvg(
374-
FlowySvgs.lock_page_s,
375-
color: const Color(0xFFD95A0B),
373+
return GestureDetector(
374+
behavior: HitTestBehavior.opaque,
375+
onTap: () {
376+
context.read<ViewLockStatusBloc>().add(
377+
const ViewLockStatusEvent.unlock(),
378+
);
379+
},
380+
child: Padding(
381+
padding: const EdgeInsets.only(
382+
top: 4.0,
383+
right: 8,
384+
bottom: 4.0,
385+
),
386+
child: FlowySvg(
387+
FlowySvgs.lock_page_s,
388+
color: const Color(0xFFD95A0B),
389+
),
390+
),
376391
);
377392
} else if (!state.isLocked && state.lockCounter > 0) {
378-
return FlowySvg(
379-
FlowySvgs.unlock_page_s,
380-
color: Color(0xFF8F959E),
381-
blendMode: null,
393+
return GestureDetector(
394+
behavior: HitTestBehavior.opaque,
395+
onTap: () {
396+
context.read<ViewLockStatusBloc>().add(
397+
const ViewLockStatusEvent.lock(),
398+
);
399+
},
400+
child: Padding(
401+
padding: const EdgeInsets.only(
402+
top: 4.0,
403+
right: 8,
404+
bottom: 4.0,
405+
),
406+
child: FlowySvg(
407+
FlowySvgs.unlock_page_s,
408+
color: Color(0xFF8F959E),
409+
blendMode: null,
410+
),
411+
),
382412
);
383413
}
384414
return const SizedBox.shrink();

frontend/appflowy_flutter/lib/mobile/presentation/bottom_sheet/bottom_sheet_view_page.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ class MobileViewBottomSheetBody extends StatelessWidget {
182182
),
183183
_divider(),
184184
..._buildPublishActions(context),
185+
_divider(),
185186
MobileQuickActionButton(
186187
text: LocaleKeys.button_delete.tr(),
187188
textColor: Theme.of(context).colorScheme.error,
@@ -275,7 +276,7 @@ class _LockPageRightIconBuilder extends StatelessWidget {
275276
onAction(
276277
MobileViewBottomSheetBodyAction.lockPage,
277278
arguments: {
278-
MobileViewBottomSheetBodyActionArguments.isLockedKey: !value,
279+
MobileViewBottomSheetBodyActionArguments.isLockedKey: value,
279280
},
280281
);
281282
},

frontend/appflowy_flutter/lib/plugins/document/document_page.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ class _DocumentPageState extends State<DocumentPage>
165165
context: context,
166166
width: width,
167167
padding: EditorStyleCustomizer.documentPadding,
168+
editorState: editorState,
168169
),
169170
header: buildCoverAndIcon(context, state),
170171
initialSelection: initialSelection,
@@ -183,6 +184,7 @@ class _DocumentPageState extends State<DocumentPage>
183184
context: context,
184185
width: width,
185186
padding: EditorStyleCustomizer.documentPadding,
187+
editorState: editorState,
186188
),
187189
header: buildCoverAndIcon(context, state),
188190
initialSelection: initialSelection,

frontend/appflowy_flutter/lib/plugins/document/presentation/editor_configuration.dart

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -203,24 +203,33 @@ void _customBlockOptionActions(
203203
} else {
204204
top += 2.0;
205205
}
206-
return Padding(
207-
padding: EdgeInsets.only(top: top),
208-
child: BlockActionList(
209-
blockComponentContext: context,
210-
blockComponentState: state,
211-
editorState: editorState,
212-
blockComponentBuilder: builders,
213-
actions: actions,
214-
showSlashMenu: slashMenuItemsBuilder != null
215-
? () => customAppFlowySlashCommand(
216-
itemsBuilder: slashMenuItemsBuilder,
217-
shouldInsertSlash: false,
218-
deleteKeywordsByDefault: true,
219-
style: styleCustomizer.selectionMenuStyleBuilder(),
220-
supportSlashMenuNodeTypes: supportSlashMenuNodeTypes,
221-
).handler.call(editorState)
222-
: () {},
223-
),
206+
return ValueListenableBuilder(
207+
valueListenable: editorState.editableNotifier,
208+
builder: (_, editable, child) {
209+
return Opacity(
210+
opacity: editable ? 1.0 : 0.0,
211+
child: Padding(
212+
padding: EdgeInsets.only(top: top),
213+
child: BlockActionList(
214+
blockComponentContext: context,
215+
blockComponentState: state,
216+
editorState: editorState,
217+
blockComponentBuilder: builders,
218+
actions: actions,
219+
showSlashMenu: slashMenuItemsBuilder != null
220+
? () => customAppFlowySlashCommand(
221+
itemsBuilder: slashMenuItemsBuilder,
222+
shouldInsertSlash: false,
223+
deleteKeywordsByDefault: true,
224+
style: styleCustomizer.selectionMenuStyleBuilder(),
225+
supportSlashMenuNodeTypes:
226+
supportSlashMenuNodeTypes,
227+
).handler.call(editorState)
228+
: () {},
229+
),
230+
),
231+
);
232+
},
224233
);
225234
};
226235
}

frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/database/database_view_block_component.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ class _DatabaseBlockComponentWidgetState
9595
);
9696
}
9797

98+
if (!editorState.editable) {
99+
child = IgnorePointer(
100+
child: child,
101+
);
102+
}
103+
98104
return child;
99105
}
100106
}

frontend/appflowy_flutter/lib/plugins/document/presentation/editor_style.dart

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ class EditorStyleCustomizer {
3232
required this.context,
3333
required this.padding,
3434
this.width,
35+
this.editorState,
3536
});
3637

3738
final BuildContext context;
3839
final EdgeInsets padding;
3940
final double? width;
41+
final EditorState? editorState;
4042

4143
static const double maxDocumentWidth = 480 * 4;
4244
static const double minDocumentWidth = 480;
@@ -76,11 +78,15 @@ class EditorStyleCustomizer {
7678
fontFamily = appearanceFont;
7779
}
7880

81+
final cursorColor = (editorState?.editable ?? true)
82+
? (appearance.cursorColor ??
83+
DefaultAppearanceSettings.getDefaultCursorColor(context))
84+
: Colors.transparent;
85+
7986
return EditorStyle.desktop(
8087
padding: padding,
8188
maxWidth: width,
82-
cursorColor: appearance.cursorColor ??
83-
DefaultAppearanceSettings.getDefaultCursorColor(context),
89+
cursorColor: cursorColor,
8490
selectionColor: appearance.selectionColor ??
8591
DefaultAppearanceSettings.getDefaultSelectionColor(context),
8692
defaultTextDirection: appearance.defaultTextDirection,

frontend/appflowy_flutter/lib/shared/version_checker/version_checker.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class VersionChecker {
2323

2424
if (UniversalPlatform.isWindows || UniversalPlatform.isMacOS) {
2525
autoUpdater.setFeedURL(url);
26+
// disable the auto update check
27+
autoUpdater.setScheduledCheckInterval(0);
2628
}
2729
}
2830

frontend/resources/translations/en.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@
556556
}
557557
},
558558
"accountPage": {
559-
"menuLabel": "My account",
559+
"menuLabel": "Account & App",
560560
"title": "My account",
561561
"general": {
562562
"title": "Account name & profile image",
@@ -2011,8 +2011,8 @@
20112011
"searchForAnImage": "Search for an image",
20122012
"pleaseInputYourOpenAIKey": "please input your AI key in Settings page",
20132013
"saveImageToGallery": "Save image",
2014-
"failedToAddImageToGallery": "Failed to add image to gallery",
2015-
"successToAddImageToGallery": "Image added to gallery successfully",
2014+
"failedToAddImageToGallery": "Failed to save image",
2015+
"successToAddImageToGallery": "Saved image to Photos",
20162016
"unableToLoadImage": "Unable to load image",
20172017
"maximumImageSize": "Maximum supported upload image size is 10MB",
20182018
"uploadImageErrorImageSizeTooBig": "Image size must be less than 10MB",
@@ -3100,13 +3100,13 @@
31003100
"autoUpdate": {
31013101
"criticalUpdateTitle": "Update required to continue",
31023102
"criticalUpdateDescription": "We've made improvements to enhance your experience! Please update from {currentVersion} to {newVersion} to keep using the app.",
3103-
"criticalUpdateButton": "Update now",
3103+
"criticalUpdateButton": "Update",
31043104
"bannerUpdateTitle": "New Version Available!",
3105-
"bannerUpdateDescription": "Get the latest features and bug fixes. Click \"Update\" to install now",
3105+
"bannerUpdateDescription": "Get the latest features and fixes. Click \"Update\" to install now",
31063106
"bannerUpdateButton": "Update",
31073107
"settingsUpdateTitle": "New Version ({newVersion}) Available!",
31083108
"settingsUpdateDescription": "Current version: {currentVersion} (Official build) → {newVersion}",
3109-
"settingsUpdateButton": "Update now",
3109+
"settingsUpdateButton": "Update",
31103110
"settingsUpdateWhatsNew": "What's new"
31113111
},
31123112
"lockPage": {

0 commit comments

Comments
 (0)