Giter VIP home page Giter VIP logo

Comments (5)

brpaz avatar brpaz commented on July 18, 2024

an example script where this is hapenning:

// Name: Password Generator
// Description: Generate a random password
// Author: Bruno Paz
// Github: @brpaz

import "@johnlindquist/kit"

const generatePassword : typeof import("generate-password") = await npm("generate-password");

const length = await arg({
    placeholder: "How many characters?",
    validate: (input) => {
        if (isNaN(Number(input))) {
            return "Please enter a number"
        }
        return true
    }
})

const includeSymbols = await arg({
    placeholder: "Include symbols?",
    choices: ["Yes", "No"],
    defaultValue: "Yes",
})

const passwords = generatePassword.generateMultiple(5, {
    length: Number(length),
    numbers: true,
    excludeSimilarCharacters: true,
    symbols: includeSymbols === "Yes",
    strict: true,
})

await arg({
    placeholder: "Select a password to copy",
    choices: passwords,
    onSubmit: async (input, state) => {
        await copy(state?.focused?.value)
        notify("Copied to clipboard")
    },
    actions: [
        {
            name: "Copy to clipboard",
            shortcut: "c",
            visible: true,
            onAction: async (input, state) => {
                await copy(state?.focused?.value)
                notify("Copied to clipboard")
            }
        }
    ]
})

from kit.

johnlindquist avatar johnlindquist commented on July 18, 2024

@brpaz Thanks for the report. The internal window size detection measurements apparently have a different behavior on Linux than they do on Windows and Mac. I'm investigating a fix. I'll try to either have a fix or a workaround in the next few days.

from kit.

brpaz avatar brpaz commented on July 18, 2024

cool. thank you. Great work on the V2 btw. I love the new features like Actions and Snippets.

from kit.

johnlindquist avatar johnlindquist commented on July 18, 2024

@brpaz Here's a build which prevents resizing:

https://github.com/johnlindquist/kitapp/releases/tag/v2.0.43

I'm still investigating if I can possible re-enable resizing before I push the build to public channel

from kit.

brpaz avatar brpaz commented on July 18, 2024

@johnlindquist thanks. just tested it and seems fine. I will close this.

from kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.