Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -177,6 +177,30 @@
|
|||||||
router.navigate(`/task/${task_id}/view`)
|
router.navigate(`/task/${task_id}/view`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function save_bookmark(){
|
||||||
|
const user_ids = Object.values(project.members).map(member => member.user.id);
|
||||||
|
const data = {
|
||||||
|
url: location.href,
|
||||||
|
tags: ['Kanban', project.name, filter_input],
|
||||||
|
comment: `${project.name}: ${filter_input}`,
|
||||||
|
share: user_ids
|
||||||
|
}
|
||||||
|
const url = api('bookmark');
|
||||||
|
const resp = await fetch(url,{
|
||||||
|
credentials : 'include',
|
||||||
|
method : 'POST',
|
||||||
|
body : JSON.stringify(data)
|
||||||
|
});
|
||||||
|
if (resp.ok) {
|
||||||
|
yikes();
|
||||||
|
router.navigate('/bookmark');
|
||||||
|
} else {
|
||||||
|
error(resp);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(data);
|
||||||
|
}
|
||||||
|
|
||||||
onMount(load);
|
onMount(load);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -193,6 +217,9 @@
|
|||||||
<span class="filter">
|
<span class="filter">
|
||||||
<input type="text" bind:value={filter_input} autofocus />
|
<input type="text" bind:value={filter_input} autofocus />
|
||||||
{t('filter')}
|
{t('filter')}
|
||||||
|
<button style="visibility:{filter_input ? 'visible' : 'hidden'}" onclick={save_bookmark}>
|
||||||
|
<span class="symbol"></span> {t('save_object',{object:t('bookmark')})}
|
||||||
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<div class="head">{t('user')}</div>
|
<div class="head">{t('user')}</div>
|
||||||
{#if project.allowed_states}
|
{#if project.allowed_states}
|
||||||
|
|||||||
Reference in New Issue
Block a user