Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ The format has been adjusted to include a release Title. This has been inserted

## [Unreleased]

### Added
- Added an announcement for the Minna Discord channel.

## [0.15.1] - Post Clone Fixes - 2026-09-02

### Fixed
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Discord Announcement.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Discord Announcement@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Discord Announcement@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions Minna/Views/Common/AnnouncementView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
//
// AnnouncementView.swift
// Minna
//
// Created by Taylor Lineman on 9/3/26.
//

import SwiftUI
import SFSafeSymbols

struct Announcement {
let title: String
let caption: String?
let description: String

let image: ImageResource

let urlLabel: String
let urlSymbol: String
let url: URL
}

struct AnnouncementView: View {
@Environment(\.dismiss) var dismiss
let announcement: Announcement

var body: some View {
ZStack(alignment: .topTrailing) {
HStack {
Image(announcement.image)
.accessibilityHidden(true)
Spacer()
VStack(alignment: .leading, spacing: 10) {
Text(announcement.title)
.font(.title)
if let caption = announcement.caption {
Text(caption)
.font(.caption)
}
Text(announcement.description)

Link(destination: announcement.url) {
HStack {
Text(announcement.urlLabel)
Image(systemName: announcement.urlSymbol)
.accessibilityHidden(true)
}
}
.buttonStyle(.borderedProminent)
}
.padding(.trailing)
}
Button {
dismiss()
} label: {
Image(systemSymbol: .xmark)
.accessibilityLabel("Dismiss announcement.")
.padding(5)
}
.buttonBorderShape(.circle)
.buttonStyle(.glass)
.padding(10)

}
.frame(width: 500)

}
}

#Preview {
// Text("Hello")
// .sheet(isPresented: .constant(true)) {
AnnouncementView(announcement: Announcement(
title: "Join our Discord!",
caption: nil,
description: "Get app support, send feedback, and talk about feature you would love! The discord is a great place to get involved with Minna.",
image: ImageResource(name: "discord_announcement", bundle: .main),
urlLabel: "Join the discord",
urlSymbol: SFSymbol.arrowUpRight.rawValue,
url: URL(string: "https://discord.gg/fveUWjck3W")!
))
// }
}
19 changes: 19 additions & 0 deletions Minna/Views/Navigation/NavigationCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public struct NavigationCore: View {

@AppStorage("knowledgeExpanded") var knowledgeExpanded: Bool = true
@AppStorage("connectionsExpanded") var connectionsExpanded: Bool = true

@AppStorage("hasShownDiscord") var hasShownDiscordSheet: Bool = false
@State var presentingDiscordSheet: Bool = false

@State var navigationRouter: NavigationRouter = NavigationRouter()

Expand Down Expand Up @@ -100,6 +103,11 @@ public struct NavigationCore: View {
}
}
.onAppear {
if !hasShownDiscordSheet {
presentingDiscordSheet = true
hasShownDiscordSheet = true
}

modelContext.undoManager = undoManager

do {
Expand Down Expand Up @@ -181,6 +189,17 @@ public struct NavigationCore: View {
Text("Please contact support (support@tryminna.com). Error: \(database.initializationError?.localizedDescription ?? "unknown")")
}
.standardDropDestination(presented: $isDroppingFile, selectedFolder: navigationRouter.currentFolder, modelContext: modelContext, irisContext: irisContext, database: database)
.sheet(isPresented: $presentingDiscordSheet) {
AnnouncementView(announcement: Announcement(
title: "Join our Discord!",
caption: nil,
description: "Get app support, send feedback, and talk about features you would love! The Discord is a great place to get involved with Minna.",
image: ImageResource(name: "discord_announcement", bundle: .main),
urlLabel: "Join the discord",
urlSymbol: SFSymbol.arrowUpRight.rawValue,
url: URL(string: "https://discord.gg/fveUWjck3W")!
))
}
}

func addFolder(in folder: Folder?) {
Expand Down
Loading