UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 3.86 kB
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`n8n@2.13.4`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`a88ec937-c0d3-4456-ba9d-36511250636f`,e._sentryDebugIdIdentifier=`sentry-dbid-a88ec937-c0d3-4456-ba9d-36511250636f`)})()}catch{}import{S as e}from"./vue.runtime.esm-bundler-D9KLAxvJ.js";import{bt as t}from"./_MapCache-CUJwh2qp.js";import{_t as n}from"./src-wni2AGA3.js";import{As as r,gr as i,r as a}from"./users.store-BHWXXawf.js";import{ms as o,ri as s}from"./constants-CIP7tKq1.js";function c(e){let t=t=>n(e.resolve({name:t})),n=e=>{let t=e.meta?.middleware,n=e.meta?.middlewareOptions;return t?i(t,n):!0};return{canUserAccessRouteByName:t}}function l(){let s=n(),l=t(),u=a(),d=r(),{canUserAccessRouteByName:f}=c(s),p=e(()=>{let e=[{id:`settings-usage-and-plan`,icon:`chart-column-decreasing`,label:l.baseText(`settings.usageAndPlan.title`),position:`top`,available:f(o.USAGE),route:{to:{name:o.USAGE}}},{id:`settings-personal`,icon:`circle-user-round`,label:l.baseText(`settings.personal`),position:`top`,available:f(o.PERSONAL_SETTINGS),route:{to:{name:o.PERSONAL_SETTINGS}}},{id:`settings-users`,icon:`user-round`,label:l.baseText(`settings.users`),position:`top`,available:f(o.USERS_SETTINGS),route:{to:{name:o.USERS_SETTINGS}}},{id:`settings-ai`,icon:`sparkles`,label:l.baseText(`settings.ai`),position:`top`,available:d.isAiAssistantEnabled&&f(o.AI_SETTINGS),route:{to:{name:o.AI_SETTINGS}}},{id:`settings-project-roles`,icon:`user-round`,label:l.baseText(`settings.projectRoles`),position:`top`,available:f(o.PROJECT_ROLES_SETTINGS),route:{to:{name:o.PROJECT_ROLES_SETTINGS}},new:!0},{id:`settings-api`,icon:`plug`,label:l.baseText(`settings.n8napi`),position:`top`,available:d.isPublicApiEnabled&&f(o.API_SETTINGS),route:{to:{name:o.API_SETTINGS}}},{id:`settings-external-secrets`,icon:`vault`,label:l.baseText(`settings.externalSecrets.title`),position:`top`,available:f(o.EXTERNAL_SECRETS_SETTINGS),route:{to:{name:o.EXTERNAL_SECRETS_SETTINGS}}},{id:`settings-credential-resolvers`,icon:`key-round`,label:l.baseText(`credentialResolver.view.title`),position:`top`,available:f(o.RESOLVERS),route:{to:{name:o.RESOLVERS}}},{id:`settings-source-control`,icon:`git-branch`,label:l.baseText(`settings.sourceControl.title`),position:`top`,available:f(o.SOURCE_CONTROL),route:{to:{name:o.SOURCE_CONTROL}}},{id:`settings-sso`,icon:`user-lock`,label:l.baseText(`settings.sso`),position:`top`,available:f(o.SSO_SETTINGS),route:{to:{name:o.SSO_SETTINGS}}},{id:`settings-security`,icon:`shield`,label:l.baseText(`settings.security`),position:`top`,available:f(o.SECURITY_SETTINGS),route:{to:{name:o.SECURITY_SETTINGS}}},{id:`settings-ldap`,icon:`network`,label:l.baseText(`settings.ldap`),position:`top`,available:f(o.LDAP_SETTINGS),route:{to:{name:o.LDAP_SETTINGS}}},{id:`settings-workersview`,icon:`waypoints`,label:l.baseText(`mainSidebar.workersView`),position:`top`,available:d.isQueueModeEnabled&&i([`rbac`],{rbac:{scope:`workersView:manage`}}),route:{to:{name:o.WORKER_VIEW}}}];e.push({id:`settings-log-streaming`,icon:`log-in`,label:l.baseText(`settings.log-streaming`),position:`top`,available:f(o.LOG_STREAMING_SETTINGS),route:{to:{name:o.LOG_STREAMING_SETTINGS}}}),e.push({id:`settings-community-nodes`,icon:`box`,label:l.baseText(`settings.communityNodes`),position:`top`,available:f(o.COMMUNITY_NODES),route:{to:{name:o.COMMUNITY_NODES}}});let t=u.settingsSidebarItems;return e.concat(t.filter(t=>!e.some(e=>e.id===t.id)))});return{settingsItems:e(()=>p.value.filter(e=>e.available))}}export{l as t}; //# sourceMappingURL=useSettingsItems-otijpHKn.js.map