File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
client/src/components/History Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 11<template >
22 <div v-if =" currentUser && history" class =" d-flex flex-column h-100" >
3- <b-alert v-if =" history.archived" variant =" warning" show >This history has been archived.</b-alert >
4- <b-alert v-if =" history.purged" variant =" info" show >This history has been purged.</b-alert >
3+ <b-alert v-if =" showHistoryStateInfo" variant =" info" show >{{ historyStateInfoMessage }}</b-alert >
54 <div v-else class =" flex-row flex-grow-0" >
65 <b-button
76 v-if =" userOwnsHistory"
@@ -72,6 +71,19 @@ export default {
7271 canEditHistory () {
7372 return this .userOwnsHistory && ! this .history .archived && ! this .history .purged ;
7473 },
74+ showHistoryStateInfo () {
75+ return this .history .archived || this .history .purged ;
76+ },
77+ historyStateInfoMessage () {
78+ if (this .history .archived && this .history .purged ) {
79+ return " This history has been archived and purged." ;
80+ } else if (this .history .archived ) {
81+ return " This history has been archived." ;
82+ } else if (this .history .purged ) {
83+ return " This history has been purged." ;
84+ }
85+ return " " ;
86+ },
7587 },
7688 created () {
7789 this .loadHistoryById (this .id );
You can’t perform that action at this time.
0 commit comments