Browse Source

fix name, build web und test version on electron

master
serkus01 7 months ago
parent
commit
4c6bc02484
  1. 89
      electron/webport-client/.gitignore
  2. 5546
      electron/webport-client/package-lock.json
  3. 58
      electron/webport-client/package.json
  4. 6
      electron/webport-client/src/asset-manifest.json
  5. BIN
      electron/webport-client/src/favicon.ico
  6. 6
      electron/webport-client/src/index.css
  7. 1
      electron/webport-client/src/index.html
  8. 46
      electron/webport-client/src/index.js
  9. 15
      electron/webport-client/src/manifest.json
  10. 1
      electron/webport-client/src/service-worker.js
  11. 2
      electron/webport-client/src/static/css/main.16e560a6.css
  12. 1
      electron/webport-client/src/static/css/main.16e560a6.css.map
  13. 2
      electron/webport-client/src/static/css/main.b5c2177a.css
  14. 1
      electron/webport-client/src/static/css/main.b5c2177a.css.map
  15. 2
      electron/webport-client/src/static/js/main.2e752546.js
  16. 2
      electron/webport-client/src/static/js/main.53383d3c.js
  17. 1
      electron/webport-client/src/static/js/main.53383d3c.js.map
  18. 21
      sources/.gitignore
  19. 1863
      sources/README.md
  20. 14337
      sources/package-lock.json
  21. 24
      sources/package.json
  22. BIN
      sources/public/favicon.ico
  23. 42
      sources/public/index.html
  24. 15
      sources/public/manifest.json
  25. 20
      sources/src/.codesandbox/workspace.json
  26. 0
      sources/src/Componets/AlertInstall.js/Alert.js
  27. 0
      sources/src/Componets/AlertInstall.js/style.css
  28. 140
      sources/src/Componets/AppContainer.js
  29. 0
      sources/src/Componets/Cards/Group.js
  30. 19
      sources/src/Componets/Cards/OverlayCard.js
  31. 192
      sources/src/Componets/Cards/fullCard.js
  32. 83
      sources/src/Componets/Cards/smallCard.js
  33. 66
      sources/src/Componets/Cards/style.css
  34. 12
      sources/src/Componets/CheckField.js
  35. 57
      sources/src/Componets/MainConteiner.js
  36. 205
      sources/src/Componets/NavList/navList.js
  37. 568
      sources/src/Componets/NavList/style.css
  38. 12
      sources/src/Componets/TopPanel/style.css
  39. 47
      sources/src/Componets/TopPanel/topPanel.js
  40. 67
      sources/src/Componets/article.js
  41. 11
      sources/src/Componets/button.js
  42. 33
      sources/src/Componets/menu.js
  43. 76
      sources/src/Componets/overlayItem.js
  44. 0
      sources/src/Componets/serverses/find.serv.js
  45. 27
      sources/src/Componets/style.css
  46. 5
      sources/src/context.js
  47. 52
      sources/src/createServiceWorker.js
  48. 239
      sources/src/example.js
  49. 5
      sources/src/index.js
  50. 17
      sources/src/package.json
  51. 22
      sources/src/pages/Community.js
  52. 15
      sources/src/pages/InstrallForm.js
  53. 39
      sources/src/pages/TreeOverlays.js
  54. 24
      sources/src/pages/auth/auth.js
  55. 20
      sources/src/pages/auth/style.css
  56. 43
      sources/src/pages/catalog.js
  57. 29
      sources/src/pages/docs.js
  58. 13
      sources/src/pages/find.js
  59. 18
      sources/src/pages/info.js
  60. 132
      sources/src/pages/main.js
  61. 28
      sources/src/pages/news/news.js
  62. 0
      sources/src/pages/news/style.css
  63. 40
      sources/src/pages/overlays.js
  64. 24
      sources/src/pages/pks.js
  65. 48
      sources/src/pages/profile.js
  66. 162
      sources/src/pages/settings.js
  67. 17
      sources/src/pages/splash/spalsh.js
  68. 630
      sources/src/pages/style.css
  69. 1
      sources/src/pkg.json
  70. 0
      sources/src/portage.json
  71. 18
      sources/src/style.css
  72. 0
      sources/src/ui.json
  73. 6
      web/asset-manifest.json
  74. BIN
      web/favicon.ico
  75. 1
      web/index.html
  76. 15
      web/manifest.json
  77. 1
      web/service-worker.js
  78. 2
      web/static/css/main.b5c2177a.css
  79. 1
      web/static/css/main.b5c2177a.css.map
  80. 2
      web/static/js/main.53383d3c.js
  81. 1
      web/static/js/main.53383d3c.js.map

89
electron/webport-client/.gitignore

@ -0,0 +1,89 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
.DS_Store
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# Webpack
.webpack/
# Electron-Forge
out/

5546
electron/webport-client/package-lock.json
File diff suppressed because it is too large
View File

58
electron/webport-client/package.json

@ -0,0 +1,58 @@
{
"name": "webport-client",
"productName": "webport-client",
"version": "1.0.0",
"description": "My Electron application description",
"main": "src/index.js",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "echo \"No linting configured\""
},
"keywords": [],
"author": {
"name": "serkus01",
"email": "7erkus@gmail.com"
},
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "webport_client"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
]
}
},
"dependencies": {
"electron-squirrel-startup": "^1.0.0"
},
"devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.61",
"@electron-forge/maker-deb": "^6.0.0-beta.61",
"@electron-forge/maker-rpm": "^6.0.0-beta.61",
"@electron-forge/maker-squirrel": "^6.0.0-beta.61",
"@electron-forge/maker-zip": "^6.0.0-beta.61",
"electron": "15.1.2"
}
}

6
electron/webport-client/src/asset-manifest.json

@ -0,0 +1,6 @@
{
"main.css": "static/css/main.b5c2177a.css",
"main.css.map": "static/css/main.b5c2177a.css.map",
"main.js": "static/js/main.53383d3c.js",
"main.js.map": "static/js/main.53383d3c.js.map"
}

BIN
electron/webport-client/src/favicon.ico

6
electron/webport-client/src/index.css

@ -0,0 +1,6 @@
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
margin: auto;
max-width: 38rem;
padding: 2rem;
}

1
electron/webport-client/src/index.html

@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="./manifest.json"><link rel="shortcut icon" href="./favicon.ico"><title>React App</title><link href="./static/css/main.16e560a6.css" rel="stylesheet"></head><body><head><title>Webport</title></head><div id="root"></div><script type="text/javascript" src="./static/js/main.2e752546.js"></script></body></html>

46
electron/webport-client/src/index.js

@ -0,0 +1,46 @@
const { app, BrowserWindow } = require('electron');
const path = require('path');
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
if (require('electron-squirrel-startup')) { // eslint-disable-line global-require
app.quit();
}
const createWindow = () => {
// Create the browser window.
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
});
// and load the index.html of the app.
mainWindow.loadFile(path.join(__dirname, 'index.html'));
// Open the DevTools.
mainWindow.webContents.openDevTools();
};
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow);
// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});
app.on('activate', () => {
// On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
});
// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and import them here.

15
electron/webport-client/src/manifest.json

@ -0,0 +1,15 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "192x192",
"type": "image/png"
}
],
"start_url": "./index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

1
electron/webport-client/src/service-worker.js

@ -0,0 +1 @@
"use strict";function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}var precacheConfig=[["/index.html","a22ab4ef0a396dfaa46e9b0215f08492"],["/static/css/main.b5c2177a.css","7e40cbddebe17530499dfad2210b28ea"],["/static/js/main.53383d3c.js","40f3f3138827978a785efe988edd7398"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(e){return e.redirected?("body"in e?Promise.resolve(e.body):e.blob()).then(function(t){return new Response(t,{headers:e.headers,status:e.status,statusText:e.statusText})}):Promise.resolve(e)},createCacheKey=function(e,t,n,r){var a=new URL(e);return r&&a.pathname.match(r)||(a.search+=(a.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),a.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,t){var n=new URL(e);return n.hash="",n.search=n.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(e){return t.every(function(t){return!t.test(e[0])})}).map(function(e){return e.join("=")}).join("&"),n.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],r=new URL(t,self.location),a=createCacheKey(r,hashParamName,n,/\.\w{8}\./);return[r.toString(),a]}));self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(e){return setOfCachedUrls(e).then(function(t){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(n){if(!t.has(n)){var r=new Request(n,{credentials:"same-origin"});return fetch(r).then(function(t){if(!t.ok)throw new Error("Request for "+n+" returned a response with status "+t.status);return cleanResponse(t).then(function(t){return e.put(n,t)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var t=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(e){return e.keys().then(function(n){return Promise.all(n.map(function(n){if(!t.has(n.url))return e.delete(n)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(e){if("GET"===e.request.method){var t,n=stripIgnoredUrlParameters(e.request.url,ignoreUrlParametersMatching);t=urlsToCacheKeys.has(n);t||(n=addDirectoryIndex(n,"index.html"),t=urlsToCacheKeys.has(n));!t&&"navigate"===e.request.mode&&isPathWhitelisted([],e.request.url)&&(n=new URL("/index.html",self.location).toString(),t=urlsToCacheKeys.has(n)),t&&e.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(t){return console.warn('Couldn\'t serve response for "%s" from cache: %O',e.request.url,t),fetch(e.request)}))}});

2
electron/webport-client/src/static/css/main.16e560a6.css
File diff suppressed because it is too large
View File

1
electron/webport-client/src/static/css/main.16e560a6.css.map
File diff suppressed because it is too large
View File

2
electron/webport-client/src/static/css/main.b5c2177a.css
File diff suppressed because it is too large
View File

1
electron/webport-client/src/static/css/main.b5c2177a.css.map
File diff suppressed because it is too large
View File

2
electron/webport-client/src/static/js/main.2e752546.js
File diff suppressed because it is too large
View File

2
electron/webport-client/src/static/js/main.53383d3c.js
File diff suppressed because it is too large
View File

1
electron/webport-client/src/static/js/main.53383d3c.js.map
File diff suppressed because it is too large
View File

21
sources/.gitignore

@ -0,0 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# dependencies
/node_modules
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

1863
sources/README.md
File diff suppressed because it is too large
View File

14337
sources/package-lock.json
File diff suppressed because it is too large
View File

24
sources/package.json

@ -0,0 +1,24 @@
{
"recpvers": null,
"dependencies": {
"react": "17.0.2",
"react-dom": "17.0.2",
"react-id-swiper": "4.0.0",
"react-id-swiper2": "1.0.7",
"react-pro-sidebar": "0.6.0",
"react-router-dom": "5.2.0"
},
"name": "webport",
"description": null,
"version": "0.0.1876",
"devDependencies": {
"electron": "^15.1.1",
"react-scripts": "1.0.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}

BIN
sources/public/favicon.ico

42
sources/public/index.html

@ -0,0 +1,42 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<head>
<title>Webport</title>
</head>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

15
sources/public/manifest.json

@ -0,0 +1,15 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "192x192",
"type": "image/png"
}
],
"start_url": "./index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

20
sources/src/.codesandbox/workspace.json

@ -0,0 +1,20 @@
{
"responsive-preview": {
"Mobile": [
320,
675
],
"Tablet": [
1024,
765
],
"Desktop": [
1400,
800
],
"Desktop HD": [
1920,
1080
]
}
}

0
sources/src/Componets/AlertInstall.js/Alert.js

0
sources/src/Componets/AlertInstall.js/style.css

140
sources/src/Componets/AppContainer.js

@ -0,0 +1,140 @@
import React from "react";
import NavBar from "./NavList/navList";
import MainPage from "../pages/main";
import ReactDOM from "react-dom";
export default class AppConteiner extends React.Component {
ui = {
BackButton: {
text: "Назад"
},
button: {
sync: {
text: "Обновить",
icon:
"https://im0-tub-ru.yandex.net/i?id=82aba01eaa9844244dfae87e7a7e5583&n=13%22"
}
}
};
toBack() {
document.getElementById("backBtn").style.display = "none";
//document.getElementById("pTitle").textContent = "Рекомендации";
/*ReactDOM.render(
<MainPage
icons={this.props.icons}
rec={this.props.rec}
useDes={this.props.useDes}
/>,
document.getElementById("HomePage")
);*/
window.location.reload();
//document.getElementById('pTitle').textContent = this.props.menuItems[]
}
viewSideBar() {
if (!this.VVSB) {
document.getElementById("MainContent").style.paddingLeft = "300px";
document.getElementById("btn-toggle").style.paddingLeft = "300px";
document.getElementById("btn-toggle").style.float = "righ";
document.getElementById("navBar").style.left = "0px";
this.VVSB = true;
} else {
document.getElementById("MainContent").style.paddingLeft = "0px";
document.getElementById("btn-toggle").style.paddingLeft = "0px";
document.getElementById("navBar").style.left = "-280px";
this.VVSB = false;
}
}
ViewTitle() {
for (let i = 0; i++; this.props.menuItems.length) {
if (window.location.href.split(this.props.menuItems[i]).length >= 2) {
document.getElementById("pTitle").textContent = this.props.menuItems[
i
].text;
}
console.log(i);
}
}
render() {
return (
<div>
<NavBar
category={this.props.category}
menuItem={this.props.menuItems}
aliases={this.props.aliases}
Ipkgs={this.props.Ipkg}
/>
<div className="page-wrapper chiller-theme toggled">
<ul
id="btn-toggle"
class="btn-toggle"
style={{
display: "inline",
padding: "20px",
margin: "0px",
borderBottom: "1px solid #AAA",
width: "100%",
background: "#2e323f",
position: "fixed",
top: "0",
color: "#FFF"
}}
>
<svg
style={{
float: "left",
paddingLeft: "20px",
paddingRight: "10px"
}}
onClick={() => this.viewSideBar()}
stroke="currentColor"
fill="currentColor"
stroke-width="0"
viewBox="0 0 448 512"
height="1.4em"
width="1.4em"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"></path>
</svg>
<div
id="backBtn"
style={{ paddingLeft: "20px", float: "left", display: "none" }}
onClick={() => this.toBack()}
>
<img
style={{ width: "1.4em", height: "1.4em" }}
src="https://cdn-icons-png.flaticon.com/512/189/189254.png"
/>
</div>
<b>
<div
id="pTitle"
style={{
float: "left",
width: "50vw",
marginleft: "20px",
textAlign: "center",
fontSize: "1.4em",
color: "#FFF"
}}
>
{" "}
""
</div>
</b>
{this.ViewTitle()}
</ul>
<main
id="MainContent"
className="page-content"
style={{ paddingLeft: "10px", margin: "10px" }}
>
<div className="container">{this.props.children}</div>
</main>
</div>
</div>
);
}
}

0
sources/src/Componets/Cards/Group.js

19
sources/src/Componets/Cards/OverlayCard.js

@ -0,0 +1,19 @@
import "./style.css";
import React from "react";
export default class OverlayCard extends React.Component {
render() {
return (
<div className="sCard" style={{}}>
<h3 style={{}}>
<b> {this.props.title.name}:</b> {this.props.OverlayInfo.name}
</h3>
<div>
<span style={{ fontSize: "1.4em" }}>
<b>{this.props.title.discription}:</b>
{this.props.OverlayInfo.description}
</span>
</div>
</div>
);
}
}

192
sources/src/Componets/Cards/fullCard.js

@ -0,0 +1,192 @@
import React from "react";
import "./style.css";
class FullCard extends React.Component {
ui = {
name: "Имя",
category: "Категория:",
versions: "Доступные версии",
uses: " USE:",
decription: "Описание:",
site: "Сайт:",
InstallButton: {
text: "Установить"
}
};
IntstallPackageParamms = {
NamePackage: this.props.PackageName.Name,
Version: "",
USE: []
};
addUse(use) {
if (
document.getElementById(use).style.background === "#0F0" ||
document.getElementById(use).style.background === "rgb(0, 255, 0)"
) {
document.getElementById(use).style.background = "#FFF";
//this.IntstallPackageParamms.USE.map((us, i)=>(
/*if( us == use){
this.IntstallPackageParamms.USE[i].delete
}*/
//))
} else {
document.getElementById(use).style.background = "#0F0";
this.IntstallPackageParamms.USE[
this.IntstallPackageParamms.USE.length + 1
] = use;
}
console.log(this.IntstallPackageParamms);
}
addVersion(version) {
console.log(typeof version);
if (this.IntstallPackageParamms.Version !== "") {
if (this.IntstallPackageParamms.Version !== version) {
document.getElementById(
this.IntstallPackageParamms.Version
).style.background = "#FFF";
this.IntstallPackageParamms.Version = version;
document.getElementById(
version
).style.background = document
.getElementById(version)
.style.border.split("2px solid")[1];
} else {
document.getElementById(
this.IntstallPackageParamms.Version
).style.background = "#FFF";
this.IntstallPackageParamms.Version = "";
}
} else {
this.IntstallPackageParamms.Version = version;
document.getElementById(
version
).style.background = document
.getElementById(version)
.style.border.split("2px solid")[1];
console.log(this.IntstallPackageParamms);
}
}
checkVersion(item) {
//console.log(item.split("[U]")[1] === "");
console
.log
//this.props.Ipkgthis.props.PackageName.Name.split("/")[1])
();
if (item.split("[U]")[1] === "") {
return (
<li
key={item}
id={item.split("[U]")[0]}
style={{ border: " 2px solid #0F0", marginLeft: "5px" }}
onClick={() => this.addVersion(item.split("[U]")[0])}
>
{item.split("[U]")[0]}
</li>
);
} else {
return (
<li
key={item}
id={item.split("[M]")[0]}
style={{ border: "2px solid #F00", marginLeft: "5px" }}
onClick={() => this.addVersion(item.split("[M]")[0])}
>
{item.split("[M]")[0]}
</li>
);
}
}
VuseInfo(use) {
//console.log(use);
//console.log(this.props.useDes);
//console.log(Object.keys(this.props.uses));
//document.getElementById(uId).style.background = "orange";
if (use in this.props.useDes || use.split("+")[1] in this.props.useDes) {
if (use in this.props.useDes) {
document.getElementById("useInfo").textContent = this.props.useDes[use];
console.log(use);
} else {
document.getElementById("useInfo").textContent = this.props.useDes[
use.split("+")[1]
];
console.log(this.props.useDes[use.split("+")[1]]);
}
//document.getElementById(uId).style.background = "orange";
//alert(this.props.useDes[use]);
} else {
document.getElementById("useInfo").textContent = use;
}
//document.getElementById("useInfo").textContent = use;
}
render() {
return (
<div className="fullCard">
<div className=" sCard">
<h1 className="title">{this.props.PackageName.Name.split("/")[1]}</h1>
<hr />
<img
src={this.props.icons[this.props.PackageName.Name.split("/")[1]]}
style={{ width: "128px", height: "128px" }}
/>
<div style={{}}>
<span>
{" "}
<b>{this.ui.category}</b>{" "}
{this.props.PackageName.Name.split("/")[0]}
</span>
<ul className="cVer">
<b>{this.ui.versions}:</b>
{this.props.PackageName.version.map((v) => this.checkVersion(v))}
</ul>
<div className="sUse">
<b>{this.ui.uses}</b>
{this.props.PackageName.USE.map((u, j) => (
<span
key={u}
id={u}
onMouseOver={() =>
this.VuseInfo(this.props.PackageName.USE[j])
}
onClick={() => this.addUse(this.props.PackageName.USE[j])}
>
{u}
</span>
))}
<div>
<b>Оверлеи:</b>
<span>{this.props.PackageName.repo}</span>
</div>
<b>
<div
id="useInfo"
className="useInfo"
style={{ marging: "5px" }}
></div>
</b>
</div>
<div> </div>
<p>
<b>{this.ui.decription}</b> {this.props.PackageName.Description}
</p>
<a href={this.props.PackageName.Home_page}>{this.ui.site} </a>
<div className="Btm">
<strong>
<span className="btn right" id={this.props.PackageName.Name}>
{this.ui.InstallButton.text}
</span>
</strong>
</div>
</div>
</div>
</div>
);
}
}
export default FullCard;

83
sources/src/Componets/Cards/smallCard.js

@ -0,0 +1,83 @@
import React from "react";
//import FullCard from "./fullCard";
//import PkgList from "../../pages/pks";
import "./style.css";
//import Swiper from "react-slider-swiper";
//import InstallForm from "../pages/InstallForm";
const ui = { description: "Описание" };
class Scard extends React.Component {
//Viewinstall(package) {
//const pkgInfo = this.props.rec[package]
//return <InstallForm rec={pkgInfo} />;
//}:
params = {
pagination: ".swiper-pagination",
paginationClickable: true,
nextButton: ".swiper-button-next",
prevButton: ".swiper-button-prev",
spaceBetween: 30,
runCallbacksOnInit: true,
onInit: (swiper) => {
this.swiper = swiper;
}
};
render() {
return this.props.rec.map((pksl, i) => (
<div
className="Card"
style={{
padding: "13px",
border: "1px solid #AAA",
//borderRadius: "16px",
backgroundColor: "#f9f9fa",
width: "20%"
//coloor: "#444"
//background: "#2E323F",
//color: "#AAA"
}}
onClick={() => this.props.ViewPackageInfo(this.props.rec[i])}
>
<img
style={{
position: "relative",
float: "left",
width: "48px",
height: "48px"
}}
src="/"
/>
<div
style={{
//display: "flex",
flex: "1",
padding: " 0 6px",
height: "100%",
borderBottom: " 1px solid rgba(0, 0, 0, 0.05)",
justifyContent: "space-between"
//color: "#AAA"
}}
>
<b style={{ width: "100%", display: "block", textAlign: "center" }}>
{pksl.Name.split("/")[1]}
</b>
{
<div
style={{ position: "relative", top: "36px", textAlign: "left" }}
>
<div className="descrition" style={{ display: "flex" }}>
<b style={{ textAlign: "left", whiteSpace: "break-spaces" }}>
{ui.description} {":"} {pksl.Description}
</b>
</div>
</div>
}
</div>
</div>
));
}
}
export default Scard;

66
sources/src/Componets/Cards/style.css

@ -0,0 +1,66 @@
.sCard {
padding: 10px;
font-size: 1.2em;
text-align: left;
border-bottom: 1px solid #aaa;
}
.sCard:hover {
}
.cTitle {
padding-top: 0px;
margin: 0px;
font: 20px bold;
text-align: center;
border-bottom: 1px solid #ccc;
}
.sUse {
display: flow-root;
}
.sUse span {
list-style: none;
display: inline-flex;
padding: 5px;
}
.sUse span:hover {
background: orange;
cursor: pointer;
}
.cVer {
display: flex;
}
.cVer li {
list-style: none;
padding-left: 5px;
}
.Btm {
position: fixed;
bottom: 20px;
right: 20px;
}
.cVer li:hover {
cursor: pointer;
}
.btn {
float: right;
padding: 5px;
background: rgba(125, 122, 255, 1);
box-shadow: 0 0 3 #000;
color: #fff;
}
.green {
background: #0f0;
margin: 3px;
}
.red {
background: #f00;
margin: 3px;
}
.descrition {
display: flexbox;
}
.useInfo {
margin: 10px;
}

12
sources/src/Componets/CheckField.js

@ -0,0 +1,12 @@
import React from "react";
export default class CheckField extends React.Component {
render() {
return (
<p>
<span> {this.props.text}</span>
<input style={{ float: "right" }} type="checkbox" />
</p>
);
}
}

57
sources/src/Componets/MainConteiner.js

@ -0,0 +1,57 @@
import React from "react";
import MainPage from "..//../pages/main";
export default class MainConteiner extends React.Component {
constructor(props) {
super(props);
const VVSB = false;
// const [VVSBar, seViewSidebar] = useState(false);
}
viewSideBar() {
if (!this.VVSB) {
document.getElementById("MainContent").style.paddingLeft = "300px";
document.getElementById("btn-toggle").style.float = "righ";
document.getElementById("navBar").style.left = "0px";
this.VVSB = true;
} else {
document.getElementById("MainContent").style.paddingLeft = "0px";
document.getElementById("navBar").style.left = "-280px";
this.VVSB = false;
}
}
render() {
return (
<div className="page-wrapper chiller-theme toggled">
<main
id="MainContent"
className="page-content"
style={{ paddingLeft: "0px" }}
>
<div
id="btn-toggle"
class="btn-toggle"
onClick={() => this.viewSideBar()}
style={{}}
>
<svg
stroke="currentColor"
fill="currentColor"
stroke-width="0"
viewBox="0 0 448 512"
height="1em"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"></path>
</svg>
</div>
<div className="container">
<h2 id="pageTitle" style={{ float: "left" }}>
{""}
</h2>
{this.props.children}
</div>
</main>
</div>
);
}
}

205
sources/src/Componets/NavList/navList.js

@ -0,0 +1,205 @@
import React, { Component } from "react";
import ReactDOM from "react-dom";
import {
ProSidebar,
Menu,
MenuItem,
SubMenu,
SidebarHeader,
SidebarFooter,
SidebarContent
} from "react-pro-sidebar";
//import "react-pro-sidebar/dist/css/styles.css";
import MenuPage from "../menu";
import "../../pages/style.css";
import FullCard from "../Cards/fullCard";
import UserProfilePage from "../../pages/profile";
//var view = false;
class NavBar extends Component {
ui = {
menu: {
text: "Меню"
},
catalog: {
text: "Каталог"
}
};
checkAlias(text) {
//console.log( "aliases:\t" + this.props.aliases)
//return text;
if (text in this.props.aliases) {
return this.props.aliases[text];
//console.log(this.props.aliases[text]);
} else {
return text;
//console.log(e);
}
}
viewPakegeInfo(pkgName) {
const url = "/find?pkg=" + "pkgNme";
const response = fetch(url);
if (response.ok) {
// если HTTP-статус в диапазоне 200-299
// получаем тело ответа (см. про этот метод ниже)
let res = response.json();
ReactDOM.render(
<FullCard
PackageName={res}
PropMain={this.props.rec}
icons={this.props.icons}
/>,
document.getElementById("HomePage")
);
} else {
alert("Ошибка HTTP: " + response.status);
}
console.log(pkgName);
}
findPakg(pkg) {
this.viewPakegeInfo(pkg);
}
render() {
return (
<ProSidebar
id="navBar"
style={{
background: "2e323f",
position: "fixed",
height: "100vh",
left: "-280px"
}}
>
<SidebarHeader>
<div
style={{
padding: "24px",
textTransform: "uppercase",
fontWeight: "bold",
fontSize: "14px",
letterSpacing: "1px",
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
paddingLeft: "12px"
}}
>
Webport
</div>
<MenuItem>
<div
className="user-pic"
style={{
width: "60px",
marginRight: "3px",
float: "left",
paddingLeft: "12px"
}}
>
<img
style={{ width: "56px", height: "56px" }}
className="img-responsive img-rounded"
src="https://raw.githubusercontent.com/azouaoui-med/pro-sidebar-template/gh-pages/src/img/user.jpg"
alt="User picture"
onClick={() => (
(document.getElementById("backBtn").style.display = "block"),
ReactDOM.render(
<UserProfilePage Ipkgs={this.props.Ipkgs} />,
document.getElementById("HomePage")
)
)}
/>
</div>
<div
className="user-info"
style={{ float: "left", width: " 100%" }}
>
<span className="user-name">
Jhon
<strong>Smith</strong>
</span>
<span
className="user-role"
style={{ width: "100vw", color: "green" }}
>
Guest
</span>
{/* <span className="user-status">
<i className="fa fa-circle"></i>
<span>Online</span>
</span>*/}
</div>
</MenuItem>
<MenuItem style={{}}>
<input
id="inS"
name="inS"
classname="form-control"
type="text"
placeholder="Введите имя пакета"
onChange={(e) => this.findPakg(e.target.value)}
style={{
fontSize: "1.2em",
margin: "10px",
backgroundColor: "rgba(81, 81, 81, 0.5)",
border: "none",
padding: "5px",
//ackground: "#2e233f",
//borderRadius: "15px",
//border: "3px inset #2e322f",
color: "#c7c7c7"
}}
/>
</MenuItem>
</SidebarHeader>
<SidebarContent style={{ overflowX: "clip" }}>
<Menu>
<MenuPage
menuItem={this.props.menuItem}
title={this.ui.menu.text}
/>
<MenuItem
title={this.ui.catalog.text}
style={{ paddingRight: "0px" }}
>
<SubMenu title={this.ui.catalog.text}>
{Object.keys(this.props.category).map((k, i) => (
<MenuItem
style={{
paddingRight: "0px",
width: "100%"
}}
>
<SubMenu title={this.checkAlias(k)}>
{this.props.category[k].map((pn, j) => (
<MenuItem
onClick={() =>
this.viewPakegeInfo(
this.props.category[k][i] +
"/" +
this.props.category[k][j]
)
}
style={{
//borderBottom: "1px solid red ",
width: "100%"
}}
>
{pn}
</MenuItem>
))}
</SubMenu>
</MenuItem>
))}
</SubMenu>
</MenuItem>
</Menu>
</SidebarContent>
</ProSidebar>
);
}
}
export default NavBar;

568
sources/src/Componets/NavList/style.css

@ -0,0 +1,568 @@
.NavBar {
user-select: none;
text-align: center;
height: 100%;
width: 11rem;
min-width: 12vw;
overflow-y: auto;
overflow-x: hidden;
color: var(--nav-color);
background-color: var(--nav-bg-color);
border-right: 1px solid rgba(0, 0, 0, 0.1);
height: 100vh;
position: sticky;
top: 0;
}
.NavBar li {
display: flex;
align-items: center;
position: relative;
font-size: 1rem;
padding-left: 1rem;
height: 2rem;
margin: 0 -1rem;
margin-bottom: 10px;
outline: none;
cursor: pointer;
border-right: 3px solid transparent;
}
.categoryIcon {
margin-right: 0.5rem;
width: 1.2rem;
min-width: 1.2rem;
height: 1.2rem;
background-size: 100%;
background-repeat: no-repeat;
background-position-x: 0, -100px;
}
.container {
width: 100vw;
}
.visible {
display: block;
}
.unvisible {
display: none;
}
@media screen and (max-width: 900px) {
ul.NavBar {
width: 50%;
/*width: 100%;*/
position: relative;
}
}
@media screen and (min-width: 480px) {
ul.NavBar li a {
width: 50%;
position: asboliute;
height: 100%;
}
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 200px;
background-color: #f1f1f1;
}
li a {
display: block;
color: #000;
padding: 8px 16px;
text-decoration: none;
}
/* Change the link color on hover */
li a:hover {
background-color: #555;
color: white;
}
@keyframes swing {
0% {
transform: rotate(0deg);
}
10% {
transform: rotate(10deg);
}
30% {
transform: rotate(0deg);
}
40% {
transform: rotate(-10deg);
}
50% {
transform: rotate(0deg);
}
60% {
transform: rotate(5deg);
}
70% {
transform: rotate(0deg);
}
80% {
transform: rotate(-5deg);
}
100% {
transform: rotate(0deg);
}
}
@keyframes sonar {
0% {
transform: scale(0.9);
opacity: 1;
}
100% {
transform: scale(2);
opacity: 0;
}
}
body {
font-size: 0.9rem;
}
.page-wrapper .sidebar-wrapper,
.sidebar-wrapper .sidebar-brand > a,
.sidebar-wrapper .sidebar-dropdown > a:after,
.sidebar-wrapper .sidebar-menu .sidebar-dropdown .sidebar-submenu li a:before,
.sidebar-wrapper ul li a i,
.page-wrapper .page-content,
.sidebar-wrapper .sidebar-search input.search-menu,
.sidebar-wrapper .sidebar-search .input-group-text,
.sidebar-wrapper .sidebar-menu ul li a,
#show-sidebar,
#close-sidebar {
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
/*----------------page-wrapper----------------*/
.page-wrapper {
height: 100vh;
}
.page-wrapper .theme {
width: 40px;
height: 40px;
display: inline-block;
border-radius: 4px;
margin: 2px;
}
.page-wrapper .theme.chiller-theme {
background: #1e2229;
}
/*----------------toggeled sidebar----------------*/
.page-wrapper.toggled .sidebar-wrapper {
left: 0px;
}
@media screen and (min-width: 768px) {
.page-wrapper.toggled .page-content {
padding-left: 300px;
}
}
/*----------------show sidebar button----------------*/
#show-sidebar {
position: fixed;
left: 0;
top: 10px;
border-radius: 0 4px 4px 0px;
width: 35px;
transition-delay: 0.3s;
}
.page-wrapper.toggled #show-sidebar {
left: -40px;
}
/*----------------sidebar-wrapper----------------*/
.sidebar-wrapper {
width: 260px;
height: 100%;
max-height: 100%;
position: fixed;
top: 0;
left: -300px;
z-index: 999;
}
.sidebar-wrapper ul {
list-style-type: none;
padding: 0;
margin: 0;
}
.sidebar-wrapper a {
text-decoration: none;
}
/*----------------sidebar-content----------------*/
.sidebar-content {
max-height: calc(100% - 30px);
height: calc(100% - 30px);
overflow-y: auto;
position: relative;
}
.sidebar-content.desktop {
overflow-y: hidden;
}
/*--------------------sidebar-brand----------------------*/
.sidebar-wrapper .sidebar-brand {
padding: 10px 20px;
display: flex;
align-items: center;
}
.sidebar-wrapper .sidebar-brand > a {
text-transform: uppercase;
font-weight: bold;
flex-grow: 1;
}
.sidebar-wrapper .sidebar-brand #close-sidebar {
cursor: pointer;
font-size: 20px;
}
/*--------------------sidebar-header----------------------*/
.sidebar-wrapper .sidebar-header {
padding: 20px;
overflow: hidden;
}
.sidebar-wrapper .sidebar-header .user-pic {
float: left;
width: 60px;
padding: 2px;
border-radius: 12px;
margin-right: 15px;
overflow: hidden;
}
.sidebar-wrapper .sidebar-header .user-pic img {
object-fit: cover;
height: 100%;
width: 100%;
}
.sidebar-wrapper .sidebar-header .user-info {
float: left;
}
.sidebar-wrapper .sidebar-header .user-info > span {
display: block;
}
.sidebar-wrapper .sidebar-header .user-info .user-role {
font-size: 12px;
}
.sidebar-wrapper .sidebar-header .user-info .user-status {
font-size: 11px;
margin-top: 4px;
}
.sidebar-wrapper .sidebar-header .user-info .user-status i {
font-size: 8px;
margin-right: 4px;
color: #5cb85c;
}
/*-----------------------sidebar-search------------------------*/
.sidebar-wrapper .sidebar-search > div {
padding: 10px 20px;
}
/*----------------------sidebar-menu-------------------------*/
.sidebar-wrapper .sidebar-menu {
padding-bottom: 10px;
}
.sidebar-wrapper .sidebar-menu .header-menu span {
font-weight: bold;
font-size: 14px;
padding: 15px 20px 5px 20px;
display: inline-block;
}
.sidebar-wrapper .sidebar-menu ul li a {
display: inline-block;
width: 100%;
text-decoration: none;
position: relative;
padding: 8px 30px 8px 20px;
}
.sidebar-wrapper .sidebar-menu ul li a i {
margin-right: 10px;
font-size: 12px;
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
border-radius: 4px;
}
.sidebar-wrapper .sidebar-menu ul li a:hover > i::before {
display: inline-block;
animation: swing ease-in-out 0.5s 1 alternate;
}
.sidebar-wrapper .sidebar-menu .sidebar-dropdown > a:after {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f105";
font-style: normal;
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
background: 0 0;
position: absolute;
right: 15px;
top: 14px;
}
.sidebar-wrapper .sidebar-menu .sidebar-dropdown .sidebar-submenu ul {
padding: 5px 0;
}
.sidebar-wrapper .sidebar-menu .sidebar-dropdown .sidebar-submenu li {
padding-left: 25px;
font-size: 13px;
}
.sidebar-wrapper .sidebar-menu .sidebar-dropdown .sidebar-submenu li a:before {
content: "\f111";
font-family: "Font Awesome 5 Free";
font-weight: 400;
font-style: normal;
display: inline-block;
text-align: center;
text-decoration: none