mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-04-11 17:29:44 +00:00
Fix: action panel (#83)
* fix: change action trigger hotkey on win and linux from control + k to alt + k * chore: Update macOS build matrix to use macos-13 instead of macos-12 * feat: improve action panel, disable actions vimBindings
This commit is contained in:
parent
0bb59e4f66
commit
33e4451be2
6
.github/workflows/beta-build.yml
vendored
6
.github/workflows/beta-build.yml
vendored
@ -91,7 +91,7 @@ jobs:
|
||||
run: |
|
||||
matrix=""
|
||||
if [ "${{ github.event_name }}" == "schedule" ]; then
|
||||
matrix="\"windows-latest\",\"ubuntu-22.04\",\"macos-14\",\"macos-12\""
|
||||
matrix="\"windows-latest\",\"ubuntu-22.04\",\"macos-14\",\"macos-13\""
|
||||
build_mode=""
|
||||
build_path="release"
|
||||
retention_days='1'
|
||||
@ -106,7 +106,7 @@ jobs:
|
||||
matrix="${matrix}\"macos-14\","
|
||||
fi
|
||||
if [ "${{ inputs.platform_macos_x86_64 }}" == "true" ]; then
|
||||
matrix="${matrix}\"macos-12\","
|
||||
matrix="${matrix}\"macos-13\","
|
||||
fi
|
||||
if [ -z "${matrix}" ]; then
|
||||
matrix="\"windows-latest\","
|
||||
@ -217,7 +217,7 @@ jobs:
|
||||
run: mv target/${{ env.BUILD_PATH }}/bundle/dmg/*.dmg target/${{ env.BUILD_PATH }}/bundle/dmg/${{ env.FILE_PREFIX }}-aarch64.dmg
|
||||
|
||||
- name: Rename macos-x86_64
|
||||
if: matrix.os == 'macos-12'
|
||||
if: matrix.os == 'macos-13'
|
||||
run: mv target/${{ env.BUILD_PATH }}/bundle/dmg/*.dmg target/${{ env.BUILD_PATH }}/bundle/dmg/${{ env.FILE_PREFIX }}-amd64.dmg
|
||||
|
||||
- name: Rename windows
|
||||
|
@ -273,8 +273,14 @@
|
||||
keySet.has(_platform === "macos" ? "Meta" : "Control") &&
|
||||
keySet.has("k")
|
||||
) {
|
||||
console.log("open action panel")
|
||||
actionPanelOpen = true
|
||||
// actionPanelOpen = true
|
||||
setTimeout(() => {
|
||||
console.log("toggle action panel")
|
||||
actionPanelOpen = !actionPanelOpen
|
||||
if (!actionPanelOpen) {
|
||||
onActionPanelBlur()
|
||||
}
|
||||
}, 100)
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -50,68 +50,11 @@ class ExtensionTemplate extends WorkerExtension {
|
||||
}
|
||||
|
||||
async load() {
|
||||
clipboard.readText().then((text) => {
|
||||
console.log("Clipboard text:", text)
|
||||
})
|
||||
kv.exists("test").then((exists) => {
|
||||
console.log("KV exists:", exists)
|
||||
})
|
||||
kv.set("test", Math.random().toString()).then(() => {
|
||||
return kv.get("test").then((value) => {
|
||||
console.log("KV value:", value)
|
||||
})
|
||||
})
|
||||
|
||||
// console.log("Check screen capture permission:", await security.mac.checkScreenCapturePermission())
|
||||
// await security.mac.revealSecurityPane("AllFiles")
|
||||
// console.log(await security.mac.verifyFingerprint())
|
||||
ui.setSearchBarPlaceholder("Search for items")
|
||||
ui.showLoadingBar(true)
|
||||
setTimeout(() => {
|
||||
ui.showLoadingBar(false)
|
||||
}, 2000)
|
||||
const { rpcChannel, process, command } = await shell.createDenoRpcChannel<
|
||||
{},
|
||||
{
|
||||
add(a: number, b: number): Promise<number>
|
||||
subtract(a: number, b: number): Promise<number>
|
||||
readImageMetadata(path: string): Promise<any>
|
||||
batchReadImageMetadata: (paths: string[]) => Promise<any[]>
|
||||
}
|
||||
>(
|
||||
"$EXTENSION/deno-src/rpc.ts",
|
||||
[],
|
||||
{
|
||||
// allowEnv: ["npm_package_config_libvips"],
|
||||
allowAllEnv: true,
|
||||
// allowFfi: ["*sharp-darwin-arm64.node"],
|
||||
allowAllFfi: true,
|
||||
allowAllRead: true,
|
||||
allowAllSys: true,
|
||||
// allowRun: ["*exiftool"]
|
||||
allowAllRun: true
|
||||
},
|
||||
{}
|
||||
)
|
||||
// const child = new Child(process.pid)
|
||||
command.stdout.on("data", (data) => {
|
||||
console.log("stdout", data.toString())
|
||||
})
|
||||
command.stderr.on("data", (data) => {
|
||||
console.log("stderr", data.toString())
|
||||
})
|
||||
// await api
|
||||
// .readImageMetadata("/Users/hacker/Pictures/3D-Image/pics/IMG_0767.jpeg")
|
||||
// .then((data) => {
|
||||
// console.log("metadata", data)
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.error("error", err)
|
||||
// })
|
||||
// await api.add(1, 2).then(console.log)
|
||||
// await api.subtract(1, 2).then(console.log)
|
||||
|
||||
await process.kill()
|
||||
const extPath = await path.extensionDir()
|
||||
// console.log("Extension path:", extPath)
|
||||
const tagList = new List.ItemDetailMetadataTagList({
|
||||
|
@ -1,10 +1,4 @@
|
||||
export type Json =
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| null
|
||||
| { [key: string]: Json | undefined }
|
||||
| Json[]
|
||||
export type Json = string | number | boolean | null | { [key: string]: Json | undefined } | Json[]
|
||||
|
||||
export type Database = {
|
||||
public: {
|
||||
@ -119,7 +113,7 @@ export type Database = {
|
||||
isOneToOne: false
|
||||
referencedRelation: "extensions"
|
||||
referencedColumns: ["identifier"]
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
extensions: {
|
||||
@ -236,7 +230,7 @@ export type Tables<
|
||||
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
||||
Database[PublicTableNameOrOptions["schema"]]["Views"])
|
||||
: never = never,
|
||||
: never = never
|
||||
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
||||
Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
||||
@ -244,10 +238,8 @@ export type Tables<
|
||||
}
|
||||
? R
|
||||
: never
|
||||
: PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
|
||||
PublicSchema["Views"])
|
||||
? (PublicSchema["Tables"] &
|
||||
PublicSchema["Views"])[PublicTableNameOrOptions] extends {
|
||||
: PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & PublicSchema["Views"])
|
||||
? (PublicSchema["Tables"] & PublicSchema["Views"])[PublicTableNameOrOptions] extends {
|
||||
Row: infer R
|
||||
}
|
||||
? R
|
||||
@ -255,12 +247,10 @@ export type Tables<
|
||||
: never
|
||||
|
||||
export type TablesInsert<
|
||||
PublicTableNameOrOptions extends
|
||||
| keyof PublicSchema["Tables"]
|
||||
| { schema: keyof Database },
|
||||
PublicTableNameOrOptions extends keyof PublicSchema["Tables"] | { schema: keyof Database },
|
||||
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
||||
: never = never,
|
||||
: never = never
|
||||
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
||||
Insert: infer I
|
||||
@ -276,12 +266,10 @@ export type TablesInsert<
|
||||
: never
|
||||
|
||||
export type TablesUpdate<
|
||||
PublicTableNameOrOptions extends
|
||||
| keyof PublicSchema["Tables"]
|
||||
| { schema: keyof Database },
|
||||
PublicTableNameOrOptions extends keyof PublicSchema["Tables"] | { schema: keyof Database },
|
||||
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
||||
: never = never,
|
||||
: never = never
|
||||
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
||||
Update: infer U
|
||||
@ -297,12 +285,10 @@ export type TablesUpdate<
|
||||
: never
|
||||
|
||||
export type Enums<
|
||||
PublicEnumNameOrOptions extends
|
||||
| keyof PublicSchema["Enums"]
|
||||
| { schema: keyof Database },
|
||||
PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] | { schema: keyof Database },
|
||||
EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
|
||||
? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
|
||||
: never = never,
|
||||
: never = never
|
||||
> = PublicEnumNameOrOptions extends { schema: keyof Database }
|
||||
? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
|
||||
: PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
|
||||
@ -317,7 +303,7 @@ export type CompositeTypes<
|
||||
schema: keyof Database
|
||||
}
|
||||
? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
|
||||
: never = never,
|
||||
: never = never
|
||||
> = PublicCompositeTypeNameOrOptions extends { schema: keyof Database }
|
||||
? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
|
||||
: PublicCompositeTypeNameOrOptions extends keyof PublicSchema["CompositeTypes"]
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
## Permission Table
|
||||
|
||||
<table>
|
||||
@ -7,7 +6,6 @@
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
|
@ -286,7 +286,7 @@
|
||||
<Separator class="my-3" />
|
||||
<h2 class="text-lg font-bold">README</h2>
|
||||
{#if extPublish?.readme}
|
||||
<Markdown markdown={extPublish.readme} class="bg-secondary p-4 max-w-full rounded-md" />
|
||||
<Markdown markdown={extPublish.readme} class="bg-secondary max-w-full rounded-md p-4" />
|
||||
{/if}
|
||||
</ScrollArea>
|
||||
|
||||
|
@ -90,6 +90,7 @@
|
||||
</script>
|
||||
|
||||
<Command.Root
|
||||
vimBindings={false}
|
||||
class="h-screen w-full rounded-lg border shadow-md"
|
||||
shouldFilter={listViewContent.filter !== "none"}
|
||||
bind:value={highlightedValue}
|
||||
|
@ -7,6 +7,8 @@
|
||||
import { tick } from "svelte"
|
||||
import Kbd from "../common/Kbd.svelte"
|
||||
|
||||
const isMac = navigator.platform.toLowerCase().includes("mac")
|
||||
|
||||
let {
|
||||
actionPanel,
|
||||
open = $bindable(false),
|
||||
@ -42,15 +44,22 @@
|
||||
<Button variant="ghost" class="" {...props} role="combobox" aria-expanded={open}>
|
||||
Actions
|
||||
<span class="flex items-center gap-0.5" data-tauri-drag-region>
|
||||
<Kbd><Icon icon="ph-command" class="h-4 w-4 shrink-0" /></Kbd>
|
||||
<Kbd>K</Kbd>
|
||||
<Kbd class="w-fit">
|
||||
{#if isMac}
|
||||
<Icon icon="ph-command" class="h-4 w-4 shrink-0" />
|
||||
{:else}
|
||||
Ctl
|
||||
{/if}
|
||||
</Kbd>
|
||||
+
|
||||
<Kbd><Icon icon="mynaui:letter-k-solid" class="h-4 w-4 shrink-0" /></Kbd>
|
||||
</span>
|
||||
<ChevronsUpDown class="ml-2 size-4 shrink-0 opacity-50" />
|
||||
</Button>
|
||||
{/snippet}
|
||||
</Popover.Trigger>
|
||||
<Popover.Content class="w-64 p-0">
|
||||
<Command.Root>
|
||||
<Command.Root vimBindings={false}>
|
||||
<Command.Input
|
||||
placeholder="Select an Action"
|
||||
onkeydown={(e) => {
|
||||
|
@ -40,7 +40,7 @@
|
||||
{#if defaultAction}
|
||||
<Button size="default" class="h-full" variant="ghost" onclick={onDefaultActionSelected}>
|
||||
{defaultAction}
|
||||
<Kbd><Icon icon="tdesign:enter" /></Kbd>
|
||||
<Kbd><Icon icon="uil:enter" /></Kbd>
|
||||
</Button>
|
||||
{/if}
|
||||
{#if actionPanel}
|
||||
|
Loading…
x
Reference in New Issue
Block a user