Skip to content

Commit 93eb14d

Browse files
committed
remove left over junk from guest attempt
1 parent 1412013 commit 93eb14d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/components/CharacterDetail.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
</div>
8484
</div>
8585

86-
<div class="d-print-none action-bar d-flex justify-content-end border-top p-1 mt-5" v-if="isAuthenticated">
86+
<div class="d-print-none action-bar d-flex justify-content-end border-top p-1 mt-5">
8787
<a href="/characters" type="button" class="btn btn-danger me-2">Close</a>
8888
<button type="button" class="btn btn-secondary me-2" @click="nextPage()"> View {{ pageLabel }}</button>
8989
<button type="button" class="btn btn-secondary me-2" @click="printCharacter()">Print</button>
@@ -127,11 +127,11 @@ const userId = ref<null|String>(null);
127127
const hasOverflowMoves = computed(() => character.value.startingMoves?.filter( (m: any) => m.isOverflow == true).length > 0);
128128
129129
const isOwner = computed(()=> {
130-
return userId.value !== "guest" && (character.value.userId === userId.value || characterId == "new-character");
130+
return userId.value !== null && (character.value.userId === userId.value || characterId == "new-character");
131131
});
132132
133133
const isGuest = computed(()=> {
134-
return userId.value === "guest";
134+
return userId.value == null;
135135
});
136136
137137
window.onafterprint = function(){

src/views/FrontDetailView.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
</div>
8282
</div>
8383

84-
<div class="d-print-none action-bar d-flex justify-content-end p-1 border-top" v-if="isAuthenticated">
84+
<div class="d-print-none action-bar d-flex justify-content-end p-1 border-top">
8585
<a href="/fronts" type="button" class="btn btn-danger me-2">Close</a>
8686
<button type="button" class="btn btn-secondary me-2" @click="print()">Print</button>
8787
<button v-if="isOwner" type="button" class="btn btn-dark" @click="save()">Save</button>
@@ -113,11 +113,11 @@ const creatingFront = ref(false);
113113
const apiKey = ref<string | null>(localStorage.getItem('dungeonworld_fronts_api_key') || null);
114114
115115
const isOwner = computed(()=> {
116-
return userId.value !== "guest" && (front.value.userId === userId.value || frontId.value == "new-front");
116+
return userId.value !== null && (front.value.userId === userId.value || frontId.value == "new-front");
117117
});
118118
119119
const isGuest = computed(()=> {
120-
return userId.value === "guest";
120+
return userId.value == null;
121121
});
122122
123123
const frontTemplate = `

0 commit comments

Comments
 (0)