Skip to content

Commit 72dd0ad

Browse files
committed
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
1 parent 917b881 commit 72dd0ad

File tree

4 files changed

+197
-183
lines changed

4 files changed

+197
-183
lines changed

web-client/src/components/SrAppBar.vue

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { useGitHubAuthStore } from '@/stores/githubAuthStore'
1313
import { useRoute, useRouter } from 'vue-router'
1414
import SrCustomTooltip from '@/components/SrCustomTooltip.vue'
1515
import SrUserUtilsDialog from '@/components/SrUserUtilsDialog.vue'
16+
import SrTokenUtilsDialog from '@/components/SrTokenUtilsDialog.vue'
1617
import { createLogger } from '@/utils/logger'
1718
1819
const logger = createLogger('SrAppBar')
@@ -32,6 +33,7 @@ const srToastStore = useSrToastStore()
3233
const orgMenu = ref<InstanceType<typeof Menu> | null>(null)
3334
const showClusterDialog = ref(false)
3435
const showUserUtilsDialog = ref(false)
36+
const showTokenUtilsDialog = ref(false)
3537
const desiredNodes = ref(1)
3638
const ttl = ref(720)
3739
@@ -190,15 +192,22 @@ const userMenuItems = computed(() => {
190192
}
191193
]
192194
193-
// Add User Utils menu item for org members only
195+
// Add User Info and Token Utils menu items for org members only
194196
if (githubIsMember.value || githubIsOwner.value) {
195197
items.push({
196-
label: 'User Utils',
197-
icon: 'pi pi-user-edit',
198+
label: 'User Info',
199+
icon: 'pi pi-user',
198200
command: () => {
199201
showUserUtilsDialog.value = true
200202
}
201203
})
204+
items.push({
205+
label: 'Token Utils',
206+
icon: 'pi pi-key',
207+
command: () => {
208+
showTokenUtilsDialog.value = true
209+
}
210+
})
202211
}
203212
204213
items.push({
@@ -956,6 +965,7 @@ function hideTooltip() {
956965
</Dialog>
957966

958967
<SrUserUtilsDialog v-model:visible="showUserUtilsDialog" />
968+
<SrTokenUtilsDialog v-model:visible="showTokenUtilsDialog" />
959969
</template>
960970

961971
<style scoped>

0 commit comments

Comments
 (0)