Skip to content

bad PR #2

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

Closed
wants to merge 74 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
e90a7cb
添加manifest.json
TransparentLC Oct 15, 2024
83da95d
add log for auth fail
xiezibuyongbi Oct 24, 2024
70c90c2
Merge pull request #48 from xiezibuyongbi/master
TransparentLC Oct 25, 2024
f3cf384
Update http-router.js
TransparentLC Nov 2, 2024
8a6c72a
Update File.vue
TransparentLC Nov 2, 2024
c10f4e5
A *.go: add go implement
yurenchen000 Nov 3, 2024
893830b
A go.mod, go.sum: add go mod file
yurenchen000 Nov 3, 2024
68293d3
U go.mod, go.sum: fix go install
yurenchen000 Nov 3, 2024
6dfc528
U go.mod: improve go install /1
yurenchen000 Nov 3, 2024
58b4c54
U go.mod: improve go install /2
yurenchen000 Nov 3, 2024
7fb51d5
U go.mod: improve go install /3
yurenchen000 Nov 3, 2024
304f70b
U go.mod: improve go install /3-2
yurenchen000 Nov 3, 2024
6d8e47c
U go.mod: improve go install /0
yurenchen000 Nov 3, 2024
51f646e
U go.mod: improve go install /4
yurenchen000 Nov 3, 2024
a8cc0fe
M server-go: improve go install /5
yurenchen000 Nov 3, 2024
d448cfc
A .github/workflows/release.yml: add ci/cd for go build
yurenchen000 Nov 3, 2024
4342a0c
U .github/workflows/release.yml: fix build err: project_path
yurenchen000 Nov 3, 2024
7c60661
U .github/workflows/release.yml: improve build: strip binary
yurenchen000 Nov 3, 2024
af51c5d
U .github/workflows/release.yml: improve build: rename binary
yurenchen000 Nov 3, 2024
efdc22f
U .github/workflows/release.yml: update to [email protected]
yurenchen000 Nov 3, 2024
f978f58
U main.go: fix server_version
yurenchen000 Nov 3, 2024
105dc67
A README.md: add readme for server-go
yurenchen000 Nov 3, 2024
22a21a7
U README.md: add build note
yurenchen000 Nov 3, 2024
698929b
U README.md: improve install note
yurenchen000 Nov 3, 2024
3b16fe2
U ws.go: fix typo
yurenchen000 Nov 3, 2024
216b869
U msg.go,type.go,main.go: fix msg id concurrent-safe
yurenchen000 Nov 3, 2024
e30ecf2
U .github/workflows/release.yml: add ver grab from git tags
yurenchen000 Nov 4, 2024
d71c084
U main.go, config.go: show version at start
yurenchen000 Nov 4, 2024
0c931ba
U main.go: fix slice out of range
yurenchen000 Nov 4, 2024
ad793c3
U main.go: empty ver in .go
yurenchen000 Nov 4, 2024
d317fe3
U go.mod: mod tidy
yurenchen000 Nov 4, 2024
fbad46d
U config.go: improve: auto create config if not exist
yurenchen000 Nov 9, 2024
52944f6
U history.go: improve: use empty if history not exist
yurenchen000 Nov 9, 2024
3af3cda
U main.go: improve: mkdir if uploads not exist
yurenchen000 Nov 9, 2024
b975c56
U main.go, utils.go: improve remote_addr use forward ip,port
yurenchen000 Nov 9, 2024
7b9be54
U main.go: fix ws nil exception
yurenchen000 Nov 9, 2024
ce5311d
U go.mod: improve go ver declare
yurenchen000 Nov 9, 2024
9b4bef8
U release.yml: add frontend build
yurenchen000 Nov 9, 2024
d8c8abc
U main.go: add embed static res support
yurenchen000 Nov 9, 2024
4427a35
U main.go: add cli arg -static
yurenchen000 Nov 9, 2024
14345d6
U release.yml: fix build dpends static
yurenchen000 Nov 9, 2024
773e686
U release.yml: size improve: strip unnecessary files in static
yurenchen000 Nov 9, 2024
d6be8cd
U main.go: add -extract arg for builtin static
yurenchen000 Nov 9, 2024
ebddf49
U src/App.vue: fix navigation-drawer-border hover issue
yurenchen000 Nov 9, 2024
c2a2521
Update README.md: improve usage
yurenchen000 Nov 9, 2024
a62c412
Update README.md: note about res
yurenchen000 Nov 9, 2024
8097e80
Merge pull request #53 from yurenchen000/fix_border_hover
TransparentLC Nov 10, 2024
9554bdb
修复同时上传文件可能出现重复id
TransparentLC Nov 10, 2024
825c82d
使用webp缩略图
TransparentLC Nov 10, 2024
83cc624
U main.go, A static_*.go: fix no-embed build: split static and suppor…
yurenchen000 Nov 10, 2024
bd0f822
A Makefile: add server-go makefile
yurenchen000 Nov 10, 2024
1083dc5
修改移动端部分交互
TransparentLC Nov 15, 2024
dea86c9
Update Home.vue
TransparentLC Nov 16, 2024
f81e985
U SendText,SendFile.vue: compact layout
yurenchen000 Nov 23, 2024
302762d
U Home.vue: compact layout: bottom dialog
yurenchen000 Nov 23, 2024
fc16716
U index.html: fix viewport resizes-content
yurenchen000 Nov 23, 2024
0c23aac
U Home.vue: compact layout: add switch btn
yurenchen000 Nov 23, 2024
b8e2edc
U Home.vue: compact layout: float single btn
yurenchen000 Nov 23, 2024
ff4f782
U Home.vue: improve auto focus
yurenchen000 Nov 23, 2024
005663d
U Home.vue: code fmt
yurenchen000 Nov 23, 2024
555aa21
U Home.vue: add dialog fullscreen btn
yurenchen000 Nov 23, 2024
603de13
U Home.vue: improve fullscreen icon
yurenchen000 Nov 24, 2024
8bfe08d
U App.vue: change toast position
yurenchen000 Nov 24, 2024
a120389
U static_embed.go: add zstd compress
yurenchen000 Dec 1, 2024
58dbca9
U static_embed.go: add gzip compress
yurenchen000 Dec 1, 2024
c4865ae
U static_embed.go: add br compress
yurenchen000 Dec 1, 2024
6bfda53
U static_*.go, A compress: add compress
yurenchen000 Dec 1, 2024
edc05a1
U go.mod,go.sum: update depends
yurenchen000 Dec 1, 2024
44cad0e
U utils.go: add webp support
yurenchen000 Dec 1, 2024
d4ade9b
U SendText.vue: responsive text rows
yurenchen000 Dec 1, 2024
4aecbaf
U Home.vue: improve dialog show overlay
yurenchen000 Dec 1, 2024
6b04719
U release.yml: build with -tags
yurenchen000 Dec 8, 2024
97c36f7
U Makefile: add .embed target
yurenchen000 Dec 8, 2024
805f509
Merge pull request #1 from yurenchen000/input_dialog
yurenchen000 Dec 8, 2024
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
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build and Release
# .github/workflows/release.yaml

on:
release:
types: [created]

jobs:
releases-matrix:
name: ReleaseGo
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/amd64, linux/arm64, windows/amd64, darwin/amd64, darwin/arm64
goos: [linux, darwin]
goarch: [amd64, arm64, arm]
exclude:
- goarch: arm
goos: darwin

steps:
## 1. checkout
- uses: actions/checkout@v3

## 2. build frontend
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: latest
architecture: x64
check-latest: true
cache: npm
cache-dependency-path: "**/package.json"
- name: Build Frontend
run: |
cd client
npm install
NODE_OPTIONS=--openssl-legacy-provider npm run build
cp -pvr ../server-node/static ../server-go/cloud-clip/
find ../server-go/cloud-clip/static/ -iname '*.br' -delete
find ../server-go/cloud-clip/static/ -iname '*.gz' -delete

## 3. build go binary
- name: Build server-go
# - uses: wangyoucao577/[email protected]
uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# goos: linux
# goarch: amd64
build_flags: -tags embed
ldflags: -s -w -X main.server_version=${{github.event.release.tag_name}}
goversion: 1.22
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: ./server-go/cloud-clip
binary_name: cloud-clip
# build_command: |
# make DEST=${BUILD_ARTIFACTS_FOLDER}

# env GO111MODULE=off go build -o hello
# env GO111MODULE=off go build -o world
# can't use multi cmd
# no strip cmd: use -ldflags -s -w
md5sum: FALSE

4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"axios": "^1.7.7",
"core-js": "^3.38.1",
"core-js": "^3.39.0",
"vue": "^2.7.16",
"vue-axios": "^2.1.5",
"vue-linkify": "^1.0.1",
Expand All @@ -24,7 +24,7 @@
"cross-env": "^7.0.3",
"fs-extra": "^11.2.0",
"glob": "^11.0.0",
"sass": "~1.79.5",
"sass": "^1.81.0",
"sass-loader": "^10.5.2",
"typeface-roboto": "^1.1.13",
"vue-cli-plugin-vuetify": "^2.5.8",
Expand Down
5 changes: 5 additions & 0 deletions client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width,initial-scale=1,interactive-widget=resizes-content">
<!--
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
-->
<meta name="author" content="TransparentLC">
<link rel="icon" type="image/svg+xml" href="<%= BASE_URL %>favicon.svg">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="manifest" href="<%= BASE_URL %>manifest.json">
<title>云剪贴板</title>
</head>
<body>
Expand Down
19 changes: 19 additions & 0 deletions client/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "云剪贴板",
"description": "在局域网内互传纯文本和文件的云剪贴板,即开即用的网页版,无须安装 APP",
"short_name": "云剪贴板",
"start_url": "./",
"scope": ".",
"display": "standalone",
"icons": [
{
"sizes": "any",
"type": "image/svg+xml",
"src": "favicon.svg"
},
{
"sizes": "32x32",
"src": "favicon.ico"
}
]
}
15 changes: 15 additions & 0 deletions client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,21 @@
</v-app>
</template>

<!-- will filter by data-v-xxx -->
<style scoped>
.v-navigation-drawer >>> .v-navigation-drawer__border {
pointer-events: none;
}
</style>

<!-- not filter by data-v-xxx -->
<style>
/* global style */
.v-snack.v-snack--bottom {
bottom: 30%;
}
</style>

<script>
import {
mdiContentPaste,
Expand Down
7 changes: 6 additions & 1 deletion client/src/components/SendFile.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template>
<div>
<!--
<div class="headline text--primary mb-4">发送文件</div>
-->
<v-card
outlined
class="pa-3 mb-6 d-flex flex-row align-center"
Expand Down Expand Up @@ -48,7 +50,7 @@
color="primary"
large
class="d-block mx-auto"
@click="$refs.selectFile.click()"
@click="focus"
>
<div title="支持拖拽和 Ctrl+V 粘贴截图">
选择要发送的文件<span class="d-none d-xl-inline">(支持拖拽和 Ctrl+V 粘贴截图)</span>
Expand Down Expand Up @@ -110,6 +112,9 @@ export default {
},
},
methods: {
focus() {
this.$refs.selectFile.click();
},
/**
* @param {File[]} files
*/
Expand Down
15 changes: 13 additions & 2 deletions client/src/components/SendText.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
<template>
<div>
<!--
<div class="headline text--primary mb-4">发送文本</div>
<v-textarea
-->
<!--
no-resize
rows="6"
rows="3"
-->
<v-textarea
ref="textarea"
auto-grow
outlined
dense
rows="6"
:rows="$vuetify.breakpoint.xs ? 3 : 6"
:counter="$root.config.text.limit"
placeholder="请输入需要发送的文本"
v-model="$root.send.text"
Expand All @@ -25,6 +33,9 @@
export default {
name: 'send-text',
methods: {
focus() {
this.$refs.textarea.focus();
},
send() {
this.$http.post(
'text',
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/received-item/File.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
v-on="on"
icon
color="grey"
:href="expired ? null : `/file/${meta.cache}`"
:href="expired ? null : `file/${meta.cache}`"
:download="expired ? null : meta.name"
>
<v-icon>{{expired ? mdiDownloadOff : mdiDownload}}</v-icon>
Expand Down
Loading