Skip to content

Commit aeeb12f

Browse files
2 parents 415d9d5 + 5574809 commit aeeb12f

File tree

3 files changed

+68
-90
lines changed

3 files changed

+68
-90
lines changed

.github/workflows/main.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,39 @@ jobs:
3333
tag_name: ${{ github.run_number }}
3434
release_name: Release ${{ github.run_number }}
3535
draft: false
36-
prerelease: true
36+
prerelease: false
37+
38+
- name: Build Mac Package
39+
run: |
40+
quasar build -m electron -T mas -A arm64
41+
cd dist/electron/Packaged
42+
# app_path="/home/runner/work/flypen-frontend/flypen-frontend/dist/electron/Packaged/Flypen-mas-arm64/Flypen.app/"
43+
# app_name="$(basename "$app_path" | sed -r "s/\.app$//g")"
44+
# dmg_size="$(du -ms "$app_path" | grep -oP "^\d+")"
45+
# dmg_path=$(sed -r "s/\.app\/?$/.dmg/g" <<< "$app_path")
46+
# set -x
47+
# dd if=/dev/zero "of=$dmg_path" bs=1M "count=$dmg_size"
48+
# label=$(sed -r "s/\s/_/g" <<< "$app_name")
49+
# label=$(sed -r "s/^(.{,27}).*$/\1/g" <<< "$label")
50+
# sudo apt install hfsutils hfsprogs
51+
# sudo hformat -l "$label" "$dmg_path"
52+
# mount_point="$(sudo mktemp -d)"
53+
# sudo mount -t hfs -o loop "$dmg_path" "$mount_point"
54+
# cp -R "$app_path" "$mount_point"
55+
# ls -l "$mount_point"
56+
# umount "$mount_point"
57+
zip -r flypen-mac-apple-chip.zip Flypen-mas-arm64
58+
cd -
59+
60+
- name: Upload Mac
61+
uses: actions/upload-release-asset@v1
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.AAA }}
64+
with:
65+
upload_url: ${{ steps.create_release.outputs.upload_url }}
66+
asset_path: dist/electron/Packaged/flypen-mac-apple-chip.zip
67+
asset_name: flypen-mac-apple-chip.zip
68+
asset_content_type: application/zip
3769

3870
- name: Build Linux Package
3971
run: |
@@ -69,7 +101,7 @@ jobs:
69101
upload_url: ${{ steps.create_release.outputs.upload_url }}
70102
asset_path: ./dist/electron/Packaged/Windows-x86_64.zip
71103
asset_name: flypen-windows-x86_64.zip
72-
asset_content_type: application/application/zip
104+
asset_content_type: application/zip
73105

74106
- name: Set up jdk
75107
run: |

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
## C++ Course Design
1414

1515

16-
This is a cross-platform multi-end application built with Vue 3 and Quasar framework. It supports web, Android, iOS, Windows, Linux and macOS.
16+
This is a cross-platform multi-end application built with Vue3 and Quasar framework. It supports Web, Android, Windows, Linux and MacOS.
17+
18+
Backend Project for Flypen is [Here](https://github.com/stepbystepcode/flypen)
1719

1820
## Features
19-
- Cross-platform support for Web and Android (iOS and other platforms coming soon)
21+
- Cross-platform support (iOS platforms coming soon)
2022
- Real-time chat and messaging
2123
- Friend management
2224
- Team collaboration
@@ -34,7 +36,7 @@ This is a cross-platform multi-end application built with Vue 3 and Quasar frame
3436

3537
## Develop from source
3638
*node version v18.18.0*
37-
```shell
39+
```bash
3840
git clone https://github.com/stepbystepcode/flypen-frontend.git
3941
cd flypen-frontend
4042
npm i
@@ -44,7 +46,7 @@ quasar dev
4446

4547
## Build apk file from source
4648
*node version v18.18.0*
47-
```shell
49+
```bash
4850
git clone https://github.com/stepbystepcode/flypen-frontend.git
4951
cd flypen-frontend
5052
npm i
@@ -64,8 +66,8 @@ java -jar uber-apk-signer-1.3.0.jar -a ./dist/capacitor/android/apk/release/app-
6466
you will find apk file in ```./signed/app-release-aligned-debugSigned.apk```
6567

6668
## Get Started
67-
### Download the app
68-
[Download Flypen App](https://github.com/stepbystepcode/flypen-frontend/releases/download/latests/app.apk)
69+
### Download
70+
[Download Flypen](https://github.com/stepbystepcode/flypen-frontend/releases)
6971

7072
The GitHub release apk is automatically deployed via GitHub Actions on push to main branch.
7173

src/pages/EditorPage.vue

Lines changed: 26 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,14 @@
1313
<q-tree v-if="final" ref="treeObj" :nodes="final" node-key="key"
1414
selected-color="primary" v-model:selected="key" @update:selected="select(key)" default-expand-all/>
1515
</div>
16-
<div class="container">
17-
<div class="content">
18-
<div class="box">
19-
<span>file name</span>
20-
<input type="text" class="input" v-model="selectFile">
21-
</div>
22-
<div class="box">
23-
<Editor style="z-index: 50" v-model="content" @imgAdd="imgAdd"/>
24-
<div class="q-mt-md row justify-end">
25-
<q-btn class="bg-primary text-white" style="width: 5rem;" @click="save()">Save</q-btn>
26-
</div>
27-
</div>
16+
<div style="width: 100vw;display: flex">
17+
<div class="q-ma-sm">file name</div>
18+
<input type="text" class="input" v-model="selectFile">
19+
</div>
20+
<div style="width: 100vw">
21+
<Editor style="z-index: 50" v-model="content" @imgAdd="imgAdd"/>
22+
<div class="q-mt-md row justify-end">
23+
<q-btn class="bg-primary text-white" style="width: 5rem;" @click="save()">Save</q-btn>
2824
</div>
2925
</div>
3026
</div>
@@ -37,6 +33,7 @@ import {ref, onMounted} from 'vue';
3733
import axios from 'axios';
3834
import Swal from 'sweetalert2'
3935
import {useQuasar} from 'quasar';
36+
4037
const $q = useQuasar();
4138
const copyed = ref(false);
4239
const moved = ref(false);
@@ -49,7 +46,7 @@ const key = ref('');
4946
const treeObj = ref(null);
5047
const selectNode = ref(null);
5148
const selectFolder = ref('');
52-
const touch=()=>{
49+
const touch = () => {
5350
if (selectFolder.value === null) Swal.fire('Please select folder', '', 'warning')
5451
else {
5552
Swal.fire({
@@ -62,7 +59,7 @@ const touch=()=>{
6259
confirmButtonText: 'Create',
6360
showLoaderOnConfirm: true,
6461
preConfirm: (login) => {
65-
commandReq(5, selectFolder.value+login,'').then(res => {
62+
commandReq(5, selectFolder.value + login, '').then(res => {
6663
if (res.data.code === 200) Swal.fire('Success', '', 'success').then(() => {
6764
commandReq(0, '', '').then(res => {
6865
tree(JSON.parse(res.data.message));
@@ -72,7 +69,7 @@ const touch=()=>{
7269
})
7370
}
7471
})
75-
}
72+
}
7673
7774
}
7875
const addFolder = () => {
@@ -88,7 +85,7 @@ const addFolder = () => {
8885
confirmButtonText: 'Create',
8986
showLoaderOnConfirm: true,
9087
preConfirm: (login) => {
91-
commandReq(4, selectFolder.value+login,'').then(res => {
88+
commandReq(4, selectFolder.value + login, '').then(res => {
9289
if (res.data.code === 200) Swal.fire('Success', '', 'success').then(() => {
9390
9491
commandReq(0, '', '').then(res => {
@@ -103,7 +100,7 @@ const addFolder = () => {
103100
}
104101
105102
const deleteFile = () => {
106-
if (selectFile.value === ''&&selectFolder.value==='') Swal.fire('Please select file or folder', '', 'warning')
103+
if (selectFile.value === '' && selectFolder.value === '') Swal.fire('Please select file or folder', '', 'warning')
107104
else {
108105
Swal.fire({
109106
title: 'Confirm delete?',
@@ -116,7 +113,7 @@ const deleteFile = () => {
116113
}).then((result) => {
117114
if (result.isDismissed) return;
118115
commandReq(3, selectNode.value.path, '')
119-
Swal.fire('Success', '', 'success').then(()=>{
116+
Swal.fire('Success', '', 'success').then(() => {
120117
121118
commandReq(0, '', '').then(res => {
122119
tree(JSON.parse(res.data.message));
@@ -142,7 +139,7 @@ const save = () => {
142139
if (result.isDismissed) return;
143140
const json = JSON.stringify({
144141
content: content.value,
145-
filename: selectFolder.value+'/'+selectFile.value,
142+
filename: selectFolder.value + '/' + selectFile.value,
146143
//time: new Date().getTime()
147144
});
148145
axios.post('http://8.130.48.157:8081/api/file/save', json, {
@@ -159,11 +156,11 @@ const save = () => {
159156
const select = (key) => {
160157
selectNode.value = treeObj.value.getNodeByKey(key);
161158
if (selectNode.value.icon === 'folder') {
162-
selectFolder.value = selectNode.value.path+'/';
159+
selectFolder.value = selectNode.value.path + '/';
163160
content.value = '';
164161
} else {
165162
selectFile.value = selectNode.value.label;
166-
selectFolder.value = selectFolder.value === selectFile.value ? selectNode.value.path+'/' :selectNode.value.path.slice(0, selectNode.value.path.length - selectFile.value.length - 1) ;
163+
selectFolder.value = selectFolder.value === selectFile.value ? selectNode.value.path + '/' : selectNode.value.path.slice(0, selectNode.value.path.length - selectFile.value.length - 1);
167164
commandReq(6, selectNode.value.path, '').then(res => {
168165
content.value = res.data.message.toString();
169166
})
@@ -176,7 +173,7 @@ onMounted(() => {
176173
})
177174
const tree = (res) => {
178175
raw.value = res;
179-
transform(raw.value[0], '0','.');
176+
transform(raw.value[0], '0', '.');
180177
raw.value.pop();
181178
final.value = raw.value;
182179
}
@@ -189,10 +186,11 @@ const transform = (item, key, path) => {
189186
item.key = key;
190187
item.children = item.contents;
191188
delete item.contents;
192-
if (item.children){
193-
item.children.forEach((child, index) => {
194-
transform(child, key + '-' + index, path + '/' + child.name);
195-
})}
189+
if (item.children) {
190+
item.children.forEach((child, index) => {
191+
transform(child, key + '-' + index, path + '/' + child.name);
192+
})
193+
}
196194
} else {
197195
item.icon = 'insert_drive_file'
198196
item.key = key
@@ -247,10 +245,10 @@ const transform = (item, key, path) => {
247245
const cpmv = (n) => {
248246
if (n === 1) {
249247
copyed.value = true;
250-
copyfile.value = selectFolder.value+'/'+selectFile.value;
248+
copyfile.value = selectFolder.value + '/' + selectFile.value;
251249
} else {
252250
moved.value = true;
253-
movefile.value = selectFolder.value+'/'+selectFile.value;
251+
movefile.value = selectFolder.value + '/' + selectFile.value;
254252
}
255253
}
256254
const paste = (n) => {
@@ -287,7 +285,6 @@ const paste = (n) => {
287285
// }
288286
289287
290-
291288
let content = ref('');
292289
const imgAdd = (pos, file) => {
293290
console.log(file);
@@ -307,57 +304,4 @@ const imgAdd = (pos, file) => {
307304
</script>
308305

309306
<style lang="scss" scoped>
310-
.container{
311-
flex:1;
312-
}
313-
.content {
314-
padding: 24px;
315-
.box {
316-
padding: 24px;
317-
border: 1px solid #e3e6e8;
318-
border-radius: 3px;
319-
display: flex;
320-
flex-direction: column;
321-
margin-top: 12px;
322-
323-
span {
324-
padding-bottom: 1em;
325-
}
326-
327-
.input {
328-
flex: 1;
329-
outline: rgb(107, 137, 147);
330-
border: 1px solid #babfc4;
331-
border-radius: 3px;
332-
display: flex;
333-
334-
&:focus {
335-
border: 1px solid #6bbbf7;
336-
box-shadow: 0 0 0 4px hsla(206, 100%, 40%, .15);
337-
}
338-
339-
input {
340-
border: none;
341-
outline: none;
342-
flex: 1;
343-
padding: .6em .7em;
344-
}
345-
}
346-
347-
input {
348-
padding: .6em .7em;
349-
}
350-
}
351-
352-
}
353-
354-
.pill {
355-
display: inline-block;
356-
margin: 2px;
357-
background: #e1ecf4;
358-
padding: 8px;
359-
color: #39739d;
360-
border-radius: 3px;
361-
font-size: 12px;
362-
}
363307
</style>

0 commit comments

Comments
 (0)