Skip to content

Commit d6bd381

Browse files
svenefftingeroboquat
authored andcommitted
[dashboard] small fixes
- avoid logo disappearing - limit with of org selector - added redirects for old user setting slugs
1 parent 12ed136 commit d6bd381

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

components/dashboard/src/app/AppRoutes.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,34 @@ export const AppRoutes: FunctionComponent<AppRoutesProps> = ({ user, teams }) =>
244244
<Route path={["/t/"]} exact>
245245
<Redirect to="/projects" />
246246
</Route>
247+
{/* redirect for old user settings slugs */}
248+
<Route path="/account" exact>
249+
<Redirect to={settingsPathAccount} />
250+
</Route>
251+
<Route path="/integrations" exact>
252+
<Redirect to={settingsPathIntegrations} />
253+
</Route>
254+
<Route path="/notifications" exact>
255+
<Redirect to={settingsPathNotifications} />
256+
</Route>
257+
<Route path="/billing" exact>
258+
<Redirect to={settingsPathBilling} />
259+
</Route>
260+
<Route path="/plans" exact>
261+
<Redirect to={settingsPathPlans} />
262+
</Route>
263+
<Route path="/preferences" exact>
264+
<Redirect to={settingsPathPreferences} />
265+
</Route>
266+
<Route path="/variables" exact>
267+
<Redirect to={settingsPathVariables} />
268+
</Route>
269+
<Route path="/tokens">
270+
<Redirect to={settingsPathPersonalAccessTokens} />
271+
</Route>
272+
<Route path="/keys" exact>
273+
<Redirect to={settingsPathSSHKeys} />
274+
</Route>
247275
<Route
248276
path="*"
249277
render={(_match) => {

components/dashboard/src/menu/Menu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ export default function Menu() {
134134
<header className="app-container flex flex-col pt-4 space-y-4" data-analytics='{"button_type":"menu"}'>
135135
<div className="flex h-10 mb-3">
136136
<div className="flex justify-between items-center pr-3">
137-
<Link to="/" className="pr-3">
137+
<Link to="/" className="pr-3 w-10">
138138
<img src={gitpodIcon} className="h-6" alt="Gitpod's logo" />
139139
</Link>
140140
<OrganizationSelector />
141141
{!isMinimalUI && (
142142
<>
143-
<div className="pl-2 text-base text-gray-500 dark:text-gray-400 flex">
143+
<div className="pl-2 text-base text-gray-500 dark:text-gray-400 flex max-w-lg overflow-scroll">
144144
{leftMenu.map((entry) => (
145145
<div className="p-1" key={entry.title}>
146146
<PillMenuItem

components/dashboard/src/menu/OrganizationSelector.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ export default function OrganizationSelector(p: OrganizationSelectorProps) {
9191
return (
9292
<ContextMenu customClasses="w-64 left-0" menuEntries={entries}>
9393
<div className={`${classes} rounded-2xl pl-3`}>
94-
<div className="py-1 pr-2 font-semibold">{selectedEntry.title!}</div>
94+
<div className="py-1 pr-2 font-semibold whitespace-nowrap max-w-xs overflow-hidden">
95+
{selectedEntry.title!}
96+
</div>
9597
<div className="flex h-full pl-0 pr-1 py-1.5 text-gray-50">
9698
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
9799
<path

0 commit comments

Comments
 (0)