Add direct link to help docs
This commit is contained in:
@@ -127,6 +127,15 @@ export const navigateToAccountPreferences = createAction({
|
|||||||
perform: () => history.push(settingsPath("preferences")),
|
perform: () => history.push(settingsPath("preferences")),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const openDocumentation = createAction({
|
||||||
|
name: ({ t }) => t("Documentation"),
|
||||||
|
analyticsName: "Open documentation",
|
||||||
|
section: NavigationSection,
|
||||||
|
iconInContextMenu: false,
|
||||||
|
icon: <OpenIcon />,
|
||||||
|
perform: () => window.open(UrlHelper.guide),
|
||||||
|
});
|
||||||
|
|
||||||
export const openAPIDocumentation = createAction({
|
export const openAPIDocumentation = createAction({
|
||||||
name: ({ t }) => t("API documentation"),
|
name: ({ t }) => t("API documentation"),
|
||||||
analyticsName: "Open API documentation",
|
analyticsName: "Open API documentation",
|
||||||
@@ -218,6 +227,7 @@ export const rootNavigationActions = [
|
|||||||
navigateToArchive,
|
navigateToArchive,
|
||||||
navigateToTrash,
|
navigateToTrash,
|
||||||
downloadApp,
|
downloadApp,
|
||||||
|
openDocumentation,
|
||||||
openAPIDocumentation,
|
openAPIDocumentation,
|
||||||
openFeedbackUrl,
|
openFeedbackUrl,
|
||||||
openBugReportUrl,
|
openBugReportUrl,
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ import {
|
|||||||
navigateToAccountPreferences,
|
navigateToAccountPreferences,
|
||||||
openKeyboardShortcuts,
|
openKeyboardShortcuts,
|
||||||
openChangelog,
|
openChangelog,
|
||||||
|
openDocumentation,
|
||||||
openAPIDocumentation,
|
openAPIDocumentation,
|
||||||
openBugReportUrl,
|
openBugReportUrl,
|
||||||
openFeedbackUrl,
|
openFeedbackUrl,
|
||||||
logout,
|
logout,
|
||||||
downloadApp,
|
|
||||||
} from "~/actions/definitions/navigation";
|
} from "~/actions/definitions/navigation";
|
||||||
import { changeTheme } from "~/actions/definitions/settings";
|
import { changeTheme } from "~/actions/definitions/settings";
|
||||||
import usePrevious from "~/hooks/usePrevious";
|
import usePrevious from "~/hooks/usePrevious";
|
||||||
@@ -43,7 +43,7 @@ const AccountMenu: React.FC = ({ children }: Props) => {
|
|||||||
const actions = React.useMemo(
|
const actions = React.useMemo(
|
||||||
() => [
|
() => [
|
||||||
openKeyboardShortcuts,
|
openKeyboardShortcuts,
|
||||||
downloadApp,
|
openDocumentation,
|
||||||
openAPIDocumentation,
|
openAPIDocumentation,
|
||||||
separator(),
|
separator(),
|
||||||
openChangelog,
|
openChangelog,
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
"Templates": "Templates",
|
"Templates": "Templates",
|
||||||
"Notifications": "Notifications",
|
"Notifications": "Notifications",
|
||||||
"Preferences": "Preferences",
|
"Preferences": "Preferences",
|
||||||
|
"Documentation": "Documentation",
|
||||||
"API documentation": "API documentation",
|
"API documentation": "API documentation",
|
||||||
"Toggle sidebar": "Toggle sidebar",
|
"Toggle sidebar": "Toggle sidebar",
|
||||||
"Send us feedback": "Send us feedback",
|
"Send us feedback": "Send us feedback",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ export class UrlHelper {
|
|||||||
public static contact = "https://www.getoutline.com/contact";
|
public static contact = "https://www.getoutline.com/contact";
|
||||||
public static developers = "https://www.getoutline.com/developers";
|
public static developers = "https://www.getoutline.com/developers";
|
||||||
public static changelog = "https://www.getoutline.com/changelog";
|
public static changelog = "https://www.getoutline.com/changelog";
|
||||||
|
public static guide = "https://docs.getoutline.com/s/guide";
|
||||||
|
|
||||||
public static SLUG_URL_REGEX = /^(?:[0-9a-zA-Z-_~]*-)?([a-zA-Z0-9]{10,15})$/;
|
public static SLUG_URL_REGEX = /^(?:[0-9a-zA-Z-_~]*-)?([a-zA-Z0-9]{10,15})$/;
|
||||||
public static SHARE_URL_SLUG_REGEX = /^[0-9a-z-]+$/;
|
public static SHARE_URL_SLUG_REGEX = /^[0-9a-z-]+$/;
|
||||||
|
|||||||
Reference in New Issue
Block a user