DEV: removes application.currentPath deprecation (#7905)
See https://deprecations.emberjs.com/v3.x#toc_application-controller-router-properties for more context
This commit is contained in:
parent
617c74bc79
commit
f9c7d5a4bd
|
@ -1,7 +1,7 @@
|
|||
import computed from "ember-addons/ember-computed-decorators";
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
application: Ember.inject.controller(),
|
||||
router: Ember.inject.service(),
|
||||
|
||||
@computed("siteSettings.enable_group_directory")
|
||||
showGroups(enableGroupDirectory) {
|
||||
|
@ -13,7 +13,7 @@ export default Ember.Controller.extend({
|
|||
return this.currentUser.get("admin") && enableBadges;
|
||||
},
|
||||
|
||||
@computed("application.currentPath")
|
||||
@computed("router.currentRouteName")
|
||||
adminContentsClassName(currentPath) {
|
||||
let cssClasses = currentPath
|
||||
.split(".")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default Ember.Controller.extend({
|
||||
application: Ember.inject.controller(),
|
||||
router: Ember.inject.service(),
|
||||
queryParams: ["category_id"]
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { default as computed } from "ember-addons/ember-computed-decorators";
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
application: Ember.inject.controller(),
|
||||
router: Ember.inject.service(),
|
||||
|
||||
@computed("model.automatic")
|
||||
tabs(automatic) {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export default Ember.Controller.extend({
|
||||
application: Ember.inject.controller()
|
||||
router: Ember.inject.service()
|
||||
});
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export default Ember.Controller.extend({
|
||||
application: Ember.inject.controller()
|
||||
router: Ember.inject.service()
|
||||
});
|
||||
|
|
|
@ -2,6 +2,7 @@ import { exportUserArchive } from "discourse/lib/export-csv";
|
|||
|
||||
export default Ember.Controller.extend({
|
||||
application: Ember.inject.controller(),
|
||||
router: Ember.inject.service(),
|
||||
user: Ember.inject.controller(),
|
||||
userActionType: null,
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
|
||||
export default Ember.Controller.extend({
|
||||
topic: Ember.inject.controller(),
|
||||
application: Ember.inject.controller(),
|
||||
router: Ember.inject.service(),
|
||||
|
||||
actions: {
|
||||
togglePosts(user) {
|
||||
|
|
|
@ -2,14 +2,14 @@ import computed from "ember-addons/ember-computed-decorators";
|
|||
import Topic from "discourse/models/topic";
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
application: Ember.inject.controller(),
|
||||
router: Ember.inject.service(),
|
||||
userTopicsList: Ember.inject.controller("user-topics-list"),
|
||||
user: Ember.inject.controller(),
|
||||
|
||||
pmView: false,
|
||||
viewingSelf: Ember.computed.alias("user.viewingSelf"),
|
||||
isGroup: Ember.computed.equal("pmView", "groups"),
|
||||
currentPath: Ember.computed.alias("application.currentPath"),
|
||||
currentPath: Ember.computed.alias("router.currentRouteName"),
|
||||
selected: Ember.computed.alias("userTopicsList.selected"),
|
||||
bulkSelectEnabled: Ember.computed.alias("userTopicsList.bulkSelectEnabled"),
|
||||
showToggleBulkSelect: true,
|
||||
|
|
|
@ -5,9 +5,9 @@ import optionalService from "discourse/lib/optional-service";
|
|||
|
||||
export default Ember.Controller.extend(CanCheckEmails, {
|
||||
indexStream: false,
|
||||
application: Ember.inject.controller(),
|
||||
router: Ember.inject.service(),
|
||||
userNotifications: Ember.inject.controller("user-notifications"),
|
||||
currentPath: Ember.computed.alias("application.currentPath"),
|
||||
currentPath: Ember.computed.alias("router.currentRouteName"),
|
||||
adminTools: optionalService(),
|
||||
|
||||
@computed("model.username")
|
||||
|
|
|
@ -56,10 +56,10 @@
|
|||
<div class="user-content-wrapper">
|
||||
<section class="user-primary-navigation">
|
||||
<div class="container">
|
||||
{{group-navigation group=model currentPath=application.currentPath tabs=tabs}}
|
||||
{{group-navigation group=model currentPath=router.currentRouteName tabs=tabs}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{outlet}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<section class="user-secondary-navigation">
|
||||
{{#mobile-nav class='activity-nav' desktopClass='action-list activity-list nav-stacked' currentPath=application.currentPath}}
|
||||
{{#mobile-nav class='activity-nav' desktopClass='action-list activity-list nav-stacked' currentPath=router.currentRouteName}}
|
||||
{{group-activity-filter filter="posts" categoryId=category_id}}
|
||||
{{group-activity-filter filter="topics" categoryId=category_id}}
|
||||
{{#if siteSettings.enable_mentions}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<section class='user-secondary-navigation'>
|
||||
{{#mobile-nav class='activity-nav' desktopClass='action-list activity-list nav-stacked' currentPath=application.currentPath}}
|
||||
{{#mobile-nav class='activity-nav' desktopClass='action-list activity-list nav-stacked' currentPath=router.currentRouteName}}
|
||||
{{#each tabs as |tab|}}
|
||||
<li>
|
||||
{{#link-to tab.route model.name}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<section class="user-secondary-navigation">
|
||||
{{#mobile-nav class='messages-nav' desktopClass='nav-stacked action-list' currentPath=application.currentPath}}
|
||||
{{#mobile-nav class='messages-nav' desktopClass='nav-stacked action-list' currentPath=router.currentRouteName}}
|
||||
|
||||
<li>
|
||||
{{#link-to 'group.messages.inbox' model.name}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{#d-section pageClass="user-preferences" class="user-secondary-navigation"}}
|
||||
{{#mobile-nav class='preferences-nav' desktopClass='preferences-list action-list nav-stacked' currentPath=application.currentPath}}
|
||||
{{#mobile-nav class='preferences-nav' desktopClass='preferences-list action-list nav-stacked' currentPath=router.currentRouteName}}
|
||||
<li class='nav-account'>
|
||||
{{#link-to 'preferences.account'}}
|
||||
{{i18n 'user.preferences_nav.account'}}
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
{{/if}}
|
||||
|
||||
{{user-card-contents
|
||||
currentPath=application.currentPath
|
||||
currentPath=router.currentRouteName
|
||||
topic=topic.model
|
||||
showUser=(action "showUser")
|
||||
togglePosts=(action "togglePosts")
|
||||
createNewMessageViaParams=(route-action "createNewMessageViaParams")}}
|
||||
|
||||
{{group-card-contents
|
||||
currentPath=application.currentPath
|
||||
currentPath=router.currentRouteName
|
||||
topic=topic.model
|
||||
showUser=(action "showUser")
|
||||
showGroup=(action "showGroup")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{#d-section pageClass="user-activity" class="user-secondary-navigation" scrollTop="false"}}
|
||||
{{#mobile-nav class='activity-nav' desktopClass='action-list activity-list nav-stacked' currentPath=application.currentPath}}
|
||||
{{#mobile-nav class='activity-nav' desktopClass='action-list activity-list nav-stacked' currentPath=router.currentRouteName}}
|
||||
<li>
|
||||
{{#link-to 'userActivity.index'}}{{i18n 'user.filters.all'}}{{/link-to}}
|
||||
</li>
|
||||
|
@ -26,7 +26,7 @@
|
|||
connectorTagName='li'
|
||||
args=(hash model=model)}}
|
||||
{{/mobile-nav}}
|
||||
|
||||
|
||||
{{/d-section}}
|
||||
{{#if canDownloadPosts}}
|
||||
<section class='user-additional-controls'>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{#d-section pageClass="user-notifications" class="user-secondary-navigation"}}
|
||||
{{#mobile-nav class='notifications-nav' desktopClass='notification-list action-list nav-stacked' currentPath=application.currentPath}}
|
||||
{{#mobile-nav class='notifications-nav' desktopClass='notification-list action-list nav-stacked' currentPath=router.currentRouteName}}
|
||||
<li>
|
||||
{{#link-to 'userNotifications.index'}}
|
||||
{{i18n 'user.filters.all'}}
|
||||
|
|
Loading…
Reference in New Issue