mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-04-22 20:06:18 +02:00
style: copy
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@
|
||||
|
||||
### Maintenance
|
||||
|
||||
- chore: versiom bump
|
||||
- chore: version bump
|
||||
- chore: serialize changelog and flake jobs
|
||||
- chore: update flake.nix for v0.20.2 [skip ci] (#273)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { toast } from "sonner";
|
||||
import { LoadingButton } from "@/components/loading-button";
|
||||
import {
|
||||
@@ -31,6 +32,7 @@ export function DeleteGroupDialog({
|
||||
group,
|
||||
onGroupDeleted,
|
||||
}: DeleteGroupDialogProps) {
|
||||
const { t } = useTranslation();
|
||||
const [associatedProfiles, setAssociatedProfiles] = useState<
|
||||
BrowserProfile[]
|
||||
>([]);
|
||||
@@ -155,7 +157,7 @@ export function DeleteGroupDialog({
|
||||
<div className="flex items-center space-x-2">
|
||||
<RadioGroupItem value="move" id="move" />
|
||||
<Label htmlFor="move" className="text-sm">
|
||||
Move profiles to Default group
|
||||
{t("groups.moveToDefault")}
|
||||
</Label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { GoPlus } from "react-icons/go";
|
||||
import { toast } from "sonner";
|
||||
import { CreateGroupDialog } from "@/components/create-group-dialog";
|
||||
@@ -40,6 +41,7 @@ export function GroupAssignmentDialog({
|
||||
onAssignmentComplete,
|
||||
profiles = [],
|
||||
}: GroupAssignmentDialogProps) {
|
||||
const { t } = useTranslation();
|
||||
const [groups, setGroups] = useState<ProfileGroup[]>([]);
|
||||
const [selectedGroupId, setSelectedGroupId] = useState<string | null>(null);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
@@ -72,10 +74,13 @@ export function GroupAssignmentDialog({
|
||||
|
||||
const groupName = selectedGroupId
|
||||
? groups.find((g) => g.id === selectedGroupId)?.name || "Unknown Group"
|
||||
: "Default";
|
||||
: t("groups.defaultGroup");
|
||||
|
||||
toast.success(
|
||||
`Successfully assigned ${selectedProfiles.length} profile(s) to ${groupName}`,
|
||||
t("groups.assignSuccess", {
|
||||
count: selectedProfiles.length,
|
||||
group: groupName,
|
||||
}),
|
||||
);
|
||||
onAssignmentComplete();
|
||||
onClose();
|
||||
@@ -96,6 +101,7 @@ export function GroupAssignmentDialog({
|
||||
groups,
|
||||
onAssignmentComplete,
|
||||
onClose,
|
||||
t,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -166,7 +172,9 @@ export function GroupAssignmentDialog({
|
||||
<SelectValue placeholder="Select a group" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="default">Default (No Group)</SelectItem>
|
||||
<SelectItem value="default">
|
||||
{t("groups.defaultGroupNoGroup")}
|
||||
</SelectItem>
|
||||
{groups.map((group) => (
|
||||
<SelectItem key={group.id} value={group.id}>
|
||||
{group.name}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import type { GroupWithCount } from "@/types";
|
||||
|
||||
@@ -18,6 +19,7 @@ export function GroupBadges({
|
||||
groups,
|
||||
isLoading,
|
||||
}: GroupBadgesProps) {
|
||||
const { t } = useTranslation();
|
||||
const scrollContainerRef = useRef<HTMLDivElement>(null);
|
||||
const [showLeftFade, setShowLeftFade] = useState(false);
|
||||
const [showRightFade, setShowRightFade] = useState(false);
|
||||
@@ -181,7 +183,9 @@ export function GroupBadges({
|
||||
}
|
||||
}}
|
||||
>
|
||||
<span>{group.name}</span>
|
||||
<span>
|
||||
{group.id === "default" ? t("groups.defaultGroup") : group.name}
|
||||
</span>
|
||||
<span className="bg-background/20 text-xs px-1.5 py-0.5 rounded-sm">
|
||||
{group.count}
|
||||
</span>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { listen } from "@tauri-apps/api/event";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { GoPlus } from "react-icons/go";
|
||||
import { LuPencil, LuTrash2 } from "react-icons/lu";
|
||||
import { CreateGroupDialog } from "@/components/create-group-dialog";
|
||||
@@ -90,6 +91,7 @@ export function GroupManagementDialog({
|
||||
onClose,
|
||||
onGroupManagementComplete,
|
||||
}: GroupManagementDialogProps) {
|
||||
const { t } = useTranslation();
|
||||
const [groups, setGroups] = useState<GroupWithCount[]>([]);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -233,10 +235,9 @@ export function GroupManagementDialog({
|
||||
<Dialog open={isOpen} onOpenChange={onClose}>
|
||||
<DialogContent className="max-w-2xl max-h-[90vh] flex flex-col">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Manage Profile Groups</DialogTitle>
|
||||
<DialogTitle>{t("groups.management")}</DialogTitle>
|
||||
<DialogDescription>
|
||||
Create, edit, and delete profile groups. Profiles without a group
|
||||
will appear in the "Default" group.
|
||||
{t("groups.noGroupDescription")}
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
@@ -265,12 +266,11 @@ export function GroupManagementDialog({
|
||||
{/* Groups list */}
|
||||
{isLoading ? (
|
||||
<div className="text-sm text-muted-foreground">
|
||||
Loading groups...
|
||||
{t("common.loading")}
|
||||
</div>
|
||||
) : groups.length === 0 ? (
|
||||
<div className="text-sm text-muted-foreground">
|
||||
No groups created yet. Create your first group using the button
|
||||
above.
|
||||
{t("groups.noGroupsDescription")}
|
||||
</div>
|
||||
) : (
|
||||
<div className="border rounded-md">
|
||||
|
||||
@@ -323,6 +323,11 @@
|
||||
"add": "Add Group",
|
||||
"edit": "Edit Group",
|
||||
"delete": "Delete Group",
|
||||
"defaultGroup": "Default",
|
||||
"defaultGroupNoGroup": "Default (No Group)",
|
||||
"moveToDefault": "Move profiles to Default group",
|
||||
"noGroupDescription": "Profiles without a group will appear in the \"Default\" group.",
|
||||
"assignSuccess": "Successfully assigned {{count}} profile(s) to {{group}}",
|
||||
"noGroups": "No groups created",
|
||||
"noGroupsDescription": "Create a group to organize your profiles.",
|
||||
"form": {
|
||||
|
||||
@@ -323,6 +323,11 @@
|
||||
"add": "Agregar Grupo",
|
||||
"edit": "Editar Grupo",
|
||||
"delete": "Eliminar Grupo",
|
||||
"defaultGroup": "Predeterminado",
|
||||
"defaultGroupNoGroup": "Predeterminado (Sin Grupo)",
|
||||
"moveToDefault": "Mover perfiles al grupo Predeterminado",
|
||||
"noGroupDescription": "Los perfiles sin grupo aparecerán en el grupo \"Predeterminado\".",
|
||||
"assignSuccess": "Se asignaron {{count}} perfil(es) a {{group}} exitosamente",
|
||||
"noGroups": "No hay grupos creados",
|
||||
"noGroupsDescription": "Crea un grupo para organizar tus perfiles.",
|
||||
"form": {
|
||||
|
||||
@@ -323,6 +323,11 @@
|
||||
"add": "Ajouter un groupe",
|
||||
"edit": "Modifier le groupe",
|
||||
"delete": "Supprimer le groupe",
|
||||
"defaultGroup": "Par défaut",
|
||||
"defaultGroupNoGroup": "Par défaut (Aucun groupe)",
|
||||
"moveToDefault": "Déplacer les profils vers le groupe Par défaut",
|
||||
"noGroupDescription": "Les profils sans groupe apparaîtront dans le groupe « Par défaut ».",
|
||||
"assignSuccess": "{{count}} profil(s) assigné(s) à {{group}} avec succès",
|
||||
"noGroups": "Aucun groupe créé",
|
||||
"noGroupsDescription": "Créez un groupe pour organiser vos profils.",
|
||||
"form": {
|
||||
|
||||
@@ -323,6 +323,11 @@
|
||||
"add": "グループを追加",
|
||||
"edit": "グループを編集",
|
||||
"delete": "グループを削除",
|
||||
"defaultGroup": "デフォルト",
|
||||
"defaultGroupNoGroup": "デフォルト(グループなし)",
|
||||
"moveToDefault": "プロファイルをデフォルトグループに移動",
|
||||
"noGroupDescription": "グループに属していないプロファイルは「デフォルト」グループに表示されます。",
|
||||
"assignSuccess": "{{count}} 件のプロファイルを {{group}} に割り当てました",
|
||||
"noGroups": "グループがありません",
|
||||
"noGroupsDescription": "プロファイルを整理するためのグループを作成してください。",
|
||||
"form": {
|
||||
|
||||
@@ -323,6 +323,11 @@
|
||||
"add": "Adicionar Grupo",
|
||||
"edit": "Editar Grupo",
|
||||
"delete": "Excluir Grupo",
|
||||
"defaultGroup": "Padrão",
|
||||
"defaultGroupNoGroup": "Padrão (Sem Grupo)",
|
||||
"moveToDefault": "Mover perfis para o grupo Padrão",
|
||||
"noGroupDescription": "Perfis sem grupo aparecerão no grupo \"Padrão\".",
|
||||
"assignSuccess": "{{count}} perfil(s) atribuído(s) a {{group}} com sucesso",
|
||||
"noGroups": "Nenhum grupo criado",
|
||||
"noGroupsDescription": "Crie um grupo para organizar seus perfis.",
|
||||
"form": {
|
||||
|
||||
@@ -323,6 +323,11 @@
|
||||
"add": "Добавить группу",
|
||||
"edit": "Редактировать группу",
|
||||
"delete": "Удалить группу",
|
||||
"defaultGroup": "По умолчанию",
|
||||
"defaultGroupNoGroup": "По умолчанию (Без группы)",
|
||||
"moveToDefault": "Переместить профили в группу по умолчанию",
|
||||
"noGroupDescription": "Профили без группы будут отображаться в группе «По умолчанию».",
|
||||
"assignSuccess": "Успешно назначено {{count}} профиль(ей) в {{group}}",
|
||||
"noGroups": "Группы не созданы",
|
||||
"noGroupsDescription": "Создайте группу для организации профилей.",
|
||||
"form": {
|
||||
|
||||
@@ -323,6 +323,11 @@
|
||||
"add": "添加分组",
|
||||
"edit": "编辑分组",
|
||||
"delete": "删除分组",
|
||||
"defaultGroup": "默认",
|
||||
"defaultGroupNoGroup": "默认(无分组)",
|
||||
"moveToDefault": "将配置文件移至默认分组",
|
||||
"noGroupDescription": "未分组的配置文件将显示在「默认」分组中。",
|
||||
"assignSuccess": "已成功将 {{count}} 个配置文件分配到 {{group}}",
|
||||
"noGroups": "暂无分组",
|
||||
"noGroupsDescription": "创建分组来组织您的配置文件。",
|
||||
"form": {
|
||||
|
||||
Reference in New Issue
Block a user