diff --git a/package-lock.json b/package-lock.json
index 7e81c52..0787df7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "feign-discord",
- "version": "0.0.3",
+ "version": "0.0.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "feign-discord",
- "version": "0.0.3",
+ "version": "0.0.4",
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.7.2",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
diff --git a/package.json b/package.json
index d1b1a27..6148780 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "feign-discord",
- "version": "0.0.3",
+ "version": "0.0.4",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.7.2",
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index 9b63598..f38c698 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -20,7 +20,7 @@ function Header() {
Feign-Discord CSS Generator
-
diff --git a/src/components/buttons/AnimationSettingButtonGroup.tsx b/src/components/buttons/AnimationSettingButtonGroup.tsx
index 46a89f3..1580fcd 100644
--- a/src/components/buttons/AnimationSettingButtonGroup.tsx
+++ b/src/components/buttons/AnimationSettingButtonGroup.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { ButtonGroup, Form, InputGroup } from "react-bootstrap";
+import { ButtonGroup, Col, Form, InputGroup, Row } from "react-bootstrap";
import { AnimationSettings } from "../../models/ViewSettings";
import { ColorPicker } from "./ColorPicker";
import { useTranslation } from "react-i18next";
@@ -15,7 +15,7 @@ export function AnimationSettingButtonGroup(
const tt = (k: string) => { return t(k, { keyPrefix: '' }) };
const jsxJump = (
-
+
handleChange({ ...setting, flash: !setting.flash })}
/>
-
-
+
{tt('color')}
{ColorPicker(t('flash_color'), setting.flashColor, (color) => handleChange({ ...setting, flashColor: color }))}
@@ -65,7 +64,7 @@ export function AnimationSettingButtonGroup(
checked={setting.outline}
onChange={() => handleChange({ ...setting, outline: !setting.outline })}
/>
-
+
{t('outline')}
@@ -77,10 +76,10 @@ export function AnimationSettingButtonGroup(
);
return (
-
- {jsxJump}
- {jsxFlash}
- {showOutline ? jsxOutline : ""}
-
+
+ {jsxJump}
+ {jsxFlash}
+ {showOutline ? jsxOutline : ""}
+
);
}
diff --git a/src/components/sections/DiscordUsers.tsx b/src/components/sections/DiscordUsers.tsx
index 551c93b..ff8e70b 100644
--- a/src/components/sections/DiscordUsers.tsx
+++ b/src/components/sections/DiscordUsers.tsx
@@ -1,6 +1,6 @@
import React from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { faArrowDown, faArrowUp } from "@fortawesome/free-solid-svg-icons";
+import { faArrowDown, faArrowUp, faPen, faPenToSquare, faTractor, faTrash, faXmark } from "@fortawesome/free-solid-svg-icons";
import { Container, Row, Col, InputGroup, Form, Button, Modal } from "react-bootstrap";
import { DiscordUser, ConfContext } from "../../models/Context";
import { useTranslation } from "react-i18next";
@@ -92,6 +92,128 @@ export function DiscordUsers() {
function DiscordUserRow(user: DiscordUser, index: number) {
const isEditing = discordUserEditing.index < discordUsers.length;
+ const buttonInterval = 'me-1'
+
+ function EditButton() {
+ return ();
+ }
+
+ function RemoveButton() {
+ return ();
+ }
+
+ function SaveButton(isValid: boolean) {
+ const title = isEditing ? tt('save') : tt('add');
+ return ();
+ }
+
+ function CancelButton(isEditing: boolean) {
+ return ();
+ }
+
+ function MoveDownButton() {
+ return ();
+ }
+
+ function MoveUpButton() {
+ return ();
+ }
+
+ function NameInput(disabled: boolean, isNameEmpty: boolean, isNameValid: boolean, feedback: string) {
+ if (disabled) {
+ return (
+ {tt('name')}
+
+ );
+ } else {
+ return (
+ {tt('name')}
+ updateDiscordUserEditing(index, e.target.value, discordUserEditing.id)}
+ />
+ {feedback}
+ );
+ }
+ }
+
+ function IdInput(disabled: boolean, isIdEmpty: boolean, isIdValid: boolean, feedback: string) {
+ if (disabled) {
+ return (
+ ID
+
+ );
+ } else {
+ return (
+ ID
+ updateDiscordUserEditing(index, discordUserEditing.name, e.target.value)}
+ />
+ {feedback}
+ );
+ }
+ }
if (index === discordUserEditing.index) {
const nameTrimmed = discordUserEditing.name.trim();
@@ -109,47 +231,15 @@ export function DiscordUsers() {
return (
@@ -157,62 +247,19 @@ export function DiscordUsers() {
} else {
return (
-
-
- {tt('name')}
-
-
-
-
-
- ID
-
-
+
+ {NameInput(true, false, false, '')}
-
-
-
+
+ {IdInput(true, false, false, '')}
-
-
-
+
+
+
+
+
+
+
);
diff --git a/src/components/sections/FeignPlayers.tsx b/src/components/sections/FeignPlayers.tsx
index e5af5a6..c25b493 100644
--- a/src/components/sections/FeignPlayers.tsx
+++ b/src/components/sections/FeignPlayers.tsx
@@ -26,8 +26,8 @@ export function FeignPlayers() {
const t = translate as ((s: string) => string);
return (
- {t(FEI_COLORS[color])}
-
+ {t(FEI_COLORS[color])}
+
@@ -55,14 +55,15 @@ export function FeignPlayers() {
return (
-
+ {/* large screen */}
+
{Array(7)
.fill(0)
.map((_, i: number) => {
return FeignPlayer(i);
})}
-
+
{Array(6)
.fill(0)
.map((_, i: number) => {
@@ -70,6 +71,31 @@ export function FeignPlayers() {
})}
+
+ {/* small screen */}
+
+ {Array(5)
+ .fill(0)
+ .map((_, i: number) => {
+ return FeignPlayer(i);
+ })}
+
+
+ {Array(5)
+ .fill(0)
+ .map((_, i: number) => {
+ return FeignPlayer(4 + i);
+ })}
+
+
+ {Array(3)
+ .fill(0)
+ .map((_, i: number) => {
+ return FeignPlayer(8 + i);
+ })}
+
+
+
);
}
diff --git a/src/components/sections/OBSSettings.tsx b/src/components/sections/OBSSettings.tsx
index 6e56eac..3dcd3f1 100644
--- a/src/components/sections/OBSSettings.tsx
+++ b/src/components/sections/OBSSettings.tsx
@@ -32,7 +32,7 @@ export function OBSSettings() {
{t('description')}
-
+
@@ -72,9 +72,10 @@ export function OBSSettings() {
-
+ {/* large screen */}
+
- {t('custom_css')}
+ {t('custom_css')}
{CopyButton(() => content, t('copy_to_clipboard'))}
+
+ {/* small screen */}
+
+
+ {t('custom_css')}
+ {CopyButton(() => content, tt('copy'))}
+
+
+
diff --git a/src/components/sections/SaveLoad.tsx b/src/components/sections/SaveLoad.tsx
index 33a6101..bc99ce1 100644
--- a/src/components/sections/SaveLoad.tsx
+++ b/src/components/sections/SaveLoad.tsx
@@ -83,7 +83,7 @@ function SaveLoad() {
@@ -102,7 +102,7 @@ function SaveLoad() {
-
diff --git a/src/components/sections/ViewSettingsPane.tsx b/src/components/sections/ViewSettingsPane.tsx
index 6ff6ecc..b56a782 100644
--- a/src/components/sections/ViewSettingsPane.tsx
+++ b/src/components/sections/ViewSettingsPane.tsx
@@ -51,14 +51,14 @@ export function ViewSettingsPane() {
{t('feign_characters')}
- {t('facing')}
-
+ {t('facing')}
+
{RadioButtonGroup([t('facing_left'), t('facing_right')], viewSettings.fei.mirror ? 0 : 1, (index: number) => {
updateFeiSettings({ ...viewSettings.fei, mirror: index === 0 });
})}
- {t('interval')}
-
+ {t('interval')}
+
- {t('speaking_behavior')}
-
+ {t('speaking_behavior')}
+
{AnimationSettingButtonGroup("fei-speaking", viewSettings.fei.speaking, false, (setting: AnimationSettings) =>
updateFeiSettings({ ...viewSettings.fei, speaking: setting })
)}
@@ -86,8 +86,8 @@ export function ViewSettingsPane() {
{t('discord_avatar')}
- {tt('show')}
-
+ {tt('show')}
+
- {t('show_front')}
-
+ {t('show_front')}
+
- {t('shape')}
+ {t('shape')}
-
+
{RadioButtonGroup([t('circle'), t('rounded_rectangle'), t('rectangle')], viewSettings.avatar.shape.valueOf(), (index) => {
updateAvatarSettings({
...viewSettings.avatar,
@@ -123,8 +123,8 @@ export function ViewSettingsPane() {
})}
- {t('vertical_offset')}
-
+ {t('vertical_offset')}
+
- {t('speaking_behavior')}
-
+ {t('speaking_behavior')}
+
{AnimationSettingButtonGroup("avatar-speaking", viewSettings.avatar.speaking, true, (setting: AnimationSettings) =>
updateAvatarSettings({ ...viewSettings.avatar, speaking: setting })
)}
@@ -153,8 +153,8 @@ export function ViewSettingsPane() {
{t('username')}
- {tt('show')}
-
+ {tt('show')}
+
+
+ {t('vertical_offset')}
+
+ {
+ updateUsernameSettings({ ...viewSettings.username, offsetY: parseInt(e.target.value) });
+ }}
+ />
+
- {t('font')}
-
+ {t('font')}
+
{t('size')}
-
- {t('vertical_offset')}
-
- {
- updateUsernameSettings({ ...viewSettings.username, offsetY: parseInt(e.target.value) });
- }}
- />
-