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