Skip to content

Commit

Permalink
fix: make the transfers page accessible through ui
Browse files Browse the repository at this point in the history
  • Loading branch information
lallenfrancisl committed Dec 30, 2023
1 parent 97d1f8b commit 5637e0c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/components/SlideButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<SubtractIcon class="w-auto h-full text-white" />
</SliderThumb>

<label :for="id">
<label v-if="label" :for="id">
{{ label }}
</label>
</SliderRoot>
Expand Down Expand Up @@ -50,7 +50,6 @@ export type SlideButtonEmits = {
const props = withDefaults(defineProps<SlideButtonProps>(), {
id: () => useId(),
label: () => `slide button ${useId()}`,
textTransform: "none",
});
const emit = defineEmits<SlideButtonEmits>();
Expand Down
14 changes: 13 additions & 1 deletion src/pages/SpacePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>

<div class="flex justify-center">
<FilePicker>
<FilePicker @update:model-value="onAddFile">
<AppButton label="add file" variant="rounded">
<PlusIcon class="w-auto h-8" />
</AppButton>
Expand All @@ -37,6 +37,7 @@ import PlusIcon from "#src/icons/PlusIcon.vue";
import QRCodeIcon from "#src/icons/QRCodeIcon.vue";
import ShareIcon from "#src/icons/ShareIcon.vue";
import SpaceLayout from "#src/layouts/SpaceLayout.vue";
import { useRouter } from "vue-router";
const options: ButtonGroupOption[] = [
{
Expand All @@ -50,6 +51,17 @@ const options: ButtonGroupOption[] = [
value: "qrCode",
},
];
const router = useRouter();
async function onAddFile() {
const spaceName = router.currentRoute.value.params.name;
if (!spaceName) {
return;
}
await router.push({ name: "transfers", params: { name: spaceName } });
}
</script>

<style scoped></style>

0 comments on commit 5637e0c

Please sign in to comment.