mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-03-28 17:42:40 +01:00
#768 - Update data view link
This commit is contained in:
@@ -10,3 +10,16 @@ export const SENTRY_LINK =
|
||||
'https://1ac45704bbe74264a7b4674bdc2abf48@o1022172.ingest.sentry.io/5988293';
|
||||
|
||||
export const DOCS_SUBMODULES = 'https://frontmatter.codes/docs/git-integration#git-submodules';
|
||||
|
||||
export const WEBSITE_LINKS = {
|
||||
root: 'https://frontmatter.codes',
|
||||
api: {
|
||||
metrics: 'https://frontmatter.codes/api/metrics',
|
||||
ai: 'https://frontmatter.codes/api/ai'
|
||||
},
|
||||
docs: {
|
||||
dataDashboard: 'https://frontmatter.codes/docs/dashboard/datafiles-view',
|
||||
snippets: `https://frontmatter.codes/docs/snippets`,
|
||||
snippetsPlaceholders: `https://frontmatter.codes/docs/snippets#placeholders`
|
||||
}
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ import { Container } from './SortableContainer';
|
||||
import { SortableItem } from './SortableItem';
|
||||
import { ChevronRightIcon, CircleStackIcon } from '@heroicons/react/24/outline';
|
||||
import { DataType } from '../../../models/DataType';
|
||||
import { TelemetryEvent } from '../../../constants';
|
||||
import { TelemetryEvent, WEBSITE_LINKS } from '../../../constants';
|
||||
import { NavigationItem } from '../Layout';
|
||||
import * as l10n from '@vscode/l10n';
|
||||
import { LocalizationKey } from '../../../localization';
|
||||
@@ -265,7 +265,7 @@ export const DataView: React.FunctionComponent<IDataViewProps> = (
|
||||
<p className="text-xl mt-4">
|
||||
<a
|
||||
className={`text-[var(--frontmatter-link)] hover:text-[var(--frontmatter-link-hover)]`}
|
||||
href={`https://frontmatter.codes/docs/dashboard#data-files-view`}
|
||||
href={WEBSITE_LINKS.docs.dataDashboard}
|
||||
title={l10n.t(LocalizationKey.dashboardDataViewDataViewGetStartedLink)}
|
||||
>
|
||||
{l10n.t(LocalizationKey.dashboardDataViewDataViewGetStartedLink)}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Messenger } from '@estruyf/vscode/dist/client';
|
||||
import * as React from 'react';
|
||||
import { GeneralCommands } from '../../../constants';
|
||||
import { GeneralCommands, WEBSITE_LINKS } from '../../../constants';
|
||||
import { SnippetInput } from './SnippetInput';
|
||||
import * as l10n from '@vscode/l10n';
|
||||
import { LocalizationKey } from '../../../localization';
|
||||
@@ -30,7 +30,7 @@ export const NewForm: React.FunctionComponent<INewFormProps> = ({
|
||||
const openLink = () => {
|
||||
Messenger.send(
|
||||
GeneralCommands.toVSCode.openLink,
|
||||
'https://frontmatter.codes/docs/snippets#placeholders'
|
||||
WEBSITE_LINKS.docs.snippetsPlaceholders
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as React from 'react';
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { FeatureFlag } from '../../../components/features/FeatureFlag';
|
||||
import { FEATURE_FLAG } from '../../../constants';
|
||||
import { FEATURE_FLAG, WEBSITE_LINKS } from '../../../constants';
|
||||
import { TelemetryEvent } from '../../../constants/TelemetryEvent';
|
||||
import { SnippetParser } from '../../../helpers/SnippetParser';
|
||||
import { DashboardMessage } from '../../DashboardMessage';
|
||||
@@ -146,7 +146,7 @@ export const Snippets: React.FunctionComponent<ISnippetsProps> = (
|
||||
<p className="text-xl mt-4">
|
||||
<a
|
||||
className={`text-[var(--frontmatter-link)] hover:text-[var(--frontmatter-link-hover)]`}
|
||||
href={`https://frontmatter.codes/docs/snippets`}
|
||||
href={WEBSITE_LINKS.docs.snippets}
|
||||
title={l10n.t(LocalizationKey.dashboardSnippetsViewSnippetsReadMore)}
|
||||
>
|
||||
{l10n.t(LocalizationKey.dashboardSnippetsViewSnippetsReadMore)}
|
||||
|
||||
@@ -12,6 +12,7 @@ import { Chatbot } from './components/Chatbot/Chatbot';
|
||||
import { updateCssVariables } from './utils';
|
||||
import { I10nProvider } from './providers/I10nProvider';
|
||||
import { SentryInit } from '../utils/sentryInit';
|
||||
import { WEBSITE_LINKS } from '../constants';
|
||||
|
||||
declare const acquireVsCodeApi: <T = unknown>() => {
|
||||
getState: () => T;
|
||||
@@ -91,7 +92,7 @@ if (elm) {
|
||||
render(
|
||||
<I10nProvider>
|
||||
<SettingsProvider
|
||||
aiUrl='https://frontmatter.codes'
|
||||
aiUrl={WEBSITE_LINKS.root}
|
||||
experimental={experimental === 'true'}
|
||||
version={version || ""}>
|
||||
<Chatbot />
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { workspace } from 'vscode';
|
||||
import { Extension, Settings } from '.';
|
||||
import { EXTENSION_BETA_ID, EXTENSION_ID, SETTING_TELEMETRY_DISABLE } from '../constants';
|
||||
|
||||
const METRICS_URL = 'https://frontmatter.codes/api/metrics';
|
||||
import {
|
||||
EXTENSION_BETA_ID,
|
||||
EXTENSION_ID,
|
||||
SETTING_TELEMETRY_DISABLE,
|
||||
WEBSITE_LINKS
|
||||
} from '../constants';
|
||||
|
||||
export class Telemetry {
|
||||
private static instance: Telemetry;
|
||||
@@ -77,7 +80,7 @@ export class Telemetry {
|
||||
|
||||
// Set a new timeout
|
||||
instance.timeout = setTimeout(async () => {
|
||||
await fetch(METRICS_URL, {
|
||||
await fetch(WEBSITE_LINKS.api.metrics, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
import { SETTING_SEO_DESCRIPTION_LENGTH, SETTING_SEO_TITLE_LENGTH } from '../constants';
|
||||
import {
|
||||
SETTING_SEO_DESCRIPTION_LENGTH,
|
||||
SETTING_SEO_TITLE_LENGTH,
|
||||
WEBSITE_LINKS
|
||||
} from '../constants';
|
||||
import { Logger, Notifications, Settings, TaxonomyHelper } from '../helpers';
|
||||
import { TagType } from '../panelWebView/TagType';
|
||||
import { TaxonomyType } from '../models';
|
||||
import * as l10n from '@vscode/l10n';
|
||||
import { LocalizationKey } from '../localization';
|
||||
|
||||
const AI_URL = 'https://frontmatter.codes/api/ai';
|
||||
const AI_URL = WEBSITE_LINKS.api.ai;
|
||||
// const AI_URL = 'http://localhost:3000/api/ai';
|
||||
|
||||
export class SponsorAi {
|
||||
|
||||
Reference in New Issue
Block a user