This commit is contained in:
andy 2022-08-07 13:31:15 +01:00
parent e45ba9e589
commit 263117607b
26 changed files with 50 additions and 40 deletions

View File

@ -1,6 +1,6 @@
//
// AppDelegate.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 16/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// SceneDelegate.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 16/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// LiveUser.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 19/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// Playlist.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 16/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// Tag.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 20/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// User.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 18/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// Network.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 18/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// NetWorkPersister.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 07/03/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// PlaylistApi.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 18/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// TagApi.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 20/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// UserApi.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 18/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// Router.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 25/04/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// AppSkeleton.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 16/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// LoginScreen.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 17/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.
@ -28,7 +28,7 @@ struct LoginScreen: View {
.cornerRadius(18)
.shadow(radius: /*@START_MENU_TOKEN@*/10/*@END_MENU_TOKEN@*/)
.padding(.bottom, 20)
Text("Sarsoo Music Tools")
Text("Sarsoo's Mixonomer")
.font(.largeTitle)
TextField("Username", text: $username)
SecureField("Password", text: $password)

View File

@ -1,6 +1,6 @@
//
// AddPlaylistSheet.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 19/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// PlaylistInputList.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 19/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// PlaylistList.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 25/04/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// PlaylistRow.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 17/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// PlaylistView.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 16/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.
@ -25,7 +25,7 @@ struct PlaylistView: View {
}
}
var chartSize = CGSize(width:140, height:220);
var chartSize = CGSize(width:210, height:250);
var body: some View {
Form {
@ -66,8 +66,8 @@ struct PlaylistView: View {
Text("Refresh")
}
}
VStack {
ScrollView(.horizontal){
HStack {
Spacer()
PieChartView(
@ -76,20 +76,24 @@ struct PlaylistView: View {
legend:"Listening",
style: chartStyle,
form: chartSize)
Spacer(minLength: 20)
PieChartView(
data: [Double(self.playlist.lastfm_stat_album_percent), Double(100 - self.playlist.lastfm_stat_album_percent)],
title: "Albums",
legend:"Listening",
style: chartStyle,
form: chartSize)
Spacer(minLength: 20)
PieChartView(
data: [Double(self.playlist.lastfm_stat_artist_percent), Double(100 - self.playlist.lastfm_stat_artist_percent)],
title: "Artists",
legend:"Listening",
style: chartStyle,
form: chartSize)
Spacer()
}
PieChartView(
data: [Double(self.playlist.lastfm_stat_artist_percent), Double(100 - self.playlist.lastfm_stat_artist_percent)],
title: "Artists",
legend:"Listening",
style: chartStyle,
form: chartSize)
.padding([.vertical], 20)
.padding([.horizontal], 10)
}
Section(header: Text("Options")){
@ -264,7 +268,13 @@ struct PlaylistView: View {
struct PlaylistView_Previews: PreviewProvider {
static var previews: some View {
PlaylistView(playlist: .constant(
Playlist(name: "playlist name", username: "username")
Playlist(name: "playlist name",
username: "username",
lastfm_stat_percent: 30,
lastfm_stat_album_percent: 40,
lastfm_stat_artist_percent: 80
)
))
}
}

View File

@ -1,6 +1,6 @@
//
// SettingsList.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 20/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.
@ -53,14 +53,14 @@ struct SettingsList: View {
}
) {
Button(action: {
if let url = URL(string: "https://github.com/sarsoo/music-tools") {
if let url = URL(string: "https://github.com/sarsoo/Mixonomer") {
UIApplication.shared.open(url)
}
}) {
Text("Server Source")
}
Button(action: {
if let url = URL(string: "https://github.com/sarsoo/music-tools-ios") {
if let url = URL(string: "https://github.com/sarsoo/Mixonomer-ios") {
UIApplication.shared.open(url)
}
}) {

View File

@ -1,6 +1,6 @@
//
// AddTagSheet.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 02/03/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// TagList.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 25/04/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// TagObjList.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 20/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// TagRow.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 20/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
//
// TagView.swift
// Music Tools
// Mixonomer
//
// Created by Andy Pack on 20/02/2020.
// Copyright © 2020 Sarsoo. All rights reserved.

View File

@ -1,6 +1,6 @@
# Music Tools iOS
# Mixonomer iOS
iOS client for [Music Tools](https://music.sarsoo.xyz) ([Source](https://github.com/sarsoo/Music-Tools)), using it to learn swift.
iOS client for [Mixonomer](https://music.sarsoo.xyz) ([Source](https://github.com/sarsoo/Mixonomer)), using it to learn swift.
Using SwiftUI for the main app UI. Hanging SwiftUI on a hosting controller for log in/register.