Skip to content

Commit

Permalink
fix: improve validation checks details display + disable update check…
Browse files Browse the repository at this point in the history
…s in dev mode
  • Loading branch information
NGPixel committed Sep 20, 2024
1 parent 03a5125 commit d722b36
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 23 deletions.
11 changes: 10 additions & 1 deletion src-electron/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,16 @@ export function registerMenu (mainWindow, updater) {
{
label: 'Check for Updates...',
click () {
updater.checkForUpdates()
if (process.env.DEV) {
mainWindow.webContents.send('notify', {
message: 'Function Unavailable',
caption: 'Checking for updates is not available in dev mode.',
color: 'amber-9',
icon: 'mdi-car-traction-control'
})
} else {
updater.checkForUpdates()
}
}
},
{ type: 'separator' },
Expand Down
2 changes: 1 addition & 1 deletion src/components/AccountMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ q-btn(v-if='userStore.isLoggedIn' padding="xs sm" flat no-caps)
q-list.bg-dark-2(separator, style='min-width: 180px')
q-item.bg-dark-1
q-item-section.text-center
.text-caption.text-blue-grey-3 Datatracker Account
.text-caption.text-blue-grey-3 IETF Account
.text-caption.text-blue-grey-2: strong {{ userStore.profile.email }}
q-item(clickable, @click='openPrefProfile')
q-item-section(side)
Expand Down
45 changes: 24 additions & 21 deletions src/components/DrawerChecks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,11 @@
@click='runAllChecks'
)
q-list
q-expansion-item(
v-for='chk of valChecks'
group='valchecks'
hide-expand-icon
:key='chk.key'
@click='chk.click'
)
template(#header)
template(v-for='chk of valChecks' :key='chk.key')
q-item(
@click='chk.click'
clickable
)
q-item-section(side)
q-icon(:name='chk.icon' size='xs' color='amber')
q-item-section
Expand All @@ -44,19 +41,25 @@ q-list
q-icon(v-else-if='editorStore.validationChecks[chk.key] === 2' name='mdi-information' size='xs' color='light-blue-5')
q-icon(v-else-if='editorStore.validationChecks[chk.key] === -1' name='mdi-close-circle' size='xs' color='red-5')
q-icon(v-else-if='editorStore.validationChecks[chk.key] === -2' name='mdi-alert-circle' size='xs' color='orange-5')
.bg-dark-5.checkdetails
q-list(dense, separator)
q-item(
v-for='dtl of editorStore.validationChecksDetails[chk.key]'
:key='dtl.key'
clickable
@click='goToPosition(dtl.range)'
)
q-item-section(v-if='dtl.group', side)
q-badge(color='blue-9' text-color='white' :label='dtl.group')
q-item-section.text-caption {{ dtl.message }}
q-item-section(v-if='dtl.range', side)
q-badge(color='dark-3' text-color='white' :label='dtl.range.startLineNumber + ":" + dtl.range.startColumn')
q-expansion-item.bg-dark-5(
v-if='editorStore.validationChecksDetails[chk.key].length > 0'
)
template(#header)
q-item-section.q-pl-md
q-item-label.text-purple-2 └─ {{ editorStore.validationChecksDetails[chk.key].length }} issues
.bg-dark-5.checkdetails
q-list(dense, separator)
q-item(
v-for='dtl of editorStore.validationChecksDetails[chk.key]'
:key='dtl.key'
clickable
@click='goToPosition(dtl.range)'
)
q-item-section(v-if='dtl.group', side)
q-badge(color='blue-9' text-color='white' :label='dtl.group')
q-item-section.text-caption {{ dtl.message }}
q-item-section(v-if='dtl.range', side)
q-badge(color='dark-3' text-color='white' :label='dtl.range.startLineNumber + ":" + dtl.range.startColumn')
</template>

<script setup>
Expand Down

0 comments on commit d722b36

Please sign in to comment.