Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32213162
D3336.1765146187.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3336.1765146187.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, Dec 7, 10:23 PM (4 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5846233
Default Alt Text
D3336.1765146187.diff (1 KB)
Attached To
Mode
D3336: [web] Introduce settings section to NavInfo
Attached
Detach File
Event Timeline
Log In to Comment