mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-07-19 14:14:05 +00:00
Application settings
This commit is contained in:
@ -8,15 +8,16 @@
|
||||
import FindViewConfigModal from './find-viewconfig.svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import Grid from '../../../components/grid.svelte';
|
||||
import { applicationSettings } from '../../../stores';
|
||||
|
||||
export let collection;
|
||||
|
||||
const defaults = {
|
||||
query: '{}',
|
||||
sort: '{ "_id": 1 }',
|
||||
sort: $applicationSettings.defaultSort || '{ "_id": 1 }',
|
||||
fields: '{}',
|
||||
skip: 0,
|
||||
limit: 15,
|
||||
limit: $applicationSettings.defaultLimit || 15,
|
||||
};
|
||||
|
||||
let form = { ...defaults };
|
||||
@ -72,7 +73,9 @@
|
||||
|
||||
async function refresh() {
|
||||
await getViewConfig();
|
||||
await submitQuery();
|
||||
if ($applicationSettings.autosubmitQuery) {
|
||||
await submitQuery();
|
||||
}
|
||||
}
|
||||
|
||||
function prev() {
|
||||
|
@ -1,7 +1,6 @@
|
||||
<script>
|
||||
import { onMount, tick } from 'svelte';
|
||||
import { Hosts } from '../../../wailsjs/go/app/App';
|
||||
import { Environment } from '../../../wailsjs/runtime';
|
||||
import { input } from '../../actions';
|
||||
import Modal from '../../components/modal.svelte';
|
||||
import DatabaseList from './dblist.svelte';
|
||||
@ -13,7 +12,6 @@
|
||||
export let activeDbKey = '';
|
||||
export let activeCollKey = '';
|
||||
|
||||
let environment;
|
||||
let addressBarModalOpen = true;
|
||||
let dbList;
|
||||
|
||||
@ -43,7 +41,6 @@
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
Environment().then(e => environment = e);
|
||||
Hosts().then(h => hosts = h);
|
||||
});
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user