Skip to content

Commit

Permalink
EIM-94 added possibility to return to the main page of the installer
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Gadorek authored and Hahihula committed Jan 30, 2025
1 parent 6d73d7a commit 9cc5405
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/src/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ Where can I find help with ESP-IDF installation and setup?
1. [ESP32 forum](https://esp32.com/)
2. [GUI installer](https://github.com/espressif/idf-im-ui)
3. [Command-line installer](https://github.com/espressif/idf-im-cl)

Can I return to the main page of the installer?

Yes, you can return to the main page of the installer by clicking on the Espressif logo in the top-left corner of the screen. However, you cannot return if you are in the finishing steps of the installation.
29 changes: 27 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="installer">
<!-- Header -->
<header class="header">
<img src="./assets/Espressif_White_Logo_EN_Horizontal.svg" alt="ESP-IDF Logo" />
<img @click="goHome" class="main_logo" src="./assets/Espressif_White_Logo_EN_Horizontal.svg" alt="ESP-IDF Logo" />
<h2>ESP-IDF Installation Manager</h2>
</header>
<router-view></router-view>
Expand All @@ -25,6 +25,7 @@ import { ref, onMounted } from 'vue'
import { attachConsole } from '@tauri-apps/plugin-log'
import { getVersion } from '@tauri-apps/api/app'
import LogLink from './components/LogLink.vue'
import { useWizardStore } from './store'
export default {
name: 'App',
Expand All @@ -35,6 +36,24 @@ export default {
NLayoutContent,
LogLink
},
methods: {
goHome() {
let step = this.currentStep;
if (step < 7) {
this.$router.push('/')
} else {
console.log('Can not go back to home page')
}
}
},
computed: {
store() {
return useWizardStore()
},
currentStep() {
return this.store.currentStep
},
},
setup() {
const osTheme = useOsTheme()
const theme = null // If you want to use computed: const theme = computed(() => (osTheme.value === 'dark' ? darkTheme : null))
Expand All @@ -52,4 +71,10 @@ export default {
}
}
}
</script>
</script>

<style scoped>
.main_logo {
cursor: pointer;
}
</style>

0 comments on commit 9cc5405

Please sign in to comment.