things
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
namespace zero.Core.Options
|
||||
{
|
||||
public class ApplicationOptions
|
||||
{
|
||||
public ApplicationOptions()
|
||||
{
|
||||
EnableMultiple = false;
|
||||
}
|
||||
|
||||
|
||||
public bool EnableMultiple { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,7 @@ namespace zero.Core.Options
|
||||
Services = new();
|
||||
Routing = new();
|
||||
Interceptors = new();
|
||||
Applications = new();
|
||||
|
||||
Raven.Indexes.Add<Backoffice_Search>();
|
||||
Raven.Indexes.Add<Media_ByChildren>();
|
||||
@@ -71,6 +72,9 @@ namespace zero.Core.Options
|
||||
/// <inheritdoc />
|
||||
public RavenOptions Raven { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public ApplicationOptions Applications { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string BackofficePath { get; set; }
|
||||
|
||||
@@ -156,6 +160,11 @@ namespace zero.Core.Options
|
||||
/// </summary>
|
||||
RavenOptions Raven { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Application options
|
||||
/// </summary>
|
||||
ApplicationOptions Applications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// URL path to the backoffice (defaults to /zero)
|
||||
/// </summary>
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<ui-dropdown v-if="applications.length > 0" class="app-nav-switch">
|
||||
<ui-dropdown v-if="applications.length > 0 && zero.config.multiApps" class="app-nav-switch">
|
||||
<template v-slot:button>
|
||||
<ui-button type="light block" :label="currentApplication.name" caret="right" />
|
||||
</template>
|
||||
@@ -37,6 +36,7 @@
|
||||
<ui-dropdown-button label="Add new application" icon="fth-plus" @click="addApplication" />
|
||||
<ui-dropdown-button label="Manage apps" icon="fth-edit-2" @click="manageApplications" />
|
||||
</ui-dropdown>
|
||||
<div v-else class="app-nav-switch is-fake"></div>
|
||||
|
||||
<nav class="app-nav-inner">
|
||||
<template v-for="section in sections">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<span class="apps-item-minor">{{app.domains[0]}}</span>
|
||||
<span class="apps-item-status" :class="{ 'is-active': app.isActive }" v-localize="getStatus(app)"></span>
|
||||
</router-link>
|
||||
<router-link :to="getAddLink()" class="apps-items-add">
|
||||
<router-link :to="getAddLink()" class="apps-items-add" v-if="zero.config.multiApps">
|
||||
<ui-icon symbol="fth-plus" :size="24" />
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
@@ -149,6 +149,13 @@
|
||||
max-height: 20px;
|
||||
max-width: 20px;
|
||||
}
|
||||
|
||||
&.is-fake
|
||||
{
|
||||
margin-bottom: 0;
|
||||
height: 0;
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
|
||||
a.app-nav-item, button.app-nav-item
|
||||
|
||||
@@ -69,6 +69,7 @@ namespace zero.Web
|
||||
config.AppId = Context.AppId;
|
||||
//config.SharedAppId = Constants.Database.SharedAppId; // TODO appx
|
||||
config.Icons = CreateIconSets();
|
||||
config.MultiApps = Options.Applications.EnableMultiple;
|
||||
|
||||
BackofficeUser user = await AuthenticationApi.GetUser();
|
||||
|
||||
@@ -451,6 +452,8 @@ namespace zero.Web
|
||||
|
||||
public string AppId { get; set; }
|
||||
|
||||
public bool MultiApps { get; set; }
|
||||
|
||||
public UserEditModel User { get; set; }
|
||||
|
||||
public IList<ZeroVueSection> Sections { get; set; } = new List<ZeroVueSection>();
|
||||
|
||||
Reference in New Issue
Block a user