Skip to content

Commit

Permalink
fix(#373): adjust icon toolbar and fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
aswallace committed Mar 29, 2023
1 parent 37881d3 commit 1897c40
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 18 deletions.
24 changes: 16 additions & 8 deletions app/src/assets/css/modules/_utility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -593,20 +593,28 @@
&-gridicon {
position: absolute;
right: 4.5rem;
top: 16rem;
z-index: 10000000;
@include respond(tab-land){
right: 2.5rem;
top: 19rem;
}
@include respond(phone) {
top: 15rem;
}
& > div {
display: inline-block;

& > i {
font-size: 1rem !important;
width: 21px !important;
min-width: 21px !important;
height: 21px !important;
cursor: pointer;
}
}
.md-icon-button {
width: 3rem !important;
min-width: 3rem !important
}
.md-icon {
font-size: 2.5rem !important;
width: 2.5rem !important;
min-width: 2.5rem !important;
height: 2.5rem !important;
cursor: pointer;
}

&_explorer {
Expand Down
2 changes: 1 addition & 1 deletion app/src/modules/vega-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ async function loadChart (chartUri) {
// lodPrefix is now fixed (e.g. http://nanomine.org/viz/chartId instead of http://purl.org/chart/view/chartId)
// Todo (ticket-xx): Remove this if logic if response is consistent
chartUrl = decodeURIComponent(chartUri.split('view/')[1])
} else if ( !chartUri.startsWith('http') ) {
} else if (!chartUri.startsWith('http')) {
// This is currently needed for editing since gallery only passes ID and not the full uri
chartUrl = `${chartUriPrefix}${chartUri}`
}
Expand Down
10 changes: 5 additions & 5 deletions app/src/pages/explorer/Gallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@
with identifier <b>{{dialog.chart.identifier}}</b>.
</md-content>
</div>
<div v-if="dialogLoading">
<div v-if="dialogLoading">
<spinner
:loading="dialogLoading"
text='Deleting Chart'
/>
</div>
</template>
</template>
<template v-slot:actions>
<span v-if="dialog.type=='delete' && dialog.chart">
<md-button @click.native.prevent="toggleDialogBox">
<md-button @click.native.prevent="toggleDialogBox">
No, cancel
</md-button>
<md-button @click.native.prevent="deleteChart(dialog.chart)">
Expand Down Expand Up @@ -172,8 +172,8 @@ export default {
async deleteChart (chart) {
if (!this.isAdmin) return // temporary safeguard
this.dialogLoading = true
await this.$store.dispatch('explorer/curation/deleteChartNanopub', chart.identifier )
await this.$store.dispatch('explorer/curation/deleteChartES', chart.identifier )
await this.$store.dispatch('explorer/curation/deleteChartNanopub', chart.identifier)
await this.$store.dispatch('explorer/curation/deleteChartES', chart.identifier)
this.toggleDialogBox()
this.dialogLoading = false
await this.loadItems()
Expand Down
8 changes: 4 additions & 4 deletions app/src/pages/explorer/chart/view/vega-view-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default {
...mapGetters({
dialogBoxActive: 'dialogBox',
isAuth: 'auth/isAuthenticated',
isAdmin: 'auth/isAdmin',
isAdmin: 'auth/isAdmin'
}),
specViewerSpec () {
return this.specViewer.includeData ? this.spec : this.chart && this.chart.baseSpec
Expand Down Expand Up @@ -87,11 +87,11 @@ export default {
editChart () {
return this.$router.push(`/explorer/chart/editor/edit/${this.chartId}`)
},
async deleteChart() {
async deleteChart () {
if (!this.isAdmin) return // temporary safeguard
this.dialogLoading = true
await this.$store.dispatch('explorer/curation/deleteChartNanopub', this.chart.uri )
await this.$store.dispatch('explorer/curation/deleteChartES', this.chart.uri )
await this.$store.dispatch('explorer/curation/deleteChartNanopub', this.chart.uri)
await this.$store.dispatch('explorer/curation/deleteChartES', this.chart.uri)
this.toggleDialogBox()
this.dialogLoading = false
this.$router.push('/explorer/chart')
Expand Down

0 comments on commit 1897c40

Please sign in to comment.