Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
864
Issues
864
List
Boards
Labels
Service Desk
Milestones
Merge Requests
46
Merge Requests
46
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
c4249f31
Commit
c4249f31
authored
12 hours ago
by
Emiliano Balbuena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(feat): Tag list
parent
097f990a
epic/minds-pro
1 merge request
!459
WIP: (feat): Minds Pro (development branch)
Pipeline
#75066726
passed with stages
in 28 minutes and 40 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
1 deletion
+70
-1
settings.component.html
src/app/modules/pro/settings/settings.component.html
+53
-0
settings.component.ts
src/app/modules/pro/settings/settings.component.ts
+17
-1
No files found.
src/app/modules/pro/settings/settings.component.html
View file @
c4249f31
...
...
@@ -24,6 +24,17 @@
</m-tooltip>
</a>
<a
class=
"m-topbar--navigation--item"
[class.m-topbar--navigation--item-active]=
"currentTab === 'hashtags'"
(click)=
"currentTab = 'hashtags'"
>
<span
i18n
>
Hashtags
</span>
<m-tooltip
icon=
"help"
i18n
>
TBD
</m-tooltip>
</a>
<a
class=
"m-topbar--navigation--item"
[class.m-topbar--navigation--item-active]=
"currentTab === 'footer'"
...
...
@@ -110,6 +121,48 @@
</div>
</ng-template>
<!-- Tags -->
<ng-template
ngSwitchCase=
"hashtags"
>
<p
class=
"m-pro--settings--note"
i18n
>
Set up your category filter hashtags here.
</p>
<div
class=
"m-pro--settings--field"
*ngFor=
"let tag of settings.tag_list; let i = index"
>
<label
for=
"headline"
i18n
>
Hashtag #{{ i + 1 }}
</label>
<div
class=
"m-pro--settings--flex-inputs"
>
<input
type=
"text"
placeholder=
"Label"
[id]=
"'tag-label-' + i"
[name]=
"'tag[' + i + '][label]'"
[(ngModel)]=
"tag.label"
i18n-placeholder
>
<input
type=
"text"
placeholder=
"#hashtag"
[id]=
"'tag-tag-' + i"
[name]=
"'tag[' + i + '][tag]'"
[(ngModel)]=
"tag.tag"
i18n-placeholder
>
</div>
</div>
<div
class=
"m-pro--settings--field"
>
<button
class=
"m-btn m-btn--slim"
type=
"button"
[disabled]=
"inProgress"
(click)=
"addBlankTag()"
i18n
>
+ Add Tag
</button>
</div>
</ng-template>
<!-- Footer -->
<ng-template
ngSwitchCase=
"footer"
>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/settings/settings.component.ts
View file @
c4249f31
...
...
@@ -17,7 +17,7 @@ export class ProSettingsComponent implements OnInit {
saved
:
boolean
=
false
;
currentTab
:
'
general
'
|
'
theme
'
|
'
footer
'
|
'
cancel
'
=
'
general
'
;
currentTab
:
'
general
'
|
'
theme
'
|
'
hashtags
'
|
'
footer
'
|
'
cancel
'
=
'
general
'
;
constructor
(
protected
service
:
ProService
,
...
...
@@ -45,6 +45,14 @@ export class ProSettingsComponent implements OnInit {
this
.
settings
=
settings
;
if
(
this
.
settings
&&
this
.
settings
.
tag_list
)
{
this
.
settings
.
tag_list
=
this
.
settings
.
tag_list
.
map
(({
tag
,
label
})
=>
{
const
formattedTag
=
`#
${
tag
}
`
;
return
{
tag
:
formattedTag
,
label
};
});
}
this
.
title
.
setTitle
(
'
Pro Settings
'
);
this
.
inProgress
=
false
;
...
...
@@ -62,6 +70,14 @@ export class ProSettingsComponent implements OnInit {
this
.
detectChanges
();
}
addBlankTag
()
{
if
(
!
this
.
settings
)
{
return
;
}
this
.
settings
.
tag_list
.
push
({
label
:
''
,
tag
:
''
});
}
addBlankFooterLink
()
{
if
(
!
this
.
settings
)
{
return
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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