Initial import of LogDarioSeq baseline
Establishes version control for the personal Logseq DB fork before starting the server-client architecture migration and domain features described in docs/agent-guide and the approved implementation plan. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "LogseqLogo.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "tinted"
|
||||
}
|
||||
],
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
6
ios/App/shortcuts/Assets.xcassets/Contents.json
Normal file
6
ios/App/shortcuts/Assets.xcassets/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
23
ios/App/shortcuts/Assets.xcassets/LogseqLogo.imageset/Contents.json
vendored
Normal file
23
ios/App/shortcuts/Assets.xcassets/LogseqLogo.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "LogseqLogo.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "LogseqLogo 1.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "LogseqLogo 2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
ios/App/shortcuts/Assets.xcassets/LogseqLogo.imageset/LogseqLogo 1.png
vendored
Normal file
BIN
ios/App/shortcuts/Assets.xcassets/LogseqLogo.imageset/LogseqLogo 1.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
BIN
ios/App/shortcuts/Assets.xcassets/LogseqLogo.imageset/LogseqLogo 2.png
vendored
Normal file
BIN
ios/App/shortcuts/Assets.xcassets/LogseqLogo.imageset/LogseqLogo 2.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
BIN
ios/App/shortcuts/Assets.xcassets/LogseqLogo.imageset/LogseqLogo.png
vendored
Normal file
BIN
ios/App/shortcuts/Assets.xcassets/LogseqLogo.imageset/LogseqLogo.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
11
ios/App/shortcuts/Info.plist
Normal file
11
ios/App/shortcuts/Info.plist
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSExtension</key>
|
||||
<dict>
|
||||
<key>NSExtensionPointIdentifier</key>
|
||||
<string>com.apple.widgetkit-extension</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
158
ios/App/shortcuts/shortcuts.swift
Normal file
158
ios/App/shortcuts/shortcuts.swift
Normal file
@@ -0,0 +1,158 @@
|
||||
import WidgetKit
|
||||
import SwiftUI
|
||||
|
||||
struct Provider: TimelineProvider {
|
||||
func placeholder(in context: Context) -> SimpleEntry {
|
||||
SimpleEntry(date: Date())
|
||||
}
|
||||
|
||||
func getSnapshot(in context: Context, completion: @escaping (SimpleEntry) -> ()) {
|
||||
let entry = SimpleEntry(date: Date())
|
||||
completion(entry)
|
||||
}
|
||||
|
||||
func getTimeline(in context: Context, completion: @escaping (Timeline<Entry>) -> ()) {
|
||||
let currentDate = Date()
|
||||
let entry = SimpleEntry(date: currentDate)
|
||||
let timeline = Timeline(entries: [entry], policy: .atEnd)
|
||||
completion(timeline)
|
||||
}
|
||||
}
|
||||
|
||||
struct SimpleEntry: TimelineEntry {
|
||||
let date: Date
|
||||
}
|
||||
|
||||
struct ShortcutsEntryView: View {
|
||||
var entry: Provider.Entry
|
||||
|
||||
// Format weekday name (e.g., "Monday")
|
||||
private var weekday: String {
|
||||
let formatter = DateFormatter()
|
||||
formatter.locale = Locale.current // ✅ respect user’s locale
|
||||
formatter.dateFormat = "EEEE" // full weekday name
|
||||
return formatter.string(from: Date())
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
Link(destination: URL(string: "logseq://mobile/go/quick-add")!) {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
// Top heading
|
||||
Link(destination: URL(string: "logseq://mobile")!) {
|
||||
HStack(alignment: .top, spacing: 8) {
|
||||
Text(weekday)
|
||||
.font(.subheadline)
|
||||
.bold()
|
||||
.foregroundColor(.white.opacity(0.5))
|
||||
.padding(.top, 4)
|
||||
|
||||
Spacer()
|
||||
|
||||
Image("LogseqLogo")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 30, height: 30)
|
||||
}
|
||||
}
|
||||
|
||||
// Middle text
|
||||
Text("I have an idea...")
|
||||
.font(.headline)
|
||||
.bold()
|
||||
.foregroundColor(.white.opacity(0.8))
|
||||
|
||||
Spacer(minLength: 0)
|
||||
|
||||
// Bottom buttons row
|
||||
HStack(spacing: 8) {
|
||||
// Left button (audio waves)
|
||||
Link(destination: URL(string: "logseq://mobile/go/audio")!) {
|
||||
Image(systemName: "waveform")
|
||||
.font(.body)
|
||||
.foregroundColor(.white)
|
||||
.frame(maxWidth: .infinity, minHeight: 36)
|
||||
.background(Color.white.opacity(0.1))
|
||||
.clipShape(Capsule())
|
||||
.contentShape(Capsule())
|
||||
}
|
||||
|
||||
// Right button (quick add)
|
||||
Link(destination: URL(string: "logseq://mobile/go/quick-add")!) {
|
||||
Image(systemName: "plus")
|
||||
.font(.body)
|
||||
.foregroundColor(.white)
|
||||
.frame(maxWidth: .infinity, minHeight: 36)
|
||||
.background(Color.white.opacity(0.1))
|
||||
.clipShape(Capsule())
|
||||
.contentShape(Capsule())
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
.padding(-8)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Helper to support hex colors
|
||||
extension Color {
|
||||
init(hex: String) {
|
||||
let hex = hex.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
|
||||
var int: UInt64 = 0
|
||||
Scanner(string: hex).scanHexInt64(&int)
|
||||
let a, r, g, b: UInt64
|
||||
switch hex.count {
|
||||
case 3:
|
||||
(a, r, g, b) = (255,
|
||||
(int >> 8) * 17,
|
||||
(int >> 4 & 0xF) * 17,
|
||||
(int & 0xF) * 17)
|
||||
case 6:
|
||||
(a, r, g, b) = (255,
|
||||
int >> 16,
|
||||
int >> 8 & 0xFF,
|
||||
int & 0xFF)
|
||||
case 8:
|
||||
(a, r, g, b) = (int >> 24,
|
||||
int >> 16 & 0xFF,
|
||||
int >> 8 & 0xFF,
|
||||
int & 0xFF)
|
||||
default:
|
||||
(a, r, g, b) = (255, 0, 0, 0)
|
||||
}
|
||||
self.init(
|
||||
.sRGB,
|
||||
red: Double(r) / 255,
|
||||
green: Double(g) / 255,
|
||||
blue: Double(b) / 255,
|
||||
opacity: Double(a) / 255
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
struct Shortcuts: Widget {
|
||||
let kind: String = "shortcuts"
|
||||
|
||||
var body: some WidgetConfiguration {
|
||||
StaticConfiguration(kind: kind, provider: Provider()) { entry in
|
||||
if #available(iOS 17.0, *) {
|
||||
ShortcutsEntryView(entry: entry)
|
||||
.containerBackground(Color(hex: "#002b36"), for: .widget)
|
||||
} else {
|
||||
ZStack {
|
||||
Color(hex: "#002b36")
|
||||
ShortcutsEntryView(entry: entry)
|
||||
}
|
||||
}
|
||||
}
|
||||
.configurationDisplayName("Logseq Shortcuts")
|
||||
.description("Quick actions for Logseq")
|
||||
}
|
||||
}
|
||||
|
||||
struct Shortcuts_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ShortcutsEntryView(entry: SimpleEntry(date: .now))
|
||||
.previewContext(WidgetPreviewContext(family: .systemSmall))
|
||||
}
|
||||
}
|
||||
19
ios/App/shortcuts/shortcutsBundle.swift
Normal file
19
ios/App/shortcuts/shortcutsBundle.swift
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// shortcutsBundle.swift
|
||||
// shortcuts
|
||||
//
|
||||
// Created by Tienson Qin on 2025/9/19.
|
||||
//
|
||||
|
||||
import WidgetKit
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
@available(iOSApplicationExtension 18.0, *)
|
||||
struct shortcutsBundle: WidgetBundle {
|
||||
var body: some Widget {
|
||||
Shortcuts()
|
||||
QuickAddButton()
|
||||
RecordAudioButton()
|
||||
}
|
||||
}
|
||||
40
ios/App/shortcuts/shortcutsControl.swift
Normal file
40
ios/App/shortcuts/shortcutsControl.swift
Normal file
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// shortcutsControl.swift
|
||||
// shortcuts
|
||||
//
|
||||
// Created by Tienson Qin on 2025/9/19.
|
||||
//
|
||||
|
||||
import AppIntents
|
||||
import SwiftUI
|
||||
import WidgetKit
|
||||
|
||||
@available(iOS 18.0, *)
|
||||
struct QuickAddButton: ControlWidget {
|
||||
var body: some ControlWidgetConfiguration {
|
||||
StaticControlConfiguration(
|
||||
kind: "com.logseq.logseq.quickAddButton"
|
||||
) {
|
||||
ControlWidgetButton(action: QuickAddIntent()) {
|
||||
Label("Quick Add", systemImage: "plus.circle")
|
||||
}
|
||||
}
|
||||
.displayName("Quick Add")
|
||||
.description("Quick note.")
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 18.0, *)
|
||||
struct RecordAudioButton: ControlWidget {
|
||||
var body: some ControlWidgetConfiguration {
|
||||
StaticControlConfiguration(
|
||||
kind: "com.logseq.logseq.recordAudioButton"
|
||||
) {
|
||||
ControlWidgetButton(action: RecordAudioIntent()) {
|
||||
Label("Record Audio", systemImage: "waveform")
|
||||
}
|
||||
}
|
||||
.displayName("Record Audio")
|
||||
.description("Record Audio.")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user