@@ -9,7 +9,7 @@ import { registerThemingParticipant, IThemeService } from 'vs/platform/theme/com
99import { MenuBarVisibility , getTitleBarStyle , IWindowOpenable , getMenuBarVisibility } from 'vs/platform/windows/common/windows' ;
1010import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey' ;
1111import { IAction , Action , SubmenuAction , Separator } from 'vs/base/common/actions' ;
12- import { addDisposableListener , Dimension , EventType , getCookieValue } from 'vs/base/browser/dom' ;
12+ import { addDisposableListener , Dimension , EventType } from 'vs/base/browser/dom' ;
1313import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding' ;
1414import { isMacintosh , isWeb , isIOS , isNative } from 'vs/base/common/platform' ;
1515import { IConfigurationService , IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration' ;
@@ -38,8 +38,6 @@ import { KeyCode } from 'vs/base/common/keyCodes';
3838import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry' ;
3939import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys' ;
4040import { ICommandService } from 'vs/platform/commands/common/commands' ;
41- import { ILogService } from 'vs/platform/log/common/log' ;
42- import { Cookie } from 'vs/server/common/cookie' ;
4341
4442export type IOpenRecentAction = IAction & { uri : URI , remoteAuthority ?: string } ;
4543
@@ -318,8 +316,7 @@ export class CustomMenubarControl extends MenubarControl {
318316 @IThemeService private readonly themeService : IThemeService ,
319317 @IWorkbenchLayoutService private readonly layoutService : IWorkbenchLayoutService ,
320318 @IHostService protected readonly hostService : IHostService ,
321- @ICommandService commandService : ICommandService ,
322- @ILogService private readonly logService : ILogService
319+ @ICommandService commandService : ICommandService
323320 ) {
324321 super ( menuService , workspacesService , contextKeyService , keybindingService , configurationService , labelService , updateService , storageService , notificationService , preferencesService , environmentService , accessibilityService , hostService , commandService ) ;
325322
@@ -721,28 +718,6 @@ export class CustomMenubarControl extends MenubarControl {
721718 webNavigationActions . pop ( ) ;
722719 }
723720
724- webNavigationActions . push ( new Action ( 'logout' , localize ( 'logout' , "Log out" ) , undefined , true ,
725- async ( event ?: MouseEvent ) => {
726- const COOKIE_KEY = Cookie . Key ;
727- const loginCookie = getCookieValue ( COOKIE_KEY ) ;
728-
729- this . logService . info ( 'Logging out of code-server' ) ;
730-
731- if ( loginCookie ) {
732- this . logService . info ( `Removing cookie under ${ COOKIE_KEY } ` ) ;
733-
734- if ( document && document . cookie ) {
735- // We delete the cookie by setting the expiration to a date/time in the past
736- document . cookie = COOKIE_KEY + '=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;' ;
737- window . location . href = '/login' ;
738- } else {
739- this . logService . warn ( 'Could not delete cookie because document and/or document.cookie is undefined' ) ;
740- }
741- } else {
742- this . logService . warn ( 'Could not log out because we could not find cookie' ) ;
743- }
744- } ) ) ;
745-
746721 return webNavigationActions ;
747722 }
748723
0 commit comments