Files
suixinkan_ios_new/suixinkan/Core/Design/ReminderTimeOptionsMenu.swift
汉秋 63fb0462d6 修复离线路径误弹位置上报超时窗,并优化提醒设置与定位 Loading 展示。
离线或倒计时未进入提醒窗口时不再弹出超时提醒;全局 Loading 支持按需展示定位文案,提前提醒选项抽成共用组件。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 16:22:55 +08:00

30 lines
710 B
Swift
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// 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()
}
}
}