mirror of
https://github.com/EvolutionAPI/evolution-manager.git
synced 2025-07-13 07:04:50 -06:00
version 0.4.0 prepare to evolution-api
This commit is contained in:
parent
6191c8b3f2
commit
f77436c5ce
@ -8,8 +8,6 @@ module.exports = async (argv) => {
|
||||
const isEvolutionInstalled = verifyEvolutionInstallation();
|
||||
if (!isEvolutionInstalled) return;
|
||||
|
||||
|
||||
|
||||
console.log(`🔃 Reverting to Evolution-Api v${v}...`);
|
||||
await revertToVersion(v);
|
||||
console.log(`🔃 Reverted to Evolution-Api v${v} successfully`);
|
||||
|
7
lib/postinstall.js
Normal file
7
lib/postinstall.js
Normal file
@ -0,0 +1,7 @@
|
||||
const build = require('./utils/build');
|
||||
|
||||
async function main() {
|
||||
await build({ VITE_BASE_URL: '/manager/' });
|
||||
}
|
||||
|
||||
main();
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "evolution-manager",
|
||||
"description": "Evolution Manager is an open-source interface for managing the Evolution API, simplifying the creation and administration of API instances with advanced features and diverse integrations.",
|
||||
"version": "0.3.12",
|
||||
"version": "0.4.0",
|
||||
"main": "dist",
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
@ -10,7 +10,8 @@
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"lint": "eslint . --fix --ignore-path .gitignore"
|
||||
"lint": "eslint . --fix --ignore-path .gitignore",
|
||||
"prepare": "node ./lib/postinstall.js"
|
||||
},
|
||||
"directories": {
|
||||
"bin": "./bin"
|
||||
|
@ -141,6 +141,8 @@
|
||||
import { useAppStore } from "@/store/app";
|
||||
import AboutModal from "./About.vue";
|
||||
import ShareConnection from "./ShareConnection.vue";
|
||||
const BASE_URL = import.meta.env.BASE_URL;
|
||||
|
||||
export default {
|
||||
components: { AboutModal, ShareConnection },
|
||||
name: "SettingsModal",
|
||||
@ -149,7 +151,7 @@ export default {
|
||||
valid: false,
|
||||
revelPassword: false,
|
||||
connection: {
|
||||
host: "",
|
||||
host: BASE_URL ? window.location.origin : "",
|
||||
globalApiKey: "",
|
||||
},
|
||||
loading: false,
|
||||
@ -161,7 +163,6 @@ export default {
|
||||
share() {
|
||||
const connection = Object.assign({}, this.AppStore.connection);
|
||||
this.$refs.share.open(connection);
|
||||
|
||||
},
|
||||
logout() {
|
||||
this.AppStore.logout();
|
||||
@ -192,6 +193,8 @@ export default {
|
||||
open() {
|
||||
this.dialog = true;
|
||||
this.connection = Object.assign({}, this.AppStore.connection);
|
||||
if (!this.connection.host && BASE_URL.startsWith("/manager"))
|
||||
this.connection.host = window.location.origin;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
@ -77,9 +77,14 @@ export default {
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
const urlConnection = await this.loadConnectionFromUrl();
|
||||
if (!urlConnection) await this.AppStore.loadConnection();
|
||||
if (!this.AppStore.validConnection) this.openSettings();
|
||||
try {
|
||||
const urlConnection = await this.loadConnectionFromUrl();
|
||||
if (!urlConnection) await this.AppStore.loadConnection();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
if (!this.AppStore.validConnection) this.openSettings();
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user