Skip to content

Commit

Permalink
add "have token" indicator #10
Browse files Browse the repository at this point in the history
  • Loading branch information
twocanoes committed Jun 17, 2022
1 parent b1d8ee6 commit db746fd
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"scale" : "1x",
"idiom" : "universal",
"filename" : "xcreds menu icon check~universal@1x.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "xcreds menu icon check~universal@2x.png"
},
{
"filename" : "xcreds menu icon check~universal@3x.png",
"scale" : "3x",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions XCreds/MainController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class MainController: NSObject {

if let refreshToken = userInfo[PrefKeys.refreshToken.rawValue] as? String {
let _ = keychainUtil.updatePassword(PrefKeys.refreshToken.rawValue, pass: refreshToken)
mainMenu.statusBarItem.button?.image=NSImage(named: "xcreds menu icon check")


}


Expand Down
2 changes: 2 additions & 0 deletions XCreds/PreferencesWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class PreferencesWindowController: NSWindowController {
let _ = keychainUtil.findAndDelete(PrefKeys.accessToken.rawValue)
let _ = keychainUtil.findAndDelete(PrefKeys.idToken.rawValue)
let _ = keychainUtil.findAndDelete(PrefKeys.refreshToken.rawValue)
mainMenu.statusBarItem.button?.image=NSImage(named: "xcreds menu icon")


}

Expand Down
5 changes: 5 additions & 0 deletions XCreds/ScheduleManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,14 @@ class ScheduleManager {
return
}
else if isSuccessful == true {

if UserDefaults.standard.bool(forKey: PrefKeys.showDebug.rawValue) == true {
NotifyManager.shared.sendMessage(message: "Azure password unchanged")
}
DispatchQueue.main.async {
mainMenu.statusBarItem.button?.image=NSImage(named: "xcreds menu icon check")
}


}
else {
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,32 @@
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "48A88CA2-4444-42B1-BCE3-97813394F16C"
uuid = "7E3586B1-2D94-4BE8-BC2E-2F3AC7FCFB14"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "XCreds/WebView.swift"
filePath = "XCreds/ScheduleManager.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "40"
endingLineNumber = "40"
landmarkName = "run()"
startingLineNumber = "51"
endingLineNumber = "51"
landmarkName = "checkToken()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "D98980F5-796F-4A70-AFB4-5F39580E84F7"
uuid = "2A5911CE-8023-4A4F-AD53-6A980594B6DC"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "XCreds/TokenManager.swift"
filePath = "XCreds/MainController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "59"
endingLineNumber = "59"
landmarkName = "getNewAccessToken(completion:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "F8B54C07-8147-4419-A30A-76F2FD91C289"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "XCreds/TokenManager.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "80"
endingLineNumber = "80"
landmarkName = "getNewAccessToken(completion:)"
startingLineNumber = "28"
endingLineNumber = "28"
landmarkName = "run()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
Expand Down

0 comments on commit db746fd

Please sign in to comment.