query history with search

This commit is contained in:
Jan Prochazka
2021-06-03 15:52:46 +02:00
parent f6c8588573
commit 6362e2137b
3 changed files with 28 additions and 4 deletions

View File

@@ -9,6 +9,7 @@
import { onMount } from 'svelte';
import socket from '../utility/socket';
import axiosInstance from '../utility/axiosInstance';
import openNewTab from '../utility/openNewTab';
let filter = '';
let search = '';
@@ -50,7 +51,24 @@
</SearchBoxWrapper>
<WidgetsInnerContainer>
{#each historyItems as item}
<div class="wrapper" title={item.sql}>
<div
class="wrapper"
title={item.sql}
on:click={() => {
openNewTab(
{
title: 'Query #',
icon: 'icon sql-file',
tabComponent: 'QueryTab',
props: {
conid: item.conid,
database: item.database,
},
},
{ editor: item.sql }
);
}}
>
<div class="sql">
<FontIcon icon="icon sql-file" />
{item.sql}