mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-09 08:13:29 +08:00
feat(sidebar): 左侧树增加回到顶部按钮
在连接操作按钮左侧增加回到顶部按钮,
点击后通过虚拟滚动 scrollTo({ index: 0 }) 快速回到树顶,
避免用户在树较长时手动滚轮。
新增 i18n 中/英/日/德/繁中翻译
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import SidebarConnectionRail from './sidebar/SidebarConnectionRail';
|
||||
import SidebarConnectionRail from './sidebar/SidebarConnectionRail';
|
||||
import Modal from './common/ResizableDraggableModal';
|
||||
import TitleBarQuickActions, { type TitleBarQuickAction } from './TitleBarQuickActions';
|
||||
import { type DataSyncEntryMode } from './dataSyncEntryMode';
|
||||
@@ -119,6 +119,7 @@ import { createSidebarResizeAwareFrameScheduler } from '../utils/sidebarResizeLi
|
||||
AimOutlined,
|
||||
MoreOutlined,
|
||||
MenuFoldOutlined,
|
||||
VerticalAlignTopOutlined,
|
||||
RobotOutlined,
|
||||
SafetyCertificateOutlined,
|
||||
SettingOutlined,
|
||||
@@ -3301,6 +3302,7 @@ const Sidebar: React.FC<{
|
||||
const v2ActiveConnectionHeaderLabel = t('sidebar.active_connection.current_host_database');
|
||||
const v2NoDatabaseSelectedLabel = t('sidebar.active_connection.no_database_selected');
|
||||
const v2ConnectionActionsLabel = t('sidebar.active_connection.actions');
|
||||
const v2ScrollToTopLabel = t('sidebar.action.scroll_to_top');
|
||||
const v2ActiveConnectionTooltipContent = (
|
||||
<div className="gn-v2-active-connection-tooltip">
|
||||
<strong>{activeConnectionDisplayName}</strong>
|
||||
@@ -3715,6 +3717,17 @@ const Sidebar: React.FC<{
|
||||
</div>
|
||||
</div>
|
||||
<div className="gn-v2-active-connection-actions">
|
||||
<Tooltip title={v2ScrollToTopLabel} placement="bottom" mouseEnterDelay={0.35}>
|
||||
<Button
|
||||
size="small"
|
||||
type="text"
|
||||
icon={<VerticalAlignTopOutlined />}
|
||||
aria-label={v2ScrollToTopLabel}
|
||||
onClick={() => {
|
||||
treeRef.current?.scrollTo?.({ index: 0, align: 'top' });
|
||||
}}
|
||||
/>
|
||||
</Tooltip>
|
||||
<Tooltip title={v2ConnectionActionsLabel}>
|
||||
<Button
|
||||
size="small"
|
||||
|
||||
@@ -6704,6 +6704,7 @@
|
||||
"query_editor.message.no_format_restore_snapshot": "Es ist kein SQL-Stand vor der Formatierung zum Wiederherstellen verfügbar.",
|
||||
"query_editor.message.no_selectable_sql": "Keine auswählbare SQL-Anweisung.",
|
||||
"query_editor.message.object_info_target_not_found": "Der Cursor befindet sich auf keiner erkannten Tabelle oder Spalte.",
|
||||
"query_editor.message.table_navigation_target_missing": "Tabelle {{table}} ist nicht mehr vorhanden. Die Metadaten des SQL-Editors wurden aktualisiert.",
|
||||
"query_editor.message.page_query_empty": "Die Seitenabfrage hat keine Ergebnismenge zurückgegeben.",
|
||||
"query_editor.message.page_query_failed": "Seitenabfrage fehlgeschlagen: {{error}}",
|
||||
"query_editor.message.read_only_index_metadata_unavailable": "Die Metadaten des eindeutigen Indexes konnten nicht geladen werden, daher können Änderungen nicht sicher gespeichert werden.",
|
||||
@@ -7212,6 +7213,7 @@
|
||||
"sidebar.action.select_all": "Alle auswählen",
|
||||
"sidebar.action.unpin_database": "Datenbankfixierung aufheben",
|
||||
"sidebar.action.unpin_table": "Anheften aufheben",
|
||||
"sidebar.action.scroll_to_top": "Zum Anfang scrollen",
|
||||
"sidebar.active_connection.actions": "Verbindungsaktionen",
|
||||
"sidebar.active_connection.current_host_database": "Aktueller Host und Datenbank",
|
||||
"sidebar.active_connection.no_database_selected": "Datenbank wählen, um Objekte zu browsen",
|
||||
|
||||
@@ -6704,6 +6704,7 @@
|
||||
"query_editor.message.no_format_restore_snapshot": "No pre-format SQL snapshot is available to restore.",
|
||||
"query_editor.message.no_selectable_sql": "No selectable SQL statement.",
|
||||
"query_editor.message.object_info_target_not_found": "The cursor is not on a recognized table or column.",
|
||||
"query_editor.message.table_navigation_target_missing": "Table {{table}} no longer exists. SQL editor metadata has been refreshed.",
|
||||
"query_editor.message.page_query_empty": "The page query returned no result set.",
|
||||
"query_editor.message.page_query_failed": "Page query failed: {{error}}",
|
||||
"query_editor.message.read_only_index_metadata_unavailable": "Unable to load unique index metadata, so changes cannot be committed safely.",
|
||||
@@ -7212,6 +7213,7 @@
|
||||
"sidebar.action.select_all": "Select all",
|
||||
"sidebar.action.unpin_database": "Unpin database",
|
||||
"sidebar.action.unpin_table": "Unpin table",
|
||||
"sidebar.action.scroll_to_top": "Scroll to top",
|
||||
"sidebar.active_connection.actions": "Connection actions",
|
||||
"sidebar.active_connection.current_host_database": "Current host and database",
|
||||
"sidebar.active_connection.no_database_selected": "Select a database to browse objects",
|
||||
|
||||
@@ -6704,6 +6704,7 @@
|
||||
"query_editor.message.no_format_restore_snapshot": "元に戻せる整形前の SQL はありません。",
|
||||
"query_editor.message.no_selectable_sql": "選択できる SQL ステートメントがありません。",
|
||||
"query_editor.message.object_info_target_not_found": "現在のカーソル位置に認識できるテーブルまたはカラムがありません。",
|
||||
"query_editor.message.table_navigation_target_missing": "テーブル {{table}} は存在しません。SQL エディターのメタデータを更新しました。",
|
||||
"query_editor.message.page_query_empty": "ページ取得で結果セットが返されませんでした。",
|
||||
"query_editor.message.page_query_failed": "ページ取得に失敗しました: {{error}}",
|
||||
"query_editor.message.read_only_index_metadata_unavailable": "一意インデックスのメタデータを読み込めないため、安全に変更をコミットできません。",
|
||||
@@ -7212,6 +7213,7 @@
|
||||
"sidebar.action.select_all": "すべて選択",
|
||||
"sidebar.action.unpin_database": "データベースの固定を解除",
|
||||
"sidebar.action.unpin_table": "テーブル固定を解除",
|
||||
"sidebar.action.scroll_to_top": "トップにスクロール",
|
||||
"sidebar.active_connection.actions": "接続操作",
|
||||
"sidebar.active_connection.current_host_database": "現在の Host とデータベース",
|
||||
"sidebar.active_connection.no_database_selected": "データベースを選択してオブジェクトを表示",
|
||||
|
||||
@@ -6704,6 +6704,7 @@
|
||||
"query_editor.message.no_format_restore_snapshot": "没有可还原的美化前 SQL",
|
||||
"query_editor.message.no_selectable_sql": "没有可选择的 SQL 语句。",
|
||||
"query_editor.message.object_info_target_not_found": "当前光标未定位到可识别的表或字段。",
|
||||
"query_editor.message.table_navigation_target_missing": "表 {{table}} 已不存在,已刷新 SQL 编辑器元数据。",
|
||||
"query_editor.message.page_query_empty": "翻页未返回结果集",
|
||||
"query_editor.message.page_query_failed": "翻页失败:{{error}}",
|
||||
"query_editor.message.read_only_index_metadata_unavailable": "无法加载唯一索引元数据,无法安全提交修改。",
|
||||
@@ -7212,6 +7213,7 @@
|
||||
"sidebar.action.select_all": "全选",
|
||||
"sidebar.action.unpin_database": "取消置顶数据库",
|
||||
"sidebar.action.unpin_table": "取消置顶",
|
||||
"sidebar.action.scroll_to_top": "回到顶部",
|
||||
"sidebar.active_connection.actions": "连接操作",
|
||||
"sidebar.active_connection.current_host_database": "当前 Host 与数据库",
|
||||
"sidebar.active_connection.no_database_selected": "选择数据库以浏览对象",
|
||||
|
||||
@@ -6704,6 +6704,7 @@
|
||||
"query_editor.message.no_format_restore_snapshot": "沒有可還原的美化前 SQL",
|
||||
"query_editor.message.no_selectable_sql": "沒有可選取的 SQL 陳述式。",
|
||||
"query_editor.message.object_info_target_not_found": "目前游標未定位到可識別的資料表或欄位。",
|
||||
"query_editor.message.table_navigation_target_missing": "資料表 {{table}} 已不存在,已重新整理 SQL 編輯器中繼資料。",
|
||||
"query_editor.message.page_query_empty": "翻頁未傳回結果集",
|
||||
"query_editor.message.page_query_failed": "翻頁失敗:{{error}}",
|
||||
"query_editor.message.read_only_index_metadata_unavailable": "無法載入唯一索引中繼資料,無法安全提交修改。",
|
||||
@@ -7212,6 +7213,7 @@
|
||||
"sidebar.action.select_all": "全選",
|
||||
"sidebar.action.unpin_database": "取消置頂資料庫",
|
||||
"sidebar.action.unpin_table": "取消置頂",
|
||||
"sidebar.action.scroll_to_top": "回到頂部",
|
||||
"sidebar.active_connection.actions": "連線操作",
|
||||
"sidebar.active_connection.current_host_database": "目前 Host 與資料庫",
|
||||
"sidebar.active_connection.no_database_selected": "選擇資料庫以瀏覽物件",
|
||||
|
||||
Reference in New Issue
Block a user