Tauri Plugin user-data
A simple plugin that allows you to get the operating system icons by name (only works on Linux) by getting it in base64 ready to use the src of any image
Installation
Add in cargo.toml
[]
= { = "https://github.com/Vasak-OS/tauri-plugin-user-data", = "v2" }
In main.rs or lib.rs, add the following to your tauri::Builder:
use tauri_plugin_user_data;
And add in src-tauri/compatibilites/default.json
Usage
import { getUserData } from '@vasakgroup/plugin-user-data';
const icon = await getUserData('folder');
in vue
<script setup lang="ts">
import { getUserData } from '@vasakgroup/plugin-user-data';
import { ref } from 'vue';
const user = ref('');
const getUserInfo = async () => {
user.value = await getUserData();
};
getUserInfo();
</script>
<template>
{{ user }}
</template>