mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-03-10 05:45:13 +08:00
Revert templateId to viewModelTemplateID for issue #150
This commit is contained in:
parent
7ede8eeb4a
commit
21a9e24233
4 changed files with 6 additions and 6 deletions
|
@ -8,8 +8,8 @@ import { ViewType } from 'Knoin/Knoin';
|
|||
class AbstractView {
|
||||
constructor(templateID, type)
|
||||
{
|
||||
// Object.defineProperty(this, 'templateId', { value: templateID });
|
||||
this.templateId = templateID;
|
||||
// Object.defineProperty(this, 'viewModelTemplateID', { value: templateID });
|
||||
this.viewModelTemplateID = templateID;
|
||||
this.viewType = type;
|
||||
this.viewModelDom = null;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ const SCREENS = {},
|
|||
ViewModelClass.__vm = vm;
|
||||
|
||||
if (vmPlace) {
|
||||
vmDom = Element.fromHTML('<div class="rl-view-model RL-' + vm.templateId + '" hidden=""></div>');
|
||||
vmDom = Element.fromHTML('<div class="rl-view-model RL-' + vm.viewModelTemplateID + '" hidden=""></div>');
|
||||
vmPlace.append(vmDom);
|
||||
|
||||
vm.viewModelDom = vmDom;
|
||||
|
@ -92,7 +92,7 @@ const SCREENS = {},
|
|||
vmDom,
|
||||
{
|
||||
i18nInit: true,
|
||||
template: () => ({ name: vm.templateId })
|
||||
template: () => ({ name: vm.viewModelTemplateID })
|
||||
},
|
||||
vm
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
if (forgotUrl || registerUrl) {
|
||||
addEventListener('rl-view-model', e => {
|
||||
if (e.detail && 'Login' === (e.detail.templateId || e.detail.viewModelTemplateID)) {
|
||||
if (e.detail && 'Login' === e.detail.viewModelTemplateID) {
|
||||
const container = e.detail.viewModelDom.querySelector('#plugin-Login-BottomControlGroup'),
|
||||
forgot = 'LOGIN/LABEL_FORGOT_PASSWORD',
|
||||
register = 'LOGIN/LABEL_REGISTRATION';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
(rl => {
|
||||
|
||||
rl && addEventListener('rl-view-model', e => {
|
||||
if (e.detail && 'Login' === (e.detail.templateId || e.detail.viewModelTemplateID)) {
|
||||
if (e.detail && 'Login' === e.detail.viewModelTemplateID) {
|
||||
const container = e.detail.viewModelDom.querySelector('#plugin-Login-BottomControlGroup'),
|
||||
placeholder = 'LOGIN/LABEL_TWO_FACTOR_CODE';
|
||||
if (container) {
|
||||
|
|
Loading…
Reference in a new issue