saby-customizer 0.0.0-pre.21 → 0.0.0-pre.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/features/git-branch.js +16 -12
- package/package.json +1 -1
package/features/git-branch.js
CHANGED
|
@@ -181,7 +181,8 @@ class GitBranchCard extends oom.extends(HTMLElement) {
|
|
|
181
181
|
placeholder: this.data.branchSubName,
|
|
182
182
|
pattern: '^\\w+[\\w()-]*$',
|
|
183
183
|
validationmessage: 'Латинские буквы, цифры и _()-',
|
|
184
|
-
|
|
184
|
+
oninput: () => this.oninputBranchSubName(),
|
|
185
|
+
onblur: () => this.onblurBranchSubName()
|
|
185
186
|
}).dom,
|
|
186
187
|
/** @type {import('@material/mwc-icon-button').IconButton} */// @ts-ignore
|
|
187
188
|
copyBranchButton: oom.mwcIconButton({
|
|
@@ -244,9 +245,10 @@ class GitBranchCard extends oom.extends(HTMLElement) {
|
|
|
244
245
|
*/
|
|
245
246
|
set branchSubName(value) {
|
|
246
247
|
this.data.branchSubName = value || this.data.number
|
|
247
|
-
this.elements.branchSubName.
|
|
248
|
-
this.elements.
|
|
249
|
-
|
|
248
|
+
oom(this.elements.branchSubName, { innerHTML: '', title: this.data.branchSubName }, this.data.branchSubName)
|
|
249
|
+
if (this.elements.branchSubNameTextfield.value !== this.data.branchSubName) {
|
|
250
|
+
this.elements.branchSubNameTextfield.value = this.data.branchSubName
|
|
251
|
+
}
|
|
250
252
|
}
|
|
251
253
|
|
|
252
254
|
/** @returns {string} Краткое описание задачи */
|
|
@@ -327,14 +329,16 @@ class GitBranchCard extends oom.extends(HTMLElement) {
|
|
|
327
329
|
this.elements.branchSubNameTextfield.select()
|
|
328
330
|
}
|
|
329
331
|
|
|
330
|
-
/**
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
332
|
+
/** Сохранение данных о доп. имени ветки при вводе */
|
|
333
|
+
oninputBranchSubName() {
|
|
334
|
+
if (this.elements.branchSubNameTextfield.checkValidity()) {
|
|
335
|
+
this.branchSubName = this.elements.branchSubNameTextfield.value
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/** Скрывает поле ввода доп. имени ветки при потере фокуса */
|
|
340
|
+
onblurBranchSubName() {
|
|
341
|
+
if (this.elements.branchSubNameTextfield.checkValidity()) {
|
|
338
342
|
this.elements.branchSubName.classList.toggle('hide')
|
|
339
343
|
this.elements.branchSubNameTextfield.classList.toggle('hide')
|
|
340
344
|
}
|