Skip to content
Snippets Groups Projects
Verified Commit f660ace6 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Allow changing icons of oauth applications in frontend

parent f4526b23
No related branches found
No related tags found
1 merge request!1784Resolve "OAuth: Activate upload of icons"
Pipeline #197194 failed
...@@ -18,6 +18,7 @@ Fixed ...@@ -18,6 +18,7 @@ Fixed
* [Dev] AddressInputType missed country field. * [Dev] AddressInputType missed country field.
* Detail pages, e.g. for groups, did not work anymore. * Detail pages, e.g. for groups, did not work anymore.
* The configured theme colors were not used by the frontend. * The configured theme colors were not used by the frontend.
* It wasn't possible to change icons of OAuth applications in the frontend.
`4.0`_ - 2025-03-29 `4.0`_ - 2025-03-29
------------------- -------------------
......
<script setup> <script setup>
import CRUDList from "../generic/CRUDList.vue"; import CRUDList from "../generic/CRUDList.vue";
import FileField from "../generic/forms/FileField.vue";
</script> </script>
<template> <template>
...@@ -128,6 +129,32 @@ import CRUDList from "../generic/CRUDList.vue"; ...@@ -128,6 +129,32 @@ import CRUDList from "../generic/CRUDList.vue";
:true-value="true" :true-value="true"
/> />
</template> </template>
<template #icon="{ item }">
<v-img
v-if="item.icon.url"
:src="item.icon.url"
:alt="$t('oauth.application.icon')"
max-width="6em"
/>
<span v-else></span>
</template>
<!-- eslint-disable-next-line vue/valid-v-slot -->
<template #icon.field="{ attrs, on }">
<div aria-required="false">
<file-field v-bind="attrs" v-on="on" accept="image/jpeg, image/png">
<template #append-outer="{ fileUrl }">
<v-img
v-if="fileUrl"
:src="fileUrl"
:alt="$t('oauth.application.icon')"
max-width="4em"
/>
</template>
</file-field>
</div>
</template>
</c-r-u-d-list> </c-r-u-d-list>
</template> </template>
...@@ -154,11 +181,11 @@ export default { ...@@ -154,11 +181,11 @@ export default {
value: "name", value: "name",
cols: 12, cols: 12,
}, },
// { {
// text: this.$t("oauth.application.icon"), text: this.$t("oauth.application.icon"),
// value: "icon", value: "icon",
// cols: 12, cols: 12,
// }, },
{ {
text: this.$t("oauth.application.client_id"), text: this.$t("oauth.application.client_id"),
value: "clientId", value: "clientId",
...@@ -233,7 +260,7 @@ export default { ...@@ -233,7 +260,7 @@ export default {
defaultItem() { defaultItem() {
return { return {
name: "", name: "",
// icon: "", icon: null,
clientId: this.initOauthApplication?.clientId, clientId: this.initOauthApplication?.clientId,
clientSecret: this.initOauthApplication?.clientSecret, clientSecret: this.initOauthApplication?.clientSecret,
clientType: "", clientType: "",
......
fragment oauthApplicationFields on OAuthApplicationType { fragment oauthApplicationFields on OAuthApplicationType {
id id
name name
# icon icon {
url
name
}
clientId clientId
clientSecret clientSecret
clientType clientType
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment