-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3ff05f1
Showing
16 changed files
with
9,575 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// 'use client' | ||
// import { ThemeProvider } from "../src/components/ThemeContext" | ||
import React from "react" | ||
import { Providers } from "../src/components/ThemeContext" | ||
import Footer from "../src/components/footer" | ||
// import Thedarkhtml from "../src/components/thedarkhtml" | ||
import Topthread from "../src/components/topthread" | ||
import { useLocalStorage } from "../src/components/useLocalStorage" | ||
import '../styles/globals.css' | ||
import DarkButton from "./but" | ||
import {Metadata} from 'next' | ||
|
||
export const metadata:Metadata = { | ||
title: 'Wireless file Manager', | ||
description: 'Open source frontend that uses apis of wireless file manager available on google play, amazon appstore for fire tv, android tv, phones, tablets, wsa, and all android devices.', | ||
} | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode | ||
}) { | ||
|
||
// const [showon, setshow] = useLocalStorage("dark",true); | ||
return ( | ||
<html suppressHydrationWarning className="" lang="en"> | ||
<body className="dark:bg-gray-900"> | ||
<Providers> | ||
|
||
{/* <Thedarkhtml> */} | ||
<Topthread/> | ||
{/* <DarkButton/> */} | ||
{children} | ||
<Footer/> | ||
{/* </Thedarkhtml> */} | ||
</Providers> | ||
|
||
</body> | ||
|
||
</html> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
// 'use client' | ||
import dynamic from 'next/dynamic' | ||
|
||
// import Project from "../src/components/project"; | ||
const Project =dynamic(()=>import ("../src/components/project")); | ||
|
||
import Homepage from "../src/components/homepage"; | ||
// import Planglist from "../src/components/planlist"; | ||
// import Stats from "../src/components/stats"; | ||
import Workinp from "../src/components/wip"; | ||
import Footer from "../src/components/footer"; | ||
import '../styles/globals.css' | ||
// import Ct from "../src/components/ct"; | ||
const Ct =dynamic(()=>import ("../src/components/ct")); | ||
|
||
// const Commits =dynamic(()=>import ("../src/components/commits")); | ||
// import Commits from "../src/components/commits"; | ||
import Topthread from "../src/components/topthread"; | ||
import DarkButton from "./but"; | ||
import Mq from "../src/components/mq"; | ||
import Contactme from "../src/components/contactme"; | ||
import Link from 'next/link'; | ||
// import { ThemeContext, ThemeProvider } from "../src/components/ThemeContext"; | ||
// import { useContext } from "react"; | ||
// import { createServerContext } from 'react'; | ||
|
||
// import dwc from "../src/dealcommits"; | ||
// import gtr from "./api/gtr"; | ||
|
||
interface listoffiles | ||
{ | ||
filename:string, | ||
openapi:string, | ||
downloadapi:string, | ||
filesize:number, | ||
lastmodified:string | ||
|
||
}; | ||
let lof:listoffiles[]=[ | ||
{ | ||
filename:"filename1.extension", | ||
openapi:"/delete.html?path=", | ||
downloadapi:"/download/filename?path=", | ||
filesize:0, | ||
lastmodified:"days ago" | ||
|
||
},{ | ||
filename:"filename2.extension", | ||
openapi:"/delete.html?path=", | ||
downloadapi:"/download/filename?path=", | ||
filesize:0, | ||
lastmodified:"days ago" | ||
|
||
} | ||
]; | ||
function getlistoffilesfromapi(lof:listoffiles[]): import("react").ReactNode { | ||
return ( | ||
<> | ||
{lof.map((each:listoffiles) => { | ||
return ( | ||
<tr> | ||
<td> | ||
<Link href={each.openapi}>Open on tv</Link> | ||
</td> | ||
<td> | ||
<Link href={each.downloadapi}>{each.filename}</Link> | ||
</td> | ||
<td> | ||
<p>{each.filesize}</p> | ||
</td> | ||
<td> | ||
<p>{each.lastmodified}</p> | ||
</td> | ||
</tr> | ||
); | ||
})} | ||
</> | ||
); | ||
} | ||
export default function Page() { | ||
|
||
|
||
// console.log("hello world") | ||
// console.log(JSON.parse(gtr())) | ||
// console.log(dwc()) | ||
// console.log("hello") | ||
// const { dark } = useContext(ThemeContext); | ||
|
||
return ( | ||
<> | ||
{/* <ThemeProvider> */} | ||
{/* <div className={dark ? 'dark' : ''}> */} | ||
<div className="dark:bg-gray-900 flex flex-col justify-center p-10"> | ||
<p>Selected storage has </p> | ||
<table> | ||
{getlistoffilesfromapi(lof)} | ||
|
||
</table> | ||
{/* <Homepage/> */} | ||
{/* <Planglist/> */} | ||
{/* <Project/> | ||
<Ct/> | ||
<Commits/> | ||
<Contactme/> */} | ||
<p className="text-center flex justify-center italic p-10">This page was made using NextJS, React and Tailwind.</p> | ||
</div> | ||
|
||
{/* </div> */} | ||
{/* </ThemeProvider> */} | ||
</> | ||
|
||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
siteUrl: 'https://visnkmr.github.io', | ||
generateRobotsTxt: true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
const TerserPlugin = require("terser-webpack-plugin"); | ||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); | ||
|
||
const withOptimizedImages = require('next-optimized-images'); | ||
|
||
|
||
|
||
|
||
const withBundleAnalyzer = require('@next/bundle-analyzer')({ | ||
enabled: process.env.ANALYZE === 'true', | ||
}) | ||
/** @type {import('next').NextConfig} */ | ||
module.exports = withBundleAnalyzer({ | ||
// withOptimizedImages, | ||
experimental: { | ||
// appDir: true, | ||
// optimizeCss: true, | ||
esmExternals: true, | ||
forceSwcTransforms: true, | ||
scrollRestoration: true, | ||
legacyBrowsers: false, | ||
}, | ||
typescript: { | ||
ignoreBuildErrors: true | ||
}, | ||
// eslint: { | ||
// ignoreDuringBuilds: true | ||
// }, | ||
|
||
// basePath: '/tmp/webpage/out', | ||
// basePath: '/home/roger/Downloads/github/webpage/out', | ||
// assetPrefix: 'https://cdn.jsdelivr.net/gh/visnkmr/visnkmr.github.io@main/', | ||
// assetPrefix: 'https://visnk.pages.dev/', | ||
// assetPrefix: 'https://cdn.jsdelivr.net/gh/visnkmr/hv2static@main/', | ||
// amp:false, | ||
// basePath: 'https://cdn.jsdelivr.net/gh/visnkmr/hv2static@master/', | ||
// async rewrites(){ | ||
// return [ | ||
// { | ||
// source: `/tmp/webpage/out/_next/:path*`, | ||
// destination: 'https://cdn.jsdelivr.net/gh/visnkmr/hv2static@master/_next/:path*', | ||
// permanent:true | ||
// } | ||
// ] | ||
// }, | ||
webpack: (config,{nextRuntime} | ||
// , { dev, isServer } | ||
) => { | ||
// if (options.isServer) { | ||
// config.externals = ['@tanstack/react-query', ...config.externals]; | ||
// } | ||
// config.resolve.alias['@tanstack/react-query'] = path.resolve( | ||
// './node_modules/@tanstack/react-query' | ||
// ); | ||
|
||
config.resolve.fallback = { | ||
fs: false, | ||
net: false, | ||
tls: false | ||
}; | ||
config.optimization = { | ||
minimize: true, | ||
minimizer: [ | ||
new TerserPlugin({ | ||
// minify: TerserPlugin.swcMinify, | ||
parallel: true, | ||
extractComments:false, | ||
terserOptions: { | ||
ecma: 10, | ||
warnings: false, | ||
output: { | ||
comments: false, | ||
indent_level: 2, | ||
ecma:10, | ||
indent_start: 0, | ||
quote_keys: false, | ||
wrap_iife: true, | ||
}, | ||
compress: { | ||
drop_console: true, | ||
drop_debugger: true, | ||
hoist_funs: true, | ||
hoist_props: true, | ||
hoist_vars: true, | ||
inline: true, | ||
loops: true, | ||
negate_iife: true, | ||
passes: 3, | ||
reduce_funcs: true, | ||
reduce_vars: true, | ||
switches: true, | ||
toplevel: true, | ||
typeofs: true, | ||
unsafe: true, | ||
unsafe_arrows: true, | ||
unsafe_comps: true, | ||
unsafe_Function: true, | ||
unsafe_math: true, | ||
unsafe_methods: true, | ||
unsafe_proto: true, | ||
unsafe_regexp: true, | ||
unsafe_undefined: true, | ||
}, | ||
ie8: false | ||
} | ||
}), | ||
new CssMinimizerPlugin({ | ||
parallel: true, | ||
minify: [ | ||
CssMinimizerPlugin.cssnanoMinify, | ||
CssMinimizerPlugin.cleanCssMinify | ||
], | ||
}), | ||
], | ||
|
||
}; | ||
// Set the output path to /tmp/next | ||
// config.output.path = '/tmp/.next'; | ||
// if (!isServer) { | ||
// config.module.rules.forEach(rule => { | ||
// if (rule.loader === 'babel-loader') { | ||
// rule.options.cacheDirectory = '/tmp/.next'; | ||
// } | ||
// }); | ||
// } | ||
|
||
// Disable code splitting | ||
// config.optimization.splitChunks.cacheGroups = { | ||
// default: false, | ||
// }; | ||
|
||
// Merge chunks instead of creating new ones | ||
config.optimization.minimize = true; | ||
// if (typeof nextRuntime === "undefined") { | ||
// config.resolve.fallback = { | ||
// ...config.resolve.fallback, | ||
// fs: false, | ||
// }; | ||
// } | ||
// Always create a single chunk for all code | ||
config.optimization.splitChunks = { | ||
cacheGroups: { | ||
default: false, | ||
}, | ||
}; | ||
|
||
// Disable file-based dynamic imports | ||
// config.module.rules.push({ | ||
// test: /\.js$/, | ||
// use: { | ||
// loader: 'next-babel-loader', | ||
// options: { | ||
// isServer, | ||
// }, | ||
// }, | ||
// }); | ||
|
||
return config; | ||
}, | ||
|
||
// webpackDevMiddleware: config => { | ||
// // Perform customizations to webpack dev middleware config | ||
// // console.log(config, '@@') | ||
// // Important: return the modified config | ||
// return config; | ||
// }, | ||
// serverRuntimeConfig: { // Will only be available on the server side | ||
// // rootDir: path.join(__dirname, './'), | ||
// PORT: isDev ? 3006 : (process.env.PORT || 5999) | ||
// }, | ||
// publicRuntimeConfig: { // Will be available on both server and client | ||
// // staticFolder: '/static', | ||
// isDev, // Pass through env variables | ||
// }, | ||
// experimental:{ | ||
// serverActions:true, | ||
// }, | ||
reactStrictMode: true, | ||
output:"export", | ||
}, | ||
|
||
); |
Oops, something went wrong.