Skip to content

Commit

Permalink
Naming things etc
Browse files Browse the repository at this point in the history
  • Loading branch information
lrosenstrom committed Jun 19, 2024
1 parent 0325376 commit 7eeaf9f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 37 deletions.
8 changes: 4 additions & 4 deletions vue-client/src/components/inspector/item-local.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import * as LayoutUtil from '@/utils/layout';
import { translatePhrase, labelByLang, capitalize } from '@/utils/filters';
import PropertyAdder from '@/components/inspector/property-adder.vue';
import EntityAction from '@/components/inspector/entity-action.vue';
import IdLabel from '@/components/shared/id-label.vue';
import SearchWindow from './search-window.vue';
import ItemMixin from '../mixins/item-mixin.vue';
import LensMixin from '../mixins/lens-mixin.vue';
import FormMixin from '../mixins/form-mixin.vue';
import IdPill from "@/components/shared/id-pill.vue";
export default {
name: 'item-local',
Expand Down Expand Up @@ -479,10 +479,10 @@ export default {
},
components: {
IdPill,
'property-adder': PropertyAdder,
'search-window': SearchWindow,
'entity-action': EntityAction,
'id-label': IdLabel,
},
};
</script>
Expand Down Expand Up @@ -548,7 +548,7 @@ export default {
<i class="fa fa-plus-circle icon--sm icon-added" />
</div>
</div>
<id-pill
<id-label
v-if="this.hasId"
:uri="this.recordId"
:isLibrisResource="this.isLibrisResource"
Expand Down Expand Up @@ -913,7 +913,7 @@ export default {
&.is-extracting {
background-color: @form-extracting !important;
border: 1px dashed @brand-primary;
&.highlight-mark {
border-color: @brand-primary !important;
}
Expand Down
4 changes: 2 additions & 2 deletions vue-client/src/components/shared/entity-summary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import OverflowMixin from '@/components/mixins/overflow-mixin.vue';
import EncodingLevelIcon from '@/components/shared/encoding-level-icon.vue';
import TypeIcon from '@/components/shared/type-icon.vue';
import SummaryNode from '@/components/shared/summary-node.vue';
import IdPill from '@/components/shared/id-pill.vue';
import IdPill from '@/components/shared/id-label.vue';
import LensMixin from '../mixins/lens-mixin.vue';
export default {
Expand Down Expand Up @@ -304,7 +304,7 @@ export default {
{{ topBarInformation }} {{ isLocal ? '{lokal entitet}' : '' }}
<span class="EntitySummary-sourceLabel" v-if="database">{{ database }}</span>
</div>
<id-pill
<id-label
v-if="!excludeComponents.includes('id')"
:uri="this.recordId"
:isLibrisResource="this.isLibrisResource"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as RecordUtil from '@/utils/record';
import { mapGetters } from 'vuex';
export default {
name: 'id-pill',
name: 'id-label',
props: {
uri: {
type: String,
Expand Down Expand Up @@ -45,7 +45,6 @@ export default {
if (this.uri) {
const id = this.uri;
const fnurgel = RecordUtil.extractFnurgel(id);
console.log('fnurgel', fnurgel);
if (fnurgel && this.isLibrisResource) {
return fnurgel;
}
Expand All @@ -62,41 +61,37 @@ export default {
</script>

<template>
<div class="IdPill">
<div
v-if="idAsFnurgel"
class="IdPill-id"
:class="{'recently-copied': recentlyCopiedId }"
@mouseover="idHover = true"
@mouseout="idHover = false">
<i
v-tooltip.top="idTooltipText"
class="fa fa-copy IdPill-idCopyIcon"
:class="{ collapsedIcon: !idHover || recentlyCopiedId }"
@click.stop="copyFnurgel" />{{ idAsFnurgel }}
</div>
<div
v-if="idAsFnurgel"
class="IdPill"
:class="{ 'recently-copied': recentlyCopiedId }"
@mouseover="idHover = true"
@mouseout="idHover = false">
<i
v-tooltip.top="idTooltipText"
class="fa fa-copy IdPill-idCopyIcon"
:class="{ collapsedIcon: !idHover || recentlyCopiedId }"
@click.stop="copyFnurgel" />{{ idAsFnurgel }}
</div>
</template>

<style lang="less">
.IdPill {
&-id {
flex-grow: 0;
text-align: right;
text-transform: none;
color: @grey-very-dark-transparent;
background-color: @badge-color-transparent;
transition: background-color 0.5s ease;
letter-spacing: 0.5px;
font-size: 1.2rem;
font-weight: 400;
padding: 0 0.75em;
border-radius: 1em;
flex-grow: 0;
text-align: right;
text-transform: none;
color: @grey-very-dark-transparent;
background-color: @badge-color-transparent;
transition: background-color 0.5s ease;
letter-spacing: 0.5px;
font-size: 1.2rem;
font-weight: 400;
padding: 0 0.75em;
border-radius: 1em;
&.recently-copied {
background-color: @brand-success;
color: @white;
}
&.recently-copied {
background-color: @brand-success;
color: @white;
}
&-idCopyIcon {
transition: all 0.25s ease;
Expand Down

0 comments on commit 7eeaf9f

Please sign in to comment.