Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
community
pount
pount-front
Commits
e8756e91
Commit
e8756e91
authored
Oct 05, 2021
by
Jean Rabreau
Browse files
🔀
Merge branch 'feature/publicity' into develop
parents
082e8129
b8cbb5e6
Pipeline
#61657
passed with stages
in 3 minutes and 51 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/components/common/Visibility.vue
View file @
e8756e91
<
template
>
<v-switch
v-model=
"visible"
:label=
"$t(`visibility.$
{visible ? 'public' : 'restricted'}`)"
:input-value=
"isPublic"
:prepend-icon=
"`mdi-eye$
{isPublic ?'':'-off-outline'}`"
:label="$t(`visibility.${isPublic ? 'public' : 'restricted'}`)"
@change="$emit('update:is-public', $event)"
/>
</
template
>
...
...
@@ -11,15 +13,8 @@ export default {
props
:
{
isPublic
:
{
type
:
Boolean
,
default
:
false
}
},
computed
:
{
visible
:
{
get
()
{
return
this
.
isPublic
},
set
()
{
this
.
$emit
(
'
update:is-public
'
,
!
this
.
isPublic
)
}
}
}
}
</
script
>
...
...
src/components/item/ItemFormDetail.vue
View file @
e8756e91
...
...
@@ -7,16 +7,14 @@
/>
</v-col>
<v-col>
<v-checkbox
:label=
"$t('visibility.public')"
v-model=
"item.isPublic"
/>
<Visibility
:is-public.sync=
"item.isPublic"
/>
</v-col>
</v-row>
</
template
>
<
script
>
import
RichText
from
'
@/components/common/RichTextInput
'
;
import
Visibility
from
'
@/components/common/Visibility
'
export
default
{
name
:
'
ItemFormDetail
'
,
...
...
@@ -34,6 +32,7 @@ export default {
},
components
:
{
RichText
,
Visibility
,
},
data
:
function
()
{
return
{
...
...
src/components/project/ProjectForm.vue
View file @
e8756e91
...
...
@@ -15,10 +15,7 @@
/>
</v-col>
<v-col>
<v-switch
:label=
"$t('visibility.public')"
v-model=
"project.isPublic"
/>
<Visibility
:is-public.sync=
"project.isPublic"
/>
</v-col>
</v-row>
</
template
>
...
...
@@ -26,6 +23,7 @@
<
script
>
import
RulesMixin
from
'
@/mixins/RulesMixin
'
;
import
RichText
from
'
@/components/common/RichTextInput
'
import
Visibility
from
'
@/components/common/Visibility
'
export
default
{
name
:
'
ProjectForm
'
,
...
...
@@ -51,6 +49,7 @@ export default {
],
components
:
{
RichText
,
Visibility
,
},
data
:
function
()
{
return
{
...
...
src/components/set/SetForm.vue
View file @
e8756e91
...
...
@@ -33,10 +33,7 @@
/>
</v-col>
<v-col>
<v-checkbox
:label=
"$t('visibility.public')"
v-model=
"set.isPublic"
/>
<Visibility
:is-public.sync=
"set.isPublic"
/>
</v-col>
</v-row>
</
template
>
...
...
@@ -46,6 +43,7 @@ import { mapGetters } from 'vuex'
import
RulesMixin
from
'
@/mixins/RulesMixin
'
;
import
RichText
from
'
@/components/common/RichTextInput
'
import
{
TEMPLATE_SCOPE
}
from
'
@/store/template
'
import
Visibility
from
'
@/components/common/Visibility
'
export
default
{
name
:
'
SetForm
'
,
...
...
@@ -86,6 +84,7 @@ export default {
],
components
:
{
RichText
,
Visibility
,
},
data
:
function
()
{
return
{
...
...
src/components/template/TemplateForm.vue
View file @
e8756e91
...
...
@@ -60,5 +60,14 @@ export default {
.v-expansion-panel-header
{
padding
:
0
0
0
8px
;
}
>
div
:last-child
{
position
:
sticky
;
top
:
74px
;
}
#UsfActionButtonsContainer
{
button
:first-child
{
// preview button
display
:
none
;
}
}
}
</
style
>
src/views/items/ItemEdit.vue
View file @
e8756e91
...
...
@@ -13,52 +13,37 @@
</v-btn>
</v-toolbar>
<v-sheet
class=
"pa-3"
>
<v-expansion-panels
tile
flat
hover
>
<v-expansion-panel>
<v-expansion-panel-header>
Avatar
</v-expansion-panel-header>
<v-expansion-panel-content>
<thumbnail-upload
object-type=
"item"
:object-id=
"item.id"
:thumbnail=
"item.thumbnails.m"
/>
</v-expansion-panel-content>
<v-divider
/>
</v-expansion-panel>
<v-expansion-panel>
<v-expansion-panel-header>
{{
$t
(
'
project.generalInfo.label
'
)
}}
</v-expansion-panel-header>
<v-expansion-panel-content>
<v-form
ref=
"itemEdit"
>
<item-form-detail
ref=
"itemFormDetail"
:presentation=
"item.description"
:is-public=
"item.isPublic"
/>
</v-form>
<v-row>
<v-spacer
/>
<v-col
class=
"flex-grow-0"
>
<v-btn
tile
elevation=
"0"
color=
"primary"
@
click=
"onSubmit"
>
{{
$t
(
'
btn.validate
'
)
}}
</v-btn>
</v-col>
</v-row>
</v-expansion-panel-content>
</v-expansion-panel>
</v-expansion-panels>
<section>
<h3>
{{
$t
(
'
project.generalInfo.label
'
)
}}
</h3><v-form
ref=
"itemEdit"
>
<item-form-detail
ref=
"itemFormDetail"
:presentation=
"item.description"
:is-public=
"item.isPublic"
/>
</v-form>
<v-row>
<v-spacer
/>
<v-col
class=
"flex-grow-0"
>
<v-btn
tile
elevation=
"0"
color=
"primary"
@
click=
"onSubmit"
>
{{
$t
(
'
btn.validate
'
)
}}
</v-btn>
</v-col>
</v-row>
</section>
<v-divider
/>
<section>
<h3>
Avatar
</h3>
<thumbnail-upload
object-type=
"item"
:object-id=
"item.id"
:thumbnail=
"item.thumbnails.m"
/>
</section>
</v-sheet>
</div>
</
template
>
...
...
@@ -92,3 +77,9 @@ export default {
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
section
{
padding
:
2rem
;
}
</
style
>
src/views/projects/Project.vue
View file @
e8756e91
...
...
@@ -87,9 +87,13 @@ export default {
title
:
this
.
project
.
name
,
subtitles
:
[
this
.
$t
(
'
project.subtitles.managers
'
,
{
names
,
label
}),
this
.
visibility
],
};
},
visibility
()
{
return
this
.
$t
(
`visibility.
${
this
.
project
.
isPublic
?
'
public
'
:
'
restricted
'
}
`
)
},
tabs
()
{
const
tabs
=
[
{
...
...
src/views/projects/ProjectEdit.vue
View file @
e8756e91
...
...
@@ -12,56 +12,42 @@
{{
$t
(
'
btn.back
'
)
}}
</v-btn>
</v-toolbar>
<v-sheet
class=
"pa-3"
>
<v-expansion-panels
tile
flat
hover
>
<v-expansion-panel>
<v-expansion-panel-header>
Avatar
</v-expansion-panel-header>
<v-expansion-panel-content>
<thumbnail-upload
object-type=
"project"
:object-id=
"project.id"
:thumbnail=
"project.thumbnails.m"
/>
</v-expansion-panel-content>
<v-divider
/>
</v-expansion-panel>
<v-expansion-panel>
<v-expansion-panel-header>
{{
$t
(
'
project.generalInfo.label
'
)
}}
</v-expansion-panel-header>
<v-expansion-panel-content>
<v-form
ref=
"projectEdit"
>
<project-form
ref=
"projectForm"
:name=
"project.name"
:description=
"project.description"
:is-public=
"project.isPublic"
/>
</v-form>
<v-row>
<v-spacer
/>
<v-col
class=
"flex-grow-0"
>
</v-col>
<v-col
class=
"flex-grow-0"
>
<v-btn
tile
elevation=
"0"
color=
"primary"
@
click=
"onSubmit"
>
{{
$t
(
'
btn.validate
'
)
}}
</v-btn>
</v-col>
</v-row>
</v-expansion-panel-content>
</v-expansion-panel>
</v-expansion-panels>
<v-sheet>
<section>
<h3>
{{
$t
(
'
project.generalInfo.label
'
)
}}
</h3>
<v-form
ref=
"projectEdit"
>
<project-form
ref=
"projectForm"
:name=
"project.name"
:description=
"project.description"
:is-public=
"project.isPublic"
/>
</v-form>
<v-row>
<v-spacer
/>
<v-col
class=
"flex-grow-0"
>
</v-col>
<v-col
class=
"flex-grow-0"
>
<v-btn
tile
elevation=
"0"
color=
"primary"
@
click=
"onSubmit"
>
{{
$t
(
'
btn.validate
'
)
}}
</v-btn>
</v-col>
</v-row>
</section>
<v-divider></v-divider>
<section>
<h3>
Avatar
</h3>
<thumbnail-upload
object-type=
"project"
:object-id=
"project.id"
:thumbnail=
"project.thumbnails.m"
/>
</section>
</v-sheet>
</div>
</
template
>
...
...
@@ -95,3 +81,9 @@ export default {
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
section
{
padding
:
2rem
;
}
</
style
>
src/views/sets/SetEdit.vue
View file @
e8756e91
...
...
@@ -12,57 +12,43 @@
{{
$t
(
'
btn.back
'
)
}}
</v-btn>
</v-toolbar>
<v-sheet
class=
"pa-3"
>
<v-expansion-panels
tile
flat
hover
>
<v-expansion-panel>
<v-expansion-panel-header>
Avatar
</v-expansion-panel-header>
<v-expansion-panel-content>
<thumbnail-upload
object-type=
"set"
:object-id=
"set.id"
:thumbnail=
"set.thumbnails.m"
/>
</v-expansion-panel-content>
<v-divider
/>
</v-expansion-panel>
<v-expansion-panel>
<v-expansion-panel-header>
{{
$t
(
'
project.generalInfo.label
'
)
}}
</v-expansion-panel-header>
<v-expansion-panel-content>
<v-form
ref=
"setEdit"
>
<set-form
ref=
"setForm"
:title=
"set.title"
:description=
"set.description"
:publisher=
"set.publisher"
:template=
"set.template.id"
:is-public=
"set.isPublic"
edit
/>
</v-form>
<v-row>
<v-spacer
/>
<v-col
class=
"flex-grow-0"
>
<v-btn
tile
elevation=
"0"
color=
"primary"
@
click=
"onSubmit"
>
{{
$t
(
'
btn.validate
'
)
}}
</v-btn>
</v-col>
</v-row>
</v-expansion-panel-content>
</v-expansion-panel>
</v-expansion-panels>
<v-sheet>
<section>
<h3>
{{
$t
(
'
project.generalInfo.label
'
)
}}
</h3>
<v-form
ref=
"setEdit"
>
<set-form
ref=
"setForm"
:title=
"set.title"
:description=
"set.description"
:publisher=
"set.publisher"
:template=
"set.template.id"
:is-public=
"set.isPublic"
edit
/>
</v-form>
<v-row>
<v-spacer
/>
<v-col
class=
"flex-grow-0"
>
<v-btn
tile
elevation=
"0"
color=
"primary"
@
click=
"onSubmit"
>
{{
$t
(
'
btn.validate
'
)
}}
</v-btn>
</v-col>
</v-row>
</section>
<v-divider
/>
<section>
<h3>
Avatar
</h3>
<thumbnail-upload
object-type=
"set"
:object-id=
"set.id"
:thumbnail=
"set.thumbnails.m"
/>
</section>
</v-sheet>
</div>
</
template
>
...
...
@@ -96,3 +82,9 @@ export default {
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
section
{
padding
:
2rem
;
}
</
style
>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment