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
799
Issues
799
List
Boards
Labels
Service Desk
Milestones
Merge Requests
46
Merge Requests
46
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
Commits
1d95c0fc
Commit
1d95c0fc
authored
47 minutes ago
by
Mark Harding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fix): signup modal issues closes
#2071
closes
#2090
parent
78412c5d
master
No related merge requests found
Pipeline
#89718311
running with stages
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
13 deletions
+57
-13
src/app/modules/modals/signup/signup-on-scroll.ts
src/app/modules/modals/signup/signup-on-scroll.ts
+22
-6
src/app/modules/modals/signup/signup.html
src/app/modules/modals/signup/signup.html
+1
-4
src/app/modules/modals/signup/signup.ts
src/app/modules/modals/signup/signup.ts
+15
-2
src/app/modules/pro/channel/channel.component.html
src/app/modules/pro/channel/channel.component.html
+1
-0
src/app/modules/pro/channel/channel.component.scss
src/app/modules/pro/channel/channel.component.scss
+15
-0
src/app/modules/pro/channel/channel.component.ts
src/app/modules/pro/channel/channel.component.ts
+1
-1
src/app/modules/pro/pro.module.ts
src/app/modules/pro/pro.module.ts
+2
-0
No files found.
src/app/modules/modals/signup/signup-on-scroll.ts
View file @
1d95c0fc
import
{
Component
}
from
'
@angular/core
'
;
import
{
Component
,
OnDestroy
,
OnInit
,
ViewChild
}
from
'
@angular/core
'
;
import
{
NavigationEnd
,
Router
}
from
'
@angular/router
'
;
import
{
Subscription
}
from
'
rxjs
'
;
import
{
Session
}
from
'
../../../services/session
'
;
import
{
ScrollService
}
from
'
../../../services/ux/scroll
'
;
import
{
SignupModal
}
from
'
./signup
'
;
import
{
Storage
}
from
'
../../../services/storage
'
;
@
Component
({
selector
:
'
m-modal-signup-on-scroll
'
,
template
:
`
<m-modal-signup
open="true" *ngIf="open"
></m-modal-signup>
<m-modal-signup
(onClose)="onModalClosed()" #modal
></m-modal-signup>
`
,
})
export
class
SignupOnScrollModal
{
export
class
SignupOnScrollModal
implements
OnInit
,
OnDestroy
{
open
:
boolean
=
false
;
route
:
string
=
''
;
scroll_listener
;
...
...
@@ -21,10 +23,13 @@ export class SignupOnScrollModal {
routerSubscription
:
Subscription
;
@
ViewChild
(
'
modal
'
,
{
static
:
true
})
modal
:
SignupModal
;
constructor
(
public
session
:
Session
,
public
router
:
Router
,
public
scroll
:
ScrollService
public
scroll
:
ScrollService
,
private
storage
:
Storage
)
{}
ngOnInit
()
{
...
...
@@ -66,9 +71,13 @@ export class SignupOnScrollModal {
default
:
this
.
scroll_listener
=
this
.
scroll
.
listen
(
e
=>
{
if
(
this
.
scroll
.
view
.
scrollTop
>
20
)
{
if
(
window
.
localStorage
.
getItem
(
'
hideSignupModal
'
))
if
(
window
.
localStorage
.
getItem
(
'
hideSignupModal
'
))
{
this
.
open
=
false
;
else
this
.
open
=
true
;
this
.
modal
.
open
=
false
;
}
else
{
this
.
open
=
true
;
this
.
modal
.
open
=
true
;
}
}
},
100
);
}
...
...
@@ -90,4 +99,11 @@ export class SignupOnScrollModal {
this
.
scroll
.
unListen
(
this
.
scroll_listener
);
}
}
onModalClosed
()
{
if
(
this
.
open
)
{
this
.
storage
.
set
(
'
hideSignupModal
'
,
'
1
'
);
this
.
open
=
false
;
}
}
}
This diff is collapsed.
Click to expand it.
src/app/modules/modals/signup/signup.html
View file @
1d95c0fc
...
...
@@ -7,10 +7,7 @@
class=
"mdl-card__title"
[hidden]=
"display == 'onboarding' || display == 'categories'"
>
<img
src=
"{{ minds.cdn_assets_url }}assets/logos/logo.svg"
(click)=
"close()"
/>
<img
[src]=
"logo"
(click)=
"close()"
/>
</div>
<!-- Initial Display -->
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/modals/signup/signup.ts
View file @
1d95c0fc
...
...
@@ -3,6 +3,8 @@ import {
ChangeDetectorRef
,
NgZone
,
ApplicationRef
,
Output
,
EventEmitter
,
}
from
'
@angular/core
'
;
import
{
Location
}
from
'
@angular/common
'
;
import
{
Router
}
from
'
@angular/router
'
;
...
...
@@ -11,6 +13,7 @@ import { SignupModalService } from './service';
import
{
Session
}
from
'
../../../services/session
'
;
import
{
AnalyticsService
}
from
'
../../../services/analytics
'
;
import
{
LoginReferrerService
}
from
'
../../../services/login-referrer.service
'
;
import
{
SiteService
}
from
'
../../../common/services/site.service
'
;
@
Component
({
selector
:
'
m-modal-signup
'
,
...
...
@@ -18,6 +21,7 @@ import { LoginReferrerService } from '../../../services/login-referrer.service';
templateUrl
:
'
signup.html
'
,
})
export
class
SignupModal
{
@
Output
(
'
onClose
'
)
onClosed
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
open
:
boolean
=
false
;
route
:
string
=
''
;
minds
=
window
.
Minds
;
...
...
@@ -27,6 +31,12 @@ export class SignupModal {
display
:
string
=
'
initial
'
;
overrideOnboarding
:
boolean
=
false
;
get
logo
()
{
return
this
.
site
.
isProDomain
?
`
${
this
.
minds
.
cdn_url
}
fs/v1/thumbnail/
${
this
.
site
.
pro
.
logo_guid
}
/master`
:
`
${
this
.
minds
.
cdn_assets_url
}
assets/logos/logo.svg`
;
}
constructor
(
public
session
:
Session
,
private
router
:
Router
,
...
...
@@ -36,13 +46,14 @@ export class SignupModal {
private
zone
:
NgZone
,
private
applicationRef
:
ApplicationRef
,
private
loginReferrer
:
LoginReferrerService
,
private
analyticsService
:
AnalyticsService
private
analyticsService
:
AnalyticsService
,
private
site
:
SiteService
)
{
this
.
listen
();
this
.
service
.
isOpen
.
subscribe
({
next
:
open
=>
{
this
.
open
=
open
;
//hack: nasty ios work around
//
hack: nasty ios work around
this
.
applicationRef
.
tick
();
this
.
listen
();
},
...
...
@@ -66,6 +77,7 @@ export class SignupModal {
break
;
default
:
this
.
service
.
close
();
this
.
onClosed
.
emit
();
}
}
...
...
@@ -166,6 +178,7 @@ export class SignupModal {
onClose
(
e
:
boolean
)
{
this
.
service
.
close
();
this
.
onClosed
.
emit
();
if
(
this
.
display
===
'
login
'
||
this
.
display
===
'
register
'
||
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/channel.component.html
View file @
1d95c0fc
...
...
@@ -122,3 +122,4 @@
</div>
<m-overlay-modal
#overlayModal
></m-overlay-modal>
<m-modal-signup-on-scroll></m-modal-signup-on-scroll>
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/channel.component.scss
View file @
1d95c0fc
...
...
@@ -60,6 +60,21 @@ m-pro--channel {
minds-button-boost
{
display
:
none
!
important
;
}
m-modal-signup
{
m-modal
{
z-index
:
9999999
;
.m-modal-container
.mdl-card
{
background-color
:
var
(
--
m-pro--transparent-background-color
);
color
:
var
(
--
m-pro--text-color
);
.m-modal-signup-apps
{
display
:
none
;
}
}
}
}
}
@media
screen
and
(
max-width
:
$max-mobile
)
{
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/channel.component.ts
View file @
1d95c0fc
...
...
@@ -25,7 +25,7 @@ import { SessionsStorageService } from '../../../services/session-storage.servic
import
{
SiteService
}
from
'
../../../common/services/site.service
'
;
@
Component
({
providers
:
[
ProChannelService
,
OverlayModalService
],
providers
:
[
ProChannelService
,
OverlayModalService
,
SignupModalService
],
selector
:
'
m-pro--channel
'
,
templateUrl
:
'
channel.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
Default
,
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/pro.module.ts
View file @
1d95c0fc
...
...
@@ -34,6 +34,7 @@ import { MediaEditComponent } from '../media/edit/edit.component';
import
{
BlogViewInfinite
}
from
'
../blogs/view/infinite
'
;
import
{
BlogEdit
}
from
'
../blogs/edit/edit
'
;
import
{
CanDeactivateGuardService
}
from
'
../../services/can-deactivate-guard
'
;
import
{
ModalsModule
}
from
'
../modals/modals.module
'
;
const
routes
:
Routes
=
[
{
...
...
@@ -140,6 +141,7 @@ export const PRO_DOMAIN_ROUTES = [
WireModule
,
VideoModule
,
AuthModule
,
ModalsModule
,
],
providers
:
[
ProService
],
declarations
:
[
...
...
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