Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api keys #155

Merged
merged 2 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions resources/assets/js/pages/application/apiDash.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<b-container fluid class="api-dash">
<b-col class="mt-4 mb-2 pl-4 pr-4">
<h1>{{ $t('applications.my_apps') }}</h1>
<h1>{{ $t('applications.api_keys') }}</h1>
</b-col>
<b-row class="pl-4 pr-4 pb-4 pt-4">
<b-col>
Expand All @@ -16,21 +16,13 @@
</b-collapse>
<b-row class="align-items-baseline">
<b-col>
<i18n path="number_of_apps" tag="small" class="text-uppercase">
<span>{{ this.apps.length }}</span>
</i18n>
</b-col>
<b-col>
<b-button class="text-uppercase float-right rtl-float-left pl-4 pr-4" variant="dark" v-b-modal.create-app :disabled="creatingApp">
<b-button class="text-uppercase float-right rtl-float-left pl-4 pr-4 btn-outline-primary"v-b-modal.create-app :disabled="creatingApp">
<span v-if="!creatingApp">{{ $t('applications.build') }} <fa class="ml-2 rtl-mr-2" :icon="['fas', 'plus']"/></span>
<span v-else>{{ $t('applications.building') }}</span>
</b-button>
</b-col>
</b-row>
<b-row class="mb-2">
<b-col>
<hr />
</b-col>
</b-row>
<transition-group name="fade-slide" tag="b-row">
<b-col md="4" sm="6" xs="12" class="mb-3" v-for="app in apps" :key="app.id">
Expand All @@ -53,7 +45,7 @@
</div>
<div>
<hr />
<div class="d-flex justify-content-between api-key-panel bg-grey align-items-center p-3">
<div class="d-flex justify-content-between api-key-panel align-items-center p-3">
<div :ref="app.id">
<small>{{ app.key }}</small>
</div>
Expand All @@ -76,8 +68,16 @@
</b-row>

<!-- Create app modal -->
<b-modal id="create-app" centered :title="isEdit ? $t('applications.edit') : $t('applications.build')"
ref="createModal" @ok="createApp" @shown="clearApp" ok-variant="dark">
<b-modal id="create-app"
centered
:title="isEdit ? $t('applications.edit') : $t('applications.build_key')"
ref="createModal"
@ok="createApp"
@shown="clearApp"
ok-title="OK"
cancel-title="Cancel"
ok-variant="outline-primary"
cancel-variant="outline-primary">
<b-form-group
id="fieldset-name"
:label="$t('common.name')"
Expand Down Expand Up @@ -253,3 +253,4 @@ export default {
})
}
</script>

2 changes: 1 addition & 1 deletion resources/assets/js/pages/users/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
:staynull="true"
v-if="!apiUsers"/>
</b-col>
<b-col cols="2" xl="1">
<b-col cols="2">
<b-button @click="clearFilters" :disabled="noFilters" class="float-right btn-outline-primary">
{{ $t('users.list.clear_filters') }}
</b-button>
Expand Down
21 changes: 5 additions & 16 deletions resources/assets/sass/components/_api-dash.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,25 @@
}
}
.api-dash-app-card {
hr {
margin-left: -23px;
margin-right: -23px;
}
background: #F7F7F7;

.api-key-panel {
height: 86px;
border-radius: 5px;
word-break: break-all;
div {
height: 100%;
&:first-of-type {
flex-basis: 75%;
overflow-y: scroll;
}
small {
color: #6d6e70;
}
}
}
.app-settings-dropdown {
button {
background-color: #f2f2f2;
background-color: #E9E9E9;
border-color: #f2f2f2;

path {
fill: #aaaaaa;
fill: #AAAAAA;
}

&:active {
background-color: #f2f2f2;
background-color: #AAAAAA;
}

&:first-of-type {
Expand Down
5 changes: 4 additions & 1 deletion resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,12 @@
"my_apps": "My Apps",
"new_tc": "New terms and conditions",
"build": "Build new app",
"build_key": "Build new API key",
"edit": "Edit app",
"building": "Building app",
"no_apps": "You have no apps, build one to get started."
"building_key": "Building API key",
"no_apps": "You have no apps, build one to get started.",
"api_keys": "API Keys"
},
"home": {
"home": "Home",
Expand Down
Loading