# fluent-community/trunk/assets/SpaceSettingsRoute.js

FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS &amp; Online Courses, version trunk. 2 lines.

- Page: https://pluginprobe.com/plugins/fluent-community/trunk/code/assets/SpaceSettingsRoute.js
- Raw: https://pluginprobe.com/plugins/fluent-community/trunk/raw/assets/SpaceSettingsRoute.js
- Modified: 2026-09-18T15:18:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-community/trunk/code/assets/SpaceSettingsRoute.js#L10-L20`.

```javascript
import{u as m}from"./app.js?ver=2.11.0";import{C as _}from"./CustomizerShell.js?ver=2.11.0";import{E as c,I as o,O as g,ae as p,D as h,S as f,M as b,G as v,aA as S}from"./vue.js?ver=2.11.0";import{_ as d}from"./emoji-picker.js?ver=2.11.0";import"./vue-router.js?ver=2.11.0";import"./element-plus.js?ver=2.11.0";import"./fcom-utils.js?ver=2.11.0";import"./dayjs.js?ver=2.11.0";import"./vendor.js?ver=2.11.0";import"./pinia.js?ver=2.11.0";import"./milkdown.js?ver=2.11.0";const k={data(){return{originRoute:null}},beforeRouteEnter(e,s,a){a(r=>r.rememberOrigin(e,s))},methods:{rememberOrigin(e,s){var r;if(!s||!s.name)return;const a=(r=e.matched[0])==null?void 0:r.path;a&&s.matched.some(i=>i.path===a)||(this.originRoute={name:s.name,params:s.params,query:s.query})},goBackToOrigin(e){this.$router.push(this.originRoute||e)}}},T={name:"SpaceSettingsRoute",inheritAttrs:!1,mixins:[k],components:{CustomizerShell:_},setup(){return{spaceStore:m()}},props:["space"],data(){return{saving:!1,savingCount:0,space_profile:null}},computed:{hasLockScreenTab(){var e,s,a;return((e=this.space_profile)==null?void 0:e.privacy)=="private"&&((a=(s=this.space_profile)==null?void 0:s.settings)==null?void 0:a.custom_lock_screen)=="yes"},hasPagesTab(){var e,s;return!this.has_pro||!!((s=(e=this.space_profile)==null?void 0:e.permissions)!=null&&s.can_manage_pages)},isPagesTab(){return this.$route.name=="space_settings_pages"},isMenuTab(){return this.$route.name=="space_settings_links"},isPaywallsTab(){return this.$route.name=="space_settings_paywalls"},tabs(){const e={space:this.space},s=[{name:"general",title:this.$t("General"),route:{name:"space_settings_general",params:e}},{name:"paywalls",title:this.$t("Paywalls"),route:{name:"space_settings_paywalls",params:e}}];return this.hasLockScreenTab&&s.push({name:"lock_screen",title:this.$t("Lock Screen"),route:{name:"space_settings_lockscreen",params:e}}),s.push({name:"manage_links",title:this.$t("Menu"),route:{name:"space_settings_links",params:e}}),this.hasPagesTab&&s.push({name:"manage_pages",title:this.$t("Pages"),route:{name:"space_settings_pages",params:e}}),s},isLockScreenTab(){return this.$route.name=="space_settings_lockscreen"},saveLabel(){return!this.has_pro&&this.isLockScreenTab?this.$t("Save Changes (Pro Required)"):this.$t("Save Changes")},childProps(){return this.$route.name=="space_settings_general"?{savingCount:this.savingCount,community:this.space_profile}:{savingCount:this.savingCount,spaceProfile:this.space_profile}},childListeners(){return this.$route.name=="space_settings_general"?{completed:this.spaceUpdated}:{close:this.goBack}}},watch:{space(){this.fetchSpace()},hasLockScreenTab(e){!e&&this.isLockScreenTab&&this.$router.replace({name:"space_settings_general",params:{space:this.space}})},hasPagesTab(e){!e&&this.isPagesTab&&this.$router.replace({name:"space_settings_general",params:{space:this.space}})}},methods:{async fetchSpace(){try{const e=await this.spaceStore.fetchSpace(this.space,!0);if(!this.hasSpaceAdminAccess(e)){this.$notify.error(this.$t("You do not have permission to manage this space")),this.goBack();return}this.space_profile=e,this.changeTitle(e.title),this.isLockScreenTab&&!this.hasLockScreenTab&&this.$router.replace({name:"space_settings_general",params:{space:this.space}})}catch(e){this.$handleError(e),this.goBack()}},saveChanges(){if(!this.has_pro&&this.isLockScreenTab){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.savingCount=this.savingCount+1},async spaceUpdated(e){if(e!=null&&e.slug&&e.slug!=this.space){this.$router.replace({name:this.$route.name,params:{...this.$route.params,space:e.slug}});return}this.spaceStore.invalidateSpace(this.space);try{this.space_profile=await this.spaceStore.fetchSpace(this.space,!0)}catch{e&&(this.space_profile=e)}},goBack(){const e=this.$route.meta.back_route||"space_feeds",s=this.$route.meta.back_with_space===!1?{}:{space:this.space};this.goBackToOrigin({name:e,params:s})}},mounted(){this.fetchSpace()},beforeUnmount(){this.spaceStore.clearCurrentSpace()}};function $(e,s,a,r,i,t){const l=p("router-view"),u=p("customizer-shell");return i.space_profile?(h(),c(u,{key:0,back_title:i.space_profile.title,tabs:t.tabs,saving:i.saving,save_label:t.saveLabel,show_save:!t.isPagesTab&&!t.isMenuTab&&!t.isPaywallsTab,header_class:"fcom_space_settings_nav",container_class:"editor_customizer_container",onBack:s[0]||(s[0]=n=>t.goBack()),onSave:s[1]||(s[1]=n=>t.saveChanges())},{default:o(()=>[f(l,null,{default:o(({Component:n})=>[(h(),c(b(n),v(t.childProps,S(t.childListeners)),null,16))]),_:1})]),_:1},8,["back_title","tabs","saving","save_label","show_save"])):g("",!0)}const A=d(T,[["render",$]]);export{A as default};

```
