dbgate-api-premium 6.8.2 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/src/controllers/databaseConnections.js +20 -0
- package/src/controllers/files.js +30 -2
- package/src/controllers/storage.js +100 -1
- package/src/controllers/storageDb.js +338 -28
- package/src/controllers/teamFiles.js +172 -19
- package/src/currentVersion.js +2 -2
- package/src/index.js +1 -0
- package/src/proc/databaseConnectionProcess.js +102 -0
- package/src/storageModel.js +215 -0
- package/src/utility/getDiagramExport.js +13 -5
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
const getDiagramExport = (html, css, themeType,
|
|
1
|
+
const getDiagramExport = (html, css, themeType, themeVariables, watermark) => {
|
|
2
2
|
const watermarkHtml = watermark
|
|
3
3
|
? `
|
|
4
|
-
<div style="position: fixed; bottom: 0; right: 0; padding: 5px; font-size: 12px; color: var(--theme-font-
|
|
4
|
+
<div style="position: fixed; bottom: 0; right: 0; padding: 5px; font-size: 12px; color: var(--theme-generic-font-grayed); background-color: var(--theme-datagrid-background); border-top-left-radius: 5px; border: var(--theme-card-border);">
|
|
5
5
|
${watermark}
|
|
6
6
|
</div>
|
|
7
7
|
`
|
|
8
8
|
: '';
|
|
9
|
+
|
|
10
|
+
// Convert theme variables object to CSS custom properties
|
|
11
|
+
const themeVariablesCSS = themeVariables
|
|
12
|
+
? `:root {\n${Object.entries(themeVariables).map(([key, value]) => ` ${key}: ${value};`).join('\n')}\n}`
|
|
13
|
+
: '';
|
|
14
|
+
|
|
9
15
|
return `<html>
|
|
10
16
|
<meta charset='utf-8'>
|
|
11
17
|
|
|
12
18
|
<head>
|
|
13
19
|
<style>
|
|
20
|
+
${themeVariablesCSS}
|
|
21
|
+
|
|
14
22
|
${css}
|
|
15
23
|
|
|
16
24
|
body {
|
|
17
|
-
background: var(--theme-
|
|
18
|
-
color: var(--theme-font
|
|
25
|
+
background: var(--theme-datagrid-background);
|
|
26
|
+
color: var(--theme-generic-font);
|
|
19
27
|
}
|
|
20
28
|
</style>
|
|
21
29
|
|
|
@@ -55,7 +63,7 @@ const getDiagramExport = (html, css, themeType, themeClassName, watermark) => {
|
|
|
55
63
|
</script>
|
|
56
64
|
</head>
|
|
57
65
|
|
|
58
|
-
<body class='${themeType == 'dark' ? 'theme-type-dark' : 'theme-type-light'}
|
|
66
|
+
<body class='${themeType == 'dark' ? 'theme-type-dark' : 'theme-type-light'}' style='user-select:none; cursor:pointer'>
|
|
59
67
|
${html}
|
|
60
68
|
${watermarkHtml}
|
|
61
69
|
</body>
|