Skip to content

Commit

Permalink
fix(vuejs): hook execution on route change caused by astilectron list…
Browse files Browse the repository at this point in the history
…ener

* fix: responsive issues with panels
  • Loading branch information
hbollon committed Jul 18, 2021
1 parent ac3550b commit 822554e
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion resources/static/vue-igopher/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ module.exports = {
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-undef': 0,
"@typescript-eslint/no-this-alias": ["off"],
}
},
}
2 changes: 1 addition & 1 deletion resources/static/vue-igopher/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<LateralNav />
<div class="d-flex flex-column" id="content-wrapper">
<div class="d-flex flex-column w-100" id="content-wrapper">
<div id="content">
<NavBar />
<router-view />
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion resources/static/vue-igopher/src/components/Footer.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<footer class="bg-white sticky-footer">
<footer class="bg-white sticky-footer mt-auto">
<div class="container my-auto">
<div class="text-center my-auto copyright">
<span>Copyright © IGopher 2021</span>
Expand Down
6 changes: 3 additions & 3 deletions resources/static/vue-igopher/src/components/LateralNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<ul class="navbar-nav text-light" id="accordionSidebar">
<li class="nav-item"></li>
<li class="nav-item"></li>
<li class="nav-item"><a class="nav-link" href="index.html#/"><i class="fa fa-envelope"></i><span>DM Automation&nbsp;</span></a></li>
<li class="nav-item"><router-link class="nav-link" to="/"><i class="fa fa-envelope"></i><span>DM Automation&nbsp;</span></router-link></li>
<li class="nav-item"></li>
<li class="nav-item"><a class="nav-link" href="index.html#/settings"><i class="fa fa-gears"></i><span>Settings</span></a></li>
<li class="nav-item"><a class="nav-link" href="index.html#/logs"><i class="fa fa-list-alt"></i><span>Logs</span></a></li>
<li class="nav-item"><router-link class="nav-link" to="/settings"><i class="fa fa-gears"></i><span>Settings</span></router-link></li>
<li class="nav-item"><router-link class="nav-link" to="/logs"><i class="fa fa-list-alt"></i><span>Logs</span></router-link></li>
</ul>
<div class="text-center d-none d-md-inline"><button class="btn rounded-circle border-0" id="sidebarToggle" type="button"></button></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/static/vue-igopher/src/components/SettingsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ export default class SettingsPanel extends Vue {
}
</script>

<style>
<style lang="scss">
</style>
</style>
7 changes: 4 additions & 3 deletions resources/static/vue-igopher/src/views/DmAutomation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<script lang="ts">
import { Options, Vue } from "vue-class-component";
import { inject } from 'vue'
import { inject, onActivated } from 'vue'
import DmAutomationPanel from "@/components/DmAutomationPanel.vue";
import * as config from "@/config"
import { Astor } from "@/plugins/astilectron";
Expand All @@ -14,10 +14,11 @@ import { Astor } from "@/plugins/astilectron";
DmAutomationPanel,
},
mounted() {
console.log("dmautomation")
const astor: Astor = inject('astor');
console.log(window.location.href)
config.ready(() => {
document.addEventListener("astilectron-ready", function() {
astor.onIsReady(function() {
config.getIgopherConfig(astor, fillInputs);
const dmBotLaunchBtn = document.querySelector("#dmBotLaunchBtn");
const dmBotLaunchIcon = document.querySelector("#dmBotLaunchIcon");
Expand Down
4 changes: 3 additions & 1 deletion resources/static/vue-igopher/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ import { Astor } from "@/plugins/astilectron";
SettingsPanel,
},
mounted() {
console.log("settings")
const astor: Astor = inject('astor');
config.ready(() => {
document.addEventListener("astilectron-ready", function() {
astor.onIsReady(function() {
console.log("settings")
config.getIgopherConfig(astor, fillInputs);
/// Buttons
Expand Down

0 comments on commit 822554e

Please sign in to comment.