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
| import Combine | |
| import SwiftUI | |
| class _Tick: ObservableObject { | |
| @Published var now: Date = .now | |
| let timer: Publishers.Autoconnect<Timer.TimerPublisher> | |
| init(every: TimeInterval = 1) { | |
| timer = Timer.publish(every: every, on: .main, in: .common) | |
| .autoconnect() |
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
| // | |
| // ContentView.swift | |
| // StateObservable | |
| // | |
| // Created by bannzai on 2025/03/09. | |
| // | |
| import SwiftUI | |
| @Observable |
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
| struct SnapshotUITest<T: PreviewProvider>: View { | |
| var navigationBarIsHidden = false | |
| var body: some View { | |
| VStack(alignment: .leading, spacing: 16) { | |
| Text(verbatim: "\(T.self)") | |
| .font(.title3) | |
| VStack(alignment: .leading) { | |
| ForEach(T._allPreviews.indices, id: \.self) { index in | |
| let preview = T._allPreviews[index] |
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
| import XCTest | |
| import SwiftUI | |
| final class RetryPageSnapshotUITest: XCTestCase { | |
| override class var runsForEachTargetApplicationUIConfiguration: Bool { | |
| false | |
| } | |
| override func setUpWithError() throws { | |
| continueAfterFailure = false | |
| } |
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
| #!/usr/bin/env bash | |
| # SessionStart hook: install/update GitHub CLI (gh) on Claude Code on the Web | |
| set -euo pipefail | |
| LOG_PREFIX="[gh-setup]" | |
| log(){ echo "$LOG_PREFIX $*" >&2; } | |
| # Only run in Claude Code on the Web | |
| if [[ "${CLAUDE_CODE_REMOTE:-}" != "true" ]]; then | |
| log "Not a remote session, skipping." |
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
| #!/usr/bin/env bash | |
| # SessionStart hook: install Flutter SDK on Claude Code on the Web | |
| LOG_PREFIX="[flutter-setup]" | |
| log(){ echo "$LOG_PREFIX $*" >&2; } | |
| # Only run in Claude Code on the Web | |
| if [[ "${CLAUDE_CODE_REMOTE:-}" != "true" ]]; then | |
| exit 0 | |
| fi |
OlderNewer