mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 15:16:01 +00:00
cloud content refactor
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if data.conid && $cloudConnectionsStore[data.conid]}
|
||||
{#if data.conid && $cloudConnectionsStore[data.conid] && $cloudConnectionsStore[data.conid]?._id}
|
||||
<ConnectionAppObject
|
||||
{...$$restProps}
|
||||
{passProps}
|
||||
@@ -109,7 +109,7 @@
|
||||
{passProps}
|
||||
data={{
|
||||
file: data.name,
|
||||
folder: data.contentFolder,
|
||||
folder: data.contentAttributes?.contentFolder,
|
||||
folid: data.folid,
|
||||
cntid: data.cntid,
|
||||
}}
|
||||
|
||||
@@ -132,7 +132,7 @@ registerCommand({
|
||||
category: 'New',
|
||||
toolbarOrder: 1,
|
||||
name: 'Connection on Cloud',
|
||||
testEnabled: () => !getCurrentConfig()?.runAsPortal && !getCurrentConfig()?.storageDatabase && isProApp(),
|
||||
testEnabled: () => !getCurrentConfig()?.runAsPortal && !getCurrentConfig()?.storageDatabase,
|
||||
onClick: () => {
|
||||
openNewTab({
|
||||
title: 'New Connection on Cloud',
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
import InputTextModal from '../modals/InputTextModal.svelte';
|
||||
import ConfirmModal from '../modals/ConfirmModal.svelte';
|
||||
import { showSnackbarInfo } from '../utility/snackbar';
|
||||
import { isProApp } from '../utility/proTools';
|
||||
|
||||
let filter = '';
|
||||
let domSqlObjectList = null;
|
||||
@@ -100,7 +101,7 @@
|
||||
|
||||
function createAddMenu() {
|
||||
return [
|
||||
{
|
||||
isProApp() && {
|
||||
text: 'New shared folder',
|
||||
onClick: () => {
|
||||
showModal(InputTextModal, {
|
||||
@@ -114,7 +115,7 @@
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
isProApp() && {
|
||||
text: 'Add existing shared folder',
|
||||
onClick: () => {
|
||||
showModal(InputTextModal, {
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
import FontIcon from '../icons/FontIcon.svelte';
|
||||
import { refreshPublicCloudFiles } from '../utility/api';
|
||||
import _ from 'lodash';
|
||||
import FormStyledButton from '../buttons/FormStyledButton.svelte';
|
||||
import ErrorInfo from '../elements/ErrorInfo.svelte';
|
||||
let filter = '';
|
||||
|
||||
const publicFiles = usePublicCloudFiles();
|
||||
@@ -45,6 +47,26 @@
|
||||
groupFunc={data => data.folder || 'Not defined'}
|
||||
{filter}
|
||||
/>
|
||||
|
||||
{#if !$publicFiles?.length}
|
||||
<ErrorInfo message="No files found for your configuration" />
|
||||
<div class="error-info">
|
||||
<div class="m-1">
|
||||
Only files relevant for your connections, platform and DbGate edition are listed. Please define connections at first.
|
||||
</div>
|
||||
<FormStyledButton value={`Refresh list`} skipWidth on:click={handleRefreshPublic} />
|
||||
</div>
|
||||
{/if}
|
||||
</WidgetsInnerContainer>
|
||||
</WidgetColumnBarItem>
|
||||
</WidgetColumnBar>
|
||||
|
||||
<style>
|
||||
.error-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user