History based navigation with new right panel store (#7398)

Co-authored-by: J. Ryan Stinnett <jryans@gmail.com>
This commit is contained in:
Timo 2022-01-05 17:25:41 +01:00 committed by GitHub
parent 6f89267a31
commit 4ab3470184
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 248 additions and 252 deletions

View file

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { _t } from "../../languageHandler";
// These are in their own file because of circular imports being a problem.
export enum RightPanelPhases {
// Room stuff
@ -44,6 +46,17 @@ export enum RightPanelPhases {
ThreadPanel = "ThreadPanel",
}
export function backLabelForPhase(phase: RightPanelPhases) {
switch (phase) {
case RightPanelPhases.ThreadPanel: return _t("Threads");
case RightPanelPhases.Timeline: return _t("Back to chat");
case RightPanelPhases.RoomSummary: return _t("Room information");
case RightPanelPhases.RoomMemberList: return _t("Room members");
case RightPanelPhases.ThreadView: return _t("Back to thread");
}
return null;
}
// These are the phases that are safe to persist (the ones that don't require additional
// arguments).
export const RIGHT_PANEL_PHASES_NO_ARGS = [