n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 3.88 kB
JavaScript
(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.16.1`}}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]=`185e7c9f-0e38-44c1-aefc-e4270091d8a2`,e._sentryDebugIdIdentifier=`sentry-dbid-185e7c9f-0e38-44c1-aefc-e4270091d8a2`)})()}catch{}import{S as e}from"./vue.runtime.esm-bundler-C3C09Zii.js";import{at as t}from"./core-Bz5WjPxS.js";import{lt as n}from"./src-XqE2yCpG.js";import{r,si as i}from"./users.store-xP93bV7X.js";import{Qo as a}from"./constants-DuQbSl-q.js";import{t as o}from"./settings.store-CAFiYCMH.js";function s(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 c(){let c=n(),l=t(),u=r(),d=o(),{canUserAccessRouteByName:f}=s(c),p=e(()=>{let e=[{id:`settings-usage-and-plan`,icon:`chart-column-decreasing`,label:l.baseText(`settings.usageAndPlan.title`),position:`top`,available:f(a.USAGE),route:{to:{name:a.USAGE}}},{id:`settings-personal`,icon:`circle-user-round`,label:l.baseText(`settings.personal`),position:`top`,available:f(a.PERSONAL_SETTINGS),route:{to:{name:a.PERSONAL_SETTINGS}}},{id:`settings-users`,icon:`user-round`,label:l.baseText(`settings.users`),position:`top`,available:f(a.USERS_SETTINGS),route:{to:{name:a.USERS_SETTINGS}}},{id:`settings-ai`,icon:`sparkles`,label:l.baseText(`settings.ai`),position:`top`,available:d.isAiAssistantEnabled&&f(a.AI_SETTINGS),route:{to:{name:a.AI_SETTINGS}}},{id:`settings-project-roles`,icon:`user-round`,label:l.baseText(`settings.projectRoles`),position:`top`,available:f(a.PROJECT_ROLES_SETTINGS),route:{to:{name:a.PROJECT_ROLES_SETTINGS}},new:!0},{id:`settings-api`,icon:`plug`,label:l.baseText(`settings.n8napi`),position:`top`,available:d.isPublicApiEnabled&&f(a.API_SETTINGS),route:{to:{name:a.API_SETTINGS}}},{id:`settings-external-secrets`,icon:`vault`,label:l.baseText(`settings.externalSecrets.title`),position:`top`,available:f(a.EXTERNAL_SECRETS_SETTINGS),route:{to:{name:a.EXTERNAL_SECRETS_SETTINGS}}},{id:`settings-credential-resolvers`,icon:`key-round`,label:l.baseText(`credentialResolver.view.title`),position:`top`,available:f(a.RESOLVERS),route:{to:{name:a.RESOLVERS}}},{id:`settings-source-control`,icon:`git-branch`,label:l.baseText(`settings.sourceControl.title`),position:`top`,available:f(a.SOURCE_CONTROL),route:{to:{name:a.SOURCE_CONTROL}}},{id:`settings-sso`,icon:`user-lock`,label:l.baseText(`settings.sso`),position:`top`,available:f(a.SSO_SETTINGS),route:{to:{name:a.SSO_SETTINGS}}},{id:`settings-security`,icon:`shield`,label:l.baseText(`settings.security`),position:`top`,available:f(a.SECURITY_SETTINGS),route:{to:{name:a.SECURITY_SETTINGS}}},{id:`settings-ldap`,icon:`network`,label:l.baseText(`settings.ldap`),position:`top`,available:f(a.LDAP_SETTINGS),route:{to:{name:a.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:a.WORKER_VIEW}}}];e.push({id:`settings-log-streaming`,icon:`log-in`,label:l.baseText(`settings.log-streaming`),position:`top`,available:f(a.LOG_STREAMING_SETTINGS),route:{to:{name:a.LOG_STREAMING_SETTINGS}}}),e.push({id:`settings-community-nodes`,icon:`box`,label:l.baseText(`settings.communityNodes`),position:`top`,available:f(a.COMMUNITY_NODES),route:{to:{name:a.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{c as t};
//# sourceMappingURL=useSettingsItems-CLwnDZ79.js.map