@internetarchive/ia-topnav 1.1.30-userlist1 → 1.1.30
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/package.json +1 -1
- package/src/data/menus.js +0 -5
- package/src/ia-topnav.js +1 -1
- package/src/primary-nav.js +2 -9
- package/src/styles/primary-nav.js +6 -2
package/package.json
CHANGED
package/src/data/menus.js
CHANGED
|
@@ -540,11 +540,6 @@ export function buildTopNavMenus(userid = '___USERID___', localLinks = true, way
|
|
|
540
540
|
title: 'My favorites',
|
|
541
541
|
analyticsEvent: 'UserFavorites',
|
|
542
542
|
},
|
|
543
|
-
{
|
|
544
|
-
url: `${prefix}/details/@me?tab=lists`,
|
|
545
|
-
title: 'My lists',
|
|
546
|
-
analyticsEvent: 'UserLists',
|
|
547
|
-
},
|
|
548
543
|
{
|
|
549
544
|
url: `${prefix}/details/@${userid}/web-archive`,
|
|
550
545
|
title: 'My web archives',
|
package/src/ia-topnav.js
CHANGED
|
@@ -89,7 +89,7 @@ export default class IATopNav extends LitElement {
|
|
|
89
89
|
menuSetup() {
|
|
90
90
|
this.localLinks = this.getAttribute('localLinks') !== 'false' && this.getAttribute('localLinks') !== false;
|
|
91
91
|
this.username = this.getAttribute('username')
|
|
92
|
-
this.screenName = this.
|
|
92
|
+
this.screenName = this.getAttribute('screenname');
|
|
93
93
|
this.waybackPagesArchived = this.getAttribute('waybackPagesArchived') ?? ''
|
|
94
94
|
|
|
95
95
|
// ensure we update other components that use `baseHost`
|
package/src/primary-nav.js
CHANGED
|
@@ -79,13 +79,6 @@ class PrimaryNav extends TrackedElement {
|
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
get truncatedScreenName() {
|
|
83
|
-
if (this.screenName && this.screenName.length > 10) {
|
|
84
|
-
return `${this.screenName.substr(0, 9)}…`;
|
|
85
|
-
}
|
|
86
|
-
return this.screenName;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
82
|
get userIcon() {
|
|
90
83
|
const userMenuClass = this.openMenu === 'user' ? 'active' : '';
|
|
91
84
|
const userMenuToolTip = this.openMenu === 'user' ? 'Close user menu' : 'Expand user menu';
|
|
@@ -99,9 +92,9 @@ class PrimaryNav extends TrackedElement {
|
|
|
99
92
|
>
|
|
100
93
|
<img
|
|
101
94
|
src="${this.mediaBaseHost}${this.userProfileImagePath}"
|
|
102
|
-
alt="${this.
|
|
95
|
+
alt="${this.screenName}"
|
|
103
96
|
/>
|
|
104
|
-
<span class="
|
|
97
|
+
<span class="screen-name" dir="auto">${this.screenName}</span>
|
|
105
98
|
</button>
|
|
106
99
|
`;
|
|
107
100
|
}
|
|
@@ -103,7 +103,7 @@ export default css`
|
|
|
103
103
|
justify-self: end;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
.
|
|
106
|
+
.screen-name {
|
|
107
107
|
display: none;
|
|
108
108
|
font-size: 1.3rem;
|
|
109
109
|
vertical-align: middle;
|
|
@@ -243,8 +243,12 @@ export default css`
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
@media (min-width: 990px) {
|
|
246
|
-
.
|
|
246
|
+
.screen-name {
|
|
247
247
|
display: inline-block;
|
|
248
|
+
text-overflow: ellipsis;
|
|
249
|
+
overflow: hidden;
|
|
250
|
+
white-space: nowrap;
|
|
251
|
+
max-width: 165px;
|
|
248
252
|
}
|
|
249
253
|
|
|
250
254
|
.upload span {
|