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
895
Issues
895
List
Boards
Labels
Service Desk
Milestones
Merge Requests
47
Merge Requests
47
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
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
Compare Revisions
8cf979f8dae7f5625eab83d3df2ae24fb810327c...b9668223154c3302dbe76b8b9cd1e6fe9de01237
Source
b9668223154c3302dbe76b8b9cd1e6fe9de01237
Select Git revision
...
Target
8cf979f8dae7f5625eab83d3df2ae24fb810327c
Select Git revision
Compare
Commits (2)
(fix): Avoid endless loop to /login
· c2caeabc
Emiliano Balbuena
authored
4 hours ago
c2caeabc
(feat): Mobile search box
· b9668223
Emiliano Balbuena
authored
13 minutes ago
b9668223
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
150 additions
and
74 deletions
+150
-74
channel.component.html
src/app/modules/pro/channel/channel.component.html
+10
-16
channel.component.scss
src/app/modules/pro/channel/channel.component.scss
+0
-50
hamburger-menu.component.html
.../pro/channel/hamburger-menu/hamburger-menu.component.html
+9
-0
hamburger-menu.component.scss
.../pro/channel/hamburger-menu/hamburger-menu.component.scss
+13
-0
hamburger-menu.component.ts
...es/pro/channel/hamburger-menu/hamburger-menu.component.ts
+9
-0
search-box.component.html
.../modules/pro/channel/search-box/search-box.component.html
+16
-0
search-box.component.scss
.../modules/pro/channel/search-box/search-box.component.scss
+49
-0
search-box.component.ts
...pp/modules/pro/channel/search-box/search-box.component.ts
+22
-0
pro.module.ts
src/app/modules/pro/pro.module.ts
+2
-0
client.ts
src/app/services/api/client.ts
+20
-8
No files found.
src/app/modules/pro/channel/channel.component.html
View file @
b9668223
...
...
@@ -7,21 +7,11 @@
/>
<div
class=
"m-proChannelTopbar__SearchBox"
>
<div
class=
"mdl-textfield mdl-js-textfield"
>
<i
class=
"material-icons search"
>
search
</i>
<input
[(ngModel)]=
"query"
id=
"search"
autocomplete=
"off"
class=
"mdl-textfield__input ng-pristine ng-valid ng-touched"
type=
"text"
(keyup.enter)=
"search()"
/>
<ng-container
*ngIf=
"query"
>
<i
class=
"material-icons clear"
(click)=
"clearSearch()"
>
close
</i>
</ng-container>
<label
class=
"mdl-textfield__label"
for=
"search"
></label>
</div>
<m-pro
__searchBox
[(query)]=
"query"
(onSearch)=
"search()"
(onClearSearch)=
"clearSearch()"
></m-pro
__searchBox
>
</div>
<ng-container
*ngIf=
"!collapseNavItems"
>
...
...
@@ -99,7 +89,11 @@
</ng-template>
</ng-container>
<m-pro
__hamburger-menu
></m-pro
__hamburger-menu
>
<m-pro
__hamburger-menu
[(query)]=
"query"
(onSearch)=
"search()"
(onClearSearch)=
"clearSearch()"
></m-pro
__hamburger-menu
>
</div>
<div
class=
"m-proChannel__body"
>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/channel.component.scss
View file @
b9668223
...
...
@@ -104,56 +104,6 @@ m-pro--channel {
flex-grow
:
1
;
max-width
:
300px
;
}
div
.mdl-textfield.mdl-js-textfield
{
width
:
100%
;
transition
:
width
ease-in-out
0
.2s
;
padding
:
8px
0
;
i
.search
{
position
:
absolute
;
margin
:
6px
;
font-size
:
20px
;
@include
m-theme
()
{
color
:
themed
(
$m-black
);
}
}
i
.clear
{
font-size
:
16px
;
border-radius
:
20px
;
cursor
:
pointer
;
position
:
absolute
;
top
:
16px
;
right
:
10px
;
@include
m-theme
()
{
color
:
themed
(
$m-black
);
}
}
input
{
height
:
32px
;
border-radius
:
18px
;
font-family
:
Roboto
,
sans-serif
;
font-size
:
14px
;
letter-spacing
:
0
.5px
;
font-weight
:
600
;
text-rendering
:
optimizeLegibility
;
-webkit-font-smoothing
:
antialiased
;
padding
:
8px
8px
8px
32px
;
box-sizing
:
border-box
;
color
:
var
(
--
m-pro--text-color
);
background-color
:
var
(
--
m-pro--transparent-background-color
);
}
label
{
display
:
none
;
}
}
}
.m-btn
:disabled
{
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/hamburger-menu/hamburger-menu.component.html
View file @
b9668223
...
...
@@ -79,6 +79,15 @@
</a>
</li>
<li
class=
"m-pro__hamburger-menu-menu__search-box"
>
<m-pro
__searchBox
[query]=
"query"
(queryChange)=
"queryChange.emit($event)"
(onSearch)=
"onSearch.emit($event); closeMenu()"
(onClearSearch)=
"onClearSearch.emit($event); closeMenu()"
></m-pro
__searchBox
>
</li>
<li
class=
"m-pro__hamburger-menu-menu__spacer"
></li>
<ng-container
*ngIf=
"items && items.length"
>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/hamburger-menu/hamburger-menu.component.scss
View file @
b9668223
...
...
@@ -69,6 +69,19 @@ m-pro__hamburger-menu {
}
}
&
.m-pro__hamburger-menu-menu__search-box
{
>
m-pro__searchbox
{
width
:
100%
;
display
:
block
;
margin
:
0
auto
16px
;
.mdl-textfield__input
{
border
:
1px
solid
var
(
--
m-pro--text-color
);
border-radius
:
6px
;
}
}
}
&
.m-pro__hamburger-menu-menu__spacer
{
height
:
0
;
border-top
:
1px
solid
var
(
--
m-pro--text-color
);
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/hamburger-menu/hamburger-menu.component.ts
View file @
b9668223
...
...
@@ -2,6 +2,7 @@ import {
ChangeDetectionStrategy
,
Component
,
EventEmitter
,
Input
,
Output
,
}
from
'
@angular/core
'
;
import
{
ProChannelService
}
from
'
../channel.service
'
;
...
...
@@ -13,6 +14,14 @@ import { Session } from '../../../../services/session';
changeDetection
:
ChangeDetectionStrategy
.
OnPush
,
})
export
class
ProHamburgerMenu
{
@
Input
()
query
:
string
=
''
;
@
Output
()
queryChange
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Output
()
onSearch
:
EventEmitter
<
void
>
=
new
EventEmitter
<
void
>
();
@
Output
()
onClearSearch
:
EventEmitter
<
void
>
=
new
EventEmitter
<
void
>
();
constructor
(
protected
service
:
ProChannelService
,
protected
session
:
Session
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/search-box/search-box.component.html
0 → 100644
View file @
b9668223
<div
class=
"mdl-textfield mdl-js-textfield m-pro__searchBox"
>
<i
class=
"material-icons search"
>
search
</i>
<input
[ngModel]=
"query"
(ngModelChange)=
"queryChange.emit($event)"
id=
"search"
autocomplete=
"off"
class=
"mdl-textfield__input ng-pristine ng-valid ng-touched"
type=
"text"
(keyup.enter)=
"onSearch.emit()"
/>
<ng-container
*ngIf=
"query"
>
<i
class=
"material-icons clear"
(click)=
"onClearSearch.emit()"
>
close
</i>
</ng-container>
<label
class=
"mdl-textfield__label"
for=
"search"
></label>
</div>
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/search-box/search-box.component.scss
0 → 100644
View file @
b9668223
div
.mdl-textfield.mdl-js-textfield.m-pro__searchBox
{
width
:
100%
;
transition
:
width
ease-in-out
0
.2s
;
padding
:
8px
0
;
i
.search
{
position
:
absolute
;
margin
:
6px
;
font-size
:
20px
;
@include
m-theme
()
{
color
:
themed
(
$m-black
);
}
}
i
.clear
{
font-size
:
16px
;
border-radius
:
20px
;
cursor
:
pointer
;
position
:
absolute
;
top
:
16px
;
right
:
10px
;
@include
m-theme
()
{
color
:
themed
(
$m-black
);
}
}
input
{
height
:
32px
;
border-radius
:
18px
;
font-family
:
Roboto
,
sans-serif
;
font-size
:
14px
;
letter-spacing
:
0
.5px
;
font-weight
:
600
;
text-rendering
:
optimizeLegibility
;
-webkit-font-smoothing
:
antialiased
;
padding
:
8px
8px
8px
32px
;
box-sizing
:
border-box
;
color
:
var
(
--
m-pro--text-color
);
background-color
:
var
(
--
m-pro--transparent-background-color
);
}
label
{
display
:
none
;
}
}
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/search-box/search-box.component.ts
0 → 100644
View file @
b9668223
import
{
ChangeDetectionStrategy
,
Component
,
EventEmitter
,
Input
,
Output
,
}
from
'
@angular/core
'
;
@
Component
({
selector
:
'
m-pro__searchBox
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
,
templateUrl
:
'
search-box.component.html
'
,
})
export
class
SearchBoxComponent
{
@
Input
()
query
:
string
=
''
;
@
Output
()
queryChange
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Output
()
onSearch
:
EventEmitter
<
void
>
=
new
EventEmitter
<
void
>
();
@
Output
()
onClearSearch
:
EventEmitter
<
void
>
=
new
EventEmitter
<
void
>
();
}
This diff is collapsed.
Click to expand it.
src/app/modules/pro/pro.module.ts
View file @
b9668223
...
...
@@ -33,6 +33,7 @@ import { ForgotPasswordComponent } from '../auth/forgot-password/forgot-password
import
{
AuthModule
}
from
'
../auth/auth.module
'
;
import
{
ProHamburgerMenu
}
from
'
./channel/hamburger-menu/hamburger-menu.component
'
;
import
{
SubscribeButtonComponent
}
from
'
./channel/subscribe-button/subscribe-button.component
'
;
import
{
SearchBoxComponent
}
from
'
./channel/search-box/search-box.component
'
;
const
routes
:
Routes
=
[
{
...
...
@@ -156,6 +157,7 @@ export const PRO_DOMAIN_ROUTES = [
ProUnsubscribeModalComponent
,
ProHamburgerMenu
,
SubscribeButtonComponent
,
SearchBoxComponent
,
],
exports
:
[
ProChannelComponent
],
entryComponents
:
[
...
...
This diff is collapsed.
Click to expand it.
src/app/services/api/client.ts
View file @
b9668223
...
...
@@ -47,8 +47,11 @@ export class Client {
return
reject
(
err
||
new
Error
(
'
GET error
'
));
}
if
(
err
.
status
===
401
&&
err
.
error
.
loggedin
===
false
)
{
localStorage
.
setItem
(
'
redirect
'
,
this
.
location
.
path
());
window
.
location
.
href
=
'
/login
'
;
if
(
this
.
location
.
path
()
!==
'
/login
'
)
{
localStorage
.
setItem
(
'
redirect
'
,
this
.
location
.
path
());
window
.
location
.
href
=
'
/login
'
;
}
return
reject
(
err
);
}
return
reject
(
err
);
...
...
@@ -104,8 +107,11 @@ export class Client {
return
reject
(
err
||
new
Error
(
'
POST error
'
));
}
if
(
err
.
status
===
401
&&
err
.
error
.
loggedin
===
false
)
{
localStorage
.
setItem
(
'
redirect
'
,
this
.
location
.
path
());
window
.
location
.
href
=
'
/login
'
;
if
(
this
.
location
.
path
()
!==
'
/login
'
)
{
localStorage
.
setItem
(
'
redirect
'
,
this
.
location
.
path
());
window
.
location
.
href
=
'
/login
'
;
}
return
reject
(
err
);
}
if
(
err
.
status
!==
200
)
{
...
...
@@ -136,8 +142,11 @@ export class Client {
},
err
=>
{
if
(
err
.
status
===
401
&&
err
.
data
().
loggedin
===
false
)
{
localStorage
.
setItem
(
'
redirect
'
,
this
.
location
.
path
());
window
.
location
.
href
=
'
/login
'
;
if
(
this
.
location
.
path
()
!==
'
/login
'
)
{
localStorage
.
setItem
(
'
redirect
'
,
this
.
location
.
path
());
window
.
location
.
href
=
'
/login
'
;
}
return
reject
(
err
);
}
if
(
err
.
status
!==
200
)
{
...
...
@@ -164,8 +173,11 @@ export class Client {
},
err
=>
{
if
(
err
.
status
===
401
&&
err
.
error
.
loggedin
===
false
)
{
localStorage
.
setItem
(
'
redirect
'
,
this
.
location
.
path
());
window
.
location
.
href
=
'
/login
'
;
if
(
this
.
location
.
path
()
!==
'
/login
'
)
{
localStorage
.
setItem
(
'
redirect
'
,
this
.
location
.
path
());
window
.
location
.
href
=
'
/login
'
;
}
return
reject
(
err
);
}
if
(
err
.
status
!==
200
)
{
...
...
This diff is collapsed.
Click to expand it.