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