diff --git a/app/src/electron.js b/app/src/electron.js
index 7387652b..23f1992c 100644
--- a/app/src/electron.js
+++ b/app/src/electron.js
@@ -120,6 +120,7 @@ function buildMenu() {
require('electron').shell.openExternal('https://github.com/dbgate/dbgate/issues/new');
},
},
+ commandItem('tabs.changelog'),
commandItem('about.show'),
],
},
diff --git a/packages/api/src/controllers/config.js b/packages/api/src/controllers/config.js
index f813912b..b86f6746 100644
--- a/packages/api/src/controllers/config.js
+++ b/packages/api/src/controllers/config.js
@@ -1,5 +1,6 @@
const fs = require('fs-extra');
const path = require('path');
+const axios = require('axios');
const { datadir } = require('../utility/directories');
const hasPermission = require('../utility/hasPermission');
const socket = require('../utility/socket');
@@ -58,4 +59,10 @@ module.exports = {
return false;
}
},
+
+ changelog_meta: 'get',
+ async changelog() {
+ const resp = await axios.default.get('https://raw.githubusercontent.com/dbgate/dbgate/master/CHANGELOG.md');
+ return resp.data;
+ },
};
diff --git a/packages/web/src/commands/stdCommands.ts b/packages/web/src/commands/stdCommands.ts
index 963f5183..a55a2b2e 100644
--- a/packages/web/src/commands/stdCommands.ts
+++ b/packages/web/src/commands/stdCommands.ts
@@ -266,6 +266,20 @@ registerCommand({
},
});
+registerCommand({
+ id: 'tabs.changelog',
+ category: 'Tabs',
+ name: 'Changelog',
+ onClick: () => {
+ openNewTab({
+ title: 'ChangeLog',
+ icon: 'img markdown',
+ tabComponent: 'ChangelogTab',
+ props: {},
+ });
+ },
+});
+
registerCommand({
id: 'group.save',
category: null,
diff --git a/packages/web/src/tabs/ChangelogTab.svelte b/packages/web/src/tabs/ChangelogTab.svelte
new file mode 100644
index 00000000..575cff2c
--- /dev/null
+++ b/packages/web/src/tabs/ChangelogTab.svelte
@@ -0,0 +1,41 @@
+
+
+
+
+{#if isLoading}
+