Skip to content

Commit

Permalink
fix: inbox-details-user-security-details-identity link opener in tauri
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Aug 15, 2024
1 parent c32d27e commit 19c46c8
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/components/inbox/InboxDetailsUserSecurityDetailsIdentity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@
base-space

a.u-medium(
:href="identityUrl"
rel="noopener noreferrer"
target="_blank"
@click="onIdentityDomainClick"
)
| {{ identityDomain }}
</template>
Expand All @@ -60,6 +58,9 @@ import { Detail as BadgeDetail } from "@/components/base/BaseBadgeDetails.vue";
// PROJECT: STORES
import Store from "@/store";

// PROJECT: UTILITIES
import UtilitiesRuntime from "@/utilities/runtime";

// CONSTANTS
const QUICKIE_DESCRIPTION_PREFIX =
"Prose checked on the identity server for matches.";
Expand Down Expand Up @@ -140,6 +141,21 @@ export default {
profile(): ReturnType<typeof Store.$profile.getProfile> {
return Store.$profile.getProfile(this.jid);
}
},

methods: {
// --> EVENT LISTENERS <--

async onIdentityDomainClick(): Promise<void> {
try {
await UtilitiesRuntime.requestOpenUrl(this.identityUrl);
} catch (error) {
this.$log.error(
`Failed opening identity server URL: ${this.identityUrl}`,
error
);
}
}
}
};
</script>
Expand Down

0 comments on commit 19c46c8

Please sign in to comment.