Skip to content

Commit

Permalink
Merge tag '1.36.0' into develop
Browse files Browse the repository at this point in the history
1.36.0
  • Loading branch information
kwahlin committed Aug 27, 2024
2 parents ce923dc + c836983 commit 769981a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion vue-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-client",
"version": "1.35.2",
"version": "1.36.0",
"type": "module",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion vue-client/src/components/shared/entity-summary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export default {
</div>
<id-pill
v-if="!excludeComponents.includes('id')"
:uri="this.recordId"
:uri="this.uri"
:isLibrisResource="this.isLibrisResource"
/>
</div>
Expand Down
21 changes: 14 additions & 7 deletions vue-client/src/components/shared/id-pill.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {
};
},
methods: {
copyFnurgel() {
copyId() {
const self = this;
this.$copyText(this.uri).then(() => {
self.recentlyCopiedId = true;
Expand All @@ -41,15 +41,17 @@ export default {
'user',
'resources',
]),
idAsFnurgel() {
displayedId() {
if (this.uri) {
const id = this.uri;
const fnurgel = RecordUtil.extractFnurgel(id);
if (fnurgel && this.isLibrisResource) {
return fnurgel;
}
const cleaned = id.replace('https://', '').replace('http://', '');
return cleaned;
return id
.replace('https://', '')
.replace('http://', '');
// TODO? uridecode for display?
}
return null;
},
Expand All @@ -62,7 +64,7 @@ export default {

<template>
<div
v-if="idAsFnurgel"
v-if="displayedId"
class="IdPill"
:class="{ 'recently-copied': recentlyCopiedId }"
@mouseover="idHover = true"
Expand All @@ -71,7 +73,7 @@ export default {
v-tooltip.top="idTooltipText"
class="fa fa-copy IdPill-idCopyIcon"
:class="{ collapsedIcon: !idHover || recentlyCopiedId }"
@click.stop="copyFnurgel" />{{ idAsFnurgel }}
@click.stop="copyId" />{{ displayedId }}
</div>
</template>

Expand All @@ -89,14 +91,19 @@ export default {
padding: 0 0.75em;
border-radius: 1em;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
&.recently-copied {
background-color: @brand-success;
color: @white;
}
&-idCopyIcon {
transition: all 0.25s ease;
margin: 0 0.25em 0 -0.25em;
overflow: hidden;
overflow: visible;
width: 1.2em;
opacity: 1;
cursor: pointer;
Expand Down

0 comments on commit 769981a

Please sign in to comment.