Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ipuppet committed Jul 2, 2024
1 parent 611f909 commit 1b02a83
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions scripts/ui/clips/clips.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ class Clips extends ClipsData {
}

async checkUrlScheme() {
// actions widget
if ($context.query["runAction"]) {
const data = JSON.parse($text.base64Decode($context.query["runAction"]))
const action = this.kernel.actions.getAction(
data.category,
data.dir,
new ActionData({ env: ActionEnv.widget })
)
action.do()
return
}
// clips widget
if ($context.query["copy"]) {
const uuid = $context.query["copy"]
this.setCopied(uuid)
Expand All @@ -94,16 +106,6 @@ class Clips extends ClipsData {
} else {
this.kernel.tabBarController.switchPageTo("actions")
}
} else if ($context.query["runAction"]) {
$delay(0, () => {
const data = JSON.parse($text.base64Decode($context.query["runAction"]))
const action = this.kernel.actions.getAction(
data.category,
data.dir,
new ActionData({ env: ActionEnv.widget })
)
action.do()
})
}
}

Expand All @@ -123,7 +125,7 @@ class Clips extends ClipsData {
if (UIKit.isTaio) return

// check url scheme
this.checkUrlScheme()
$delay(0, () => this.checkUrlScheme())

this.appListen()
}
Expand Down

0 comments on commit 1b02a83

Please sign in to comment.