Skip to content

Commit

Permalink
Fix: called entrypoints on operation components
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Jul 12, 2023
1 parent 32d1cbd commit 39835bb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/views/contract/ContentItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ import Shortcut from "@/components/Shortcut.vue";
import { getContentItemHeaderClass } from '@/utils/styles';
import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
import {plural} from '@/utils/tz.js';
dayjs.extend(relativeTime);
Expand All @@ -139,7 +140,11 @@ export default {
text() {
if (this.value == null) return "";
if (this.value.entrypoint) {
return this.value.entrypoint;
let all = this.value.entrypoint.split(',');
if (all.length == 1) {
return all[0];
}
return `${all[0]} and ${plural(all.length - 1, 'call')}`;
}
return this.value.kind;
},
Expand Down

0 comments on commit 39835bb

Please sign in to comment.