Skip to content

Commit

Permalink
1.0.0 amélioration de l'appstore
Browse files Browse the repository at this point in the history
  • Loading branch information
MeatReed committed Feb 22, 2020
1 parent d22fd9c commit 0fdfb61
Show file tree
Hide file tree
Showing 16 changed files with 346 additions and 39 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
## Previews

![N|Solid](https://i.imgur.com/gASkXUM.png)
![N|Solid](https://i.imgur.com/XHCLkio.png)
![N|Solid](https://i.imgur.com/vwCFIsC.png)
![N|Solid](https://i.imgur.com/EkwsCqM.png)

### Credits

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nsmultitools",
"version": "0.3.0",
"version": "1.0.0",
"description": "Interface graphique sous Windows permettant de facilité la vie aux hackeurs Nintendo Switch :D 🍭",
"main": "./dist/main/index.js",
"scripts": {
Expand Down
27 changes: 27 additions & 0 deletions src/renderer/components/loading.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<v-progress-circular
indeterminate
:value="loadingVal"
v-if="loading"
></v-progress-circular>
</template>

<script>
export default {
data: () => ({
loading: false,
loadingVal: 0
}),
methods: {
start () {
this.loading = true
},
finish () {
this.loading = false
},
increase (num) {
this.loadingVal = num
}
}
}
</script>
38 changes: 36 additions & 2 deletions src/renderer/components/navigationAppstore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@
</div>
</template>
</v-navigation-drawer>
<v-snackbar
v-model="snackbar"
:color="snackbarColor"
:timeout="snackbarTimeout"
top
right
>
{{ snackbarMessage }}
</v-snackbar>
<v-dialog
v-model="dialog"
max-width="550"
Expand Down Expand Up @@ -98,6 +107,8 @@

<script>
import { remote } from 'electron'
import downloadUrl from 'url-download'
import path from 'path'
export default {
async asyncData({ $axios }) {
Expand Down Expand Up @@ -136,6 +147,10 @@ export default {
modalUpdated: "",
modalSource: "",
dialog: false,
snackbar: false,
snackbarColor: "",
snackbarMessage: "",
snackbarTimeout: 6000
}),
computed: {
itemsPackage() {
Expand Down Expand Up @@ -198,8 +213,27 @@ export default {
openLink(link) {
remote.shell.openExternal(link);
},
download(name) {
remote.shell.openExternal(`https://switchbru.com/appstore/zips/${name}.zip`);
async download(name) {
let self = this
var installPath = await remote.dialog.showSaveDialogSync({
title: `Installation ${name}.zip`,
defaultPath: `${name}.zip`
});
var urlParse = path.parse(installPath);
this.snackbarColor = "success"
this.snackbarMessage = `Installation en cours de ${name}.zip`
this.snackbarTimeout = 0
this.snackbar = true
downloadUrl(`https://switchbru.com/appstore/zips/${name}.zip`, urlParse.dir)
.on('close', function () {
self.snackbar = false
self.snackbarColor = "success"
self.snackbarMessage = `${name}.zip a été installé avec succès !`
self.snackbarTimeout = 6000
setTimeout(function(){
self.snackbar = true
}, 1000);
});
},
getIcon: function(name) {
return `https://www.switchbru.com/appstore/packages/${name}/icon.png`
Expand Down
1 change: 0 additions & 1 deletion src/renderer/components/navigationHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
dense
nav
>

<v-list-item
v-for="item in items"
:key="item.title"
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
{ charset: 'utf-8' }
]
},
loading: true,
loading: 'components/loading.vue',
plugins: [
{ssr: true, src: '@/plugins/icons.js'}
],
Expand Down
12 changes: 8 additions & 4 deletions src/renderer/pages/apps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ export default {
to: { name: '/inject' },
online: false
},
{
/*{
name: "SysDVR",
img: require('../assets/sysdvr.png'),
to: { name: '/sysdvr' },
online: false
},
},*/
{
name: "IMSP",
img: require('../assets/imsp.png'),
Expand All @@ -124,12 +124,12 @@ export default {
to: { name: '/sxos' },
online: true
},
{
/*{
name: "Tinfoil",
img: require('../assets/tinfoil.png'),
to: { name: '/tinfoil' },
online: true
}
}*/
]
}),
created() {
Expand All @@ -144,6 +144,10 @@ export default {
methods: {
async installFiles() {
this.dialog = false
if (!fs.existsSync(userData)){
fs.mkdirSync(userData);
}
if (!fs.existsSync(path.join(userData, 'TegraRcmSmash'))) {
fs.mkdirSync(path.join(userData, 'TegraRcmSmash'));
Expand Down
40 changes: 37 additions & 3 deletions src/renderer/pages/appstore/advanced.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@
</v-col>
</v-row>
</v-container>
<v-snackbar
v-model="snackbar"
:color="snackbarColor"
:timeout="snackbarTimeout"
top
right
>
{{ snackbarMessage }}
</v-snackbar>
</v-content>
<v-dialog
v-model="dialog"
Expand Down Expand Up @@ -83,6 +92,8 @@
<script>
import { remote } from 'electron'
import appHeader from '@/components/navigationAppstore'
import downloadUrl from 'url-download'
import path from 'path'
export default {
components: {
Expand Down Expand Up @@ -126,8 +137,27 @@ export default {
this.modalSource = select.url
this.dialog = true
},
download(name) {
remote.shell.openExternal(`https://switchbru.com/appstore/zips/${name}.zip`);
async download(name) {
let self = this
var installPath = await remote.dialog.showSaveDialogSync({
title: `Installation ${name}.zip`,
defaultPath: `${name}.zip`
});
var urlParse = path.parse(installPath);
this.snackbarColor = "success"
this.snackbarMessage = `Installation en cours de ${name}.zip`
this.snackbarTimeout = 0
this.snackbar = true
downloadUrl(`https://switchbru.com/appstore/zips/${name}.zip`, urlParse.dir)
.on('close', function () {
self.snackbar = false
self.snackbarColor = "success"
self.snackbarMessage = `${name}.zip a été installé avec succès !`
self.snackbarTimeout = 6000
setTimeout(function(){
self.snackbar = true
}, 1000);
});
},
getIcon: function(name) {
return `https://www.switchbru.com/appstore/packages/${name}/icon.png`
Expand Down Expand Up @@ -183,7 +213,11 @@ export default {
json_id: "_misc",
icon: "fa-cubes"
}
]
],
snackbar: false,
snackbarColor: "",
snackbarMessage: "",
snackbarTimeout: 6000
})
}
</script>
Expand Down
40 changes: 37 additions & 3 deletions src/renderer/pages/appstore/emulators.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@
</v-row>
</v-container>
</v-content>
<v-snackbar
v-model="snackbar"
:color="snackbarColor"
:timeout="snackbarTimeout"
top
right
>
{{ snackbarMessage }}
</v-snackbar>
<v-dialog
v-model="dialog"
max-width="550"
Expand Down Expand Up @@ -83,6 +92,8 @@
<script>
import { remote } from 'electron'
import appHeader from '@/components/navigationAppstore'
import downloadUrl from 'url-download'
import path from 'path'
export default {
components: {
Expand Down Expand Up @@ -126,8 +137,27 @@ export default {
this.modalSource = select.url
this.dialog = true
},
download(name) {
remote.shell.openExternal(`https://switchbru.com/appstore/zips/${name}.zip`);
async download(name) {
let self = this
var installPath = await remote.dialog.showSaveDialogSync({
title: `Installation ${name}.zip`,
defaultPath: `${name}.zip`
});
var urlParse = path.parse(installPath);
this.snackbarColor = "success"
this.snackbarMessage = `Installation en cours de ${name}.zip`
this.snackbarTimeout = 0
this.snackbar = true
downloadUrl(`https://switchbru.com/appstore/zips/${name}.zip`, urlParse.dir)
.on('close', function () {
self.snackbar = false
self.snackbarColor = "success"
self.snackbarMessage = `${name}.zip a été installé avec succès !`
self.snackbarTimeout = 6000
setTimeout(function(){
self.snackbar = true
}, 1000);
});
},
getIcon: function(name) {
return `https://www.switchbru.com/appstore/packages/${name}/icon.png`
Expand Down Expand Up @@ -183,7 +213,11 @@ export default {
json_id: "_misc",
icon: "fa-cubes"
}
]
],
snackbar: false,
snackbarColor: "",
snackbarMessage: "",
snackbarTimeout: 6000
})
}
</script>
Expand Down
40 changes: 37 additions & 3 deletions src/renderer/pages/appstore/games.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@
</v-row>
</v-container>
</v-content>
<v-snackbar
v-model="snackbar"
:color="snackbarColor"
:timeout="snackbarTimeout"
top
right
>
{{ snackbarMessage }}
</v-snackbar>
<v-dialog
v-model="dialog"
max-width="550"
Expand Down Expand Up @@ -83,6 +92,8 @@
<script>
import { remote } from 'electron'
import appHeader from '@/components/navigationAppstore'
import downloadUrl from 'url-download'
import path from 'path'
export default {
components: {
Expand Down Expand Up @@ -126,8 +137,27 @@ export default {
this.modalSource = select.url
this.dialog = true
},
download(name) {
remote.shell.openExternal(`https://switchbru.com/appstore/zips/${name}.zip`);
async download(name) {
let self = this
var installPath = await remote.dialog.showSaveDialogSync({
title: `Installation ${name}.zip`,
defaultPath: `${name}.zip`
});
var urlParse = path.parse(installPath);
this.snackbarColor = "success"
this.snackbarMessage = `Installation en cours de ${name}.zip`
this.snackbarTimeout = 0
this.snackbar = true
downloadUrl(`https://switchbru.com/appstore/zips/${name}.zip`, urlParse.dir)
.on('close', function () {
self.snackbar = false
self.snackbarColor = "success"
self.snackbarMessage = `${name}.zip a été installé avec succès !`
self.snackbarTimeout = 6000
setTimeout(function(){
self.snackbar = true
}, 1000);
});
},
getIcon: function(name) {
return `https://www.switchbru.com/appstore/packages/${name}/icon.png`
Expand Down Expand Up @@ -183,7 +213,11 @@ export default {
json_id: "_misc",
icon: "fa-cubes"
}
]
],
snackbar: false,
snackbarColor: "",
snackbarMessage: "",
snackbarTimeout: 6000
})
}
</script>
Expand Down
Loading

0 comments on commit 0fdfb61

Please sign in to comment.