Skip to content

Commit

Permalink
release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jwenjian committed Jun 28, 2020
1 parent e8266e1 commit e4e70d3
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 20 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LuckyYou is a simple app build on [tauri](https://github.com/tauri-apps/tauri) f

## Screenshots

![截屏2020-06-27 下午5.20.17.png](https://i.loli.net/2020/06/27/gyBWUFu1kCqQwEV.png)
![截屏2020-06-28 下午12.44.23.png](https://i.loli.net/2020/06/28/yfMEjJzgWKcn79L.png)

## Install

Expand Down Expand Up @@ -53,6 +53,20 @@ We support 2 languages for now, you can click this button to switch to your lang

3. Your image file name better be short(like less than 10 words), otherwise it may be wrapped and replaced with `...`

## Donation

Thanks for your donation, your donation will encourege me to add more feature and fix bugs if has any

### Wechat Pay

![](public/wechat.png)

### Paypal

[[email protected]](https://paypal.me/jwenjian/1)

## License

CC0-1.0, Non-comercial
CC0-1.0, Non-comercial

> Forked repo plese do not remove or change the donation info, be gentleman.
20 changes: 18 additions & 2 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LuckyYou 是一个基于 [tauri](https://github.com/tauri-apps/tauri) 框架开

## 截图

![截屏2020-06-27 下午5.20.25.png](https://i.loli.net/2020/06/27/PYe9TEScaAwu61m.png)
![截屏2020-06-28 下午12.44.33.png](https://i.loli.net/2020/06/28/ueOEUQGq1HgbnmL.png)

## 安装

Expand Down Expand Up @@ -50,6 +50,22 @@ LuckyYou 是一个基于 [tauri](https://github.com/tauri-apps/tauri) 框架开

3. 你的图片文件名不宜过长,否则可能会展示不全,以 10 字以内为宜


## 捐赠

感谢你的捐赠,你的捐赠会鼓励我添加更多新功能以及修复可能有的 bug

### 微信支付

![](public/wechat.png)

### 贝宝支付

[[email protected]](https://paypal.me/jwenjian/1)


## 开源协议

CC0-1.0, 署名,非商业。
CC0-1.0, 署名,非商业。

> Forked 的项目请不要删除或修改捐赠信息,尊重劳动成果,感谢。
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "lucky-you",
"version": "0.3.0",
"version": "1.0.0",
"private": true,
"description": "A cross platform app to choose lucky you based on tauri, test windows xsi file dfhaslfdlsaf",
"description": "A cross platform app to choose lucky you based on tauri",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
Expand Down
Binary file added public/wechat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "LuckyYou"
version = "0.3.0"
version = "1.0.0"
description = "A cross platform app to choose lucky you based on tauri"
authors = [ "jwenjian" ]
license = ""
repository = ""
license = "CC0-1.0"
repository = "https://github.com/jwenjian/lucky-you"
default-run = "LuckyYou"
edition = "2018"
build = "src/build.rs"
Expand Down
25 changes: 20 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<span class="toolbar-btn-status">{{ soundBtnStatus }}</span>
</div>
<div class="toolbar-btn-wrapper">
<el-dropdown trigger="click" class="toolbar-btn" @command="onLangChange">
<el-dropdown trigger="click" @command="onLangChange">
<el-button :disabled="rolling" class="toolbar-btn" circle>
<i class="fas fa-globe"></i>
</el-button>
Expand All @@ -20,6 +20,12 @@
</el-dropdown-menu>
</el-dropdown>
</div>
<div class="toolbar-btn-wrapper">
<el-button class="toolbar-btn" circle @click="showDonateDialog">
<i class="fas fa-donate"></i>
</el-button>
<span class="toolbar-btn-status">{{ $t("luckyYou.button.donate") }}</span>
</div>
</el-col>
</el-row>
<el-row justify="space-between" class="img-row">
Expand Down Expand Up @@ -66,16 +72,21 @@
</span>
</el-col>
</el-row>
<donate-dialog ref="donateDialog"></donate-dialog>
</div>
</template>

<script>
import { readBinaryFile, readDir } from "tauri/api/fs";
import { open } from "tauri/api/dialog";
import { Howl } from "howler";
import DonateDialog from "./components/DonateDialog";
export default {
name: "App",
components: {
"donate-dialog": DonateDialog
},
data() {
return {
selectedImageFileName: this.$t("luckyYou.text.defaultTips"),
Expand All @@ -97,7 +108,7 @@ export default {
success: null
},
isPlaySound: true,
selectedLang: "En"
donateDialogVisible: false
};
},
computed: {
Expand All @@ -111,6 +122,9 @@ export default {
}
},
methods: {
showDonateDialog() {
this.$refs["donateDialog"] && this.$refs["donateDialog"].showDialog();
},
shortenImageName(fullImageName) {
let orig = fullImageName;
if ("Windows" === this.getOS()) {
Expand Down Expand Up @@ -368,7 +382,7 @@ html body {
height: 100%;
background-color: white;
background-size: cover;
background-image: url('/bg.png');
background-image: url("/bg.png");
}
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
Expand Down Expand Up @@ -419,15 +433,16 @@ html body {
.toolbar-btn-status {
display: block;
font-size: x-small;
color: var(--primary);
font-weight: bold;
color: #606266;
}
.toolbar-section {
display: flex;
justify-content: flex-end;
padding-right: 1em;
}
.toolbar-btn-wrapper {
margin-left: 0;
margin-left: 0.5em;
align-content: flex-end;
}
</style>
69 changes: 69 additions & 0 deletions src/components/DonateDialog.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<template>
<!-- Forked project please do not remove or change the donation info, be gentleman -->
<!-- Forked 的项目中,请不要删除或修改捐赠信息,尊重劳动成果,谢谢 -->
<el-dialog
:title="$t('luckyYou.button.donate')"
:visible.sync="visible"
width="60%"
:show-close="false"
:close-on-click-modal="false"
>
<div class="wrapper">
<h4>{{ $t("luckyYou.text.donateTips") }}</h4>
<el-tabs v-model="tabName">
<el-tab-pane :label="$t('luckyYou.text.wechat')" name="wechat">
<img src="/wechat.png" />
</el-tab-pane>
<el-tab-pane :label="$t('luckyYou.text.paypal')" name="paypal">
<a href="http://paypal.me/jwenjian/1" target="_blank">{{$t('luckyYou.text.paypal')}}</a>
</el-tab-pane>
</el-tabs>
</div>
<span slot="footer">
<el-button @click="onNextTime">{{ $t("luckyYou.button.nextTime") }}</el-button>
<el-button type="primary" @click="onDonated">{{ $t("luckyYou.button.donated") }}</el-button>
</span>
</el-dialog>
<!-- Forked 的项目中,请不要删除或修改捐赠信息,尊重劳动成果,谢谢 -->
<!-- Forked project please do not remove or change the donation info, be gentleman -->
</template>

<script>
export default {
name: "donate-dialog",
data() {
return {
visible: false,
tabName: "wechat"
};
},
methods: {
showDialog() {
this.visible = true;
},
onNextTime() {
this.$message({
type: "info",
message: this.$t("luckyYou.message.nextTime")
});
this.visible = false;
},
onDonated() {
// say thanks
this.$notify({
type: "success",
title: this.$t("luckyYou.message.donatedTipsTitle"),
message: this.$t("luckyYou.message.donatedTipsMessage"),
duration: 0
});
this.visible = false;
}
}
};
</script>

<style>
.el-dialog {
margin-top: 5vh;
}
</style>
15 changes: 12 additions & 3 deletions src/locale/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,27 @@
"selectImageFolder": "Select image folder",
"start": "Start",
"stop": "Stop",
"readingImage": "Reading image..."
"readingImage": "Reading image...",
"donate": "Donate",
"nextTime": "Will do in next time",
"donated": "I donated!"
},
"text": {
"muted": "Muted",
"unmuted": "Unmuted",
"defaultTips": "Who will be THE one?"
"defaultTips": "Who will be THE one?",
"donateTips": "Thanks for you donation!",
"wechat": "WeChat Pay",
"paypal": "Paypal"
},
"message": {
"noImage": "Image file not found",
"failedToReadImage": "Failed to read image file, please use .jpg or .png format",
"readDone": "{0} image files read successfully, You can now click Start button~",
"commonError": "Error happened :("
"commonError": "Error happened :(",
"nextTime": "Yes, you said next time.",
"donatedTipsTitle": "Thanks for your donation!",
"donatedTipsMessage": "I'm sure this is not a miss-click. Please send your donation screenshots to my email: [email protected] to let me know you and thank you!"
}
}
}
15 changes: 12 additions & 3 deletions src/locale/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,27 @@
"selectImageFolder": "选择图片文件夹",
"start": "开始",
"stop": "停止",
"readingImage": "图片读取中..."
"readingImage": "图片读取中...",
"donate": "捐赠",
"nextTime": "下次一定",
"donated": "我已捐赠"
},
"text": {
"muted": "声音:关",
"unmuted": "声音:开",
"defaultTips": "幸运之子会是谁呢?"
"defaultTips": "幸运之子会是谁呢?",
"donateTips": "感谢你的捐赠!",
"wechat": "微信",
"paypal": "贝宝"
},
"message": {
"noImage": "未找到图片文件",
"failedToReadImage": "读取图片失败,请使用 jpg 或 png 格式",
"readDone": "已成功读取 {0} 个图片,你现在可以点击开始按钮啦~",
"commonError": "出错啦 :("
"commonError": "出错啦 :(",
"nextTime": "下次,一定",
"donatedTipsTitle": "感谢你的捐赠!",
"donatedTipsMessage": "我想你应该不是点错了按钮了。请将你捐赠的截图发到我的邮箱:[email protected] 以便我记录和感谢!"
}
}
}

0 comments on commit e4e70d3

Please sign in to comment.