Skip to content

Bubka/2FAuth-Components

Repository files navigation

2FAuth-Components

A vue.js components library to build the 2FAuth web app & web extension.

2FAuth is a web app for managing your Two-Factor Authentication (2FA) accounts and generating their security codes.

🔗 2FAuth repository
🔗 2FAuth docs

Purpose

The sole purpose of this library is to share common components between all clients of the 2FAuth project. Although it could probably be used in other projects, it was not designed for, and it never will be.

Workspace content

Directories

Name Content
histoire Components are documented using Histoire. This directory contains all necessary configuration files and assets to build or preview the Histoire pages.
packages Source code of all vue sfc components which compose the library, as well as an Histoire file for each of them.
playground Contains all necessary configuration files and assets to build or preview a test playground if you need to work with a component in a specific way.

Development

Requirements

Using the lib in other 2FAuth repositories

For now the library is not published as public packages. It is not possible to install it like any other js dependencies by adding it to a package.json file.

If you need to work on the 2FAuth repository or the 2FAuth-WebExtension repository, clone the library repository in the same directory as the 2FAuth ones and use the npm link command.

You should get this directory structure:

|-- Repositories
|   |-- 2FAuth
|   |-- 2FAuth-WebExtension
|   |-- 2FAuth-Components

From the 2FAuth or 2FAuth-WebExtension local directory, run the following command :

npm link ../2FAuth-Components/packages/ui ../2FAuth-Components/packages/formcontrols ../2FAuth-Components/packages/styles ../2FAuth-Components/packages/stores

See pnpm link usage

Working with translations

The components are localized using the vue-i18n plugin. Translations are done and managed with the Crowdin SAAS.

In order for the components to be localised on the Histoire pages or the playground, you have to fetch the language files from Crowdin and store them in the \resources\lang\ folder, alongside the packages and playground folders.

This can be acheived using the Crowdin CLI using the following command:

# fetch only the source file (en.json)
crowdin download sources

# fetch all translation files (*.json)
crowdin download translations

Important

The en.json source file fetched by the Crowdin CLI can be modified locally but it should NEVER BE UPLOADED to crowdin for an update from this repository.
If you need any additions or changes to the source language definition, please open a pull request to update the en.json file tracked in the 2FAuth repository

License

AGPL-3.0

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors