Skip to content

Commit

Permalink
feat: add button to open Skyrim and US directories
Browse files Browse the repository at this point in the history
  • Loading branch information
MattLish committed Sep 12, 2021
1 parent b5dcf94 commit 607ba4b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/AppFileSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,21 @@
>
Browse
</BaseButton>
<BaseButton
type="default"
@click="openDirectory"
class="c-file-input__browse"
>
Open
</BaseButton>
</div>
</div>
</template>

<script lang="ts">
import { Options as Component, Vue } from "vue-class-component";
import BaseButton from "@/components/BaseButton.vue";
import { ipcRenderer } from "electron";
import { ipcRenderer, shell } from "electron";
import { IPCEvents } from "@/enums/IPCEvents";
import BaseInput from "@/components/BaseInput.vue";
import { Prop, Watch } from "vue-property-decorator";
Expand Down Expand Up @@ -63,6 +70,10 @@ export default class AppFileSelect extends Vue {
}
}
async openDirectory() {
await shell.openPath(this.filepath);
}
@Watch("initialFilepath")
private setNewFilepath(filepath: string) {
this.filepath = filepath;
Expand Down

0 comments on commit 607ba4b

Please sign in to comment.