修复离线路径误弹位置上报超时窗,并优化提醒设置与定位 Loading 展示。
离线或倒计时未进入提醒窗口时不再弹出超时提醒;全局 Loading 支持按需展示定位文案,提前提醒选项抽成共用组件。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
29
suixinkan/Core/Design/ReminderTimeOptionsMenu.swift
Normal file
29
suixinkan/Core/Design/ReminderTimeOptionsMenu.swift
Normal file
@ -0,0 +1,29 @@
|
||||
//
|
||||
// ReminderTimeOptionsMenu.swift
|
||||
// suixinkan
|
||||
//
|
||||
// Created by Codex on 2026/6/29.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
/// 提前提醒时间选择控件。
|
||||
/// 使用 `Menu` 而非 `confirmationDialog`,避免 ScrollView 内 popover 箭头锚点偏移。
|
||||
struct ReminderTimeOptionsMenu<Label: View>: View {
|
||||
let onSelect: (Int) -> Void
|
||||
@ViewBuilder let label: () -> Label
|
||||
|
||||
private let options = [0, 5, 10, 15, 30]
|
||||
|
||||
var body: some View {
|
||||
Menu {
|
||||
ForEach(options, id: \.self) { minute in
|
||||
Button(minute == 0 ? "不提醒" : "\(minute)分钟") {
|
||||
onSelect(minute)
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
label()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user