-
Notifications
You must be signed in to change notification settings - Fork 4
在 Mobile 當中,議程表將呈現列表形式 #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
mirumodapon
wants to merge
8
commits into
feat/session-popup
Choose a base branch
from
feat/session-list
base: feat/session-popup
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+77
−4
Draft
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
06116a4
refactor(session): update session display logic
mirumodapon a0e8a2b
feat(session): add session list component and integrate with session …
mirumodapon 0e2de4a
refactor(session): simplify session layout and remove unused breakpoints
mirumodapon 03e23e8
fix(session): update no session message condition to check for length
mirumodapon 240b430
fix(session): ensure session filtering checks for both start and end …
mirumodapon 18e8380
fix(session): return an empty object instead of an array when no sess…
mirumodapon aa378c2
fix(session): sort time in SessionList
mirumodapon d4cbc09
fix(session): make session time headers sticky for better visibility
mirumodapon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,56 @@ | ||
| <script lang="ts" setup> | ||
| import type { SessionSummary } from '#shared/types/session' | ||
| import { useI18n } from '#imports' | ||
| import CpSessionItem from './CpSessionItem.vue' | ||
|
|
||
| const { sessions: _sessions } = defineProps<{ sessions: SessionSummary[] }>() | ||
|
|
||
| const { locale } = useI18n() | ||
|
|
||
| const times = computed(() => { | ||
| if (!_sessions) { | ||
| return [] | ||
| } | ||
|
|
||
| return Object.groupBy( | ||
| _sessions | ||
| .filter((session) => session.start && session.room).map((session) => ({ | ||
|
mirumodapon marked this conversation as resolved.
Outdated
|
||
| id: session.id, | ||
| title: session[locale.value].title, | ||
| speakers: session.speakers?.map((s) => s[locale.value].name).join(', '), | ||
| start: session.start!.slice(11, 16), | ||
| end: session.end!.slice(11, 16), | ||
| tags: [], | ||
| })), | ||
|
mirumodapon marked this conversation as resolved.
|
||
| (session) => session.start, | ||
| ) | ||
| }) | ||
| </script> | ||
|
|
||
| <template> | ||
| <div class="flex flex-col gap-6"> | ||
| <section | ||
| v-for="(sess, time) in times" | ||
| :key="time" | ||
| > | ||
| <h3 class="text-lg text-primary-400 font-medium mb-2"> | ||
| {{ time }} | ||
| </h3> | ||
| <div class="flex flex-col gap-2"> | ||
| <NuxtLink | ||
| v-for="session in sess" | ||
| :key="session.id" | ||
| :to="`/session/${session.id}`" | ||
| > | ||
| <CpSessionItem | ||
| :end="session.end" | ||
| :speaker="session.speakers" | ||
| :start="session.start" | ||
| :tags="session.tags" | ||
| :title="session.title" | ||
| /> | ||
| </NuxtLink> | ||
| </div> | ||
| </section> | ||
| </div> | ||
| </template> | ||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.