@cloudron/pankow 3.3.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,6 +55,7 @@ const menuModel = computed(() => {
55
55
  return {
56
56
  label: item[props.optionLabel],
57
57
  disabled: item.disabled,
58
+ icon: item.icon,
58
59
  action: () => {
59
60
  if (selected.value === item) return;
60
61
 
@@ -160,7 +161,10 @@ onMounted(() => {
160
161
  <template>
161
162
  <div class="pankow-singleselect" :class="{ 'pankow-singleselect-disabled': disabled }" ref="elem" tabindex="0" @click="onClick" @keydown.enter="onOpen" @keydown.down.stop.prevent="onSelectNext" @keydown.up.stop.prevent="onSelectPrev" @keydown.esc.stop="onClose" @keydown.stop="onKeyDown($event)">
162
163
  <Menu ref="menu" :model="menuModel" :search-threshold="searchThreshold" :close-on-activation="true" @close="onMenuClosed"/>
163
- {{ selected ? selected[optionLabel] : placeholder }}
164
+ <span>
165
+ <Icon v-if="selected ? selected.icon : false" :icon="selected.icon" style="margin-right: 6px" />
166
+ {{ selected ? selected[optionLabel] : placeholder }}
167
+ </span>
164
168
  <Icon icon="fa-solid fa-chevron-down" class="pankow-button-icon-right-with-text" />
165
169
  </div>
166
170
  </template>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudron/pankow",
3
3
  "private": false,
4
- "version": "3.3.0",
4
+ "version": "3.3.1",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "types": "types/index.d.ts",
package/utils.js CHANGED
@@ -125,8 +125,11 @@ function prettyLongDate(value) {
125
125
  if (isNaN(date.getTime())) return 'unknown';
126
126
 
127
127
  const formatter = new Intl.DateTimeFormat(undefined, {
128
- dateStyle: 'long',
129
- timeStyle: 'medium'
128
+ day: 'numeric',
129
+ month: 'short',
130
+ year: 'numeric',
131
+ hour: '2-digit',
132
+ minute: '2-digit',
130
133
  });
131
134
 
132
135
  const formattedDate = formatter.format(date);