Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
admin-fe
Commits
d7ef98e6
Commit
d7ef98e6
authored
4 years ago
by
Angelina Filippova
Browse files
Options
Downloads
Patches
Plain Diff
Add form for installing new frontend
parent
4880e555
No related branches found
No related tags found
1 merge request
!197
Ability to install frontends
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/lang/en.js
+5
-1
5 additions, 1 deletion
src/lang/en.js
src/views/settings/components/Frontend.vue
+52
-2
52 additions, 2 deletions
src/views/settings/components/Frontend.vue
src/views/settings/styles/main.scss
+14
-0
14 additions, 0 deletions
src/views/settings/styles/main.scss
with
71 additions
and
3 deletions
src/lang/en.js
+
5
−
1
View file @
d7ef98e6
...
...
@@ -469,7 +469,11 @@ export default {
setLimits
:
'
Set different limits for unauthenticated and authenticated users
'
,
unauthenticatedUsers
:
'
Unauthenticated users
'
,
authenticatedUsers
:
'
Authenticated users
'
,
setLimitsForAll
:
'
Set limit for all users
'
setLimitsForAll
:
'
Set limit for all users
'
,
ref
:
'
Ref
'
,
file
:
'
File
'
,
buildUrl
:
'
Build URL
'
,
buildDir
:
'
Build Directory
'
},
invites
:
{
...
...
This diff is collapsed.
Click to expand it.
src/views/settings/components/Frontend.vue
+
52
−
2
View file @
d7ef98e6
<
template
>
<div
v-if=
"!loading"
:class=
"isSidebarOpen"
class=
"form-container"
>
<el-form
:label-position=
"labelPosition"
:label-width=
"labelWidth"
>
<el-form
:label-position=
"labelPosition"
:label-width=
"labelWidth"
class=
"frontend-container"
>
<el-form-item
class=
"description-container"
>
<span
class=
"setting-label"
>
{{
$t
(
'
settings.availableFrontends
'
)
}}
</span>
<span
class=
"expl no-top-margin"
><p>
{{
$t
(
'
settings.installFrontends
'
)
}}
</p></span>
...
...
@@ -37,8 +37,37 @@
</
template
>
</el-table-column>
</el-table>
<div
class=
"frontends-button-container"
>
<el-button
:size=
"isDesktop ? 'medium' : 'mini'"
:icon=
"frontendInputOpen ? 'el-icon-minus' : 'el-icon-plus'"
circle
@
click=
"toggleFrontendInput"
/>
<span
class=
"icons-button-desc"
>
{{ $t('settings.installAnotherFrontend') }}
</span>
</div>
<el-form
v-if=
"frontendInputOpen"
:model=
"frontendFormData"
label-width=
"120px"
>
<el-form-item
:label=
"$t('settings.name')"
class=
"frontend-form-input"
>
<el-input
v-model=
"frontendFormData.name"
/>
</el-form-item>
<el-form-item
:label=
"$t('settings.ref')"
class=
"frontend-form-input"
>
<el-input
v-model=
"frontendFormData.ref"
/>
</el-form-item>
<el-form-item
:label=
"$t('settings.file')"
class=
"frontend-form-input"
>
<el-input
v-model=
"frontendFormData.file"
/>
</el-form-item>
<el-form-item
:label=
"$t('settings.buildUrl')"
class=
"frontend-form-input"
>
<el-input
v-model=
"frontendFormData.buildUrl"
/>
</el-form-item>
<el-form-item
:label=
"$t('settings.buildDir')"
class=
"frontend-form-input"
>
<el-input
v-model=
"frontendFormData.buildDir"
/>
</el-form-item>
<el-form-item
class=
"install-frontend-button"
>
<el-button
type=
"primary"
@
click=
"installNewFrontend"
>
{{ $t('settings.install') }}
</el-button>
</el-form-item>
</el-form>
</el-form-item>
</el-form>
<el-divider
v-if=
"frontend"
class=
"divider thick-line"
/>
<el-form
:model=
"frontendData"
:label-position=
"labelPosition"
:label-width=
"labelWidth"
>
<setting
:setting-group=
"frontend"
:data=
"frontendData"
/>
</el-form>
...
...
@@ -71,7 +100,7 @@
<setting
:setting-group=
"preload"
:data=
"preloadData"
/>
</el-form>
<div
class=
"submit-button-container"
>
<el-button
class=
"submit-button"
type=
"primary"
@
click=
"onSubmit"
>
Submit
</el-button>
<el-button
class=
"submit-button"
type=
"primary"
@
click=
"onSubmit"
>
{{ $t('settings.submit') }}
</el-button>
</div>
</div>
</template>
...
...
@@ -85,6 +114,18 @@ import _ from 'lodash'
export
default
{
name
:
'
Frontend
'
,
components
:
{
Setting
},
data
()
{
return
{
frontendInputOpen
:
false
,
frontendFormData
:
{
name
:
''
,
ref
:
''
,
file
:
''
,
buildUrl
:
''
,
buildDir
:
''
}
}
},
computed
:
{
...
mapGetters
([
'
settings
'
...
...
@@ -122,6 +163,9 @@ export default {
frontendsData
()
{
return
_
.
get
(
this
.
settings
.
settings
,
[
'
:pleroma
'
,
'
:frontends
'
])
||
{}
},
isDesktop
()
{
return
this
.
$store
.
state
.
app
.
device
===
'
desktop
'
},
isMobile
()
{
return
this
.
$store
.
state
.
app
.
device
===
'
mobile
'
},
...
...
@@ -171,6 +215,9 @@ export default {
methods
:
{
installFrontend
({
name
})
{
this
.
$store
.
dispatch
(
'
InstallFrontend
'
,
{
name
})
},
installNewFrontend
()
{
},
async
onSubmit
()
{
try
{
...
...
@@ -182,6 +229,9 @@ export default {
type
:
'
success
'
,
message
:
i18n
.
t
(
'
settings.success
'
)
})
},
toggleFrontendInput
()
{
this
.
frontendInputOpen
=
!
this
.
frontendInputOpen
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/views/settings/styles/main.scss
+
14
−
0
View file @
d7ef98e6
...
...
@@ -75,6 +75,16 @@
.form-container
{
margin-bottom
:
80px
;
}
.frontend-container
{
margin-right
:
30px
;
}
.frontend-form-input
{
margin-top
:
15px
;
}
.frontends-button-container
{
width
:
100%
;
margin-top
:
15px
;
}
.frontends-table
{
width
:
100%
;
margin-right
:
30px
;
...
...
@@ -130,6 +140,10 @@
width
:
100%
;
}
}
.install-frontend-button
{
margin-top
:
15px
;
float
:
right
;
}
.keyword-container
{
width
:
100%
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment