Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
DerKatsche committed Feb 15, 2024
2 parents 06e1f60 + 0ea41ed commit 91df5cd
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default function AdaptivityElementDialogContainer({
className="w-8 h-8 p-1 mr-2 text-xs roboto-black xl:w-10 xl:h-10 lg:w-10 lg:h-10 md:w-10 md:h-10 sm:w-10 sm:h-10"
shape="closebutton"
>
{"\u21B6"}
{"\u25C0"}
</StyledButton>
)}

Expand Down Expand Up @@ -257,7 +257,7 @@ export default function AdaptivityElementDialogContainer({
<div className="fixed right-2 top-2 flex flex-col bg-gradient-to-br from-adlerbggradientfrom to-adlerbggradientto rounded-xl p-4 flex gap-2 ">
<div className="flex flex-row gap-4 w-full justify-between">
<h1 className="text-xs lg:text-xl font-bold">
Symbollegende Adaptivitätselement
{translate("headerLegend")}
</h1>
<StyledButton
shape="closebutton"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import StyledButton from "~ReactComponents/ReactRelated/ReactBaseComponents/Styl

import GoalLogo from "../../../../../../Assets/icons/20-goal/goal-icon.svg";
import GoalIcon from "../../../../../../Assets/icons/20-goal/goal-icon-adlerblue-bg.svg";
import { useTranslation } from "react-i18next";

export default function LearningSpaceGoalPanel() {
const [viewModel, controller] = useBuilder<
Expand All @@ -19,6 +20,8 @@ export default function LearningSpaceGoalPanel() {
const [goals] = useObservable<string[]>(viewModel?.goals);
const [isOpen] = useObservable<boolean>(viewModel?.isOpen);

const { t: translate } = useTranslation("spaceGoal");

if (!viewModel || !controller || !goals || !goals[0]) return null;

return (
Expand All @@ -31,7 +34,7 @@ export default function LearningSpaceGoalPanel() {
></img>

{isOpen && (
<StyledContainer className="fixed z-10 max-w-2xl p-2 overflow-hidden rounded-lg top-12 right-2 md:top-20 lg:right-40 bg-buttonbgblue">
<StyledContainer className="fixed z-10 max-w-2xl p-2 overflow-hidden rounded-lg top-12 right-0 md:top-20 lg:right-40 bg-buttonbgblue">
<div className="flex flex-col gap-4 m-2">
{goals && (
<div className="flex flex-row">
Expand All @@ -44,12 +47,12 @@ export default function LearningSpaceGoalPanel() {
/>
{goals.length === 1 && (
<h3 className="pb-1 text-sm font-semibold lg:text-xl">
Lernziel
{translate("learningGoalHeader_singular")}
</h3>
)}
{goals.length > 1 && (
<h3 className="pb-1 text-sm font-semibold lg:text-xl">
Lernziele
<p>{translate("learningGoalsHeader_plural")}</p>
</h3>
)}
</div>
Expand Down Expand Up @@ -85,7 +88,7 @@ export default function LearningSpaceGoalPanel() {
viewModel.isOpen.Value = false;
}}
>
OK
{translate("confirmButton")}
</StyledButton>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export default function StoryElement({ className }: AdLerUIComponent<{}>) {
shape="closebutton"
onClick={controller.decreasePageId}
>
{"\u21B6"}
{"\u25C0"}
</StyledButton>
)}
</div>
Expand All @@ -234,7 +234,7 @@ export default function StoryElement({ className }: AdLerUIComponent<{}>) {
shape="closebutton"
onClick={controller.increasePageId}
>
{"\u21B7"}
{"\u25B6"}
</StyledButton>
)}
</div>
Expand Down Expand Up @@ -269,7 +269,7 @@ export default function StoryElement({ className }: AdLerUIComponent<{}>) {
shape="closebutton"
onClick={controller.decreasePageId}
>
{"\u21B6"}
{"\u25C0"}
</StyledButton>
)}
</div>
Expand All @@ -280,7 +280,7 @@ export default function StoryElement({ className }: AdLerUIComponent<{}>) {
shape="closebutton"
onClick={controller.increasePageId}
>
{"\u21B7"}
{"\u25B6"}
</StyledButton>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ exports[`AdaptivityElementDialogContainer should render 1`] = `
<button
class="mr-2 roboto-black xl:w-10 xl:h-10 lg:w-10 lg:h-10 justify-center p-1 md:w-12 md:h-12 sm:w-10 sm:h-10 w-8 h-8 aspect-square flex items-center text-sm rounded-lg hover:cursor-pointer hover:border-buttonbgblue hover:text-buttonbgblue hover:bg-adlerdarkblue lg:text-xl transition ease-in-out duration-75 active:translate-x-1 active:translate-y-1 active:border-transparent text-adlerdarkblue font-regular border-t-[1px] border-l-[1px] border-b-4 border-r-4 border-adlerdarkblue overflow-hidden box-border cursor-pointer bg-buttonbgblue"
>
</button>
</div>
<img
Expand Down
1 change: 1 addition & 0 deletions src/localize/de/learningElement.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"adaptivityIntro": "Hallo Freund, ich helfe dir zu lernen. Suche dir ein Thema aus und wir arbeiten gemeinsam an deinem Wissen.",

"legendHover": "Klicke hier, um die Symbollegende anzuzeigen",
"headerLegend": "Symbollegende Adaptivitätselement",
"leftEasy": "Links: Leichte Frage<br/>",
"middleNormal": "Mitte: Mittelschwer<br/>",
"rightHard": "Rechts: Schwere Frage",
Expand Down
5 changes: 5 additions & 0 deletions src/localize/de/spaceGoal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"learningGoalHeader_singular": "Lernziel",
"learningGoalsHeader_plural": "Lernziele",
"confirmButton": "OK"
}
3 changes: 3 additions & 0 deletions src/localize/i18next-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import de_worldMenu from "./de/worldMenu.json";
import de_spaceMenu from "./de/spaceMenu.json";
import de_breakTime from "./de/breakTime.json";
import de_learningElement from "./de/learningElement.json";
import de_spaceGoal from "./de/spaceGoal.json";

const resources = {
de: {
Expand All @@ -20,6 +21,7 @@ const resources = {
learningSpace: de_learningSpace,
breakTime: de_breakTime,
learningElement: de_learningElement,
spaceGoal: de_spaceGoal,
},
};
const defaultNS = "start";
Expand All @@ -36,6 +38,7 @@ i18next.use(initReactI18next).init({
"learningSpace",
"breakTime",
"learningElement",
"spaceGoal",
],
resources: resources,
defaultNS: defaultNS,
Expand Down

0 comments on commit 91df5cd

Please sign in to comment.