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
891
Issues
891
List
Boards
Labels
Service Desk
Milestones
Merge Requests
50
Merge Requests
50
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
cf88f897fc58635ad5606f2343a826b2602b9536...a53208848c3d59cb46ac1583b5666c87758d0333
Source
a53208848c3d59cb46ac1583b5666c87758d0333
Select Git revision
...
Target
cf88f897fc58635ad5606f2343a826b2602b9536
Select Git revision
Compare
Commits (5)
(chore): Hide signup modal
· 4fefdf50
Emiliano Balbuena
authored
2 days ago
4fefdf50
(fix): Login/Signup skewed with long headlines
· 6e9b7180
Emiliano Balbuena
authored
2 days ago
6e9b7180
(chore): Title should not say Minds
· af501a43
Emiliano Balbuena
authored
2 days ago
af501a43
(feat): Cookie modal to use site title
· b7cf7a78
Emiliano Balbuena
authored
2 days ago
b7cf7a78
(cs): Code styling
· a5320884
Emiliano Balbuena
authored
2 days ago
a5320884
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
105 additions
and
62 deletions
+105
-62
app.component.html
src/app/app.component.html
+1
-1
notice.component.html
src/app/common/components/notice/notice.component.html
+5
-5
notice.component.ts
src/app/common/components/notice/notice.component.ts
+10
-1
auth.module.ts
src/app/modules/auth/auth.module.ts
+1
-3
channel.component.ts
src/app/modules/pro/channel/channel.component.ts
+2
-1
channel.service.ts
src/app/modules/pro/channel/channel.service.ts
+1
-2
footer.component.html
src/app/modules/pro/channel/footer/footer.component.html
+6
-3
hamburger-menu.component.html
.../pro/channel/hamburger-menu/hamburger-menu.component.html
+15
-17
hamburger-menu.component.ts
...es/pro/channel/hamburger-menu/hamburger-menu.component.ts
+6
-5
home.component.ts
src/app/modules/pro/channel/home/home.component.ts
+6
-3
list.component.ts
src/app/modules/pro/channel/list/list.component.ts
+9
-3
login.component.scss
src/app/modules/pro/channel/login/login.component.scss
+2
-0
tile.component.html
src/app/modules/pro/channel/tiles/media/tile.component.html
+5
-1
pro.module.ts
src/app/modules/pro/pro.module.ts
+14
-15
providers.ts
src/app/services/providers.ts
+2
-0
site.service.ts
src/app/services/site.service.ts
+12
-0
title.ts
src/app/services/ux/title.ts
+8
-2
No files found.
src/app/app.component.html
View file @
a5320884
...
...
@@ -56,7 +56,7 @@
*ngIf=
"session.isLoggedIn() && !this.standalone"
></m-juryDutySession
__summons
>
<m-modal-signup-on-scroll></m-modal-signup-on-scroll>
<m-modal-signup-on-scroll
*ngIf=
"!this.standalone"
></m-modal-signup-on-scroll>
<m-channel--onboarding
*ngIf=
"showOnboarding"
></m-channel--onboarding>
...
...
This diff is collapsed.
Click to expand it.
src/app/common/components/notice/notice.component.html
View file @
a5320884
<div
class=
"m-notice--message"
>
<ng-container
*ngIf=
"cookiesEnabled"
>
Minds uses cookies to ensure you get the best experience. By continuing to
use Minds you agree to our privacy policy or you can
<a
(click)=
"toggleCookies(false)"
>
opt-out
</a>
.
</ng-container
>
{{ siteTitle }} uses cookies to ensure you get the best experience. By
continuing to use {{ siteTitle }} you agree to Minds privacy policy or you
can
<a
(click)=
"toggleCookies(false)"
>
opt-out
</a>
.
</ng-container
>
<ng-container
*ngIf=
"!cookiesEnabled"
>
You have disabled cookies from
Minds which limits your experience. Conside
r
opting back in.
</ng-container
>
You have disabled cookies from
{{ siteTitle }} which limits you
r
experience. Consider
opting back in.
</ng-container
>
</div>
<ng-container
*ngIf=
"cookiesEnabled"
>
...
...
This diff is collapsed.
Click to expand it.
src/app/common/components/notice/notice.component.ts
View file @
a5320884
...
...
@@ -8,6 +8,7 @@ import {
}
from
'
@angular/core
'
;
import
{
Client
}
from
'
../../../services/api/client
'
;
import
{
Storage
}
from
'
../../../services/storage
'
;
import
{
SiteService
}
from
'
../../../services/site.service
'
;
@
Component
({
selector
:
'
m-cookies-notice
'
,
...
...
@@ -21,7 +22,11 @@ export class DismissableNoticeComponent {
cookiesEnabled
:
boolean
=
true
;
constructor
(
private
client
:
Client
,
private
storage
:
Storage
)
{
constructor
(
private
client
:
Client
,
private
storage
:
Storage
,
private
site
:
SiteService
)
{
if
(
this
.
storage
.
get
(
'
cookies-notice-dismissed
'
))
{
this
.
hidden
=
true
;
}
...
...
@@ -53,4 +58,8 @@ export class DismissableNoticeComponent {
this
.
client
.
delete
(
url
);
}
}
get
siteTitle
()
{
return
this
.
site
.
title
;
}
}
This diff is collapsed.
Click to expand it.
src/app/modules/auth/auth.module.ts
View file @
a5320884
...
...
@@ -41,9 +41,7 @@ const routes: Routes = [
RegisterComponent
,
ForgotPasswordComponent
,
],
exports
:
[
ForgotPasswordComponent
,
],
exports
:
[
ForgotPasswordComponent
],
entryComponents
:
[
LoginComponent
,
LogoutComponent
,
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/channel.component.ts
View file @
a5320884
...
...
@@ -260,7 +260,8 @@ export class ProChannelComponent implements OnInit, AfterViewInit, OnDestroy {
return
''
;
}
return
`m-theme--wrapper m-theme--wrapper__
${
this
.
channel
.
pro_settings
.
scheme
||
'
light
'
}
`
;
return
`m-theme--wrapper m-theme--wrapper__
${
this
.
channel
.
pro_settings
.
scheme
||
'
light
'
}
`
;
}
@
HostListener
(
'
window:resize
'
)
onResize
()
{
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/channel.service.ts
View file @
a5320884
...
...
@@ -20,7 +20,6 @@ export type RouterLinkToType =
|
'
donate
'
|
'
login
'
;
export
interface
NavItems
{
label
:
string
;
onClick
:
()
=>
void
;
...
...
@@ -42,7 +41,7 @@ export class ProChannelService {
protected
entitiesService
:
EntitiesService
,
protected
session
:
Session
,
protected
route
:
ActivatedRoute
,
protected
modalService
:
OverlayModalService
,
protected
modalService
:
OverlayModalService
)
{}
async
load
(
id
:
string
)
{
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/footer/footer.component.html
View file @
a5320884
<div
class=
"m-pro--channel-footer"
>
<div
class=
"m-pro--channel-footer__items"
>
<a
*ngFor=
"let link of footerLinks"
...
...
@@ -20,12 +19,16 @@
@{{ currentUsername }}
</a>
<a
class=
"m-pro--channel-footer--link"
(click)=
"logout()"
i18n
>
Logout
</a>
<a
class=
"m-pro--channel-footer--link"
(click)=
"logout()"
i18n
>
Logout
</a
>
</ng-container>
<ng-container
*ngIf=
"!isOwner"
>
<span
style=
"position: relative"
>
<minds-button-user-dropdown
[user]=
"user"
></minds-button-user-dropdown>
<minds-button-user-dropdown
[user]=
"user"
></minds-button-user-dropdown>
</span>
</ng-container>
</ng-container>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/hamburger-menu/hamburger-menu.component.html
View file @
a5320884
<a
class=
"m-pro__hamburger-menu__trigger"
(click)=
"toggleMenu()"
>
<a
class=
"m-pro__hamburger-menu__trigger"
(click)=
"toggleMenu()"
>
<i
class=
"material-icons"
>
menu
</i>
</a>
<div
class=
"m-pro__hamburger-menu__menu"
>
<a
class=
"m-pro__hamburger-menu__close"
(click)=
"closeMenu()"
>
<a
class=
"m-pro__hamburger-menu__close"
(click)=
"closeMenu()"
>
<i
class=
"material-icons"
>
close
</i>
</a>
...
...
@@ -28,7 +22,8 @@
routerLinkActive=
"m-pro__hamburger-menu-menu__item--active"
(click)=
"closeMenu()"
i18n
>
Feed
</a>
>
Feed
</a
>
</li>
<li>
...
...
@@ -37,7 +32,8 @@
routerLinkActive=
"m-pro__hamburger-menu-menu__item--active"
(click)=
"closeMenu()"
i18n
>
Videos
</a>
>
Videos
</a
>
</li>
<li>
...
...
@@ -46,7 +42,8 @@
routerLinkActive=
"m-pro__hamburger-menu-menu__item--active"
(click)=
"closeMenu()"
i18n
>
Images
</a>
>
Images
</a
>
</li>
<li>
...
...
@@ -55,7 +52,8 @@
routerLinkActive=
"m-pro__hamburger-menu-menu__item--active"
(click)=
"closeMenu()"
i18n
>
Articles
</a>
>
Articles
</a
>
</li>
<li>
...
...
@@ -64,7 +62,8 @@
routerLinkActive=
"m-pro__hamburger-menu-menu__item--active"
(click)=
"closeMenu()"
i18n
>
Groups
</a>
>
Groups
</a
>
</li>
<li>
...
...
@@ -80,14 +79,13 @@
<a
[class.m-pro__hamburger-menu-menu__item--active]=
"item.isActive()"
(click)=
"item.onClick(); closeMenu()"
>
{{ item.label }}
</a>
>
{{ item.label }}
</a
>
</li>
<li
class=
"m-pro__hamburger-menu-menu__spacer"
></li>
</ng-container>
</ul>
<m-pro--channel-footer
(click)=
"closeMenu()"
></m-pro--channel-footer>
<m-pro--channel-footer
(click)=
"closeMenu()"
></m-pro--channel-footer>
</div>
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/hamburger-menu/hamburger-menu.component.ts
View file @
a5320884
...
...
@@ -4,12 +4,10 @@ import { ProChannelService } from '../channel.service';
@
Component
({
selector
:
'
m-pro__hamburger-menu
'
,
templateUrl
:
'
hamburger-menu.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
changeDetection
:
ChangeDetectionStrategy
.
OnPush
,
})
export
class
ProHamburgerMenu
{
constructor
(
protected
service
:
ProChannelService
)
{
}
constructor
(
protected
service
:
ProChannelService
)
{}
toggleMenu
()
{
if
(
document
.
body
)
{
...
...
@@ -22,7 +20,10 @@ export class ProHamburgerMenu {
}
closeMenu
()
{
if
(
document
.
body
&&
document
.
body
.
classList
.
contains
(
'
hamburger-menu--open
'
))
{
if
(
document
.
body
&&
document
.
body
.
classList
.
contains
(
'
hamburger-menu--open
'
)
)
{
document
.
body
.
classList
.
remove
(
'
hamburger-menu--open
'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/home/home.component.ts
View file @
a5320884
import
{
ChangeDetectionStrategy
,
ChangeDetectorRef
,
Component
,
OnDestroy
,
Component
,
OnDestroy
,
OnInit
,
}
from
'
@angular/core
'
;
import
{
Router
}
from
'
@angular/router
'
;
...
...
@@ -75,11 +76,13 @@ export class ProChannelHomeComponent implements OnInit, OnDestroy {
}
setMenuNavItems
()
{
const
tags
=
this
.
channelService
.
currentChannel
.
pro_settings
.
tag_list
.
concat
([]);
const
tags
=
this
.
channelService
.
currentChannel
.
pro_settings
.
tag_list
.
concat
(
[]
);
const
navItems
:
Array
<
NavItems
>
=
tags
.
map
(
tag
=>
({
label
:
tag
.
label
,
onClick
:
()
=>
{
this
.
navigateToCategory
(
tag
.
tag
)
this
.
navigateToCategory
(
tag
.
tag
)
;
},
isActive
:
()
=>
{
return
false
;
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/list/list.component.ts
View file @
a5320884
...
...
@@ -9,7 +9,11 @@ import {
import
{
ActivatedRoute
,
Router
}
from
'
@angular/router
'
;
import
{
Subscription
}
from
'
rxjs
'
;
import
{
FeedsService
}
from
'
../../../../common/services/feeds.service
'
;
import
{
NavItems
,
ProChannelService
,
RouterLinkToType
}
from
'
../channel.service
'
;
import
{
NavItems
,
ProChannelService
,
RouterLinkToType
,
}
from
'
../channel.service
'
;
import
{
OverlayModalService
}
from
'
../../../../services/ux/overlay-modal
'
;
@
Component
({
...
...
@@ -126,14 +130,16 @@ export class ProChannelListComponent implements OnInit, OnDestroy {
}
setMenuNavItems
()
{
const
tags
=
this
.
channelService
.
currentChannel
.
pro_settings
.
tag_list
.
concat
([]);
const
tags
=
this
.
channelService
.
currentChannel
.
pro_settings
.
tag_list
.
concat
(
[]
);
tags
.
unshift
({
label
:
'
All
'
,
tag
:
'
all
'
,
selected
:
false
});
const
navItems
:
Array
<
NavItems
>
=
tags
.
map
(
tag
=>
({
label
:
tag
.
label
,
onClick
:
()
=>
{
this
.
selectHashtag
(
tag
.
tag
)
this
.
selectHashtag
(
tag
.
tag
)
;
},
isActive
:
()
=>
{
return
this
.
selectedHashtag
===
tag
.
tag
;
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/login/login.component.scss
View file @
a5320884
...
...
@@ -132,10 +132,12 @@ m-pro--channel-login {
flex
:
1
;
margin-left
:
16px
;
z-index
:
2
;
min-width
:
480px
;
@media
screen
and
(
max-width
:
1000px
)
{
flex-basis
:
100%
;
margin-left
:
0
;
min-width
:
initial
;
}
.m-proChannelLogin--subtext
{
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/tiles/media/tile.component.html
View file @
a5320884
...
...
@@ -29,6 +29,10 @@
/>
</div>
<div
class=
"m-proChannelTile__text"
(click)=
"tileClicked()"
*ngIf=
"getTitle() || getText()"
>
<div
class=
"m-proChannelTile__text"
(click)=
"tileClicked()"
*ngIf=
"getTitle() || getText()"
>
<h2
[title]=
"getTitle()"
>
{{ getTitle() }}
</h2>
</div>
This diff is collapsed.
Click to expand it.
src/app/modules/pro/pro.module.ts
View file @
a5320884
...
...
@@ -23,14 +23,14 @@ import { ProUnsubscribeModalComponent } from './channel/unsubscribe-modal/modal.
import
{
ProCategoriesComponent
}
from
'
./channel/categories/categories.component
'
;
import
{
BlogView
}
from
'
../blogs/view/view
'
;
import
{
MediaModalComponent
}
from
'
../media/modal/modal.component
'
;
import
{
NewsfeedSingleComponent
}
from
"
../newsfeed/single/single.component
"
;
import
{
MediaViewComponent
}
from
"
../media/view/view.component
"
;
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
{
ForgotPasswordComponent
}
from
"
../auth/forgot-password/forgot-password.component
"
;
import
{
AuthModule
}
from
"
../auth/auth.module
"
;
import
{
NewsfeedSingleComponent
}
from
'
../newsfeed/single/single.component
'
;
import
{
MediaViewComponent
}
from
'
../media/view/view.component
'
;
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
{
ForgotPasswordComponent
}
from
'
../auth/forgot-password/forgot-password.component
'
;
import
{
AuthModule
}
from
'
../auth/auth.module
'
;
import
{
ProHamburgerMenu
}
from
'
./channel/hamburger-menu/hamburger-menu.component
'
;
const
routes
:
Routes
=
[
...
...
@@ -98,15 +98,15 @@ export const STANDALONE_ROUTES = [
},
{
path
:
'
media/edit/:guid
'
,
component
:
MediaEditComponent
component
:
MediaEditComponent
,
},
{
path
:
'
blog/view/:guid/:title
'
,
component
:
BlogViewInfinite
component
:
BlogViewInfinite
,
},
{
path
:
'
blog/view/:guid
'
,
component
:
BlogViewInfinite
component
:
BlogViewInfinite
,
},
{
path
:
'
blog/edit/:guid
'
,
...
...
@@ -115,14 +115,14 @@ export const STANDALONE_ROUTES = [
},
{
path
:
'
blog/:slugid
'
,
component
:
BlogViewInfinite
component
:
BlogViewInfinite
,
},
{
path
:
'
:type
'
,
component
:
ProChannelListComponent
,
},
],
}
}
,
];
@
NgModule
({
...
...
@@ -162,5 +162,4 @@ export const STANDALONE_ROUTES = [
BlogView
,
],
})
export
class
ProModule
{
}
export
class
ProModule
{}
This diff is collapsed.
Click to expand it.
src/app/services/providers.ts
View file @
a5320884
...
...
@@ -43,6 +43,7 @@ import { FeedsService } from '../common/services/feeds.service';
import
{
ThemeService
}
from
'
../common/services/theme.service
'
;
import
{
GlobalScrollService
}
from
'
./ux/global-scroll.service
'
;
import
{
AuthService
}
from
'
./auth.service
'
;
import
{
SiteService
}
from
'
./site.service
'
;
export
const
MINDS_PROVIDERS
:
any
[]
=
[
{
...
...
@@ -224,4 +225,5 @@ export const MINDS_PROVIDERS: any[] = [
deps
:
[
RendererFactory2
,
Client
,
Session
,
Storage
],
},
AuthService
,
SiteService
,
];
This diff is collapsed.
Click to expand it.
src/app/services/site.service.ts
0 → 100644
View file @
a5320884
import
{
Injectable
}
from
'
@angular/core
'
;
@
Injectable
()
export
class
SiteService
{
isProDomain
()
{
return
Boolean
(
window
.
Minds
.
pro
);
}
get
title
()
{
return
this
.
isProDomain
()
?
window
.
Minds
.
pro
.
title
||
''
:
'
Minds
'
;
}
}
This diff is collapsed.
Click to expand it.
src/app/services/ux/title.ts
View file @
a5320884
...
...
@@ -10,13 +10,19 @@ export class MindsTitle {
return
new
MindsTitle
(
title
);
}
constructor
(
public
title
:
Title
)
{}
constructor
(
public
title
:
Title
)
{
if
(
window
.
Minds
.
pro
)
{
this
.
default_title
=
''
;
}
}
setTitle
(
value
:
string
,
join
=
true
)
{
let
title
;
if
(
value
&&
join
)
{
title
=
[
value
,
this
.
default_title
].
join
(
this
.
sep
);
title
=
[
value
,
this
.
default_title
]
.
filter
(
fragment
=>
Boolean
(
fragment
))
.
join
(
this
.
sep
);
}
else
if
(
value
)
{
title
=
value
;
}
else
{
...
...
This diff is collapsed.
Click to expand it.