diff --git a/app/assets/app/auth/MFAChallenge.component.js b/app/assets/app/auth/MFAChallenge.component.js index b1de955..43a4293 100644 --- a/app/assets/app/auth/MFAChallenge.component.js +++ b/app/assets/app/auth/MFAChallenge.component.js @@ -38,14 +38,18 @@ export default class MFAChallengePage extends Component { static get props() { return ['app_name'] } static get template() { return template } - loading = false + constructor() { + super() - verify_code = '' - verify_success = false + this.loading = false - error_message = '' - other_message = '' - t = {} + this.verify_code = '' + this.verify_success = false + + this.error_message = '' + this.other_message = '' + this.t = {} + } async vue_on_create() { this.t = await T( diff --git a/app/assets/app/auth/MFADisable.component.js b/app/assets/app/auth/MFADisable.component.js index 472d611..cec8653 100644 --- a/app/assets/app/auth/MFADisable.component.js +++ b/app/assets/app/auth/MFADisable.component.js @@ -28,12 +28,16 @@ export default class MFADisableComponent extends Component { static get template() { return template } static get props() { return [] } - app_name = '' - step = 0 - loading = false - error_message = '' - other_message = '' - t = {} + constructor() { + super() + + this.app_name = '' + this.step = 0 + this.loading = false + this.error_message = '' + this.other_message = '' + this.t = {} + } async vue_on_create() { this.app_name = session.get('app.name') diff --git a/app/assets/app/auth/MFARecovery.component.js b/app/assets/app/auth/MFARecovery.component.js index f39c5d5..11c6054 100644 --- a/app/assets/app/auth/MFARecovery.component.js +++ b/app/assets/app/auth/MFARecovery.component.js @@ -38,12 +38,16 @@ export default class MFARecoveryComponent extends Component { static get template() { return template } static get props() { return ['app_name'] } - verify_success = false - loading = false - recovery_code = '' - error_message = '' - other_message = '' - t = {} + constructor() { + super() + + this.verify_success = false + this.loading = false + this.recovery_code = '' + this.error_message = '' + this.other_message = '' + this.t = {} + } async vue_on_create() { this.t = await T( diff --git a/app/assets/app/auth/MFASetup.component.js b/app/assets/app/auth/MFASetup.component.js index 1a30bb9..c651f9f 100644 --- a/app/assets/app/auth/MFASetup.component.js +++ b/app/assets/app/auth/MFASetup.component.js @@ -61,19 +61,23 @@ export default class MFASetupPage extends Component { static get props() { return ['app_name'] } static get template() { return template } - loading = false - step = 0 + constructor() { + super() - qr_data = '' - otpauth_url = '' - secret = '' - verify_code = '' + this.loading = false + this.step = 0 - verify_success = false + this.qr_data = '' + this.otpauth_url = '' + this.secret = '' + this.verify_code = '' - error_message = '' - other_message = '' - t = {} + this.verify_success = false + + this.error_message = '' + this.other_message = '' + this.t = {} + } async vue_on_create() { this.t = await T( diff --git a/app/assets/app/auth/Page.component.js b/app/assets/app/auth/Page.component.js index 0569f79..57c5cdb 100644 --- a/app/assets/app/auth/Page.component.js +++ b/app/assets/app/auth/Page.component.js @@ -25,7 +25,11 @@ export default class AuthPage extends Component { static get props() { return ['app_name', 'message', 'actions'] } static get template() { return template } - loading = false + constructor() { + super() + + this.loading = false + } async action_click(index) { this.loading = true diff --git a/app/assets/app/auth/PasswordReset.component.js b/app/assets/app/auth/PasswordReset.component.js index d714870..4eb898e 100644 --- a/app/assets/app/auth/PasswordReset.component.js +++ b/app/assets/app/auth/PasswordReset.component.js @@ -78,23 +78,27 @@ export default class PasswordResetComponent extends Component { static get template() { return template } static get props() { return ['app_name'] } - step = 0 - loading = false - has_mfa = false + constructor() { + super() - error_message = '' - other_message = '' + this.step = 0 + this.loading = false + this.has_mfa = false - step_1_valid = false - step_1_calc_time = '' - step_1_problem = '' + this.error_message = '' + this.other_message = '' - step_2_valid = false + this.step_1_valid = false + this.step_1_calc_time = '' + this.step_1_problem = '' - password = '' - confirm_password = '' - t = {} - ready = false + this.step_2_valid = false + + this.password = '' + this.confirm_password = '' + this.t = {} + this.ready = false + } async vue_on_create() { this.has_mfa = !!session.get('user.has_mfa') diff --git a/app/assets/app/auth/login/Form.component.js b/app/assets/app/auth/login/Form.component.js index d528069..d925113 100644 --- a/app/assets/app/auth/login/Form.component.js +++ b/app/assets/app/auth/login/Form.component.js @@ -63,18 +63,21 @@ export default class AuthLoginForm extends Component { ] } static get template() { return template } - username = '' - password = '' - button_text = '' - step_two = false - btn_disabled = true - loading = false - error_message = '' - other_message = '' - allow_back = true - auth_user = false - - t = {} + constructor() { + super() + + this.username = '' + this.password = '' + this.button_text = '' + this.step_two = false + this.btn_disabled = true + this.loading = false + this.error_message = '' + this.other_message = '' + this.allow_back = true + this.auth_user = false + this.t = {} + } watch_username(new_username, old_username) { this.btn_disabled = !new_username diff --git a/app/assets/app/auth/register/Form.component.js b/app/assets/app/auth/register/Form.component.js index fb6630a..2f30d19 100644 --- a/app/assets/app/auth/register/Form.component.js +++ b/app/assets/app/auth/register/Form.component.js @@ -98,19 +98,23 @@ export default class RegistrationFormComponent extends Component { static get template() { return template } static get props() { return ['app_name'] } - loading = false - step = 1 - other_message = '' - error_message = '' - message = '' - btn_disabled = true - button_text = '' - - first_name = '' - last_name = '' - username = '' - email = '' - t = {} + constructor() { + super() + + this.loading = false + this.step = 1 + this.other_message = '' + this.error_message = '' + this.message = '' + this.btn_disabled = true + this.button_text = '' + + this.first_name = '' + this.last_name = '' + this.username = '' + this.email = '' + this.t = {} + } async vue_on_create() { // Batch-load translated phrases diff --git a/app/assets/app/cobalt/Form.component.js b/app/assets/app/cobalt/Form.component.js index 91a83f2..f8d0716 100644 --- a/app/assets/app/cobalt/Form.component.js +++ b/app/assets/app/cobalt/Form.component.js @@ -146,20 +146,24 @@ export default class FormComponent extends Component { return ['resource', 'form_id', 'initial_mode'] } - definition = {} - data = {} - uuid = '' - title = '' - error_message = '' - other_message = '' - - access_msg = '' - can_access = false - - is_ready = false - mode = '' - id = '' - t = {} + constructor() { + super() + + this.definition = {} + this.data = {} + this.uuid = '' + this.title = '' + this.error_message = '' + this.other_message = '' + + this.access_msg = '' + this.can_access = false + + this.is_ready = false + this.mode = '' + this.id = '' + this.t = {} + } reset() { this.definition = {} diff --git a/app/assets/app/cobalt/Listing.component.js b/app/assets/app/cobalt/Listing.component.js index 52a22d4..a8bc525 100644 --- a/app/assets/app/cobalt/Listing.component.js +++ b/app/assets/app/cobalt/Listing.component.js @@ -65,13 +65,17 @@ export default class ListingComponent extends Component { static get template() { return template } static get props() { return ['resource'] } - definition = {} - data = [] - resource_class = {} + constructor() { + super() - access_msg = '' - can_access = false - t = {} + this.definition = {} + this.data = [] + this.resource_class = {} + + this.access_msg = '' + this.can_access = false + this.t = {} + } async vue_on_create() { this.t = await T( diff --git a/app/assets/app/dash/AppSetup.component.js b/app/assets/app/dash/AppSetup.component.js index e7710c7..3499654 100644 --- a/app/assets/app/dash/AppSetup.component.js +++ b/app/assets/app/dash/AppSetup.component.js @@ -232,35 +232,39 @@ export default class AppSetupComponent extends Component { static get template() { return template } static get props() { return [] } - step = 0 - btn_disabled = true - btn_back = false - btn_hidden = false - btn_listing = false + constructor() { + super() - name = '' - identifier = '' - type = '' // ldap | saml | oauth - oauth_redirect_uri = '' + this.step = 0 + this.btn_disabled = true + this.btn_back = false + this.btn_hidden = false + this.btn_listing = false - saml_entity_id = '' - saml_acs_url = '' - saml_slo_url = '' + this.name = '' + this.identifier = '' + this.type = '' // ldap | saml | oauth + this.oauth_redirect_uri = '' - ldap_username = '' - ldap_password = '' - ldap_password_confirm = '' - ldap_config = {} + this.saml_entity_id = '' + this.saml_acs_url = '' + this.saml_slo_url = '' - error_message = '' + this.ldap_username = '' + this.ldap_password = '' + this.ldap_password_confirm = '' + this.ldap_config = {} - app = {} - oauth_client = {} - saml_provider = {} - ldap_client = {} + this.error_message = '' - app_name = '' - host = '' + this.app = {} + this.oauth_client = {} + this.saml_provider = {} + this.ldap_client = {} + + this.app_name = '' + this.host = '' + } make_url(path) { return session.url(path) diff --git a/app/assets/app/dash/NavBar.component.js b/app/assets/app/dash/NavBar.component.js index 1729c5c..10c71f7 100644 --- a/app/assets/app/dash/NavBar.component.js +++ b/app/assets/app/dash/NavBar.component.js @@ -1,7 +1,6 @@ import { Component } from '../../lib/vues6/vues6.js' import { event_bus } from '../service/EventBus.service.js' import { session } from '../service/Session.service.js' -import { message_service } from '../service/Message.service.js' const template = `