Skip to content

Commit df9c7ea

Browse files
authored
Merge branch 'timvisee:master' into master
2 parents e32ea7d + 55ad08f commit df9c7ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+23885
-4502
lines changed

.eslintrc.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,24 @@ env:
55
extends:
66
- eslint:recommended
77
- prettier
8-
- plugin:node/recommended
8+
- plugin:n/recommended
99
- plugin:security/recommended
1010

1111
plugins:
12-
- node
12+
- n
1313
- security
1414

1515
root: true
1616

1717
rules:
18-
node/no-deprecated-api: off
19-
node/no-unsupported-features/es-syntax: off
20-
node/no-unsupported-features/node-builtins: off
21-
node/no-unpublished-require: off
22-
node/no-unpublished-import: off
18+
n/no-deprecated-api: off
19+
n/no-unsupported-features/es-syntax: off
20+
n/no-unsupported-features/node-builtins: off
21+
n/no-unpublished-require: off
22+
n/no-unpublished-import: off
23+
n/no-process-exit: off
24+
# This forces using file extensions in imports, which is a best practice, but refactoring would take some time
25+
n/no-missing-import: off
2326

2427
security/detect-non-literal-fs-filename: off
2528
security/detect-object-injection: off

.stylelintrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ rules:
1111
selector-list-comma-newline-after: null
1212
value-list-comma-newline-after: null
1313
at-rule-no-unknown: null
14+
# Conflicts with prettier
15+
string-quotes: null

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ COPY --chown=app:app server server
6363
COPY --chown=app:app --from=builder /app/dist dist
6464

6565
RUN npm ci --production && npm cache clean --force
66-
RUN mkdir -p /app/.config/configstore
6766
RUN ln -s dist/version.json version.json
6867

6968
ENV PORT=1443

app/.eslintrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ parserOptions:
66
sourceType: module
77

88
rules:
9-
node/no-unsupported-features: off
9+
n/no-unsupported-features: off

app/capabilities.js

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,7 @@ async function checkCrypto() {
4545
);
4646
return true;
4747
} catch (err) {
48-
try {
49-
window.asmCrypto = await import('asmcrypto.js');
50-
await import('@dannycoates/webcrypto-liner/build/shim');
51-
return true;
52-
} catch (e) {
53-
return false;
54-
}
48+
return false;
5549
}
5650
}
5751

@@ -66,25 +60,12 @@ function checkStreams() {
6660
}
6761
}
6862

69-
async function polyfillStreams() {
70-
try {
71-
await import('@mattiasbuelens/web-streams-polyfill');
72-
return true;
73-
} catch (e) {
74-
return false;
75-
}
76-
}
77-
7863
export default async function getCapabilities() {
7964
const browser = browserName();
8065
const isMobile = /mobi|android/i.test(navigator.userAgent);
8166
const serviceWorker = 'serviceWorker' in navigator && browser !== 'edge';
8267
let crypto = await checkCrypto();
8368
const nativeStreams = checkStreams();
84-
let polyStreams = false;
85-
if (!nativeStreams) {
86-
polyStreams = await polyfillStreams();
87-
}
8869
let account = typeof AUTH_CONFIG !== 'undefined';
8970
try {
9071
account = account && !!localStorage;
@@ -106,10 +87,10 @@ export default async function getCapabilities() {
10687
account,
10788
crypto,
10889
serviceWorker,
109-
streamUpload: nativeStreams || polyStreams,
90+
streamUpload: nativeStreams,
11091
streamDownload:
11192
nativeStreams && serviceWorker && browser !== 'safari' && !mobileFirefox,
112-
multifile: nativeStreams || polyStreams,
93+
multifile: nativeStreams,
11394
share,
11495
standalone
11596
};

app/ece.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class ECETransformer {
4848
name: 'AES-GCM',
4949
length: 128
5050
},
51-
true, // Edge polyfill requires key to be extractable to encrypt :/
51+
false,
5252
['encrypt', 'decrypt']
5353
);
5454
}

app/locale.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { FluentBundle } from '@fluent/bundle';
1+
import { FluentBundle, FluentResource } from '@fluent/bundle';
22

33
function makeBundle(locale, ftl) {
44
const bundle = new FluentBundle(locale, { useIsolating: false });
5-
bundle.addMessages(ftl);
5+
bundle.addResource(new FluentResource(ftl));
66
return bundle;
77
}
88

@@ -19,7 +19,7 @@ export async function getTranslator(locale) {
1919
return function(id, data) {
2020
for (let bundle of bundles) {
2121
if (bundle.hasMessage(id)) {
22-
return bundle.format(bundle.getMessage(id), data);
22+
return bundle.formatPattern(bundle.getMessage(id).value, data);
2323
}
2424
}
2525
};

app/main.css

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,14 @@ html {
77
@tailwind components;
88

99
:not(input) {
10-
-webkit-user-select: none;
11-
-moz-user-select: none;
12-
-ms-user-select: none;
1310
user-select: none;
1411
}
1512

1613
:root {
1714
--violet-gradient: linear-gradient(
1815
-180deg,
19-
rgba(144, 89, 255, 0.8) 0%,
20-
rgba(144, 89, 255, 0.4) 100%
16+
rgb(144 89 255 / 80%) 0%,
17+
rgb(144 89 255 / 40%) 100%
2118
);
2219
}
2320

@@ -71,7 +68,7 @@ body {
7168

7269
.checkbox > label::before {
7370
/* @apply bg-grey-10; */
74-
@apply border;
71+
@apply border-default;
7572
@apply rounded-sm;
7673

7774
content: '';
@@ -204,32 +201,31 @@ progress::-webkit-progress-value {
204201
background-image: -webkit-linear-gradient(
205202
-45deg,
206203
transparent 20%,
207-
rgba(255, 255, 255, 0.4) 20%,
208-
rgba(255, 255, 255, 0.4) 40%,
204+
rgb(255 255 255 / 40%) 20%,
205+
rgb(255 255 255 / 40%) 40%,
209206
transparent 40%,
210207
transparent 60%,
211-
rgba(255, 255, 255, 0.4) 60%,
212-
rgba(255, 255, 255, 0.4) 80%,
208+
rgb(255 255 255 / 40%) 60%,
209+
rgb(255 255 255 / 40%) 80%,
213210
transparent 80%
214211
),
215212
-webkit-linear-gradient(left, var(--color-primary), var(--color-primary));
216213
/* stylelint-enable */
217214
border-radius: 2px;
218215
background-size: 21px 20px, 100% 100%, 100% 100%;
219-
-webkit-animation: animate-stripes 1s linear infinite;
220216
}
221217

222218
progress::-moz-progress-bar {
223219
/* stylelint-disable */
224220
background-image: -moz-linear-gradient(
225221
135deg,
226222
transparent 20%,
227-
rgba(255, 255, 255, 0.4) 20%,
228-
rgba(255, 255, 255, 0.4) 40%,
223+
rgb(255 255 255 / 40%) 20%,
224+
rgb(255 255 255 / 40%) 40%,
229225
transparent 40%,
230226
transparent 60%,
231-
rgba(255, 255, 255, 0.4) 60%,
232-
rgba(255, 255, 255, 0.4) 80%,
227+
rgb(255 255 255 / 40%) 60%,
228+
rgb(255 255 255 / 40%) 80%,
233229
transparent 80%
234230
),
235231
-moz-linear-gradient(left, var(--color-primary), var(--color-primary));
@@ -239,12 +235,6 @@ progress::-moz-progress-bar {
239235
animation: animate-stripes 1s linear infinite;
240236
}
241237

242-
@-webkit-keyframes animate-stripes {
243-
100% {
244-
background-position: -21px 0;
245-
}
246-
}
247-
248238
@keyframes animate-stripes {
249239
100% {
250240
background-position: -21px 0;
@@ -313,7 +303,7 @@ select {
313303

314304
@screen md {
315305
.main > section {
316-
@apply border;
306+
@apply border-default;
317307
@apply border-grey-80;
318308
}
319309
}
@@ -323,13 +313,12 @@ select {
323313

324314
@responsive {
325315
.shadow-light {
326-
box-shadow: 0 0 8px 0 rgba(12, 12, 13, 0.1);
316+
box-shadow: 0 0 8px 0 rgb(12 12 13 / 10%);
327317
}
328318

329319
.shadow-big {
330-
box-shadow: 0 12px 18px 2px rgba(34, 0, 51, 0.04),
331-
0 6px 22px 4px rgba(7, 48, 114, 0.12),
332-
0 6px 10px -4px rgba(14, 13, 26, 0.12);
320+
box-shadow: 0 12px 18px 2px rgb(34 0 51 / 4%),
321+
0 6px 22px 4px rgb(7 48 114 / 12%), 0 6px 10px -4px rgb(14 13 26 / 12%);
333322
}
334323
}
335324

app/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* global DEFAULTS LIMITS WEB_UI PREFS */
22
import 'core-js';
3-
import 'fast-text-encoding'; // MS Edge support
43
import 'intl-pluralrules';
54
import choo from 'choo';
65
import nanotiming from 'nanotiming';

app/storage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class Storage {
110110
}
111111

112112
set user(info) {
113-
return this.engine.setItem('user', JSON.stringify(info));
113+
this.engine.setItem('user', JSON.stringify(info));
114114
}
115115

116116
getFileById(id) {

0 commit comments

Comments
 (0)