forked from ietf-tools/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(agenda): various agenda improvements and fixes (ietf-tools#4613)
* chore: update dependencies + add jsconfig * fix(agenda): handle localStorage being disabled * feat: agenda share modal * feat: agenda tour * feat: agenda share filters + picked sessions + fixes * test: fix agenda tests * test: add agenda share dialog test * test: remove agenda only flag
- Loading branch information
Showing
93 changed files
with
1,291 additions
and
792 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+136 KB
...intrc-npm-1.3.2-fd8de37609-2074dca47d.zip → ...intrc-npm-1.3.3-9e3a462140-f03e9d6727.zip
Binary file not shown.
Binary file renamed
BIN
+3.91 MB
...faker-npm-7.5.0-1dcb36d85a-6f2c48a801.zip → ...faker-npm-7.6.0-fa135883e9-942af62217.zip
Binary file not shown.
Binary file removed
BIN
-8.68 KB
.yarn/cache/@humanwhocodes-gitignore-to-minimatch-npm-1.0.2-247ae8a408-aba5c40c9e.zip
Binary file not shown.
Binary file renamed
BIN
+3.48 KB
...-app-npm-1.10.4-06b84c2fa7-81db381f2e.zip → ...-app-npm-1.11.0-f151cd6058-d4d1a25cff.zip
Binary file not shown.
Binary file renamed
BIN
+5.98 KB
...uild-npm-1.10.4-aea75ba7bd-c6aa64bbb3.zip → ...uild-npm-1.11.0-96219509e1-58567f5687.zip
Binary file not shown.
Binary file renamed
BIN
+19.4 KB
...mand-npm-1.10.4-9b894aa1cf-d96a572e24.zip → ...mand-npm-1.11.0-7ee9134bf1-b49be8a28c.zip
Binary file not shown.
Binary file renamed
BIN
+5.63 KB
...nfig-npm-1.10.4-9177c0305d-901df758d4.zip → ...nfig-npm-1.11.0-533ce951fd-f46ef6fe50.zip
Binary file not shown.
Binary file renamed
BIN
+6.15 KB
...exec-npm-1.10.4-df1853a356-d1c77ce6c9.zip → ...exec-npm-1.11.0-b316d40654-3937bfa865.zip
Binary file not shown.
Binary file renamed
BIN
+8.07 KB
...-cli-npm-1.10.4-acb199a834-3164e88bbc.zip → ...-cli-npm-1.11.0-7d2cef507c-251f4939fc.zip
Binary file not shown.
Binary file renamed
BIN
+7.65 KB
...shot-npm-1.10.4-12fbaf9321-51542704a0.zip → ...shot-npm-1.11.0-3520e16c4a-65ea6e35b7.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+15.9 KB
...nfig-npm-1.10.4-b58233e905-545e2fd4ab.zip → ...nfig-npm-1.11.0-0cbc8dda44-c1c186a6e9.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+6.17 KB
...-dom-npm-1.10.4-ced497b448-2c1b4da7fa.zip → ...-dom-npm-1.11.0-9d7b991a27-fac71ca3fa.zip
Binary file not shown.
Binary file renamed
BIN
+8.07 KB
...-env-npm-1.10.4-d5bfdc729b-c2a9f6b384.zip → ...-env-npm-1.11.0-eece120049-f4d9ed4a9d.zip
Binary file not shown.
Binary file renamed
BIN
+7.87 KB
...gger-npm-1.10.4-34e93e31f1-4c6ade3902.zip → ...gger-npm-1.11.0-4de8dd7dd0-63e8cf5ea3.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+18.6 KB
...s-api-npm-6.2.1-252fdd4f01-34765af0be.zip → ...s-api-npm-6.4.4-b8e2fda55a-d4d1079202.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-8.96 KB
.yarn/cache/@vue-reactivity-transform-npm-3.2.40-c8706743e9-b86fc29b52.zip
Binary file not shown.
Binary file added
BIN
+8.94 KB
.yarn/cache/@vue-reactivity-transform-npm-3.2.41-c0c4b830b1-f4a1d3ea62.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-122 KB
.yarn/cache/@vue-server-renderer-npm-3.2.40-b8eff98a5b-f9d53aefca.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+16 KB
...cess-npm-0.31.0-0e9a01c010-d1b6682415.zip → ...cess-npm-0.31.1-c276b62f78-4a5c88839e.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+740 KB
...lint-npm-8.24.0-40a0bdeb6e-ca293ce711.zip → ...lint-npm-8.25.0-2af5e4f121-7acf2693b5.zip
Binary file not shown.
Binary file removed
BIN
-21.8 KB
.yarn/cache/eslint-plugin-promise-npm-6.0.1-44f44fa21c-c1bb3c2e59.zip
Binary file not shown.
Binary file added
BIN
+26.1 KB
.yarn/cache/eslint-plugin-promise-npm-6.1.0-fbc1a09f9f-01c55f6c4d.zip
Binary file not shown.
Binary file renamed
BIN
+375 KB
...n-vue-npm-9.5.1-71da965834-3643332871.zip → ...n-vue-npm-9.6.0-62ddc861da-fcfb333b09.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+4.33 MB
...e-ui-npm-2.33.3-b741bf7169-772373981b.zip → ...e-ui-npm-2.33.5-1142591c7e-d8357a302a.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+61.6 KB
...tcss-npm-8.4.14-c0d448b728-fe58766ff3.zip → ...tcss-npm-8.4.18-f1d73c0a84-9349fd9984.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+41.1 KB
.yarn/cache/smoothscroll-polyfill-npm-0.4.4-69b5bb4bf7-b99ff7d916.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
<template lang="pug"> | ||
n-modal(v-model:show='modalShown') | ||
n-card.agenda-share( | ||
:bordered='false' | ||
segmented | ||
role='dialog' | ||
aria-modal='true' | ||
) | ||
template(#header-extra) | ||
.agenda-share-header | ||
n-button.ms-4.agenda-share-close( | ||
ghost | ||
color='gray' | ||
strong | ||
@click='modalShown = false' | ||
) | ||
i.bi.bi-x | ||
template(#header) | ||
.agenda-share-header | ||
i.bi.bi-share | ||
span Share this view | ||
.agenda-share-content | ||
.text-muted.pb-2 Use the following URL for sharing the current view #[em (including any active filters)] with other users: | ||
n-input-group | ||
n-input( | ||
ref='filteredUrlIpt' | ||
size='large' | ||
readonly | ||
v-model:value='state.filteredUrl' | ||
) | ||
n-button( | ||
type='primary' | ||
primary | ||
strong | ||
size='large' | ||
@click='copyFilteredUrl' | ||
) | ||
template(#icon) | ||
i.bi.bi-clipboard-check.me-1 | ||
span Copy | ||
</template> | ||
|
||
<script setup> | ||
import { computed, reactive, ref, watch } from 'vue' | ||
import { find } from 'lodash-es' | ||
import { | ||
NButton, | ||
NCard, | ||
NModal, | ||
NInputGroup, | ||
NInput, | ||
useMessage | ||
} from 'naive-ui' | ||
import { useAgendaStore } from './store' | ||
// PROPS | ||
const props = defineProps({ | ||
shown: { | ||
type: Boolean, | ||
required: true, | ||
default: false | ||
} | ||
}) | ||
// MESSAGE PROVIDER | ||
const message = useMessage() | ||
// STORES | ||
const agendaStore = useAgendaStore() | ||
// EMIT | ||
const emit = defineEmits(['update:shown']) | ||
// STATE | ||
const state = reactive({ | ||
isLoading: false, | ||
filteredUrl: window.location.href | ||
}) | ||
const filteredUrlIpt = ref(null) | ||
// COMPUTED | ||
const modalShown = computed({ | ||
get () { | ||
return props.shown | ||
}, | ||
set(value) { | ||
emit('update:shown', value) | ||
} | ||
}) | ||
// WATCHERS | ||
watch(() => props.shown, (newValue) => { | ||
if (newValue) { | ||
generateUrl() | ||
} | ||
}) | ||
// METHODS | ||
function generateUrl () { | ||
const newUrl = new URL(window.location.href) | ||
const queryParams = [] | ||
if (agendaStore.selectedCatSubs.length > 0 ) { | ||
queryParams.push(`filters=${agendaStore.selectedCatSubs.join(',')}`) | ||
} | ||
if (agendaStore.pickerMode && agendaStore.pickedEvents.length > 0 ) { | ||
const kwds = [] | ||
for (const id of agendaStore.pickedEvents) { | ||
const session = find(agendaStore.scheduleAdjusted, ['id', id]) | ||
if (session) { | ||
const suffix = session.sessionToken ? `-${session.sessionToken}` : '' | ||
kwds.push(`${session.acronym}${suffix}`) | ||
} | ||
} | ||
queryParams.push(`show=${kwds.join(',')}`) | ||
} | ||
newUrl.search = queryParams.length > 0 ? `?${queryParams.join('&')}` : '' | ||
state.filteredUrl = newUrl.toString() | ||
} | ||
async function copyFilteredUrl () { | ||
filteredUrlIpt.value?.select() | ||
try { | ||
if (navigator.clipboard) { | ||
await navigator.clipboard.writeText(state.filteredUrl) | ||
} else { | ||
if (!document.execCommand('copy')) { | ||
throw new Error('Copy failed') | ||
} | ||
} | ||
message.success('URL copied to clipboard successfully.') | ||
} catch (err) { | ||
message.error('Failed to copy URL to clipboard.') | ||
} | ||
} | ||
</script> | ||
<style lang="scss"> | ||
@import "bootstrap/scss/functions"; | ||
@import "bootstrap/scss/variables"; | ||
.agenda-share { | ||
width: 90vw; | ||
max-width: 1000px; | ||
&-header { | ||
font-size: 20px; | ||
display: flex; | ||
align-items: center; | ||
> .bi { | ||
margin-right: 12px; | ||
font-size: 20px; | ||
color: $indigo; | ||
} | ||
} | ||
&-close .bi { | ||
font-size: 20px; | ||
color: inherit; | ||
} | ||
} | ||
</style> |
Oops, something went wrong.