-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(theme): compatible with vscode theme
- Loading branch information
Showing
44 changed files
with
910 additions
and
703 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,8 +26,4 @@ | |
opacity: 0.4; | ||
pointer-events: none; | ||
} | ||
|
||
&:hover { | ||
opacity: 0.9; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,6 @@ | |
} | ||
|
||
&--shadow { | ||
box-shadow: rgb(0, 0, 0) 0 2px 4px; | ||
box-shadow: var(--widget-shadow) 0 2px 4px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,11 @@ | |
font-size: 16px; | ||
} | ||
} | ||
|
||
&__separator { | ||
height: 1px; | ||
width: 100%; | ||
} | ||
} | ||
|
||
#{$subMenu} { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,42 @@ | ||
import { IColorTheme } from "mo/model/colorTheme"; | ||
import { IExtension, IExtensionType } from "mo/model/extension"; | ||
|
||
const colorThemesExtension: IExtension = require('./package.json'); | ||
|
||
function initColorTheme() { | ||
|
||
try { | ||
|
||
if (!colorThemesExtension || !colorThemesExtension.categories?.includes(IExtensionType.Theme)) { | ||
console.error('This is invalid colorTheme extension package!', colorThemesExtension); | ||
} | ||
|
||
const themes = colorThemesExtension.contributes?.themes?.map((theme: IColorTheme) => { | ||
if (theme.path) { | ||
const themeDetail = {}; // require(theme.path); | ||
return Object.assign({}, theme, themeDetail) | ||
} | ||
return theme; | ||
}); | ||
|
||
if (!colorThemesExtension.contributes) { | ||
colorThemesExtension.contributes = { themes: [] }; | ||
} | ||
|
||
colorThemesExtension.contributes.themes = themes; | ||
} catch (e) { | ||
throw new Error('Load color theme exception:' + e); | ||
} | ||
} | ||
|
||
initColorTheme(); | ||
|
||
export { | ||
colorThemesExtension | ||
} | ||
import { IColorTheme } from 'mo/model/colorTheme'; | ||
import { IExtension } from 'mo/model/extension'; | ||
|
||
const defaultColorThemeExtension: IExtension = require('./package.json'); | ||
|
||
// The below handle for theme extension is temporary, | ||
// we will automatic load the extension package. | ||
|
||
// Default | ||
const defaultDark: IColorTheme = require('./themes/dark_defaults.json'); | ||
const defaultLight: IColorTheme = require('./themes/light_defaults.json'); | ||
const defaultHC: IColorTheme = require('./themes/hc_black_defaults.json'); | ||
|
||
// Theme | ||
const darkPlus: IColorTheme = require('./themes/dark_plus.json'); | ||
Object.assign(darkPlus, defaultDark); | ||
const darkVS: IColorTheme = require('./themes/dark_vs.json'); | ||
Object.assign(darkVS, defaultDark); | ||
|
||
const lightPlus: IColorTheme = require('./themes/light_plus.json'); | ||
Object.assign(lightPlus, defaultLight); | ||
const lightVS: IColorTheme = require('./themes/light_vs.json'); | ||
Object.assign(lightVS, defaultLight); | ||
|
||
const hcBlack: IColorTheme = require('./themes/hc_black.json'); | ||
Object.assign(hcBlack, defaultHC); | ||
|
||
const themes = defaultColorThemeExtension.contributes?.themes || []; | ||
|
||
const themeDarkPlus = themes[0]; | ||
const themeLightPlus = themes[1]; | ||
const themeVSDark = themes[2]; | ||
const themeVSLight = themes[3]; | ||
const themeHCBlack = themes[4]; | ||
|
||
themes[0] = Object.assign({}, themeDarkPlus, darkPlus); | ||
themes[1] = Object.assign({}, themeLightPlus, lightPlus); | ||
themes[2] = Object.assign({}, themeVSDark, darkVS); | ||
themes[3] = Object.assign({}, themeVSLight, lightVS); | ||
themes[4] = Object.assign({}, themeHCBlack, hcBlack); | ||
|
||
export { defaultColorThemeExtension }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { IColorTheme } from 'mo/model/colorTheme'; | ||
import { IExtension } from 'mo/model/extension'; | ||
|
||
const monokaiColorThemeExtension: IExtension = require('./package.json'); | ||
|
||
// Default | ||
const themeOneColors: IColorTheme = require('./themes/monokai-color-theme.json'); | ||
|
||
const themes = monokaiColorThemeExtension.contributes?.themes || []; | ||
|
||
const themeOne = themes[0]; | ||
|
||
themes[0] = Object.assign({}, themeOne, themeOneColors); | ||
|
||
export { monokaiColorThemeExtension }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.