Merge branch 'master' into removecordova
This commit is contained in:
commit
23c0eda718
|
@ -5736,9 +5736,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/http-cache-semantics": {
|
"node_modules/http-cache-semantics": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
|
||||||
"integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==",
|
"integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/http-deceiver": {
|
"node_modules/http-deceiver": {
|
||||||
|
@ -9432,9 +9432,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ua-parser-js": {
|
"node_modules/ua-parser-js": {
|
||||||
"version": "0.7.31",
|
"version": "0.7.33",
|
||||||
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz",
|
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.33.tgz",
|
||||||
"integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==",
|
"integrity": "sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -14631,9 +14631,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"http-cache-semantics": {
|
"http-cache-semantics": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
|
||||||
"integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==",
|
"integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"http-deceiver": {
|
"http-deceiver": {
|
||||||
|
@ -17498,9 +17498,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ua-parser-js": {
|
"ua-parser-js": {
|
||||||
"version": "0.7.31",
|
"version": "0.7.33",
|
||||||
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz",
|
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.33.tgz",
|
||||||
"integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==",
|
"integrity": "sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"underscore": {
|
"underscore": {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# Generated by Cargo
|
# Generated by Cargo
|
||||||
# will have compiled files and executables
|
# will have compiled files and executables
|
||||||
/target/
|
/target/
|
||||||
WixTools
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,23 +1,24 @@
|
||||||
[package]
|
[package]
|
||||||
name = "glowing-bear"
|
name = "glowing-bear"
|
||||||
version = "0.1.0"
|
version = "0.10.0" #sync to ../package.json
|
||||||
description = "A web client for WeeChat"
|
description = "A web client for WeeChat"
|
||||||
authors = ["glowing-bear-contributors"]
|
authors = ["glowing-bear-contributors"]
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
repository = "https://github.com/glowing-bear/glowing-bear"
|
repository = "https://github.com/glowing-bear/glowing-bear"
|
||||||
default-run = "app"
|
default-run = "glowing-bear"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.57"
|
rust-version = "1.57"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tauri-build = { version = "1.0.0-rc.3", features = [] }
|
tauri-build = { version = "1.2.1", features = [] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tauri = { version = "1.0.0-rc.3", features = ["api-all"] }
|
tauri = { version = "1.2.4", features = ["api-all"] }
|
||||||
|
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# by default Tauri runs in production mode
|
# by default Tauri runs in production mode
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
tauri::Builder::default()
|
tauri::Builder::default()
|
||||||
|
.plugin(tauri_plugin_window_state::Builder::default().build()) // register plugin to remember window state
|
||||||
.run(tauri::generate_context!())
|
.run(tauri::generate_context!())
|
||||||
.expect("error while running tauri application");
|
.expect("error while running tauri application");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,68 +1,65 @@
|
||||||
{
|
{
|
||||||
|
"build": {
|
||||||
|
"beforeBuildCommand": "npm run build",
|
||||||
|
"beforeDevCommand": "npm run start",
|
||||||
|
"devPath": " http://localhost:8080/",
|
||||||
|
"distDir": "../build",
|
||||||
|
"withGlobalTauri": true
|
||||||
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "glowing-bear",
|
"productName": "glowing-bear",
|
||||||
"version": "0.1.0"
|
"version": "0.10.0"
|
||||||
},
|
|
||||||
"build": {
|
|
||||||
"distDir": "../build",
|
|
||||||
"devPath": "http://localhost:8000",
|
|
||||||
"beforeDevCommand": "",
|
|
||||||
"beforeBuildCommand": ""
|
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
|
"allowlist": {
|
||||||
|
"all": true
|
||||||
|
},
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"targets": "all",
|
"category": "SocialNetworking",
|
||||||
"identifier": "org.glowing-bear",
|
"copyright": "Glowing Bear developers",
|
||||||
|
"deb": {
|
||||||
|
"depends": []
|
||||||
|
},
|
||||||
|
"externalBin": [],
|
||||||
"icon": [
|
"icon": [
|
||||||
"../src/assets/img/favicon.png",
|
"../src/assets/img/favicon.png",
|
||||||
"../src/assets/img/glowing_bear_128x128.png",
|
"../src/assets/img/glowing_bear_128x128.png",
|
||||||
"../src/assets/img/glowing-bear.png",
|
"../src/assets/img/glowing-bear.png",
|
||||||
"../src/assets/img/glowing-bear.icns"
|
"../src/assets/img/glowing-bear.icns"
|
||||||
],
|
],
|
||||||
"resources": [],
|
"identifier": "org.glowing-bear",
|
||||||
"externalBin": [],
|
"longDescription": "Glowing Bear is a web frontend for the WeeChat IRC client",
|
||||||
"copyright": "",
|
|
||||||
"category": "Chat",
|
|
||||||
"shortDescription": "",
|
|
||||||
"longDescription": "",
|
|
||||||
"deb": {
|
|
||||||
"depends": [],
|
|
||||||
"useBootstrapper": false
|
|
||||||
},
|
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"entitlements": null,
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
|
||||||
"exceptionDomain": "",
|
"exceptionDomain": "",
|
||||||
"signingIdentity": null,
|
"frameworks": [],
|
||||||
"providerShortName": null,
|
"providerShortName": null,
|
||||||
"entitlements": null
|
"signingIdentity": null
|
||||||
},
|
},
|
||||||
|
"resources": [],
|
||||||
|
"shortDescription": "",
|
||||||
|
"targets": "all",
|
||||||
"windows": {
|
"windows": {
|
||||||
"certificateThumbprint": null,
|
"certificateThumbprint": null,
|
||||||
"digestAlgorithm": "sha256",
|
"digestAlgorithm": "sha256",
|
||||||
"timestampUrl": ""
|
"timestampUrl": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"security": {
|
||||||
|
"csp": null
|
||||||
|
},
|
||||||
"updater": {
|
"updater": {
|
||||||
"active": false
|
"active": false
|
||||||
},
|
},
|
||||||
"allowlist": {
|
|
||||||
"all": true
|
|
||||||
},
|
|
||||||
"windows": [
|
"windows": [
|
||||||
{
|
{
|
||||||
"title": "Glowing Bear",
|
"fullscreen": false,
|
||||||
"center": true,
|
|
||||||
"width": 800,
|
|
||||||
"height": 600,
|
"height": 600,
|
||||||
"resizable": true,
|
"resizable": true,
|
||||||
"fullscreen": false
|
"title": "Glowing Bear",
|
||||||
|
"width": 800
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"security": {
|
|
||||||
"csp": null
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,7 +491,7 @@ weechat.directive('inputBar', function() {
|
||||||
bufferNumber = code - 48 - 1 ;
|
bufferNumber = code - 48 - 1 ;
|
||||||
|
|
||||||
// quick select filtered entries
|
// quick select filtered entries
|
||||||
if (($scope.$parent.search.length || $scope.$parent.onlyUnread) && $scope.$parent.filteredBuffers.length) {
|
if (($scope.$parent.search.length || settings.onlyUnread) && $scope.$parent.filteredBuffers.length) {
|
||||||
filteredBufferNum = $scope.$parent.filteredBuffers[bufferNumber];
|
filteredBufferNum = $scope.$parent.filteredBuffers[bufferNumber];
|
||||||
if (filteredBufferNum !== undefined) {
|
if (filteredBufferNum !== undefined) {
|
||||||
activeBufferId = [filteredBufferNum.number, filteredBufferNum.id];
|
activeBufferId = [filteredBufferNum.number, filteredBufferNum.id];
|
||||||
|
@ -563,7 +563,9 @@ weechat.directive('inputBar', function() {
|
||||||
|
|
||||||
// Alt+< -> switch to previous buffer
|
// Alt+< -> switch to previous buffer
|
||||||
// https://w3c.github.io/uievents-code/#code-IntlBackslash
|
// https://w3c.github.io/uievents-code/#code-IntlBackslash
|
||||||
if ($event.altKey && (code === 60 || code === 226 || key === "IntlBackslash")) {
|
// Support both backquote and intlbackslash for this action, since macos is weird
|
||||||
|
// https://github.com/microsoft/vscode/issues/65082
|
||||||
|
if ($event.altKey && (code === 60 || code === 226 || key === "IntlBackslash" || key === "Backquote")) {
|
||||||
var previousBuffer = models.getPreviousBuffer();
|
var previousBuffer = models.getPreviousBuffer();
|
||||||
if (previousBuffer) {
|
if (previousBuffer) {
|
||||||
models.setActiveBuffer(previousBuffer.id);
|
models.setActiveBuffer(previousBuffer.id);
|
||||||
|
|
|
@ -25,7 +25,7 @@ weechat.factory('notifications', ['$rootScope', '$log', 'models', 'settings', 'u
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for serviceWorker support, and also disable serviceWorker if we're running in electron process, since that's just problematic and not necessary, since gb then already is in a separate process
|
// Check for serviceWorker support, and also disable serviceWorker if we're running in electron process, since that's just problematic and not necessary, since gb then already is in a separate process
|
||||||
if ('serviceWorker' in navigator && window.is_electron !== 1) {
|
if ('serviceWorker' in navigator && window.is_electron !== 1 && !utils.isTauri()) {
|
||||||
$log.info('Service Worker is supported');
|
$log.info('Service Worker is supported');
|
||||||
navigator.serviceWorker.register('serviceworker.js').then(function(reg) {
|
navigator.serviceWorker.register('serviceworker.js').then(function(reg) {
|
||||||
$log.info('Service Worker install:', reg);
|
$log.info('Service Worker install:', reg);
|
||||||
|
@ -37,6 +37,7 @@ weechat.factory('notifications', ['$rootScope', '$log', 'models', 'settings', 'u
|
||||||
};
|
};
|
||||||
|
|
||||||
var showNotification = function(buffer, title, body) {
|
var showNotification = function(buffer, title, body) {
|
||||||
|
$log.info('Showing notification', title);
|
||||||
if (serviceworker) {
|
if (serviceworker) {
|
||||||
navigator.serviceWorker.ready.then(function(registration) {
|
navigator.serviceWorker.ready.then(function(registration) {
|
||||||
registration.showNotification(title, {
|
registration.showNotification(title, {
|
||||||
|
@ -72,13 +73,14 @@ weechat.factory('notifications', ['$rootScope', '$log', 'models', 'settings', 'u
|
||||||
body: body,
|
body: body,
|
||||||
icon: 'assets/img/favicon.png'
|
icon: 'assets/img/favicon.png'
|
||||||
});
|
});
|
||||||
|
$log.info('Using Web API Notification', notification);
|
||||||
|
|
||||||
// Save notification, so we can close all outstanding ones when disconnecting
|
// Save notification, so we can close all outstanding ones when disconnecting
|
||||||
notification.id = notifications.length;
|
notification.id = notifications.length;
|
||||||
notifications.push(notification);
|
notifications.push(notification);
|
||||||
|
|
||||||
// Cancel notification automatically
|
// Cancel notification automatically
|
||||||
var timeout = 15*1000;
|
var timeout = 15*1000; // 15 seconds
|
||||||
notification.onshow = function() {
|
notification.onshow = function() {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
notification.close();
|
notification.close();
|
||||||
|
@ -86,7 +88,8 @@ weechat.factory('notifications', ['$rootScope', '$log', 'models', 'settings', 'u
|
||||||
};
|
};
|
||||||
|
|
||||||
// Click takes the user to the buffer
|
// Click takes the user to the buffer
|
||||||
notification.onclick = function() {
|
notification.onclick = function(event) {
|
||||||
|
event.preventDefault();
|
||||||
models.setActiveBuffer(buffer.id);
|
models.setActiveBuffer(buffer.id);
|
||||||
window.focus();
|
window.focus();
|
||||||
notification.close();
|
notification.close();
|
||||||
|
@ -128,7 +131,13 @@ weechat.factory('notifications', ['$rootScope', '$log', 'models', 'settings', 'u
|
||||||
|
|
||||||
var activeBuffer = models.getActiveBuffer();
|
var activeBuffer = models.getActiveBuffer();
|
||||||
if (activeBuffer) {
|
if (activeBuffer) {
|
||||||
$rootScope.pageTitle = activeBuffer.shortName + ' | ' + activeBuffer.rtitle;
|
let title = activeBuffer.shortName + ' | ' + activeBuffer.rtitle;
|
||||||
|
$rootScope.pageTitle = title;
|
||||||
|
// If running in Tauri, use platform code to update its window title
|
||||||
|
if (utils.isTauri()) {
|
||||||
|
__TAURI__.window.appWindow.setTitle(title);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,10 @@ weechat.factory('utils', function() {
|
||||||
return (document.body.clientWidth < mobile_cutoff);
|
return (document.body.clientWidth < mobile_cutoff);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const _isTauri = window.__TAURI__ !== undefined;
|
||||||
|
var isTauri = function() {
|
||||||
|
return _isTauri;
|
||||||
|
}
|
||||||
|
|
||||||
// Inject a javascript (used by KaTeX)
|
// Inject a javascript (used by KaTeX)
|
||||||
var inject_script = function(script_url) {
|
var inject_script = function(script_url) {
|
||||||
|
@ -82,6 +86,7 @@ weechat.factory('utils', function() {
|
||||||
changeClassStyle: changeClassStyle,
|
changeClassStyle: changeClassStyle,
|
||||||
getClassStyle: getClassStyle,
|
getClassStyle: getClassStyle,
|
||||||
isMobileUi: isMobileUi,
|
isMobileUi: isMobileUi,
|
||||||
|
isTauri: isTauri,
|
||||||
inject_script: inject_script,
|
inject_script: inject_script,
|
||||||
inject_css: inject_css,
|
inject_css: inject_css,
|
||||||
hexStringToByte: hexStringToByte,
|
hexStringToByte: hexStringToByte,
|
||||||
|
|
|
@ -10,6 +10,10 @@ module.exports = {
|
||||||
context: path.resolve(__dirname, 'src'),
|
context: path.resolve(__dirname, 'src'),
|
||||||
entry: './main.js',
|
entry: './main.js',
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
|
performance: {
|
||||||
|
maxEntrypointSize: 600000,
|
||||||
|
maxAssetSize: 600000
|
||||||
|
},
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, 'build'),
|
path: path.resolve(__dirname, 'build'),
|
||||||
},
|
},
|
||||||
|
@ -27,6 +31,8 @@ module.exports = {
|
||||||
new CopyWebpackPlugin({
|
new CopyWebpackPlugin({
|
||||||
patterns: [
|
patterns: [
|
||||||
"**/*.css",
|
"**/*.css",
|
||||||
|
"**/*.mp3",
|
||||||
|
"**/*.ogg",
|
||||||
"**/*.svg",
|
"**/*.svg",
|
||||||
"**/*.png",
|
"**/*.png",
|
||||||
"directives/*.html",
|
"directives/*.html",
|
||||||
|
|
Loading…
Reference in New Issue