Compare commits

...

1 Commits

Author SHA1 Message Date
ff8d505281 dynamic theme change. 2021-01-04 13:12:51 -08:00
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,18 @@
import { installTheme } from './installTheme';
const THEME_LIST = [
'espresso',
'maelstrom',
'snow'
];
export function getThemeItems(openmct) {
return THEME_LIST.map(theme => {
return {
cssClass: '',
name: theme,
description: `${theme} Theme`,
callBack: () => installTheme(openmct, theme)
};
});
}

View File

@ -24,11 +24,14 @@
ref="aboutLogo"
class="l-shell__app-logo"
@click="launchAbout"
@contextmenu.prevent="showContextMenu"
></div>
</template>
<script>
import AboutDialog from './AboutDialog.vue';
import { getThemeItems } from '../../plugins/themes/themeMenuItems';
import Vue from 'vue';
export default {
@ -53,6 +56,9 @@ export default {
element: vm.$el,
size: 'large'
});
},
showContextMenu(event) {
this.openmct.menus.showMenu(event.x, event.y, getThemeItems(this.openmct));
}
}
};