Merge branch 'release/2.11.0'
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import { FC, ReactNode } from 'react';
|
||||
import { Main } from '@/app/ui/Main';
|
||||
|
||||
import { authConfig } from "@/app/lib/auth";
|
||||
import { authConfig, myAuth } from "@/app/lib/auth";
|
||||
import { SignInButton } from '@/app/ui/SignInButton';
|
||||
import Image from 'next/image';
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { getTranslations, getLocale } from "next-intl/server";
|
||||
import isWebview from "is-ua-webview";
|
||||
import { headers } from 'next/headers'
|
||||
import { headers } from 'next/headers';
|
||||
import { ExclamationTriangleIcon } from "@heroicons/react/24/outline";
|
||||
import Link from 'next/link';
|
||||
|
||||
type Provider = {
|
||||
id: string;
|
||||
@@ -38,6 +39,8 @@ function getKeyValuesFromObject<T>(obj: any, keys: (keyof T)[]): T {
|
||||
|
||||
const Page:FC = async () => {
|
||||
|
||||
const session = await myAuth();
|
||||
const locale = await getLocale();
|
||||
const providers = await getProviders();
|
||||
const t = await getTranslations("login-page");
|
||||
// get userAgent from NextJS
|
||||
@@ -76,11 +79,21 @@ const Page:FC = async () => {
|
||||
}
|
||||
<span className="flex justify-center">
|
||||
{
|
||||
Object.values(providers).map((provider) => (
|
||||
<div key={provider.name}>
|
||||
<SignInButton provider={provider} />
|
||||
</div>
|
||||
))
|
||||
session ? (
|
||||
<Link
|
||||
href={`/${locale}/home`}
|
||||
className="btn btn-neutral btn-lg"
|
||||
>
|
||||
<Image src="/icon2.png" alt="logo" width={32} height={32} />
|
||||
{t("main-card.go-to-app")}
|
||||
</Link>
|
||||
) : (
|
||||
Object.values(providers).map((provider) => (
|
||||
<div key={provider.name}>
|
||||
<SignInButton provider={provider} />
|
||||
</div>
|
||||
))
|
||||
)
|
||||
}
|
||||
</span>
|
||||
<video className="m-auto mt-4" title={t("main-card.video-title")} role="img" data-js-id="hero" loop muted playsInline autoPlay poster={t("main-card.image-url")}>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"title-3": "How much are my expenses?",
|
||||
"text-1": "These are the questions this simple and free app will help you with ...",
|
||||
"text-2": "... try it & use it completly free!",
|
||||
"go-to-app": "Go to the App",
|
||||
"in-app-browser-warning": "<strong>WARNING:</strong> we detected you're using an in-app browser.<br></br>This might prevent this app to work properly.<hint>Please use a regular browser to sign in (rezije.app) 😉</hint>",
|
||||
"video-url": "/welcome-demo-vp9-25fps-1500bps.webm",
|
||||
"image-url": "/hero.png",
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"title-3": "Koliki su mi troškovi?",
|
||||
"text-1": "To su pitanja na koja će ti ova jednostavna aplikacija odgovoriti ...",
|
||||
"text-2": "... isprobaj je i koristi potpuno besplatno!",
|
||||
"go-to-app": "Uđi u Aplikaciju",
|
||||
"in-app-browser-warning": "<strong>UPOZORENJE!</strong><br></br>Detektirali smo da je web stranica otvorena u in-app pregledniku. To može dovesti do probleme u radu ove web aplikacije. <hint>Molimo otvori web aplikaciju u normalnom web pregledniku (rezije.app) 😉</hint>",
|
||||
"video-url": "/welcome-demo-vp9-25fps-1500bps.webm",
|
||||
"image-url": "/hero.png",
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "evidencija-rezija",
|
||||
"version": "2.10.0",
|
||||
"version": "2.11.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"version": "2.10.0",
|
||||
"version": "2.11.0",
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.1",
|
||||
|
||||
@@ -59,5 +59,5 @@
|
||||
"engines": {
|
||||
"node": ">=18.17.0"
|
||||
},
|
||||
"version": "2.10.0"
|
||||
"version": "2.11.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user