Skip to content

Commit

Permalink
fix(girder): Disable upload if not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
floryst committed Apr 13, 2020
1 parent 20d7dab commit f9a3bee
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/tools/MeasurementTools/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
SvgIcon,
SourceSelect,
},
inject: ['$notify'],
inject: ['$notify', 'girderRest'],
data() {
return {
uiToolList: ToolList,
Expand Down
3 changes: 2 additions & 1 deletion src/components/tools/MeasurementTools/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,10 @@
<template v-else>
<div class="pt-2 body-1 teal--text text-center">No measurements yet</div>
</template>
<v-btn :disabled="!targetProxy" @click="upload">
<v-btn :disabled="!targetProxy || !girderRest.user" @click="upload">
Upload
</v-btn>
<span v-show="!girderRest.user" class="body-2">Log in to upload</span>
</div>
</v-card>
</v-container>
Expand Down
1 change: 1 addition & 0 deletions src/components/tools/PaintTool/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function createLabelMapFromImage(imageData) {

export default {
name: 'PaintTool',
inject: ['girderRest'],
components: {
PalettePicker,
PopUp,
Expand Down
14 changes: 7 additions & 7 deletions src/components/tools/PaintTool/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,13 @@
</v-radio-group>
</v-list>
</v-flex>
<v-flex xs2>
<v-btn
@click="upload()"
>
Upload
</v-btn>
</v-flex>
<v-btn
:disabled="!girderRest.user"
@click="upload()"
>
Upload
</v-btn>
<span v-show="!girderRest.user" class="body-2">Log in to upload</span>
</v-layout>
</v-container>
</div>

0 comments on commit f9a3bee

Please sign in to comment.