Skip to content

Commit

Permalink
- fix crypto.randomUUID crash when hosting on http
Browse files Browse the repository at this point in the history
- fix transaction filter by resources whose name that requires html encoding
- fix filter tags black rectangle UI
  • Loading branch information
cioraneanu committed Dec 22, 2024
1 parent dd92e69 commit 1f3fa18
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 8 deletions.
12 changes: 12 additions & 0 deletions front/assets/styles/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1011,4 +1011,16 @@ img, svg {
font-size: 13px;
font-weight: 400;
line-height: 16px;
}

.tag-filter {
border-radius: 10px;
background: #333 !important;
padding: 4px 11px !important;
color: white;
font-size: 12px;
font-weight: 400;
display: flex;
align-items: center;
justify-content: center;
}
3 changes: 2 additions & 1 deletion front/composables/useForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export function useForm(props) {
const title = computed(() => (route.params.id ? titleEdit : titleAdd))

let itemId = ref(null)
let formName = ref(`form-${crypto.randomUUID()}`)
let formName = ref(`form-${crypto.randomUUID ? crypto.randomUUID() : Utils.getGUID()}`)


// let itemId = computed(() => route.params.id)

Expand Down
4 changes: 2 additions & 2 deletions front/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion front/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.5.0",
"version": "1.5.1",
"private": true,
"scripts": {
"start": "npm run dev -- -o",
Expand Down
8 changes: 5 additions & 3 deletions front/pages/transactions/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>

<div class="display-flex flex-wrap gap-1">
<div v-for="appliedFilter in filtersDisplayList" class="app-tag van-tag van-tag--round van-tag--medium van-tag--primary">
<div v-for="appliedFilter in filtersDisplayList" class="tag-filter">
<icon-filter size="14" :stroke-width="1.9" />
<span class="ml-5">{{ appliedFilter }}</span>
</div>
Expand Down Expand Up @@ -179,7 +179,10 @@ let filtersDictionary = computed(() => {
filter: `date_before:"${DateUtils.dateToString(_filter.dateEnd)}"`,
active: !!_filter.dateEnd,
},
]
].map((item) => {
item.filter = item.filter.replace(/(\w+):"([^"]+)"/g, (match, key, content) => `${key}:"${encodeURIComponent(content)}"`)
return item
})
})
let filtersDisplayList = computed(() => {
Expand Down Expand Up @@ -233,5 +236,4 @@ onMounted(() => {
})
animateSwipeList(list)
</script>
1 change: 0 additions & 1 deletion front/stores/dataStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ export const useDataStore = defineStore('data', {
// let filters = [{ field: 'query', value: filtersBackendList.value.join(' ') }]

let filters = [{ field: 'query', value: `tag_is:"${Tag.getDisplayNameEllipsized(this.tagTodo)}"` }]

let list = await new TransactionRepository().searchTransaction({ filters })
list = get(list, 'data') ?? []
this.dashboard.transactionsWithTodo = TransactionTransformer.transformFromApiList(list)
Expand Down

0 comments on commit 1f3fa18

Please sign in to comment.