Page MenuHomePhabricator

D3336.diff
No OneTemporary

D3336.diff

diff --git a/web/types/nav-types.js b/web/types/nav-types.js
--- a/web/types/nav-types.js
+++ b/web/types/nav-types.js
@@ -5,9 +5,10 @@
export type NavInfo = {
...$Exact<BaseNavInfo>,
- +tab: 'calendar' | 'chat' | 'apps',
+ +tab: 'calendar' | 'chat' | 'apps' | 'settings',
+activeChatThreadID: ?string,
+pendingThread?: ThreadInfo,
+ +settingsSection?: 'account',
};
export const updateNavInfoActionType = 'UPDATE_NAV_INFO';
diff --git a/web/url-utils.js b/web/url-utils.js
--- a/web/url-utils.js
+++ b/web/url-utils.js
@@ -58,6 +58,8 @@
if (activeChatThreadID) {
newURL += `thread/${activeChatThreadID}/`;
}
+ } else if (navInfo.tab === 'settings' && navInfo.settingsSection) {
+ newURL += `${navInfo.settingsSection}/`;
}
}
@@ -102,14 +104,25 @@
tab = 'calendar';
} else if (urlInfo.apps) {
tab = 'apps';
+ } else if (urlInfo.settings) {
+ tab = 'settings';
}
- return {
+ const newNavInfo = {
tab,
startDate: startDateForYearAndMonth(year, month),
endDate: endDateForYearAndMonth(year, month),
activeChatThreadID,
};
+
+ if (!urlInfo.settings) {
+ return newNavInfo;
+ }
+
+ return {
+ ...newNavInfo,
+ settingsSection: urlInfo.settings,
+ };
}
export { canonicalURLFromReduxState, navInfoFromURL };

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 10:28 PM (21 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2532125
Default Alt Text
D3336.diff (1 KB)

Event Timeline