Skip to content

Commit

Permalink
chore: bump version (bump version: 0.0.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
dragon-fish committed Oct 1, 2021
1 parent f96c1c7 commit d747ce2
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 32 deletions.
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"quoteProps": "as-needed",
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "always",
"printWidth": 80
}
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "short-now",
"version": "0.0.0",
"version": "0.0.1",
"description": "Short URL Service",
"main": "index.js",
"repository": "[email protected]:FreeNowOrg/ShortNow.git",
Expand All @@ -10,7 +10,8 @@
"scripts": {
"start": "vite",
"serve": "vercel dev",
"build": "vite build"
"build": "vite build",
"bump": "bump --nopublish"
},
"dependencies": {
"axios": "^0.21.1",
Expand All @@ -19,6 +20,7 @@
"vue-router": "^4.0.10"
},
"devDependencies": {
"@dragon-fish/bump": "^0.0.15",
"@types/nprogress": "^0.2.0",
"@vitejs/plugin-vue": "^1.3.0",
"@vue/compiler-sfc": "^3.1.5",
Expand All @@ -27,8 +29,9 @@
"pug": "^3.0.2",
"querystring": "^0.2.1",
"sass": "^1.37.0",
"sensitive-word-filter": "^1.0.2",
"typescript": "^4.3.5",
"vercel": "^23.0.1",
"vite": "^2.4.4"
}
}
}
18 changes: 11 additions & 7 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ NProgress
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import NProgress from './components/NProgress.vue'
import { defineComponent } from "vue";
import NProgress from "./components/NProgress.vue";
export default defineComponent({
name: 'App',
name: "App",
components: { NProgress },
data() {
return {}
return {};
},
methods: {},
mounted() {},
})
});
</script>

<style scoped lang="sass">
Expand All @@ -27,8 +27,12 @@ main
min-height: 100vh
position: relative
article
padding: 1rem 5%
background-color: rgba(0, 0, 0, 0.02)
z-index: 1
@media screen and (max-width: 800px)
article
padding: 1rem
background-color: rgba(0, 0, 0, 0.02)
z-index: 1
</style>
65 changes: 43 additions & 22 deletions src/view/index.vue
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
<template lang="pug">
h1 ShortURL Now

section
h2 查看全部
p.loading(v-if="listLoading") 加载中……
p.error(v-if="listError") {{ listError }}
ul.allList(v-if="!listLoading")
li(v-for="item in list")
strong {{ item.long_url }}
|
code {{ item.short_url }}
|
a(:href="'/-/' + item.short_url" target="_blank") 访问

section
h2 缩短 URL
form
label
strong 原网址
input(v-model="addUrlInputLong" type="url" :disabled="addLoading")
input.long-url(
v-model='addUrlInputLong',
type='url',
:disabled='addLoading'
)
div
button.btn.primary(@click="addUrl" :disabled="addLoading") 提交
modal(v-model:show="addModal")
pre.info(v-if="addInfo") {{ addInfo }}
.error(v-if="addError") {{ addError }}
button.btn.primary(@click='addUrl', :disabled='addLoading') 提交
modal(v-model:show='addModal')
.info(v-if='addInfo')
h3 {{ addInfo.message }}
input.result(
readonly,
:value='location.origin + "/-/" + addInfo.body.short_url',
:style='{ width: "100%" }',
@click='handleClickResult'
)
.desc 点击复制
.error(v-if='addError')
h3 短链接生成失败
p {{ addError }}

section
h2 最近生成
p.loading(v-if='listLoading') 加载中……
p.error(v-if='listError') {{ listError }}
ul.allList(v-if='!listLoading')
li(v-for='item in list')
strong {{ item.long_url }}
|
code {{ item.short_url }}
|
a(:href='"/-/" + item.short_url', target='_blank') 访问
</template>

<script lang="ts">
Expand All @@ -44,6 +58,7 @@ export default defineComponent({
addError: '',
addModal: false,
addInfo: '',
location: window.location,
}
},
methods: {
Expand Down Expand Up @@ -105,6 +120,11 @@ export default defineComponent({
this.addLoading = false
})
},
handleClickResult(e) {
const el = e.target
el.select()
document.execCommand('Copy')
},
},
mounted() {
this.getList()
Expand All @@ -114,10 +134,8 @@ export default defineComponent({

<style scoped lang="sass">
.error
color: #b00
background-color: #fdd
padding: 4px
font-weight: 600
h3
color: #b00
ul.allList
padding: 0
Expand All @@ -129,7 +147,6 @@ ul.allList
> strong
flex: 1
form
text-align: center
Expand All @@ -146,4 +163,8 @@ form
&:invalid
--placeholder: 0
input.result
padding: 4px
font-size: 1rem
</style>
53 changes: 53 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
"@babel/helper-validator-identifier" "^7.14.8"
to-fast-properties "^2.0.0"

"@dragon-fish/bump@^0.0.15":
version "0.0.15"
resolved "https://registry.npmjs.org/@dragon-fish/bump/-/bump-0.0.15.tgz#b04e9e3e3be11b8166228fc14da427c18386dfb8"
integrity sha512-ObYvwi0vNhKZ1eerSpOK6ThfIF4bruzLxuc74joC4ag9uc3VocKHzVqdzIlWKh43dTwmdEisawOOJ/iobI/70A==
dependencies:
axios "^0.21.1"
commander "^7.1.0"
fs-extra "^9.1.0"

"@sindresorhus/is@^0.14.0":
version "0.14.0"
resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
Expand Down Expand Up @@ -217,6 +226,11 @@ assert-never@^1.2.1:
resolved "https://registry.npmjs.org/assert-never/-/assert-never-1.2.1.tgz#11f0e363bf146205fb08193b5c7b90f4d1cf44fe"
integrity sha512-TaTivMB6pYI1kXwrFlEhLeGfOqoDNdTxjCdwRfFFkEA30Eu+k48W34nlok2EYWJfFFzqaEmichdNM7th6M5HNw==

at-least-node@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2"
integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==

axios@^0.21.1:
version "0.21.1"
resolved "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8"
Expand Down Expand Up @@ -382,6 +396,11 @@ colorette@^1.2.2:
resolved "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94"
integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==

commander@^7.1.0:
version "7.2.0"
resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==

configstore@^5.0.1:
version "5.0.1"
resolved "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96"
Expand Down Expand Up @@ -517,6 +536,16 @@ follow-redirects@^1.10.0:
resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43"
integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==

fs-extra@^9.1.0:
version "9.1.0"
resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d"
integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==
dependencies:
at-least-node "^1.0.0"
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^2.0.0"

fsevents@~2.3.2:
version "2.3.2"
resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
Expand Down Expand Up @@ -593,6 +622,11 @@ graceful-fs@^4.1.2:
resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==

graceful-fs@^4.1.6, graceful-fs@^4.2.0:
version "4.2.8"
resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a"
integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==

has-flag@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
Expand Down Expand Up @@ -779,6 +813,15 @@ json5@^1.0.1:
dependencies:
minimist "^1.2.0"

jsonfile@^6.0.1:
version "6.1.0"
resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==
dependencies:
universalify "^2.0.0"
optionalDependencies:
graceful-fs "^4.1.6"

[email protected]:
version "1.0.0"
resolved "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz#ed8bf0921e2f3f1ed4d5c1a44f68709ed24722c3"
Expand Down Expand Up @@ -1236,6 +1279,11 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0:
resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==

sensitive-word-filter@^1.0.2:
version "1.0.2"
resolved "https://registry.npmjs.org/sensitive-word-filter/-/sensitive-word-filter-1.0.2.tgz#010452fa8ec1af2be966210722ced16963c72846"
integrity sha512-P/RUI2A9M6J921lfKNneLK6a/OToF0+qmz5xVtPS9yjRrS/FBNBHQJDnlmHpMYtdhydjqlebrh2hfAEDLFx8GA==

signal-exit@^3.0.2:
version "3.0.3"
resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
Expand Down Expand Up @@ -1394,6 +1442,11 @@ unique-string@^2.0.0:
dependencies:
crypto-random-string "^2.0.0"

universalify@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==

[email protected]:
version "4.1.0"
resolved "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz#4866b98c3bc5b5473c020b1250583628f9a328f3"
Expand Down

1 comment on commit d747ce2

@vercel
Copy link

@vercel vercel bot commented on d747ce2 Oct 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.