feat(app): add environment import/export and sidebar footer info

- add environment import/export API endpoints and client integration

- add environment export actions and toolbar import/export buttons in UI

- move theme switcher to sidebar bottom and show root package version

- switch snippet card menu icon to cog for consistent options affordance
This commit is contained in:
2026-04-10 20:29:40 +03:00
parent 99da7ac891
commit 0e4a2e1819
13 changed files with 218 additions and 20 deletions
+15
View File
@@ -1,14 +1,29 @@
/// <reference types="vitest/config" />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
import { playwright } from '@vitest/browser-playwright';
const dirname = typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
const rootPackageJsonPath = path.resolve(dirname, '../package.json');
const APP_VERSION = (() => {
try {
const json = JSON.parse(fs.readFileSync(rootPackageJsonPath, 'utf8')) as {
version?: string;
};
return json.version ?? 'dev';
} catch {
return 'dev';
}
})();
// More info at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon
export default defineConfig({
define: {
__APP_VERSION__: JSON.stringify(APP_VERSION),
},
plugins: [react()],
server: {
proxy: {