Compare commits
11 Commits
main
...
feature/we
Author | SHA1 | Date |
---|---|---|
jld3103 | 6e984c9911 | 1 year ago |
jld3103 | 4494e0a4dc | 1 year ago |
jld3103 | 1b4da66784 | 1 year ago |
jld3103 | 5ba8fe384d | 1 year ago |
jld3103 | aded2e89ca | 1 year ago |
jld3103 | 4272042c6f | 1 year ago |
jld3103 | 004e58b168 | 1 year ago |
jld3103 | 9e2d14f0e7 | 1 year ago |
jld3103 | 7391081019 | 1 year ago |
jld3103 | 65cc267bf5 | 1 year ago |
jld3103 | 65ff49345f | 1 year ago |
35 changed files with 12075 additions and 37 deletions
@ -0,0 +1,10 @@ |
|||||||
|
**/.dart_tool |
||||||
|
**/build |
||||||
|
**/coverage |
||||||
|
.git/ |
||||||
|
external/ |
||||||
|
packages/app/.flatpak-builder |
||||||
|
packages/app/android |
||||||
|
packages/app/build-dir |
||||||
|
packages/app/linux |
||||||
|
packages/app/screenshots |
@ -0,0 +1,2 @@ |
|||||||
|
web/sqflite_sw.js -diff |
||||||
|
web/sqlite3.wasm -diff |
@ -0,0 +1,20 @@ |
|||||||
|
FROM leoafarias/fvm:latest as build |
||||||
|
|
||||||
|
# This is needed, because for some reason it doesn't work with the default user because of permissions |
||||||
|
USER root |
||||||
|
WORKDIR /app |
||||||
|
|
||||||
|
COPY .fvm/fvm_config.json .fvm/ |
||||||
|
RUN fvm install |
||||||
|
RUN fvm flutter config --enable-web |
||||||
|
RUN fvm flutter precache |
||||||
|
|
||||||
|
# TODO: Efficiently cache dependencies |
||||||
|
|
||||||
|
COPY . . |
||||||
|
|
||||||
|
RUN cd packages/app && fvm flutter build web --no-web-resources-cdn |
||||||
|
|
||||||
|
FROM nginx:alpine |
||||||
|
COPY packages/app/nginx.conf /etc/nginx/conf.d/default.conf |
||||||
|
COPY --from=build /app/packages/app/build/web/ /usr/share/nginx/html |
@ -0,0 +1,4 @@ |
|||||||
|
server { |
||||||
|
listen 8080; |
||||||
|
root /usr/share/nginx/html; |
||||||
|
} |
After Width: | Height: | Size: 603 B |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 20 KiB |
@ -0,0 +1,59 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html> |
||||||
|
<head> |
||||||
|
<!-- |
||||||
|
If you are serving your web app in a path other than the root, change the |
||||||
|
href value below to reflect the base path you are serving from. |
||||||
|
|
||||||
|
The path provided below has to start and end with a slash "/" in order for |
||||||
|
it to work correctly. |
||||||
|
|
||||||
|
For more details: |
||||||
|
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base |
||||||
|
|
||||||
|
This is a placeholder for base href that will be replaced by the value of |
||||||
|
the `--base-href` argument provided to `flutter build`. |
||||||
|
--> |
||||||
|
<base href="$FLUTTER_BASE_HREF"> |
||||||
|
|
||||||
|
<meta charset="UTF-8"> |
||||||
|
<meta content="IE=Edge" http-equiv="X-UA-Compatible"> |
||||||
|
<meta name="description" content="A beautiful convergent cross-platform client for Nextcloud written in Flutter."> |
||||||
|
|
||||||
|
<!-- iOS meta tags & icons --> |
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes"> |
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
||||||
|
<meta name="apple-mobile-web-app-title" content="Neon"> |
||||||
|
<link rel="apple-touch-icon" href="icons/Icon-192.png"> |
||||||
|
|
||||||
|
<!-- Favicon --> |
||||||
|
<link rel="icon" type="image/png" href="favicon.png"/> |
||||||
|
|
||||||
|
<title>Neon</title> |
||||||
|
<link rel="manifest" href="manifest.json"> |
||||||
|
|
||||||
|
<script> |
||||||
|
// The value below is injected by flutter build, do not touch. |
||||||
|
var serviceWorkerVersion = null; |
||||||
|
</script> |
||||||
|
<!-- This script adds the flutter initialization JS code --> |
||||||
|
<script src="flutter.js" defer></script> |
||||||
|
</head> |
||||||
|
<body> |
||||||
|
<script> |
||||||
|
window.addEventListener('load', function(ev) { |
||||||
|
// Download main.dart.js |
||||||
|
_flutter.loader.loadEntrypoint({ |
||||||
|
serviceWorker: { |
||||||
|
serviceWorkerVersion: serviceWorkerVersion, |
||||||
|
}, |
||||||
|
onEntrypointLoaded: function(engineInitializer) { |
||||||
|
engineInitializer.initializeEngine().then(function(appRunner) { |
||||||
|
appRunner.runApp(); |
||||||
|
}); |
||||||
|
} |
||||||
|
}); |
||||||
|
}); |
||||||
|
</script> |
||||||
|
</body> |
||||||
|
</html> |
@ -0,0 +1,23 @@ |
|||||||
|
{ |
||||||
|
"name": "Neon", |
||||||
|
"short_name": "Neon", |
||||||
|
"start_url": ".", |
||||||
|
"display": "standalone", |
||||||
|
"background_color": "#f37736", |
||||||
|
"theme_color": "#f37736", |
||||||
|
"description": "A beautiful convergent cross-platform client for Nextcloud written in Flutter.", |
||||||
|
"orientation": "portrait-primary", |
||||||
|
"prefer_related_applications": false, |
||||||
|
"icons": [ |
||||||
|
{ |
||||||
|
"src": "icons/Icon-192.png", |
||||||
|
"sizes": "192x192", |
||||||
|
"type": "image/png" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"src": "icons/Icon-512.png", |
||||||
|
"sizes": "512x512", |
||||||
|
"type": "image/png" |
||||||
|
} |
||||||
|
] |
||||||
|
} |
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -0,0 +1,48 @@ |
|||||||
|
import 'dart:async'; |
||||||
|
|
||||||
|
import 'package:meta/meta.dart'; |
||||||
|
import 'package:neon/src/platform/platform.dart'; |
||||||
|
import 'package:sqflite_common_ffi/sqflite_ffi.dart'; |
||||||
|
import 'package:sqflite_common_ffi_web/sqflite_ffi_web.dart'; |
||||||
|
import 'package:universal_html/html.dart' as html; |
||||||
|
|
||||||
|
@immutable |
||||||
|
@internal |
||||||
|
class WebNeonPlatform implements NeonPlatform { |
||||||
|
const WebNeonPlatform(); |
||||||
|
|
||||||
|
@override |
||||||
|
bool get canUseCamera => false; |
||||||
|
|
||||||
|
@override |
||||||
|
bool get canUsePushNotifications => false; |
||||||
|
|
||||||
|
@override |
||||||
|
bool get canUseQuickActions => false; |
||||||
|
|
||||||
|
@override |
||||||
|
bool get canUseSystemTray => false; |
||||||
|
|
||||||
|
@override |
||||||
|
bool get canUseWebView => false; |
||||||
|
|
||||||
|
@override |
||||||
|
bool get canUseWindowManager => false; |
||||||
|
|
||||||
|
@override |
||||||
|
bool get canUseSharing => true; |
||||||
|
|
||||||
|
@override |
||||||
|
bool get shouldUseFileDialog => throw UnimplementedError(); |
||||||
|
|
||||||
|
@override |
||||||
|
FutureOr<String>? get userAccessibleAppDataPath => null; |
||||||
|
|
||||||
|
@override |
||||||
|
String getWindowLocation() => html.window.location.href; |
||||||
|
|
||||||
|
@override |
||||||
|
FutureOr<void> init() { |
||||||
|
databaseFactory = databaseFactoryFfiWeb; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue