mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-12 03:13:50 +02:00
add sentry feedback integration
This commit is contained in:
@@ -34,6 +34,10 @@
|
||||
</div>
|
||||
|
||||
<div class="nav-menu-container-bottom">
|
||||
<el-tooltip v-if="branch === 'Nightly'" :content="'Feedback'" placement="right"
|
||||
><div class="direct-access" id="feedback">
|
||||
<i class="ri-feedback-line"></i></div
|
||||
></el-tooltip>
|
||||
<el-tooltip :content="t('prompt.direct_access_omni.header')" placement="right"
|
||||
><div class="direct-access" @click="directAccessPaste"><i class="ri-compass-3-line"></i></div
|
||||
></el-tooltip>
|
||||
@@ -42,11 +46,14 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { useSearchStore, useUiStore, useVRCXUpdaterStore } from '../stores';
|
||||
|
||||
import * as Sentry from '@sentry/vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const navItems = [
|
||||
@@ -65,11 +72,17 @@
|
||||
];
|
||||
|
||||
const VRCXUpdaterStore = useVRCXUpdaterStore();
|
||||
const { pendingVRCXUpdate, pendingVRCXInstall, updateInProgress, updateProgress } = storeToRefs(VRCXUpdaterStore);
|
||||
const { pendingVRCXUpdate, pendingVRCXInstall, updateInProgress, updateProgress, branch } =
|
||||
storeToRefs(VRCXUpdaterStore);
|
||||
const { showVRCXUpdateDialog, updateProgressText } = VRCXUpdaterStore;
|
||||
const uiStore = useUiStore();
|
||||
const { notifiedMenus } = storeToRefs(uiStore);
|
||||
const { directAccessPaste } = useSearchStore();
|
||||
|
||||
onMounted(() => {
|
||||
const feedback = Sentry.getFeedback();
|
||||
feedback?.attachTo(document.getElementById('feedback'));
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -77,6 +77,14 @@ export async function initSentry(app) {
|
||||
tracingOptions: {
|
||||
trackComponents: true
|
||||
}
|
||||
}),
|
||||
Sentry.feedbackIntegration({
|
||||
showBranding: false,
|
||||
autoInject: false,
|
||||
enableScreenshot: false,
|
||||
buttonLabel: 'Feedback',
|
||||
submitButtonLabel: 'Send Feedback',
|
||||
formTitle: 'Send Feedback'
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user