Skip to content

Commit

Permalink
chore: fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
appflowy committed Jun 14, 2024
1 parent 8e12bc0 commit 8e83470
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/database/application/row/row_service.dart';
import 'package:appflowy/plugins/database/grid/presentation/layout/sizes.dart';
import 'package:appflowy/workspace/presentation/widgets/dialogs.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:easy_localization/easy_localization.dart';
Expand Down Expand Up @@ -52,7 +53,17 @@ class RowActionMenu extends StatelessWidget {
child: FlowyButton(
text: FlowyText.medium(action.text, overflow: TextOverflow.ellipsis),
onTap: () {
action.performAction(context, viewId, rowId);
if (action == RowAction.delete) {
NavigatorOkCancelDialog(
message: LocaleKeys.grid_row_deleteRowPrompt.tr(),
onOkPressed: () {
action.performAction(context, viewId, rowId);
},
).show(context);
} else {
action.performAction(context, viewId, rowId);
}

PopoverContainer.of(context).close();
},
leftIcon: icon,
Expand Down
3 changes: 2 additions & 1 deletion frontend/resources/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,7 @@
"action": "Action",
"add": "Click add to below",
"drag": "Drag to move",
"deleteRowPrompt": "Are you sure you want to delete this row? This action cannot be undone",
"dragAndClick": "Drag to move, click to open menu",
"insertRecordAbove": "Insert record above",
"insertRecordBelow": "Insert record below",
Expand Down Expand Up @@ -1914,4 +1915,4 @@
"enableSpacesForYourWorkspace": "Enable spaces for your workspace",
"title": "Spaces"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- This file should undo anything in `up.sql`
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- Your SQL goes here
CREATE TABLE workspace_members_table (
email TEXT KEY NOT NULL,
role INTEGER NOT NULL,
name TEXT NOT NULL,
avatar_url TEXT,
uid BIGINT NOT NULL,
workspace_id TEXT NOT NULL,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (email, workspace_id)
);
14 changes: 7 additions & 7 deletions frontend/rust-lib/flowy-sqlite/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ diesel::table! {
}

diesel::allow_tables_to_appear_in_same_query!(
chat_message_table,
chat_table,
collab_snapshot,
user_data_migration_records,
user_table,
user_workspace_table,
workspace_members_table,
chat_message_table,
chat_table,
collab_snapshot,
user_data_migration_records,
user_table,
user_workspace_table,
workspace_members_table,
);

0 comments on commit 8e83470

Please sign in to comment.