提交 63d89c3d 编写于 作者: J Joao Moreno

🐛 fixes #25622

上级 52dd6053
...@@ -16,6 +16,14 @@ import pkg from 'vs/platform/node/package'; ...@@ -16,6 +16,14 @@ import pkg from 'vs/platform/node/package';
// Enable this by default // Enable this by default
function getDefaultValue(): boolean { function getDefaultValue(): boolean {
const minorVersion = pkg.version.replace(/^(\d+\.\d+).*$/, '$1');
const forcedVersion = window.localStorage.getItem('forcedPreviewSCMVersion');
if (forcedVersion !== minorVersion) {
window.localStorage.setItem('forcedPreviewSCMVersion', minorVersion);
window.localStorage.setItem('enablePreviewSCM', 'true');
}
const value = window.localStorage.getItem('enablePreviewSCM'); const value = window.localStorage.getItem('enablePreviewSCM');
return value !== 'false'; return value !== 'false';
} }
...@@ -36,7 +44,7 @@ export default class SCMPreview { ...@@ -36,7 +44,7 @@ export default class SCMPreview {
export class EnableSCMPreviewAction extends Action { export class EnableSCMPreviewAction extends Action {
static ID = 'enablescmpreview'; static ID = 'enablescmpreview';
static LABEL = 'Enable Preview SCM'; static LABEL = 'Disable Legacy Git';
constructor( constructor(
id = EnableSCMPreviewAction.ID, id = EnableSCMPreviewAction.ID,
...@@ -63,7 +71,7 @@ export class EnableSCMPreviewAction extends Action { ...@@ -63,7 +71,7 @@ export class EnableSCMPreviewAction extends Action {
export class DisableSCMPreviewAction extends Action { export class DisableSCMPreviewAction extends Action {
static ID = 'disablescmpreview'; static ID = 'disablescmpreview';
static LABEL = 'Disable Preview SCM'; static LABEL = 'Enable Legacy Git';
constructor( constructor(
id = DisableSCMPreviewAction.ID, id = DisableSCMPreviewAction.ID,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册