You've already forked AstralRinth
forked from didirus/AstralRinth
Refactor scope labels for applications and pats (#1560)
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
<Checkbox
|
||||
v-for="scope in scopeList"
|
||||
:key="scope"
|
||||
:label="constCaseToSentenceCase(scope)"
|
||||
:label="getScopeLabel(scope)"
|
||||
:model-value="hasScope(scopesVal, scope)"
|
||||
@update:model-value="() => (scopesVal = toggleScope(scopesVal, scope))"
|
||||
/>
|
||||
@@ -230,7 +230,7 @@ import {
|
||||
ConfirmModal,
|
||||
} from 'omorphia'
|
||||
import Modal from '~/components/ui/Modal.vue'
|
||||
import { scopeList, hasScope, toggleScope } from '~/utils/auth/scopes.ts'
|
||||
import { scopeList, hasScope, toggleScope, getScopeLabel } from '~/utils/auth/scopes.ts'
|
||||
|
||||
definePageMeta({
|
||||
middleware: 'auth',
|
||||
@@ -470,11 +470,6 @@ async function removeApp() {
|
||||
}
|
||||
stopLoading()
|
||||
}
|
||||
|
||||
const constCaseToSentenceCase = (str) => {
|
||||
str = str.replace(/_/g, ' ')
|
||||
return str[0].toUpperCase() + str.slice(1).toLowerCase()
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.description-textarea {
|
||||
|
||||
Reference in New Issue
Block a user