Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/components/config-components/ConfigSelectionLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ function editConfig(file: ConfigFile) {
}

function openConfig(file: ConfigFile) {
console.log(file.getPath());
LinkProvider.instance.openLink(`file://${file.getPath()}`);
LinkProvider.instance.openPath(file.getPath());
}

</script>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Manager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,11 @@ function setFunkyMode(value: boolean) {
}

function browseDataFolder() {
LinkProvider.instance.openLink('file://' + PathResolver.ROOT);
LinkProvider.instance.openPath(PathResolver.ROOT);
}

function browseProfileFolder() {
LinkProvider.instance.openLink('file://' + profile.value.getProfilePath());
LinkProvider.instance.openPath(profile.value.getProfilePath());
}

function toggleCardExpanded(expanded: boolean) {
Expand Down
2 changes: 2 additions & 0 deletions src/providers/components/LinkProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ export default abstract class LinkProvider {

public abstract selectFile(url: string): void;

public abstract openPath(path: string): void;

}
4 changes: 4 additions & 0 deletions src/r2mm/component_override/LinkImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ export default class LinkImpl extends LinkProvider {
window.electron.selectFile(url);
}

openPath(path: string): void {
window.electron.openPath(path);
}

}
4 changes: 4 additions & 0 deletions test/vitest/stubs/providers/stub.LinkProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ export default class StubLinkProvider extends LinkProvider {
throw new Error("Stub access must be mocked or spied");
}

openPath(path: string): void {
throw new Error("Stub access must be mocked or spied");
}

}
Loading