Comments (6)
As a copy of the changes for "meetings", I made a verified patch for plugins/pade/classes/docs7inverse/index.js
for function _createAvatar()
, but I can't locate this file in the sources?!
# diff index.js.20210104-081414 index.js
1762,1764c1762,1764
< if (!width) width = 32;
< if (!height) height = 32;
< if (!font) font = "16px Arial";
---
> if (!width) width = 128;
> if (!height) height = 128;
> if (!font) font = "64px Arial";
1780,1783c1780,1784
< var name = nickname.split(" ");
< if (name.length == 1) name = nickname.split(".");
< if (name.length == 1) name = nickname.split("-");
< var l = name.length - 1;
---
> console.debug("_createAvatar: " + nickname );
> // try to split nickname into words at different symbols with preference
> let words = nickname.split(/[, ]/); // "John W. Doe" -> "John "W." "Doe" or "Doe,John W." -> "Doe" "John" "W."
> if (words.length == 1) words = nickname.split("."); // "John.Doe" -> "John" "Doe" or "John.W.Doe" -> "John" "W" "Doe"
> if (words.length == 1) words = nickname.split("-"); // "John-Doe" -> "John" "Doe" or "John-W-Doe" -> "John" "W" "Doe"
1785c1786
< if (name && name[0] && name.first != '')
---
> if (words && words[0] && words.first != '')
1787,1788d1787
< first = name[0][0];
< last = name[l] && name[l] != '' && l > 0 ? name[l][0] : null;
1790,1792c1789,1802
< if (last) {
< var initials = first + last;
< context.fillText(initials.toUpperCase(), 3, 23);
---
> const firstInitial = words[0][0]; // first letter of first word
> var lastInitial = null; // first letter of last word, if any
>
> const lastWordIdx = words.length - 1; // index of last word
> if (lastWordIdx > 0 && words[lastWordIdx] && words[lastWordIdx] != '')
> {
> lastInitial = words[lastWordIdx][0]; // first letter of last word
> }
>
> // if nickname consist of more than one words, compose the initials as two letter
> if (lastInitial) {
> // if any comma is in the nickname, treat it to have the lastname in front, i.e. compose reversed
> const initials = nickname.indexOf(",") == -1 ? firstInitial + lastInitial : lastInitial + firstInitial;
> context.fillText(initials.toUpperCase(), 20, 88);
1794,1795c1804
< var initials = first;
< context.fillText(initials.toUpperCase(), 10, 23);
---
> context.fillText(firstInitial.toUpperCase(), 44, 88);
1796a1806,1807
>
>
from pade.
See
Line 1749 in f828f42
from pade.
I see, source for Pàdé is at this repo. 😄
from pade.
I found the identical code at
Line 1591 in f828f42
from pade.
?!? Is this used or is it an artefact?
Yes.
https://github.com/igniterealtime/pade/blob/master/docs-1.6.13.3.zip
https://github.com/igniterealtime/openfire-pade-plugin/blob/3230d0f5b4319bee233eaa6b4913d872ec37ca4a/pade/pom.xml#L46
from pade.
But I don't change js/background.js::createAvatar()
, just inverse/index.js::_createAvatar()
to see the expected results.
from pade.
Related Issues (20)
- Parameter & Setting page formating on Mobile
- Chat room display & formatting is incorrect on android
- Added support for using chrome.storage.local and chrome.storage.sync in Converse HOT 1
- Auto presence is broken
- Google analytics for Padé & ofmeet
- Images and Icons
- Meta TAGS in headers Og images, keywords, sitemap.xml & robot.txt
- Pade doesnt connect anymore HOT 1
- Hide search functions of Padé / converse / admin console HOT 3
- Pàdé should be Fastpath aware
- Android beep beep beep when using voice to text transcription
- Start/Stop Voice to text transcription from the conference room / Enhancement
- Не отображается планировщик в Pade HOT 1
- Release version problem HOT 1
- make users always online
- Make voice chat work with any Jitsi server
- golang webview HOT 1
- How to do this in Pad? HOT 2
- Questions to Pade
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pade.