A platform for community discussion. Free, open, simple.
DEV: Remove obsolete topic-progress code
Jarek Radosz5b6acea56e50
diff --git a/app/assets/javascripts/discourse/app/components/topic-progress.js b/app/assets/javascripts/discourse/app/components/topic-progress.jsindex 12d6d40b341..ee5df9843d9 100644--- a/app/assets/javascripts/discourse/app/components/topic-progress.js+++ b/app/assets/javascripts/discourse/app/components/topic-progress.js@@ -1,8 +1,8 @@import discourseComputed, { bind } from "discourse-common/utils/decorators";import Component from "@ember/component";-import I18n from "I18n";import { alias } from "@ember/object/computed";import { later, scheduleOnce } from "@ember/runloop";+import { action } from "@ember/object";export default Component.extend({elementId: "topic-progress-wrapper",@@ -13,23 +13,6 @@ export default Component.extend({postStream: alias("topic.postStream"),_streamPercentage: null,- @discourseComputed("progressPosition")- jumpTopDisabled(progressPosition) {- return progressPosition <= 3;- },-- @discourseComputed(- "postStream.filteredPostsCount",- "topic.highest_post_number",- "progressPosition"- )- jumpBottomDisabled(filteredPostsCount, highestPostNumber, progressPosition) {- return (- progressPosition >= filteredPostsCount ||- progressPosition >= highestPostNumber- );- },-@discourseComputed("postStream.loaded","topic.currentPost",@@ -47,17 +30,6 @@ export default Component.extend({);},- @discourseComputed("hugeNumberOfPosts", "topic.highest_post_number")- jumpToBottomTitle(hugeNumberOfPosts, highestPostNumber) {- if (hugeNumberOfPosts) {- return I18n.t("topic.progress.jump_bottom_with_number", {- post_number: highestPostNumber,- });- } else {- return I18n.t("topic.progress.jump_bottom");- }- },-@discourseComputed("progressPosition", "topic.last_read_post_id")showBackButton(position, lastReadId) {if (!lastReadId) {@@ -195,17 +167,12 @@ export default Component.extend({click(e) {if (e.target.closest("#topic-progress")) {- this.send("toggleExpansion");+ this.toggleProperty("expanded");}},- actions: {- toggleExpansion() {- this.toggleProperty("expanded");- },-- goBack() {- this.attrs.jumpToPost(this.get("topic.last_read_post_number"));- },+ @action+ goBack() {+ this.attrs.jumpToPost(this.get("topic.last_read_post_number"));},});diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex 9b68f2f9b3e..0e6f2b40e0e 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -2745,20 +2745,13 @@ en:progress:title: topic progress- go_top: "top"- go_bottom: "bottom"- go: "go"- jump_bottom: "jump to last post"jump_prompt: "jump to..."jump_prompt_of:one: "of %{count} post"other: "of %{count} posts"jump_prompt_long: "Jump to..."- jump_bottom_with_number: "jump to post %{post_number}"jump_prompt_to_date: "to date"jump_prompt_or: "or"- total: total posts- current: current postnotifications:title: change how often you get notified about this topic