Skip to content

Commit

Permalink
Merge branch 'main' into update/capacitor-6
Browse files Browse the repository at this point in the history
  • Loading branch information
robingenz authored Aug 30, 2024
2 parents e5c27c0 + 4238a82 commit 2e559a0
Show file tree
Hide file tree
Showing 27 changed files with 361 additions and 3,750 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build
dist
example
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# See https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Bug report
about: Create a report to help us improve
title: "bug: "
labels: ["bug/fix", "needs: triage"]
---

**Plugin version:**
<!-- List the plugin version that this bug affects. -->



**Platform(s):**
<!-- List the platforms that this bug affects. -->



**Current behavior:**
<!-- Describe how the bug manifests. -->



**Expected behavior:**
<!-- Describe what the behavior would be without the bug. -->



**Steps to reproduce:**
<!-- Please explain the steps required to reproduce the issue. -->



**Related code:**
<!-- Code which helps to reproduce or better understand the issue. -->

```
insert short code snippets here
```

**Other information:**
<!-- List any other information that is relevant to your issue. Device information, stack traces, screenshots, related issues, etc. -->



**Capacitor doctor:**
<!-- Run `npx cap doctor` in a terminal and paste the output below. -->

```
insert the output from `npx cap doctor` here
```
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Feature request
about: Suggest an idea for this project
title: "feat: "
labels: ["feature", "needs: triage"]
---

**Is your feature request related to a problem? Please describe:**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->



**Describe the solution you'd like:**
<!-- A clear and concise description of what you want to happen. -->



**Describe alternatives you've considered:**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->



**Additional context:**
<!-- Add any other context or screenshots about the feature request here. -->


5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Pull request checklist

Please check if your PR fulfills the following requirements:

- [ ] The changes have been tested successfully.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

env:
NODE_VERSION: 18
JAVA_VERSION: 17

jobs:
build:
name: Build
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set up Java ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ env.JAVA_VERSION }}
- name: Install dependencies
run: npm ci
- name: Build iOS
run: npm run verify:ios
- name: Build Android
run: npm run verify:android
- name: Build Web
run: npm run verify:web
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
lint:
name: Lint
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm ci
- name: Run Lint script
run: npm run lint
21 changes: 21 additions & 0 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lock old issues and pull requests that are closed

on:
schedule:
- cron: '0 20 * * *'
workflow_dispatch:

permissions:
issues: write
pull-requests: write

concurrency:
group: lock

jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v3
with:
issue-inactive-days: '56'
16 changes: 16 additions & 0 deletions .github/workflows/needs-reply-remove.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Remove needs-reply label

on:
issue_comment:
types:
- created

jobs:
needs-reply:
runs-on: ubuntu-latest
steps:
- name: Remove needs-reply label
run: |
curl --request DELETE \
--url 'https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels/needs%3A%20reply' \
--header 'Authorization: token ${{ secrets.GITHUB_TOKEN }}'
16 changes: 16 additions & 0 deletions .github/workflows/needs-reply.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Close old issues that need reply

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
needs-reply:
runs-on: ubuntu-latest
steps:
- name: Close old issues that need reply
uses: dwieeb/needs-reply@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-label: 'needs: reply'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ captures

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# VSCode
.vscode/settings.json
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build
dist
example
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"files.insertFinalNewline": true
}
39 changes: 7 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,6 @@
<h3 align="center">PHOTO VIEWER</h3>
<p align="center"><strong><code>@capacitor-community/photoviewer</code></strong></p>
<br>
<p align="center" style="font-size:50px;color:red"><strong>Capacitor 5</strong></p>
<br>
<!-- Note from the Owner - Start -->
<p align="center" style="font-size:50px;color:red"><strong>Note from the Owner</strong></p>
<!-- Note from the Owner - End -->
<br>
<!-- Message below Note from the Owner - Start -->
<p align="left" style="font-size:47px">Start --></p>
<br>
<p align="left">
I have been dedicated to developing and maintaining this plugin for many years since the inception of Ionic Capacitor. Now, at 73+ years old, and with my MacBook Pro becoming obsolete for running Capacitor 6 for iOS, I have made the decision to cease maintenance of the plugin. If anyone wishes to take ownership of this plugin, they are welcome to do so.
</p>
<br>
<p align="left">
It has been a great honor to be part of this development journey alongside the developer community. I am grateful to see many of you following me on this path and incorporating the plugin into your applications. Your comments and suggestions have motivated me to continuously improve it.
</p>
<br>
<p align="left">
I have made this decision due to several family-related troubles that require my full attention and time. Therefore, I will not be stepping back. Thank you to all of you for your support.
</p>
<br>
<p align="left" style="font-size:47px">End <--</p>
<!-- Message below Note from the Owner - End -->
<br>
<br>
<p align="left">
Capacitor community plugin for Web and Native Photo Viewer allowing to open fullscreen </p>
<p align="left">
Expand Down Expand Up @@ -58,7 +33,7 @@ On iOS plugin, the creation of a movie from the pictures stored in the <strong>A

<br>
<p align="center">
<img src="https://img.shields.io/maintenance/yes/2023?style=flat-square" />
<img src="https://img.shields.io/maintenance/yes/2024?style=flat-square" />
<a href="https://www.npmjs.com/package/@capacitor-community/photoviewer"><img src="https://img.shields.io/npm/l/@capacitor-community/photoviewer?style=flat-square" /></a>
<br>
<a href="https://www.npmjs.com/package/@capacitor-community/photoviewer"><img src="https://img.shields.io/npm/dw/@capacitor-community/photoviewer?style=flat-square" /></a>
Expand Down Expand Up @@ -200,12 +175,12 @@ npm run serve // Web

## Supported methods

| Name | Android | iOS | Electron | Web |
| :-------------------------- | :------ | :-- | :------- | :-- |
| echo | | | | |
| show | | | | |
| saveImageFromHttpToInternal | | | | |
| getInternalImagePaths | | | | |
| Name | Android | iOS | Electron | Web |
| :-------------------------- | :------ | :--- | :------- | :--- |
| echo | | | | |
| show | | | | |
| saveImageFromHttpToInternal | | | | |
| getInternalImagePaths | | | | |


## Documentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ private void createMainFragment(ArrayList<Image> imageList, JSObject options) th
FrameLayout frameLayoutView = new FrameLayout(context);
frameLayoutView.setId(frameLayoutViewId);
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.MATCH_PARENT
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.MATCH_PARENT
);
// Apply the Layout Parameters to frameLayout
frameLayoutView.setLayoutParams(lp);
Expand All @@ -67,11 +67,11 @@ private void createMainFragment(ArrayList<Image> imageList, JSObject options) th
mainFragment.setOptions(options);

bridge
.getActivity()
.getSupportFragmentManager()
.beginTransaction()
.replace(frameLayoutViewId, mainFragment, "mainfragment")
.commit();
.getActivity()
.getSupportFragmentManager()
.beginTransaction()
.replace(frameLayoutViewId, mainFragment, "mainfragment")
.commit();
} catch (Exception e) {
throw new Exception(e.getMessage());
}
Expand All @@ -83,8 +83,8 @@ private void createImageFragment(ArrayList<Image> imageList, Integer startFrom,
FrameLayout frameLayoutView = new FrameLayout(context);
frameLayoutView.setId(frameLayoutViewId);
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.MATCH_PARENT
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.MATCH_PARENT
);
// Apply the Layout Parameters to frameLayout
frameLayoutView.setLayoutParams(lp);
Expand All @@ -96,11 +96,11 @@ private void createImageFragment(ArrayList<Image> imageList, Integer startFrom,
imageFragment.setStartFrom(startFrom);

bridge
.getActivity()
.getSupportFragmentManager()
.beginTransaction()
.replace(frameLayoutViewId, imageFragment, "imagefragment")
.commit();
.getActivity()
.getSupportFragmentManager()
.beginTransaction()
.replace(frameLayoutViewId, imageFragment, "imagefragment")
.commit();
} catch (Exception e) {
throw new Exception(e.getMessage());
}
Expand All @@ -112,8 +112,8 @@ private void createSliderFragment(ArrayList<Image> imageList, Integer startFrom,
FrameLayout frameLayoutView = new FrameLayout(context);
frameLayoutView.setId(frameLayoutViewId);
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.MATCH_PARENT
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.MATCH_PARENT
);
// Apply the Layout Parameters to frameLayout
frameLayoutView.setLayoutParams(lp);
Expand All @@ -127,11 +127,11 @@ private void createSliderFragment(ArrayList<Image> imageList, Integer startFrom,
galleryFragment.setStartFrom(startFrom);

bridge
.getActivity()
.getSupportFragmentManager()
.beginTransaction()
.replace(frameLayoutViewId, galleryFragment, "gallery")
.commit();
.getActivity()
.getSupportFragmentManager()
.beginTransaction()
.replace(frameLayoutViewId, galleryFragment, "gallery")
.commit();
} catch (Exception e) {
throw new Exception(e.getMessage());
}
Expand Down
Loading

0 comments on commit 2e559a0

Please sign in to comment.