output spaces

This commit is contained in:
2020-08-20 15:11:41 +02:00
parent 6191bebe7f
commit 1352393cf4
6 changed files with 37 additions and 60 deletions
+2 -2
View File
@@ -15,8 +15,8 @@ namespace zero.TestData
{
plugin.Name = "Test Plugin";
ISection spaceSection = zero.Sections.GetAllItems().FirstOrDefault(x => x.Alias == Constants.Sections.Spaces);
zero.Sections.Remove(spaceSection);
//ISection spaceSection = zero.Sections.GetAllItems().FirstOrDefault(x => x.Alias == Constants.Sections.Spaces);
//zero.Sections.Remove(spaceSection);
zero.Spaces.AddList<TeamMember>("team", "Team", "Our team members", "fth-users");
zero.Spaces.AddList<News>("news", "News", "Articles about the company", "fth-edit");
@@ -1,6 +1,6 @@
<template>
<div class="ui-module-item" v-if="!loading" :data-module="module.alias">
<header class="ui-module-item-header"><i :class="module.icon"></i> {{module.name}}</header>
<button type="button" class="ui-module-item-header" @click="$emit('edit', module, value)"><i :class="module.icon"></i> {{module.name}}</button>
<ui-module-preview-inner v-if="renderer.preview && renderer.preview.template" :template="renderer.preview.template" :value="value" />
<div v-if="!value.isActive" class="ui-module-item-disabled"></div>
<!--<pre><code>{{value}}</code></pre>-->
@@ -41,7 +41,7 @@
mounted()
{
this.loadImageSource();
},
},
methods: {
@@ -90,14 +90,14 @@
{
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
-webkit-line-clamp: 2;
display: -webkit-box;
}
.-image
{
border-radius: var(--radius);
max-width: 64px;
max-width: 128px;
max-height: 64px;
}
}
+24 -49
View File
@@ -1,6 +1,6 @@
<template>
<div class="spaces">
<div class="spaces-tree" v-resizable="resizable">
<div class="app-tree spaces-tree" v-resizable="resizable">
<ui-header-bar title="Spaces" />
<div class="spaces-tree-items">
<div v-for="item in spaces" class="spaces-tree-item" :class="getClasses(item)">
@@ -135,7 +135,8 @@
return {
'has-children': item.hasChildren,
'has-line': item.lineBelow,
'is-open': item.isOpen
'is-open': item.isOpen,
'is-active': item.alias == this.$route.params.alias
};
}
}
@@ -153,50 +154,15 @@
height: 100vh;
}
.spaces-tree
{
width: 340px;
background: var(--color-bg-light);
padding: 0;
position: relative;
overflow-y: auto;
height: 100vh;
.ui-header-bar + .ui-tree
{
margin-top: 2px;
}
}
.spaces-tree-actions
{
padding: var(--padding);
}
.spaces-tree-resizable
{
position: absolute;
top: 0;
bottom: 0;
background: var(--color-fg);
opacity: 0;
right: 0;
width: 6px;
cursor: ew-resize;
transition: opacity 0.15s ease 0s;
&:hover
{
transition-delay: 0.2s;
opacity: 0.04;
}
}
.spaces-overview
{
padding: 95px 0 0 60px;
}
.spaces-tree-items
{
margin-top: -13px;
}
.spaces-tree-item
{
@@ -204,7 +170,7 @@
grid-template-columns: 1fr auto;
align-items: center;
font-size: var(--font-size);
padding: 10px var(--padding);
padding: 15px var(--padding);
color: var(--color-fg);
position: relative;
transition: color 0.2s ease;
@@ -215,15 +181,25 @@
opacity: 1;
}
& + .spaces-tree-item
/*&.has-line
{
margin-top: 15px;
margin-bottom: 25px;
}
&.has-line
&.has-line:after
{
border-bottom: 1px solid var(--color-bg);
padding-bottom: 25px;
content: '';
position: absolute;
bottom: -25px;
left: 0;
right: 0;
border-bottom: 2px solid var(--color-bg);
}*/
&.is-active
{
background: var(--color-bg-bright-two);
border-right: 3px solid var(--color-primary);
}
}
@@ -240,7 +216,6 @@
&.is-active
{
font-weight: bold;
color: var(--color-primary);
.spaces-tree-item-text span
{
@@ -256,7 +231,7 @@
span
{
color: var(--color-fg-light);
color: var(--color-fg-dim);
margin-top: 3px;
}
}
+1 -1
View File
@@ -102,7 +102,7 @@
:root
{
// accent colors
--color-primary: #ff662b; //linear-gradient(75deg, #48da9c, #3eb8ad); //#484c5b; // #292b2c; // #00aea2
--color-primary: #2f90e2; //linear-gradient(75deg, #48da9c, #3eb8ad); //#484c5b; // #292b2c; // #00aea2
--color-primary-fg: #fff;
--color-primary-low: rgba(229, 225, 221, 0.3);
--color-primary-two: #e5e4df;
+6 -4
View File
@@ -124,8 +124,9 @@ namespace zero.Web.Controllers
/// </summary>
bool CanReadSpace(string alias)
{
Permission permission = AuthenticationApi.GetPermission(Permissions.Spaces.PREFIX + alias);
return permission != null && permission.CanRead;
return true;
//Permission permission = AuthenticationApi.GetPermission(Permissions.Spaces.PREFIX + alias);
//return permission != null && permission.CanRead;
}
@@ -134,8 +135,9 @@ namespace zero.Web.Controllers
/// </summary>
bool CanWriteSpace(string alias)
{
Permission permission = AuthenticationApi.GetPermission(Permissions.Spaces.PREFIX + alias);
return permission != null && permission.CanWrite;
return true;
//Permission permission = AuthenticationApi.GetPermission(Permissions.Spaces.PREFIX + alias);
//return permission != null && permission.CanWrite;
}
}
}