Test push

This commit is contained in:
shilangyu 2021-10-31 14:14:31 +01:00
commit 88d6366a19
15 changed files with 133874 additions and 0 deletions

View File

@ -0,0 +1 @@
{"CHANGELOG.md":["CHANGELOG.md"],"assets/app_icon.png":["assets/app_icon.png"],"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"]}

191
assets/CHANGELOG.md Normal file
View File

@ -0,0 +1,191 @@
## Unreleased
### Added
- Logging: local logs about some actions/errors. Can be accessed from **settings > about lemmur > logs**
- Android theme-aware splash screen (thanks to [@mimi89999](https://github.com/mimi89999))
- Blocking of users and communities (from post and from comment)
### Fixed
- Fixed a bug where post would go out of sync with full version of the post
## v0.6.0 - 2021-09-06
### Added
- Support for Lemmy v0.12.0
- Show cake day on a user's profile and next to their name in a comment
## v0.5.0 - 2021-04-29
### Added
- Editing posts
- Editing comments
- Show avatars setting toggle
- Show scores setting toggle
- Default sort type setting
- Default listing type setting
- Import Lemmy settings: long press an account in account settings then choose the import option
- Support lemmy v0.11.0
### Fixed
- Added deduplication in infinite scrolls
- Fixed bug where creating post would crash after uploading a picture
## v0.4.2 - 2021-04-12
### Changed
- Disable commenting on locked posts
- Enhanced keyboard experience
- appropriate keyboard types are opened
- correct capitalization
- added text input hints for things like password managers
- Account actions in settings are more obvious to access: long press an account/instance to see possible actions such as setting as default or removal
### Added
- When writing a comment, the parent text is now selectable
- Text of a post is now selectable
- Tapping outside of a text input hides the keyboard
### Fixed
- Actually fixed the thing that v0.4.1 supposedly fixed
## v0.4.1 - 2021-04-06
### Fixed
- Some actions would pass the wrong user id around causing infinite spinners, this is now fixed
## v0.4.0 - 2021-04-05
### Added
- Share buttons on windows/linux now copy the data to the clipboard
- Initial translations have been incorporated into lemmur. It is not yet possible to contribute translation strings
### Changed
- Transitioned to Lemmy API v3
### Fixed
- Quote blocks in posts and comments are now much prettier
- Code blocks now have monospace font. As they should
- Switching accounts in the profile tab now correctly reacts to the change
- You can no longer add the same instance twice just by changing capitalization (thanks to @ryg-git)
## v0.3.0 - 2021-02-25
WARNING: due to some internal changes your local settings will be reset (logged out of accounts, removed instances, theme back to default)
### Added
- Added inbox page, that can be accessed by tapping bell in the home tab
- Added page with saved posts/comments. It can be accessed from the profile tab under the bookmark icon
- Added ability to send private messages
- Added modlog page. Can be visited in the context of an instance or community from the about tab
- You can now create posts from the community page
### Changed
- Titles on some pages, have an appear effect when scrolling down
- Long pressing comments now has a ripple effect
- Nerd stuff now contains more nerd stuff
- Communities that a user follows will no longer appear on a user's profile in most scenarios
### Fixed
- Time of posts is now displayed properly. Unless you live in UTC zone, then you won't notice a difference
- Fixed a bug where links would not work on Android 11
## v0.2.3 - 2021-02-09
Lemmur is now available on the [play store](https://play.google.com/store/apps/details?id=com.krawieck.lemmur) and [f-droid](https://f-droid.org/packages/com.krawieck.lemmur)
### Changed
- Posts with large amount of text are now truncated in infinite scroll views
- Changed image viewer dismissal to be more fun. The image now also moves on the x axis, changes scale and rotates a bit for more user enjoyment
### Fixed
- Fixed issue where the "About lemmur" tile would not appear on Windows/Linux
- Added a bigger bottom margin in the comment section to prevent the floating action button from covering the last comment
## v0.2.2 - 2021-02-03
Minimum Lemmy version supported: `v0.9.4`
### Added
- Online users count is now correctly displayed
- APKs are now signed
### Fixed
- Fixed a bug where replying to a comment would instead reply to the parent of that comment
- Fixed a bug where comments would be displayed as a grey block
- Fixed a bug where adding/removing accounts could cause the home/communities/search tabs to crash
- Fixed a bug where up/down voting twice cause the comment/post to crash
## v0.2.1 - 2021-02-03
[YANKED]
## v0.2.0 - 2021-01-27
### Breaking changes
- Lemmur now works exclusively with Lemmy API v2
### Added
- You can now manage account-specific settings, such as username, avatar, etc.
### Fixed
- Fixed a bug where in some circumstances removal of an instance would fail
## v0.1.1 - 2021-01-17
### Added
#### Pages
- Instance page
- Community page
- Post page
- User profile page
- Home tab
- Communities tab
- Search tab
- Profile tab
- Settings
#### Actions
- Create comment
- Create post
- Upvote/Downvote
- Save comments/posts
- Follow/Unfollow communities
#### Other
- Light/dark/AMOLED themes
- Manage multiple accounts/instances
### Notable things that don't work / are not implemented yet
- No notifications page
- No way to browse saved posts/comments
- Themes are not yet finalized so they might not look great in some situations
- Other than pictures, there is absolutely no caching
Remember: there's always option to open instance/community/post/comment in web browser from the app if there is a missing feature

1
assets/FontManifest.json Normal file
View File

@ -0,0 +1 @@
[{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]}]

17710
assets/NOTICES Normal file

File diff suppressed because it is too large Load Diff

BIN
assets/assets/app_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

BIN
favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

192
flutter_service_worker.js Normal file
View File

@ -0,0 +1,192 @@
'use strict';
const MANIFEST = 'flutter-app-manifest';
const TEMP = 'flutter-temp-cache';
const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"version.json": "3ad75d4e80acd5e5db7e8266c1f5511d",
"main.dart.js": "f5b48566029a78729bddf6dfcb99d1e8",
"favicon.png": "041f0c97403d25a367331edac230d981",
"assets/FontManifest.json": "dc3d03800ccca4601324923c0b1d6d57",
"assets/CHANGELOG.md": "b852eb86dd00f40dec5bd8593f1e63af",
"assets/NOTICES": "f3b76fecedd372183ec1ba045dcca361",
"assets/assets/app_icon.png": "31af27b86ee52230229594782a0a491e",
"assets/fonts/MaterialIcons-Regular.otf": "4e6447691c9509f7acdbf8a931a85ca1",
"assets/packages/cupertino_icons/assets/CupertinoIcons.ttf": "6d342eb68f170c97609e9da345464e5e",
"assets/AssetManifest.json": "91f31648a511a88249f86a7f94e6f64e",
"icons/Icon-192.png": "e22ddf59c27f4b3009f285547095fccf",
"icons/Icon-512.png": "03de87197ad5d472794ceed395c14f05",
"index.html": "093c0887cab826dab6056ce0318d8a03",
"/": "093c0887cab826dab6056ce0318d8a03",
"manifest.json": "4bd881f33a3e826464d1deeed868e1d5"
};
// The application shell files that are downloaded before a service worker can
// start.
const CORE = [
"/",
"main.dart.js",
"index.html",
"assets/NOTICES",
"assets/AssetManifest.json",
"assets/FontManifest.json"];
// During install, the TEMP cache is populated with the application shell files.
self.addEventListener("install", (event) => {
self.skipWaiting();
return event.waitUntil(
caches.open(TEMP).then((cache) => {
return cache.addAll(
CORE.map((value) => new Request(value, {'cache': 'reload'})));
})
);
});
// During activate, the cache is populated with the temp files downloaded in
// install. If this service worker is upgrading from one with a saved
// MANIFEST, then use this to retain unchanged resource files.
self.addEventListener("activate", function(event) {
return event.waitUntil(async function() {
try {
var contentCache = await caches.open(CACHE_NAME);
var tempCache = await caches.open(TEMP);
var manifestCache = await caches.open(MANIFEST);
var manifest = await manifestCache.match('manifest');
// When there is no prior manifest, clear the entire cache.
if (!manifest) {
await caches.delete(CACHE_NAME);
contentCache = await caches.open(CACHE_NAME);
for (var request of await tempCache.keys()) {
var response = await tempCache.match(request);
await contentCache.put(request, response);
}
await caches.delete(TEMP);
// Save the manifest to make future upgrades efficient.
await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES)));
return;
}
var oldManifest = await manifest.json();
var origin = self.location.origin;
for (var request of await contentCache.keys()) {
var key = request.url.substring(origin.length + 1);
if (key == "") {
key = "/";
}
// If a resource from the old manifest is not in the new cache, or if
// the MD5 sum has changed, delete it. Otherwise the resource is left
// in the cache and can be reused by the new service worker.
if (!RESOURCES[key] || RESOURCES[key] != oldManifest[key]) {
await contentCache.delete(request);
}
}
// Populate the cache with the app shell TEMP files, potentially overwriting
// cache files preserved above.
for (var request of await tempCache.keys()) {
var response = await tempCache.match(request);
await contentCache.put(request, response);
}
await caches.delete(TEMP);
// Save the manifest to make future upgrades efficient.
await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES)));
return;
} catch (err) {
// On an unhandled exception the state of the cache cannot be guaranteed.
console.error('Failed to upgrade service worker: ' + err);
await caches.delete(CACHE_NAME);
await caches.delete(TEMP);
await caches.delete(MANIFEST);
}
}());
});
// The fetch handler redirects requests for RESOURCE files to the service
// worker cache.
self.addEventListener("fetch", (event) => {
if (event.request.method !== 'GET') {
return;
}
var origin = self.location.origin;
var key = event.request.url.substring(origin.length + 1);
// Redirect URLs to the index.html
if (key.indexOf('?v=') != -1) {
key = key.split('?v=')[0];
}
if (event.request.url == origin || event.request.url.startsWith(origin + '/#') || key == '') {
key = '/';
}
// If the URL is not the RESOURCE list then return to signal that the
// browser should take over.
if (!RESOURCES[key]) {
return;
}
// If the URL is the index.html, perform an online-first request.
if (key == '/') {
return onlineFirst(event);
}
event.respondWith(caches.open(CACHE_NAME)
.then((cache) => {
return cache.match(event.request).then((response) => {
// Either respond with the cached resource, or perform a fetch and
// lazily populate the cache.
return response || fetch(event.request).then((response) => {
cache.put(event.request, response.clone());
return response;
});
})
})
);
});
self.addEventListener('message', (event) => {
// SkipWaiting can be used to immediately activate a waiting service worker.
// This will also require a page refresh triggered by the main worker.
if (event.data === 'skipWaiting') {
self.skipWaiting();
return;
}
if (event.data === 'downloadOffline') {
downloadOffline();
return;
}
});
// Download offline will check the RESOURCES for all files not in the cache
// and populate them.
async function downloadOffline() {
var resources = [];
var contentCache = await caches.open(CACHE_NAME);
var currentContent = {};
for (var request of await contentCache.keys()) {
var key = request.url.substring(origin.length + 1);
if (key == "") {
key = "/";
}
currentContent[key] = true;
}
for (var resourceKey of Object.keys(RESOURCES)) {
if (!currentContent[resourceKey]) {
resources.push(resourceKey);
}
}
return contentCache.addAll(resources);
}
// Attempt to download the resource online before falling back to
// the offline cache.
function onlineFirst(event) {
return event.respondWith(
fetch(event.request).then((response) => {
return caches.open(CACHE_NAME).then((cache) => {
cache.put(event.request, response.clone());
return response;
});
}).catch((error) => {
return caches.open(CACHE_NAME).then((cache) => {
return cache.match(event.request).then((response) => {
if (response != null) {
return response;
}
throw error;
});
});
})
);
}

BIN
icons/Icon-192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
icons/Icon-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

45
index.html Normal file
View File

@ -0,0 +1,45 @@
<!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.
Fore more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
-->
<base href="/" />
<meta charset="UTF-8" />
<meta content="IE=Edge" http-equiv="X-UA-Compatible" />
<meta name="description" content="A new Flutter project." />
<!-- 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="lemmur" />
<link rel="apple-touch-icon" href="icons/Icon-192.png" />
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png" />
<title>lemmur</title>
<link rel="manifest" href="manifest.json" />
</head>
<body>
<!-- This script installs service_worker.js to provide PWA functionality to
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('flutter-first-frame', function () {
navigator.serviceWorker.register('flutter_service_worker.js?v=4219580765')
})
}
</script>
<script src="main.dart.js" type="application/javascript"></script>
</body>
</html>

115710
main.dart.js Normal file

File diff suppressed because one or more lines are too long

23
manifest.json Normal file
View File

@ -0,0 +1,23 @@
{
"name": "lemmur",
"short_name": "lemmur",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A mobile client for Lemmy - a federated reddit alternative",
"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"
}
]
}

1
version.json Normal file
View File

@ -0,0 +1 @@
{"app_name":"lemmur","version":"0.6.0","build_number":"17"}