Skip to content
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

顯示且能修改時區的議程表 #15

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Conversation

rileychh
Copy link

@rileychh rileychh commented Apr 9, 2024

COSCUP/2022 #21 搬過來的 PR,合併了衝突,還沒測試過。

Closes #2.

@rileychh rileychh self-assigned this Apr 9, 2024
@rileychh rileychh marked this pull request as ready for review April 12, 2024 15:00
Copy link

@mirumodapon mirumodapon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 選擇器會在 navbar 的上方,可能需要調整 z-index
  • 我覺得可以調整一下在 width < 600px 選擇器的顯示
  • 我覺得可以把選好的時區存進 localStrage 就不用每次都要重選

@@ -171,7 +168,7 @@ export function generateScheduleTable (elements: ScheduleElement[]): ScheduleTab
const { hour, minute } = getPartsOfDate(d)
return timePoints.findIndex(([h, m]) => h === hour && m === minute)
})
const span = endIndex - startIndex
const span = Math.abs(endIndex - startIndex)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是有 session 有這方面的錯誤嗎?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我不確定這個修改的作用,它也是搬過來的 😅
該留著還是改回來?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先...改回來好了 XD

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7f72694 改回來了

src/modules/session/logic.ts Show resolved Hide resolved
:options="timeZoneOptions"
v-model="currentTimeZone"
/>
<button

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

或許可以回到會場(台灣)時區?這部分之後可以討論一下

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

該把重設按鈕從當地時區改成會場時區,還是另外加一個按鈕?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我覺得選一個就好耶!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fb51b6f 改成會場時區了

@@ -68,6 +69,10 @@ export default defineComponent({
sessionId: {
type: String,
required: true
},
currentTimeZone: {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

想確認一下這裡為什麼需要傳這個參數

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看起來沒有用到,另外兩個元件也是相同的情況。我把他們移除了。

@rileychh
Copy link
Author

rileychh commented May 9, 2024

選擇器會在 navbar 的上方,可能需要調整 z-index

為了在 教室列表z-index: 2) 之上,我設成了 z-index: 3。建議該怎麽處理呢?

我覺得可以調整一下在 width < 600px 選擇器的顯示

雖然不知道為什麼無法置中,但大概用 white-space: nowrapmax-width 處理好了。

我覺得可以把選好的時區存進 localStrage 就不用每次都要重選

搞定。

@rileychh rileychh requested a review from mirumodapon May 9, 2024 14:14
@mirumodapon
Copy link

選擇器會在 navbar 的上方,可能需要調整 z-index

為了在 教室列表z-index: 2) 之上,我設成了 z-index: 3。建議該怎麽處理呢?

我覺得可以調整一下在 width < 600px 選擇器的顯示

雖然不知道為什麼無法置中,但大概用 white-space: nowrapmax-width 處理好了。

我覺得可以把選好的時區存進 localStrage 就不用每次都要重選

搞定。

z-index 設成 0 看起來 OK,教室列表之上是什麼意思啊

@rileychh
Copy link
Author

圖片
⬆️ .time-zone-container { z-index: 0; } 長這樣

圖片
⬆️ .time-zone-container { z-index: 3; } 長這樣

rileychh and others added 20 commits May 27, 2024 21:35
1. 將TIMEZONE_OFFSET加入useSession
2. 新增watch觀測TIMEZONE_OFFSET並重新渲染

Cherry-picked to 2024 by Riley
Co-authored-by: Chenghsuan Ho <chengxuanjhe@gmail.com>
Cherry-picked to 2024 by Riley
Co-authored-by: Chenghsuan Ho <chengxuanjhe@gmail.com
Cherry-picked to 2024 by Riley
Co-authored-by: Chenghsuan Ho <chengxuanjhe@gmail.com>
1. 移除未使用的程式碼
2. 將 `@types/lodash` 替換成 `@types/lodash-es`
- 使用 `vue-search-select` 作為時區選擇元件
- 更新 `typescript` 到 `5.1` 以支援 `Intl.supportedValuesOf`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

顯示且能修改時區的議程表
3 participants