Skip to content

Commit

Permalink
fix: opener algo
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanSalt committed Nov 21, 2024
1 parent b205435 commit dd93032
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions addons/camera/src/renderer/RecorderAnchor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ async function share() {
.recorder-anchor {
&.active {
color: rgb(var(--system-red));
opacity: 1;
}
}
.recorder-icon {
Expand Down
1 change: 1 addition & 0 deletions addons/proxy/src/renderer/ProxyAnchor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function configure(event: MouseEvent) {
align-items: center;
&.active {
color: var(--design-highlight-color);
opacity: 1;
&.system {
color: rgb(var(--system-purple));
}
Expand Down
5 changes: 3 additions & 2 deletions src/renderer/compositions/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ export async function confirmClosing() {
}

function getFileOpener(file: string) {
const ext = path.extname(file).toLowerCase()
const openers = commas.proxy.context.getCollection('terminal.file-opener')
return openers.find(item => item.extensions.includes(ext))
return openers.find(item => item.extensions.some(ext => {
return ext.startsWith('.') ? file.endsWith(ext) : file === ext
}))
}

/**
Expand Down

0 comments on commit dd93032

Please sign in to comment.