* add stopAll invocation to ipc handler * trigger modal on both signout btns * refactor invalidateSession fn * fix application controller tests * fix failing tests settings-card/user * add test to Acceptance | authentication * migrate electron dialog.showMessageBoxSync to Hds * rename channel and tracked prop, consolidate cancel fns * combine modals, add willDestroy, refactor * test signout and close sessions modal * address feedback * refactor window.electron in authentication-test * address feedback * refactor: 💡 Fix failing tests --------- Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
23 lines
588 B
JavaScript
23 lines
588 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import Controller, { inject as controller } from '@ember/controller';
|
|
import { action } from '@ember/object';
|
|
|
|
export default class ScopesScopeProjectsSettingsIndexController extends Controller {
|
|
@controller('application') application;
|
|
|
|
// =actions
|
|
|
|
/**
|
|
* Calls the Application controller's toggleTheme method
|
|
* @param {string} theme - "light", "dark", or nullish (system default)
|
|
*/
|
|
@action
|
|
toggleTheme({ target: { value: theme } }) {
|
|
return this.application.toggleTheme(theme);
|
|
}
|
|
}
|