Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Andcool-Systems committed Sep 27, 2024
1 parent 649cbd0 commit ccd6c6b
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 199 deletions.
File renamed without changes.
3 changes: 1 addition & 2 deletions src/app/modules/components/me.module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ import Image from 'next/image';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { timeStamp } from "../utils/time.module";
import Footer from "./footer.module";
import Menu from "./theme_select.module";
import { Users } from "@/app/users/[name]/page";
import { formatDate } from "./card.module";

import { IconSettings, IconBell, IconStar, IconList, IconStarFilled } from '@tabler/icons-react';
import { TransitionLink } from "@/app/me/aniamtedLink.module";
import { TransitionLink } from "@/app/me/animatedLink.module";

const Default = ({ data, islogged, color }: { data: Query, islogged: boolean, color?: string }) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/components/openableImage.module.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { CSSProperties, useEffect, useState } from "react";
import { CSSProperties, useState } from "react";
import NextImage from "next/image";
import Style from "@/app/styles/openableImage.module.css";

Expand Down
1 change: 0 additions & 1 deletion src/app/modules/components/search.module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import React, { useEffect, useState } from 'react';
import Select from 'react-select';
import { CSSTransition } from 'react-transition-group';
import Styles from "@/app/styles/search.module.css"
import Image from 'next/image';
import { Category } from '@/app/interfaces';
import { CategoryEl } from './card.module';
import styleLink from '@/app/styles/tutorials/common.module.css';
Expand Down
1 change: 0 additions & 1 deletion src/app/modules/components/theme_select.module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import { useEffect, useState } from 'react';
import { CSSTransition } from 'react-transition-group';
import Styles from '@/app/styles/theme_selector.module.css';
import Image from 'next/image';
import { IconBucketDroplet, IconPalette, IconPhoto } from '@tabler/icons-react'
import { authApi } from '../utils/api.module';

Expand Down
14 changes: 0 additions & 14 deletions src/app/modules/providers.module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@ const inter = Inter({ subsets: ["latin"] });

export const getTheme = (theme: string) => {
switch (theme) {
case 'default':
return {
'--main-bg-color': '#17181c',
'--main-card-color': '#262930',
'--main-element-color': '#434957',
'--main-action-color': '#00ADB5',
'--main-menu-color': '#252a30',
'--dark-hover': '#1d2025',
'--hr-color': '#596172',
'--focus-color': '#717b91',
'--category-color': '#717b91',
'--main-text-color': '#ffffff',
'--main-shadow-color': '#1d2025'
}
case 'amoled':
return {
'--main-bg-color': '#000000',
Expand Down
10 changes: 5 additions & 5 deletions src/app/modules/utils/time.module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ export const numbersTxt = (num: number, variations: [string, string, string]): s

let text: string;
if (past === 1 && num !== 11) {
text = variations[0]; // голос
text = variations[0]; // голос
} else if (past >= 2 && past <= 4 && first !== 1) {
text = variations[1]; // голоса
text = variations[1]; // голоса
} else {
text = variations[2]; // голосов
text = variations[2]; // голосов
}

return `${num} ${text}`;
}

export const timeStamp = (timestamp: number): string => {
const onlineTime = 300; // 5 минут в секундах
const currentTime = Math.floor(Date.now() / 1000); // текущее время в секундах
const onlineTime = 300; // 5 минут в секундах
const currentTime = Math.floor(Date.now() / 1000); // текущее время в секундах
const delta = Math.round(currentTime - timestamp);

if (delta < onlineTime) {
Expand Down
31 changes: 0 additions & 31 deletions src/app/tos/page.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface AnimatedLinkProps
LinkProps {
children: ReactNode;
href: string;
delay?: number; // задержка перед переходом (в миллисекундах)
delay?: number;
}

function sleep(ms: number): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion src/app/tutorials/header.module.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import style_sidebar from "@/app/styles/me/sidebar.module.css";
import style_add from '@/app/styles/tutorials/common.module.css';
import { usePathname } from "next/navigation";
import { TransitionLink } from "./aniamtedLink.module";
import { TransitionLink } from "./animatedLink.module";

const ASide = () => {
const pathname = usePathname();
Expand Down
4 changes: 2 additions & 2 deletions src/app/tutorials/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function Home() {
})
}, [])

const dat = roles.map((role) => {
const roles_data = roles.map((role) => {
return (
<div key={role.id} className={styles.role_container}>
<span style={{ backgroundColor: "#" + role.color.toString(16) }} className={styles.role_dot}>
Expand Down Expand Up @@ -58,7 +58,7 @@ export default function Home() {
а так же имеющие определенные <Tooltip
body={
<div className={styles.roles_container}>
{dat.length > 0 ? dat : <IconSvg width={86} height={86} className={style_workshop.loading} />}
{roles_data.length > 0 ? roles_data : <IconSvg width={86} height={86} className={style_workshop.loading} />}
</div>
}
opacity="1"
Expand Down
Loading

0 comments on commit ccd6c6b

Please sign in to comment.