Browse Source

Fix editing input fields with emoji as last char

Removed DS_Store files
master
morethanwords 4 years ago
parent
commit
5f3c48db65
  1. BIN
      .DS_Store
  2. 2
      .gitignore
  3. 1063
      package-lock.json
  4. 4
      package.json
  5. 2
      src/components/sidebarLeft/tabs/editFolder.ts
  6. 24
      src/components/sidebarLeft/tabs/editProfile.ts
  7. 2
      webpack.common.js

BIN
.DS_Store vendored

Binary file not shown.

2
.gitignore vendored

@ -2,7 +2,7 @@ node_modules @@ -2,7 +2,7 @@ node_modules
coverage
__pycache__
dist
.DS_Store
**/.DS_Store
stats.json
certs
src/rlottie.github.io

1063
package-lock.json generated

File diff suppressed because it is too large Load Diff

4
package.json

@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
"media-query-plugin": "^1.3.1",
"mini-css-extract-plugin": "^0.9.0",
"node-sass": "^4.14.1",
"npm": "^6.14.5",
"npm": "^6.14.10",
"on-build-webpack": "^0.1.0",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"pako": "^1.0.11",
@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
"postcss-loader": "^3.0.0",
"postcss-preset-env": "^6.7.0",
"qr-code-styling": "^1.0.1",
"resolve-url-loader": "^3.1.1",
"resolve-url-loader": "^3.1.2",
"sass-loader": "^8.0.2",
"serviceworker-webpack-plugin": "^1.0.1",
"style-loader": "^1.2.1",

2
src/components/sidebarLeft/tabs/editFolder.ts

@ -184,7 +184,7 @@ export default class AppEditFolderTab implements SliderTab { @@ -184,7 +184,7 @@ export default class AppEditFolderTab implements SliderTab {
}
const filter = this.filter;
this.nameInputField.value = RichTextProcessor.wrapEmojiText(filter.title);
this.nameInputField.value = RichTextProcessor.wrapDraftText(filter.title);
for(const flag in this.flags) {
// @ts-ignore

24
src/components/sidebarLeft/tabs/editProfile.ts

@ -20,6 +20,10 @@ export default class AppEditProfileTab implements SliderTab { @@ -20,6 +20,10 @@ export default class AppEditProfileTab implements SliderTab {
private canvas: HTMLCanvasElement;
private uploadAvatar: () => Promise<InputFile> = null;
private firstNameInputField: InputField;
private lastNameInputField: InputField;
private bioInputField: InputField;
private userNameInputField: InputField;
private firstNameInput: HTMLElement;
private lastNameInput: HTMLElement;
private bioInput: HTMLElement;
@ -36,10 +40,6 @@ export default class AppEditProfileTab implements SliderTab { @@ -36,10 +40,6 @@ export default class AppEditProfileTab implements SliderTab {
userName: '',
bio: ''
};
firstNameInputField: InputField;
lastNameInputField: InputField;
bioInputField: InputField;
userNameInputField: InputField;
public init() {
this.container = document.querySelector('.edit-profile-container');
@ -211,9 +211,9 @@ export default class AppEditProfileTab implements SliderTab { @@ -211,9 +211,9 @@ export default class AppEditProfileTab implements SliderTab {
bio: ''
});
this.firstNameInput.innerHTML = user.rFirstName;
this.lastNameInput.innerHTML = RichTextProcessor.wrapRichText(user.last_name, {noLinks: true, noLinebreaks: true});
this.bioInput.innerHTML = '';
this.firstNameInputField.value = RichTextProcessor.wrapDraftText(user.first_name);
this.lastNameInputField.value = RichTextProcessor.wrapDraftText(user.last_name);
this.bioInputField.value = '';
this.userNameInputField.value = this.originalValues.userName = user.username ?? '';
this.userNameInput.classList.remove('valid', 'error');
@ -222,7 +222,7 @@ export default class AppEditProfileTab implements SliderTab { @@ -222,7 +222,7 @@ export default class AppEditProfileTab implements SliderTab {
appProfileManager.getProfile(user.id, true).then(userFull => {
if(userFull.about) {
this.originalValues.bio = userFull.about;
this.bioInput.innerHTML = userFull.rAbout;
this.bioInputField.value = RichTextProcessor.wrapDraftText(userFull.about);
this.handleChange();
}
@ -263,15 +263,11 @@ export default class AppEditProfileTab implements SliderTab { @@ -263,15 +263,11 @@ export default class AppEditProfileTab implements SliderTab {
}
private handleChange = () => {
if(this.isChanged()) {
this.nextBtn.classList.add('is-visible');
} else {
this.nextBtn.classList.remove('is-visible');
}
this.nextBtn.classList.toggle('is-visible', this.isChanged());
};
onCloseAfterTimeout() {
this.nextBtn.classList.remove('is-visible');
this.firstNameInput.innerHTML = this.lastNameInput.innerHTML = this.bioInput.innerHTML = '';
this.firstNameInputField.value = this.lastNameInputField.value = this.bioInputField.value = '';
}
}

2
webpack.common.js

@ -8,7 +8,7 @@ const fs = require('fs'); @@ -8,7 +8,7 @@ const fs = require('fs');
const allowedIPs = ['194.58.97.147', '195.66.140.39', '192.168.31.144', '127.0.0.1', '192.168.31.1', '192.168.31.192', '176.100.8.202', '46.219.250.22', '193.42.119.184', '46.133.168.67', '78.26.144.197', '46.133.225.88', '128.124.170.79'];
const devMode = process.env.NODE_ENV !== 'production';
const useLocal = false;
const useLocal = true;
if(devMode) {
console.log('DEVMODE IS ON!');

Loading…
Cancel
Save