Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.1.2 #201

Merged
merged 17 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ parserOptions:
ecmaVersion: 12
sourceType: module
plugins:
- 'react'
- '@typescript-eslint'
rules: {}
32 changes: 6 additions & 26 deletions .github/workflows/tauri-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,12 @@ jobs:
- name: Install frontend dependencies
run: yarn install

- name: Build frontend (windows)
env:
REACT_APP_ALLOW_BETA: false
REACT_APP_HOST_DOMAIN: https://user-images.githubusercontent.com
REACT_APP_API_KEY: ${{ secrets.REACT_APP_API_KEY }}
REACT_APP_AUTH_DOMAIN: ${{ secrets.REACT_APP_AUTH_DOMAIN }}
REACT_APP_DB_URL: ${{ secrets.REACT_APP_DB_URL }}
REACT_APP_PROJECT_ID: ${{ secrets.REACT_APP_PROJECT_ID }}
REACT_APP_STORAGE_BUCKET: ${{ secrets.REACT_APP_STORAGE_BUCKET }}
REACT_APP_SENDER_ID: ${{ secrets.REACT_APP_SENDER_ID }}
REACT_APP_ID: ${{ secrets.REACT_APP_ID }}
REACT_APP_MEASUREMENT_ID: ${{ secrets.REACT_APP_MEASUREMENT_ID }}
if: matrix.platform == 'windows-latest'
run: yarn build:win

- name: Build frontend (macos, ubuntu)
- name: Building tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
REACT_APP_ALLOW_BETA: false
REACT_APP_HOST_DOMAIN: https://user-images.githubusercontent.com
REACT_APP_API_KEY: ${{ secrets.REACT_APP_API_KEY }}
Expand All @@ -67,18 +56,9 @@ jobs:
REACT_APP_SENDER_ID: ${{ secrets.REACT_APP_SENDER_ID }}
REACT_APP_ID: ${{ secrets.REACT_APP_ID }}
REACT_APP_MEASUREMENT_ID: ${{ secrets.REACT_APP_MEASUREMENT_ID }}
if: matrix.platform != 'windows-latest'
run: yarn build

- name: Building tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
tagName: v__VERSION__
releaseName: 'Loofi v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
prerelease: false
32 changes: 6 additions & 26 deletions .github/workflows/tauri-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,12 @@ jobs:
- name: Install frontend dependencies
run: yarn install

- name: Build frontend (windows)
env:
REACT_APP_ALLOW_BETA: false
REACT_APP_HOST_DOMAIN: https://user-images.githubusercontent.com
REACT_APP_API_KEY: ${{ secrets.REACT_APP_API_KEY }}
REACT_APP_AUTH_DOMAIN: ${{ secrets.REACT_APP_AUTH_DOMAIN }}
REACT_APP_DB_URL: ${{ secrets.REACT_APP_DB_URL }}
REACT_APP_PROJECT_ID: ${{ secrets.REACT_APP_PROJECT_ID }}
REACT_APP_STORAGE_BUCKET: ${{ secrets.REACT_APP_STORAGE_BUCKET }}
REACT_APP_SENDER_ID: ${{ secrets.REACT_APP_SENDER_ID }}
REACT_APP_ID: ${{ secrets.REACT_APP_ID }}
REACT_APP_MEASUREMENT_ID: ${{ secrets.REACT_APP_MEASUREMENT_ID }}
if: matrix.platform == 'windows-latest'
run: yarn build:win

- name: Build frontend (macos, ubuntu)
- name: Building tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
REACT_APP_ALLOW_BETA: false
REACT_APP_HOST_DOMAIN: https://user-images.githubusercontent.com
REACT_APP_API_KEY: ${{ secrets.REACT_APP_API_KEY }}
Expand All @@ -62,13 +51,4 @@ jobs:
REACT_APP_STORAGE_BUCKET: ${{ secrets.REACT_APP_STORAGE_BUCKET }}
REACT_APP_SENDER_ID: ${{ secrets.REACT_APP_SENDER_ID }}
REACT_APP_ID: ${{ secrets.REACT_APP_ID }}
REACT_APP_MEASUREMENT_ID: ${{ secrets.REACT_APP_MEASUREMENT_ID }}
if: matrix.platform != 'windows-latest'
run: yarn build

- name: Building tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
REACT_APP_MEASUREMENT_ID: ${{ secrets.REACT_APP_MEASUREMENT_ID }}
24 changes: 11 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "loofi",
"version": "1.1.1",
"version": "1.1.2",
"private": true,
"author": "Stanley Owen <stanleyowen06@gmail.com>",
"dependencies": {
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@mui/material": "^5.12.1",
"@types/node": "^18.16.0",
"@types/react": "^18.0.38",
"@types/react-dom": "^18.0.11",
"@mui/lab": "^5.0.0-alpha.128",
"@mui/material": "^5.12.2",
"@types/node": "^18.16.1",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.1",
"@types/react-router-dom": "^5.3.3",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"axios": "^1.3.6",
"electron-is-dev": "^2.0.0",
"firebase": "^9.20.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -26,10 +26,8 @@
"scripts": {
"tauri": "tauri",
"start": "react-scripts start",
"build": "node ./scripts/prebuild.js && GENERATE_SOURCEMAP=false CI='' REACT_APP_ENV='tauri' yarn react-scripts build && node ./scripts/postbuild.js",
"build:win": "node ./scripts/prebuild.js && yarn cross-env GENERATE_SOURCEMAP=false CI='' REACT_APP_ENV='tauri' react-scripts build && node ./scripts/postbuild.js",
"build:web": "GENERATE_SOURCEMAP=false CI='' yarn react-scripts build",
"build:web:win": "yarn cross-env GENERATE_SOURCEMAP=false CI='' react-scripts build",
"dev": "yarn tauri dev",
"build": "yarn cross-env GENERATE_SOURCEMAP=false CI='' react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"release": "yarn build && electron-builder --publish=always",
Expand Down Expand Up @@ -69,11 +67,11 @@
]
},
"devDependencies": {
"@tauri-apps/api": "^1.2.0",
"@tauri-apps/cli": "^1.2.3",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"concurrently": "^8.0.1",
"cross-env": "^7.0.3",
"dotenv": "^16.0.3",
"eslint": "^8.39.0",
Expand Down
8 changes: 4 additions & 4 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"package": {
"productName": "Loofi",
"version": "1.1.1"
"productName": "Loofi Desktop",
"version": "1.1.2"
},
"build": {
"distDir": "../build",
"devPath": "http://localhost:3000",
"beforeDevCommand": "cross-env BROWSER=none && yarn start",
"beforeBuildCommand": "",
"beforeBuildCommand": "node ./scripts/prebuild.js && yarn build && node ./scripts/postbuild.js",
"withGlobalTauri": true
},
"tauri": {
Expand Down Expand Up @@ -50,7 +50,7 @@
"endpoints": [
"https://updater-2-z5186372.deta.app/updater/{{target}}/{{arch}}/{{current_version}}"
],
"dialog": true,
"dialog": false,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEZBQTc1M0JBRDk2MzcwNjUKUldSbGNHUFp1bE9uK2o4U3Z4Y0pkais4OUtIZ2ZjTVVDZXpvMm9Vc2FuTysvdTJvSmRPV3daeTMK",
"windows": {
"installMode": "passive"
Expand Down
48 changes: 45 additions & 3 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ p {
padding-top: 30px;
box-sizing: border-box;
background: rgb(var(--white) / 40%);
-webkit-transition: width 0.4s ease-in-out;
-moz-transition: width 0.4s ease-in-out;
-o-transition: width 0.4s ease-in-out;
transition: width 0.4s ease-in-out;
}
#tabs {
height: 100%;
Expand Down Expand Up @@ -184,6 +188,10 @@ p {
height: 100vh;
margin-left: 225px;
flex-direction: column;
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
.base {
overflow: auto;
Expand Down Expand Up @@ -262,6 +270,9 @@ p {
}

/* Properties */
.pb-0 {
padding-bottom: 0 !important;
}
.no-capitalization {
text-transform: none !important;
}
Expand Down Expand Up @@ -542,7 +553,12 @@ button {
right: 10px;
z-index: 100;
}

.MuiTab-root {
min-height: 55px;
display: grid;
grid-template-columns: 20% 80%;
gap: 10px;
}
/* Download */
#download .large-card svg {
display: block;
Expand Down Expand Up @@ -601,6 +617,10 @@ button {
.search {
width: 60%;
}
.MuiTab-root {
grid-template-columns: auto;
gap: 10px;
}
}
@media only screen and (max-width: 800px) {
.col-3 {
Expand All @@ -622,8 +642,11 @@ button {
#settings .flex .w-50.m-10:nth-child(even) {
margin: 5px 10px !important;
}
.search {
width: 100%;
}
}
@media only screen and (max-width: 700px) {
@media only screen and (max-width: 600px) {
.search {
width: 100%;
}
Expand All @@ -638,6 +661,25 @@ button {
width: 100% !important;
}
.MuiAlert-root {
width: 100vh !important;
width: 100% !important;
}
#tabs {
.MuiButtonBase-root {
min-width: auto;
justify-content: left;
}
.w-30 {
width: 10% !important;
}
}
.sidebar-text {
display: none;
visibility: hidden;
}
.sidebar {
width: 60px;
}
.app {
margin-left: 60px;
}
}
41 changes: 40 additions & 1 deletion src/components/about.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ import {
Contributors,
PrivacyPolicy,
CopyToClipboard as CopyToClipboardIcon,
CheckUpdate,
} from '../lib/icons.component';
import { LoadingButton } from '@mui/lab';

const About = () => {
const About = ({ updateAppToLatestVersion }: any) => {
const [copiedToClipboard, setCopiedToClipboard] = useState<
boolean | string
>(false);
const [isFetching, setIsFetching] = useState<boolean>(false);
const [isUpToDate, setIsUpToDate] = useState<boolean>(false);

const CopyToClipboard = (e: React.MouseEvent<HTMLButtonElement>) => {
e.preventDefault();
Expand Down Expand Up @@ -77,6 +81,41 @@ const About = () => {
)}
</Button>
</Tooltip>
{window.__TAURI_METADATA__ ? (
<Tooltip
enterDelay={500}
enterNextDelay={500}
title={
isUpToDate === true
? 'Up to Date'
: 'Check for Updates'
}
>
<LoadingButton
color={
isUpToDate === true
? 'success'
: copiedToClipboard === 'error'
? 'error'
: 'primary'
}
variant="outlined"
className="align-right ml-10"
loading={isFetching}
onClick={() => {
setIsFetching(true);
updateAppToLatestVersion('button').then(
(res: boolean) => {
setIsUpToDate(res);
setIsFetching(false);
}
);
}}
>
<CheckUpdate />
</LoadingButton>
</Tooltip>
) : null}
</div>

<Accordion className="w-100 card mt-10">
Expand Down
Loading