Browse Source

Merge branch 'node-16' into develop

develop
Alice Gaudon 2 months ago
parent
commit
6ab51f7b38
  1. 5
      frontend/connection_error.html
  2. 5
      frontend/file_not_found_error.html
  3. 5
      frontend/index.html
  4. 2
      frontend/sass/layout.scss
  5. 5
      frontend/service-settings.html
  6. 5
      frontend/settings.html
  7. 15
      package.json
  8. 14
      src/windows/MainWindow.ts
  9. 3
      webpack.config.js
  10. 2097
      yarn.lock

5
frontend/connection_error.html

@ -4,10 +4,7 @@
<meta charset="UTF-8">
<title>An error occured</title>
<meta http-equiv="Content-Security-Policy"
content="style-src 'self' 'unsafe-inline' https://use.fontawesome.com; font-src 'self' https://use.fontawesome.com; script-src 'self'">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
content="style-src 'self' 'unsafe-inline'; font-src 'self'; script-src 'self'">
<link rel="stylesheet" href="css/layout.css">
<link rel="stylesheet" href="css/error.css">

5
frontend/file_not_found_error.html

@ -4,10 +4,7 @@
<meta charset="UTF-8">
<title>An error occured</title>
<meta http-equiv="Content-Security-Policy"
content="style-src 'self' 'unsafe-inline' https://use.fontawesome.com; font-src 'self' https://use.fontawesome.com; script-src 'self'">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
content="style-src 'self' 'unsafe-inline'; font-src 'self'; script-src 'self'">
<link rel="stylesheet" href="css/layout.css">
<link rel="stylesheet" href="css/error.css">

5
frontend/index.html

@ -4,10 +4,7 @@
<meta charset="UTF-8">
<title>Tabs</title>
<meta http-equiv="Content-Security-Policy" content="style-src 'self' 'unsafe-inline' https://use.fontawesome.com; font-src 'self' https://use.fontawesome.com; script-src 'self' 'sha256-oPC0l5nxLnJ2LX6qU9Laxa4/cjhuHDRIqdUsBDWYqnw='">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
<meta http-equiv="Content-Security-Policy" content="style-src 'self' 'unsafe-inline'; font-src 'self'; script-src 'self' 'sha256-oPC0l5nxLnJ2LX6qU9Laxa4/cjhuHDRIqdUsBDWYqnw='">
<link rel="stylesheet" href="css/layout.css">
<link rel="stylesheet" href="css/index.css">

2
frontend/sass/layout.scss

@ -1,3 +1,5 @@
@import url('../../node_modules/@fortawesome/fontawesome-free/css/all.css');
* {
box-sizing: border-box;
}

5
frontend/service-settings.html

@ -4,10 +4,7 @@
<meta charset="UTF-8">
<title>Service settings</title>
<meta http-equiv="Content-Security-Policy" content="style-src 'self' 'unsafe-inline' https://use.fontawesome.com; font-src 'self' https://use.fontawesome.com; script-src 'self' 'sha256-5gY/z34s5Mtc3YL8GkwZQhzk9LymQIuFUQRVvs7Gh0o='">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
<meta http-equiv="Content-Security-Policy" content="style-src 'self' 'unsafe-inline'; font-src 'self'; script-src 'self' 'sha256-5gY/z34s5Mtc3YL8GkwZQhzk9LymQIuFUQRVvs7Gh0o='">
<link rel="stylesheet" href="css/layout.css">
<link rel="stylesheet" href="css/service-settings.css">

5
frontend/settings.html

@ -5,10 +5,7 @@
<title>Service settings</title>
<meta http-equiv="Content-Security-Policy"
content="style-src 'self' 'unsafe-inline' https://use.fontawesome.com; font-src 'self' https://use.fontawesome.com; script-src 'self' 'sha256-UoPUIMX0PZl7cy3YoegZ0EDleSaHxTURPMyK09xsa0E='">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
content="style-src 'self' 'unsafe-inline'; font-src 'self'; script-src 'self' 'sha256-UoPUIMX0PZl7cy3YoegZ0EDleSaHxTURPMyK09xsa0E='">
<link rel="stylesheet" href="css/layout.css">
<link rel="stylesheet" href="css/service-settings.css">

15
package.json

@ -31,14 +31,15 @@
"@babel/core": "^7.9.6",
"@babel/preset-env": "^7.9.6",
"@fortawesome/fontawesome-free": "^5.13.0",
"@types/node": "^14.17.1",
"@typescript-eslint/eslint-plugin": "^4.3.0",
"@typescript-eslint/parser": "^4.3.0",
"babel-loader": "^8.1.0",
"concurrently": "^6.0.0",
"copy-webpack-plugin": "^8.0.0",
"copy-webpack-plugin": "^9.0.0",
"css-loader": "^5.0.0",
"electron": "^12.0.0",
"electron-builder": "^22.4.0",
"electron": "^13.0.0",
"electron-builder": "^22.11.5",
"eslint": "^7.10.0",
"file-loader": "^6.0.0",
"imagemin": "^7.0.1",
@ -46,11 +47,11 @@
"imagemin-mozjpeg": "^9.0.0",
"imagemin-pngquant": "^9.0.0",
"imagemin-svgo": "^9.0.0",
"img-loader": "^3.0.1",
"img-loader": "^3.0.2",
"mini-css-extract-plugin": "^1.2.0",
"node-sass": "^5.0.0",
"sass": "^1.32.12",
"sass-loader": "^11.0.0",
"ts-loader": "^8.0.0",
"ts-loader": "^9.1.2",
"typescript": "^4.0.2",
"webpack": "^5.2.0",
"webpack-cli": "^4.1.0"
@ -88,6 +89,6 @@
"icon": "resources/images/logo.png",
"category": "public.app-category.utilities"
},
"electronVersion": "12.0.4"
"electronVersion": "13.0.0"
}
}

14
src/windows/MainWindow.ts

@ -1,13 +1,5 @@
import path from "path";
import {
clipboard,
ContextMenuParams,
dialog,
ipcMain,
Menu,
MenuItem, session, shell,
webContents,
} from "electron";
import {clipboard, ContextMenuParams, dialog, ipcMain, Menu, MenuItem, session, shell, webContents,} from "electron";
import ServiceSettingsWindow from "./ServiceSettingsWindow";
import SettingsWindow from "./SettingsWindow";
import Application from "../Application";
@ -460,7 +452,9 @@ export default class MainWindow extends Window {
): void {
const service = this.config.services[serviceId];
function getUrlDomain(url: string) {
function getUrlDomain(url: string | undefined) {
if (!url) return '';
const matches = url.match(/^https?:\/\/((.+?)\/|(.+))/i);
if (matches !== null) {
let domain = matches[1];

3
webpack.config.js

@ -37,9 +37,6 @@ const config = {
use: [
{
loader: MiniCssExtractPlugin.loader,
options: {
publicPath: '/',
}
},
'css-loader',
'sass-loader',

2097
yarn.lock
File diff suppressed because it is too large
View File

Loading…
Cancel
Save