Skip to content

Commit

Permalink
wip: Allow to define the version of the theme as well as the version …
Browse files Browse the repository at this point in the history
…of the KDK theme #11
  • Loading branch information
cnouguier committed Jun 12, 2024
1 parent 8bbf72b commit fecf3c3
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 13 deletions.
22 changes: 12 additions & 10 deletions themes/kdk/login/fragments/footer.ftl
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<div class="column items-center justify-end">
<div class="row items-center">
<span id="kdk-label">${msg('madeWithKDK')}</span>
<q-btn id="kdk-link" icon="link" tooltip="${msg('moreAboutKDK')}" size="sm" href="https://kalisio.github.io/kdk" target="_blank" flat round>
<q-tooltip>
${msg('aboutKDK')}
<div class="q-pa-sm column items-center justify-end">
<div class="row justify-center items-center q-gutter-x-sm">
<q-icon id="theme-info" name="las la-info-circle" size="sm">
<q-tooltip class="bg-primary text-white text-caption">
<div>${msg('themeVersion')}: <b>{{ version().theme }}</b></div>
<div>${msg('kdkThemeVersion')}: <b>{{ version().kdkTheme }}</b></div>
</q-tooltip>
</q-btn>
</q-icon>
<div>|</div>
<div>
${msg('designBy')}
<a href="https://kalisio.com" target="_blank">Kalisio</a>
</div>
</div>
<a href="https://kalisio.com" target="_blank">
<img id="kdk-logo" loading="lazy" src="${url.resourcesPath}/img/kalisio.webp" width="80px"/>
</a>
</div>
4 changes: 3 additions & 1 deletion themes/kdk/login/messages/messages_en.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
doLogin=Login
doApply=Apply
backToLogin=Back to login
madeWithKDK=Made with Kalisio''s Development Kit
designBy=Design by
themeVersion=Theme version
kdkThemeVersion=KDK theme version
close=Close
about=About
aboutKDK=Learn more about the KDK
Expand Down
4 changes: 3 additions & 1 deletion themes/kdk/login/messages/messages_fr.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
doLogin=Se connecter
doApply=Appliquer
backToLogin=Retour \u00e0 la connexion
madeWithKDK=R\u00e9alis\u00e9 avec le Kalisio''s Development Kit
designBy=Conception par
themeVersion=Version du th\u00e8me
kdkThemeVersion=Version du th\u00e8me KDK
close=Fermer
about=A propos
aboutKDK=En savoir plus sur le KDK
Expand Down
4 changes: 4 additions & 0 deletions themes/kdk/login/resources/js/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
const config = {
version: {
theme: 'latest',
kdkTheme: 'latest'
},
brand: {
primary: '#293341',
secondary: '#415168',
Expand Down
4 changes: 4 additions & 0 deletions themes/kdk/login/resources/js/quasar.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ const app = Vue.createApp({
}
})
}
function version () {
return config.version
}
// Expose
return {
email: Vue.ref(environment.user.email),
Expand All @@ -46,6 +49,7 @@ const app = Vue.createApp({
showPasswordNew: Vue.ref(false),
showPasswordConfirm: Vue.ref(false),
submitAction: Vue.ref(''),
version,
popup
}
}
Expand Down
2 changes: 1 addition & 1 deletion themes/kdk/login/template.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
</#if>
<script>Quasar.lang.set(Quasar.lang.${locale.currentLanguageTag})</script>
</#if>
<script src="${url.resourcesPath}/js/config.js"></script>
<script src="${url.resourcesPath}/js/config.js"></script>
<script src="${url.resourcesPath}/js/quasar.js"></script>
</body>
</html>
Expand Down

0 comments on commit fecf3c3

Please sign in to comment.