Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3295646
D3336.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3336.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D3336: [web] Introduce settings section to NavInfo
Attached
Detach File
Event Timeline
Log In to Comment