mirror of
https://github.com/directus/directus.git
synced 2026-02-11 17:05:06 -05:00
Enhance bug reporting from within the app (#16566)
* Fix paths of imports * Process not-found.vue as ts To prevent the following error from 'vue-tsc': error TS6504: File '/Users/pascal/Development/directus/app/src/modules/insights/routes/not-found.vue.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? Note: We could also enable 'allowJS' but since this is the only js file this seems to be a more fitting fix * Drop hljs language definition for GraphQL (now in core) * Enhance bug reporting from within the app * Simplify simplify simplify --------- Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -35,7 +35,7 @@ export default defineComponent({
|
||||
setup() {
|
||||
const { t } = useI18n();
|
||||
|
||||
const { parsedInfo } = useProjectInfo();
|
||||
const { parsedInfo: projectInfo } = useProjectInfo();
|
||||
|
||||
const navItems = [
|
||||
{
|
||||
@@ -76,23 +76,16 @@ export default defineComponent({
|
||||
];
|
||||
|
||||
const externalItems = computed(() => {
|
||||
const bugReportParams = new URLSearchParams({
|
||||
template: 'bug_report.yml',
|
||||
'directus-version': parsedInfo.value?.directus.version ?? '',
|
||||
'node-version': parsedInfo.value?.node.version ?? '',
|
||||
'operating-system': `${parsedInfo.value?.os.type ?? ''} ${parsedInfo.value?.os.version ?? ''}`,
|
||||
});
|
||||
|
||||
return [
|
||||
{
|
||||
icon: 'bug_report',
|
||||
name: t('report_bug'),
|
||||
href: `https://github.com/directus/directus/issues/new?${bugReportParams.toString()}`,
|
||||
href: 'https://github.com/directus/directus/issues/new?template=bug_report.yml',
|
||||
},
|
||||
{
|
||||
icon: 'new_releases',
|
||||
name: t('request_feature'),
|
||||
href: 'https://github.com/directus/directus/discussions/new',
|
||||
href: 'https://github.com/directus/directus/discussions/new?category=feature-requests',
|
||||
},
|
||||
];
|
||||
});
|
||||
|
||||
@@ -19,7 +19,7 @@ type ServerInfo = {
|
||||
};
|
||||
};
|
||||
|
||||
type UsableProjectInfo = {
|
||||
export type UsableProjectInfo = {
|
||||
info: Ref<ServerInfo | undefined>;
|
||||
parsedInfo: ComputedRef<{
|
||||
directus: {
|
||||
|
||||
Reference in New Issue
Block a user