Compare commits

...

36 Commits

Author SHA1 Message Date
Corentin Thomasset
fce9240221 1.3.0 2020-06-15 22:08:36 +02:00
Corentin Thomasset
e6a7397493 docs: checked Lorem ipsum generator in roadmap
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-15 22:07:08 +02:00
Corentin Thomasset
a099485382 feat: fixed icons width in sidebar
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-15 22:06:24 +02:00
Corentin Thomasset
181c9f9874 feat: fixed icons width in sidebar
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-14 21:19:29 +02:00
Corentin Thomasset
21e9890b65 docs: checked markdown editor in roadmap
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-14 21:01:00 +02:00
Corentin Thomasset
e894125001 refactor: now using marked for changelog
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-14 20:52:43 +02:00
Corentin Thomasset
ffe25b87d2 feat: added MarkdownEditor.vue
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-14 19:33:29 +02:00
Corentin Thomasset
eb4363244b chore: added stuff to roadmap
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-14 11:03:37 +02:00
Corentin Thomasset
58372b0d06 chore: update CHANGELOG.md
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-14 00:31:24 +02:00
Corentin Thomasset
096bebf093 refactor: removed lazyLoad method
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-14 00:29:44 +02:00
Corentin Thomasset
9f83534046 Merge branch 'dev' of github.com:CorentinTh/it-tools into dev 2020-06-13 23:29:18 +02:00
Corentin Thomasset
c1dafd09b7 refactor: lazy-loading tools routes
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-13 23:28:25 +02:00
Corentin THOMASSET
cc1ac8398b chore: updated changelog 2020-06-11 16:20:36 +02:00
Alexander Janke
24fd5e7aaf Use vue-typecast
https://vuejs.org/v2/guide/forms.html#number
2020-06-11 16:19:26 +02:00
Corentin Thomasset
94cb74d434 fix: ordered contributors by contribution count
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-11 13:25:57 +02:00
Corentin Thomasset
08aae49aa3 fix: replace next by version
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-11 13:25:16 +02:00
Corentin Thomasset
c727e150f7 fix: added parseFloat in isInt
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-09 08:19:16 +02:00
Corentin Thomasset
8158f29d62 1.2.1 2020-06-09 08:10:36 +02:00
Corentin Thomasset
830c11f2a8 chore: update CHANGELOG.md
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-09 08:09:36 +02:00
dotvirus
c484715c3e Use Number.isInteger 2020-06-09 08:09:36 +02:00
Corentin Thomasset
0812385ada refactor: proper validation rules
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-09 08:09:36 +02:00
Corentin Thomasset
f6d8dc41e6 fix: added quantity validation rules
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-09 08:09:36 +02:00
Corentin Thomasset
e51a37844a 1.2.0 2020-06-08 19:15:52 +02:00
Corentin Thomasset
6d8db0a5d5 chore: updated CHANGELOG.md
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-08 19:15:52 +02:00
Corentin Thomasset
84e727a43a feat: can generate multiple uuids
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-08 19:15:52 +02:00
Corentin Thomasset
6f7c399823 refactor: removed 404 page from tools roadmap
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-08 19:15:52 +02:00
dependabot[bot]
3777eb941d chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-08 19:15:52 +02:00
Corentin Thomasset
dd41bdc57c chore: updated CHANGELOG.md version
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-08 12:02:02 +02:00
Corentin Thomasset
48d0815524 1.1.0 2020-06-08 11:59:52 +02:00
Corentin Thomasset
efe62bb3cf fix: color picker now updates fields
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-08 11:58:09 +02:00
Corentin Thomasset
48376c17b2 docs: updated README.md
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-08 00:54:25 +02:00
Corentin Thomasset
458309c563 chore: updated CHANGELOG.md
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-08 00:54:04 +02:00
Corentin Thomasset
fba0701df2 feat: contributors + changelogs in about page
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-08 00:31:07 +02:00
Corentin Thomasset
b013903c41 refactor: cleaner 404 page
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-07 23:13:08 +02:00
Corentin Thomasset
432ac7dd1c feat: 404 handler + page
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-07 23:11:18 +02:00
Corentin Thomasset
12a0d93c85 fix: added links in CHANGELOG.md
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
2020-06-07 19:29:54 +02:00
16 changed files with 564 additions and 80 deletions

View File

@@ -1,7 +1,27 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
## Next
- [fix] [GithubContributors] ordered contributors by contribution count
- [refactor] used vue-typecasting for number inputs
- [feat] lazy loading tools routes
- [feat] added [markdown editor](/#/markdown-editor)
- [feat] added [lorem ipsum generator](/#/lorem-ipsum-generator)
## 1.2.1
- [fix] [UuidGenerator] added quantity validation rules
- [refactor] better isInt checker
## 1.2.0
- [feat] [UuidGenerator] can generate multiple uuids
## 1.1.0
- [feat] 404 route + page
- [feat] changelog in the About page
- [feat] contributors list in the About page
- [fix] [ColorConverter] color picker now updates fields
## 1.0.1
- [chore] added changelog
@@ -9,4 +29,4 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve
- [fix] remove history move (incompatible with vercel.com)
## 1.0.0
- First release
- First release

View File

@@ -2,7 +2,7 @@
Aggregated set of useful tools that every developer may need once in a while. Available [here](https://it-tools.tech).
## Functionality/roadmap
## Functionalities roadmap
Here is an unordered list of the current functionalities, and some that may come.
- [x] Token generator
@@ -15,14 +15,18 @@ Here is an unordered list of the current functionalities, and some that may come
- [x] Url encoder
- [x] Base 64 generator
- [x] Text information
- [ ] Lorem ipsum text generator
- [x] Markdown editor
- [x] Lorem ipsum text generator
- [ ] Image exif editor/remover
- [ ] QR code generator
- [ ] Bip39 pass-phrase generator
- [ ] Crontab friendly generator
- [ ] Image format converter?
- [ ] Image cropper
- [ ] 404 page
- [ ] Image resizer
- [ ] HTTP client (w/ axios)
- [ ] Math expression evaluator
- [ ] Math expression graph
You have an idea of a tool? Submit a feature request!

53
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "it-tools",
"version": "1.0.1",
"version": "1.3.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -3139,6 +3139,12 @@
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"highlight.js": {
"version": "9.18.1",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz",
"integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==",
"dev": true
},
"supports-color": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
@@ -4373,6 +4379,11 @@
"domelementtype": "1"
}
},
"dompurify": {
"version": "2.0.11",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.11.tgz",
"integrity": "sha512-qVoGPjIW9IqxRij7klDQQ2j6nSe4UNWANBhZNLnsS7ScTtLb+3YdxkRY8brNTpkUiTtcXsCJO+jS0UCDfenLuA=="
},
"domutils": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
@@ -6253,12 +6264,6 @@
"integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==",
"dev": true
},
"highlight.js": {
"version": "9.18.1",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz",
"integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==",
"dev": true
},
"hmac-drbg": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
@@ -8103,6 +8108,11 @@
"object-visit": "^1.0.0"
}
},
"marked": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-1.1.0.tgz",
"integrity": "sha512-EkE7RW6KcXfMHy2PA7Jg0YJE1l8UPEZE8k45tylzmZM30/r1M1MUXWQfJlrSbsTeh7m/XTwHbWUENvAJZpp1YA=="
},
"md5.js": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
@@ -10051,6 +10061,29 @@
"unpipe": "1.0.0"
}
},
"raw-loader": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.1.tgz",
"integrity": "sha512-baolhQBSi3iNh1cglJjA0mYzga+wePk7vdEX//1dTFd+v4TsQlQE0jitJSNF1OIP82rdYulH7otaVmdlDaJ64A==",
"dev": true,
"requires": {
"loader-utils": "^2.0.0",
"schema-utils": "^2.6.5"
},
"dependencies": {
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
}
}
},
"read-pkg": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz",
@@ -12718,9 +12751,9 @@
}
},
"websocket-extensions": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz",
"integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==",
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
"integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
"dev": true
},
"which": {

View File

@@ -1,7 +1,7 @@
{
"name": "it-tools",
"description": "",
"version": "1.0.1",
"version": "1.3.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
@@ -13,6 +13,8 @@
"color-convert": "^2.0.1",
"color-name": "^1.1.4",
"core-js": "^3.6.4",
"dompurify": "^2.0.11",
"marked": "^1.1.0",
"register-service-worker": "^1.7.1",
"roboto-fontface": "*",
"vue": "^2.6.11",
@@ -36,6 +38,7 @@
"less": "^3.0.4",
"less-loader": "^5.0.0",
"lint-staged": "^9.5.0",
"raw-loader": "^4.0.1",
"sass": "^1.19.0",
"sass-loader": "^8.0.0",
"vue-cli-plugin-vuetify": "~2.0.5",

View File

@@ -1,14 +1,15 @@
<template>
<v-app id="inspire">
<vue-headful
:title="currentRoute ? `${currentRoute.text} - IT-Tools` : 'IT-Tools'"
:description="currentRoute ? currentRoute.description: 'Aggregated set of useful tools that every developer may need once in a while.'"
:keywords="currentRoute ? currentRoute.keywords: null"
image="/img/banner.png"
:title="currentRoute ? `${currentRoute.text} - IT-Tools` : 'IT-Tools'"
:description="currentRoute ? currentRoute.description: 'Aggregated set of useful tools that every developer may need once in a while.'"
:keywords="currentRoute ? currentRoute.keywords: null"
image="/img/banner.png"
/>
<v-navigation-drawer v-model="drawer" app clipped>
<SearchBar class="hidden-sm-and-up" />
<template v-slot:prepend>
<SearchBar class="hidden-sm-and-up"/>
</template>
<v-list dense>
@@ -17,7 +18,7 @@
<v-list-item v-for="item in section.child" :key="item.text" :to="item.path">
<v-list-item-action>
<v-icon>{{ item.icon }}</v-icon>
<v-icon style="width: 1.25em">{{ item.icon }}</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>
@@ -99,7 +100,7 @@
appVersion: 'v' + process.env.APPLICATION_VERSION,
drawer: null,
items: toolsComponents,
currentRoute:{}
currentRoute: {}
}),
mounted() {
this.setTitle()
@@ -107,14 +108,14 @@
created() {
this.$vuetify.theme.dark = true
},
methods:{
setTitle(){
methods: {
setTitle() {
const path = this.$router.currentRoute.path;
this.currentRoute = toolsComponents.map(p => p.child).flat().find(p => p.path === path)
}
},
watch:{
'$route'(){
watch: {
'$route'() {
this.setTitle()
}
}
@@ -126,6 +127,33 @@
overflow-y: auto !important;
}
.pretty-scrollbar{
&::-webkit-scrollbar {
width: 5px!important;
}
/* Track */
&::-webkit-scrollbar-track {
opacity: 0 !important;
}
/* Handle */
&::-webkit-scrollbar-thumb {
background: rgba(241, 241, 241, 0.10) !important;
border-radius: 10px;
}
/* Handle on hover */
&::-webkit-scrollbar-thumb:hover {
background: rgba(241, 241, 241, 0.20)!important;
}
}
.v-navigation-drawer__content{
.pretty-scrollbar;
}
.single-card {
width: 100%;
max-width: 700px !important;

View File

@@ -0,0 +1,49 @@
<template>
<div class="github-contributor">
<div v-if="loading" class="text-center pt-3 pb-3">
<v-progress-circular indeterminate />
</div>
<v-list v-else class="pa-0">
<v-list-item v-for="(contributor, i) in contributors" :key="i" :href="contributor.html_url">
<v-list-item-avatar>
<v-img :src="contributor.avatar_url"></v-img>
</v-list-item-avatar>
<v-list-item-content>
{{contributor.login}}
</v-list-item-content>
</v-list-item>
</v-list>
</div>
</template>
<script>
const baseUrl = 'https://api.github.com/repos/$repo$/contributors'
import axios from 'axios'
export default {
name: "GithubContributors",
props: ['repo'],
data: () => ({
contributors: [],
loading: true,
hasError: false
}),
mounted() {
const url = baseUrl.replace('$repo$', this.repo)
axios
.get(url)
.then(({data}) => {
this.contributors = data.sort((a, b) => b.contributions - a.contributions)
this.loading = false
})
.catch(() => this.hasError = true)
}
}
</script>
<style scoped>
</style>

View File

@@ -1,20 +1,9 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from './routes/Home.vue'
import TokenGenerator from "./routes/tools/TokenGenerator";
import Hash from "./routes/tools/Hash";
import DateConverter from "./routes/tools/DateConverter";
import UrlEncoder from "./routes/tools/UrlEncoder";
import FileToBase64 from "./routes/tools/FileToBase64";
import TextCypher from "./routes/tools/TextCypher";
import TextStats from "./routes/tools/TextStats";
import BaseConverter from "./routes/tools/BaseConverter";
import UuidGenerator from "./routes/tools/UuidGenerator";
import ColorConverter from "./routes/tools/ColorConverter";
Vue.use(VueRouter)
const toolsComponents = [
{
title: 'Crypto',
@@ -23,7 +12,7 @@ const toolsComponents = [
icon: 'fa-key',
text: 'Token generator',
path: '/token-generator',
component: TokenGenerator,
component: () => import('./routes/tools/TokenGenerator'),
keywords: ['token', 'random', 'string', 'alphanumeric'],
description: 'Generate random tokens.'
},
@@ -31,14 +20,14 @@ const toolsComponents = [
icon: 'fa-fingerprint',
text: 'Uuid generator',
path: '/uuid-generator',
component: UuidGenerator,
component: () => import('./routes/tools/UuidGenerator'),
keywords: ['token', 'v4', 'string', 'alphanumeric']
},
{
icon: 'fa-font',
text: 'Hash text',
path: '/hash',
component: Hash,
component: () => import('./routes/tools/Hash'),
keywords: ['md5', 'sha1', 'sha256', 'sha224', 'sha512', 'sha384', 'sha3', 'ripemd160', 'random']
},
@@ -46,7 +35,7 @@ const toolsComponents = [
icon: 'fa-lock',
text: 'Cypher/uncypher text',
path: '/cypher',
component: TextCypher,
component: () => import('./routes/tools/TextCypher'),
keywords: ['aes', 'tripledes', 'rabbit', 'rabbitlegacy', 'rc4']
},
],
@@ -58,21 +47,21 @@ const toolsComponents = [
icon: 'fa-calendar',
text: 'Date/Time converter',
path: '/date-converter',
component: DateConverter,
component: () => import('./routes/tools/DateConverter'),
keywords: ['locale', 'format', 'iso 8601', 'utc', 'timestamp', 'unix', 'year', 'month', 'day', 'hours', 'minutes', 'seconds']
},
{
icon: 'fa-exchange-alt',
text: 'Base converter',
path: '/base-converter',
component: BaseConverter,
component: () => import('./routes/tools/BaseConverter'),
keywords: ['binary', 'hexadecimal', 'decimal']
},
{
icon: 'fa-palette',
text: 'Color picker/converter',
path: '/color-picker-converter',
component: ColorConverter,
component: () => import('./routes/tools/ColorConverter'),
keywords: ['rgb', 'rgba', 'hexadecimal', 'hsla', 'red', 'green', 'blue', 'alpha']
},
],
@@ -84,27 +73,41 @@ const toolsComponents = [
icon: 'fa-link',
text: 'URL encode/decode',
path: '/url-encoder',
component: UrlEncoder,
component: () => import('./routes/tools/UrlEncoder'),
keywords: ['%20']
},
{
icon: 'fa-file-export',
text: 'File to Base64',
path: '/file-to-base64',
component: FileToBase64
component: () => import('./routes/tools/FileToBase64')
},
],
},
{
title: 'Miscellaneous',
title: 'Text',
child: [
{
icon: 'fa-align-left\n',
icon: 'fa-align-left',
text: 'Text stats',
path: '/text-stats',
component: TextStats,
component: () => import('./routes/tools/TextStats'),
keywords: ['word', 'count', 'size', 'bytes', 'length']
},
{
icon: 'fab fa-markdown',
text: 'Markdown editor',
path: '/markdown-editor',
component: () => import('./routes/tools/MarkdownEditor'),
keywords: ['text', 'html', 'markdown']
},
{
icon: 'fa-align-justify',
text: 'Lorem ipsum generator',
path: '/lorem-ipsum-generator',
component: () => import('./routes/tools/LoremIpsumGenerator'),
keywords: ['text', 'dolor', 'sit', 'placeholder', 'fill', 'dummy']
}
],
}
];
@@ -121,6 +124,11 @@ const routes = [
path: '/about',
name: 'About',
component: () => import('./routes/About.vue')
},
{
path: '*',
name: '404',
component: () => import('./routes/NotFound.vue')
}
]

View File

@@ -1,19 +1,63 @@
<template>
<v-card class="single-card">
<v-card-title>About</v-card-title>
<v-card-text>
<Abstract />
</v-card-text>
</v-card>
<div>
<v-row justify="center" align="center">
<v-col cols="12" xl="12">
<v-card class="single-card">
<v-card-title>About</v-card-title>
<v-card-text>
<Abstract/>
</v-card-text>
</v-card>
</v-col>
</v-row>
<v-row justify="center">
<v-col cols="12" md="5" sm="12">
<v-card>
<v-card-title>Contributors</v-card-title>
<github-contributors repo="CorentinTh/it-tools"/>
</v-card>
</v-col>
<v-col cols="12" md="7" sm="12">
<v-card>
<v-card-title>Changelog</v-card-title>
<v-card-text>
<div v-html="changelog" class="changelog">
</div>
</v-card-text>
</v-card>
</v-col>
</v-row>
</div>
</template>
<script>
import Abstract from "../components/Abstract";
import Abstract from "../components/Abstract";
import GithubContributors from "../components/GithubContributors";
import changelog from "../../CHANGELOG.md"
import marked from 'marked'
import DOMPurify from 'dompurify';
export default {
name: "About",
components : {
Abstract
},
}
</script>
export default {
name: "About",
data: () => ({
changelog: []
}),
mounted() {
this.changelog = DOMPurify.sanitize(marked('##' + changelog.replace(/^(.*?)##/s, '')));
},
components: {
Abstract,
GithubContributors
},
}
</script>
<style scoped lang="less">
::v-deep {
.changelog {
h2 {
margin-top: 10px;
}
}
}
</style>

54
src/routes/NotFound.vue Normal file
View File

@@ -0,0 +1,54 @@
<template>
<div class="e404">
<div class="e404-image">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 100 511.999 300" xml:space="preserve">
<g><path d="M140.61,273.063h-5.956v-22.69c0-11.623-10.593-19.433-26.358-19.433s-26.357,7.81-26.357,19.433v22.69H65.571 l25.677-100.707c1.101-2.746,1.194-5.749,1.186-8.392l-0.001-0.284c0-15.632-22.966-20.737-30.881-20.737 c-10.132,0-18.414,5.148-22.723,14.123c-0.199,0.415-0.359,0.847-0.481,1.29C0,298.98,0,300.981,0,302.305 c0,12.096,8.537,20.876,20.297,20.876H33.97c4.2,0,7.604-3.405,7.604-7.604c0-4.199-3.404-7.604-7.604-7.604H20.297 c-3.184,0-4.887-1.694-5.072-5.04c1.954-8.608,23.256-87.252,37.593-139.831c1.785-3.288,4.721-4.954,8.734-4.954 c5.289,0,14.355,3.338,15.673,5.732l0.001,0.128c0.001,0.584,0.006,2.084-0.132,2.756c-0.178,0.397-0.321,0.809-0.43,1.231 L48.417,278.788c-0.58,2.275-0.076,4.69,1.365,6.544c1.44,1.854,3.656,2.938,6.004,2.938h33.757c4.2,0,7.604-3.405,7.604-7.604 v-30.294c0-2.528,5.766-4.225,11.149-4.225c5.481,0,11.15,1.581,11.15,4.225v30.294c0,4.199,3.404,7.604,7.604,7.604h13.56 c2.252,0,4.226,4.671,4.226,9.996c0,5.013-3.022,9.171-4.382,9.708H127.05c-4.2,0-7.604,3.405-7.604,7.604v34.045 c0,1.954-4.872,4.225-11.15,4.225c-6.467,0-11.149-2.523-11.149-4.225v-34.045c0-4.199-3.404-7.604-7.604-7.604H59.318 c-4.2,0-7.604,3.405-7.604,7.604c0,4.199,3.404,7.604,7.604,7.604h22.621v26.441c0,11.26,11.086,19.433,26.357,19.433 c15.52,0,26.358-7.991,26.358-19.433v-26.441h5.956c9.192,0,19.434-10.232,19.434-24.916 C160.043,283.663,151.87,273.063,140.61,273.063z"/></g>
<g><path d="M492.566,273.063h-5.956v-22.69c0-11.623-10.593-19.433-26.358-19.433s-26.357,7.81-26.357,19.433v22.69h-16.368 l25.679-100.708c1.1-2.745,1.193-5.75,1.185-8.393l-0.001-0.281c0-15.632-22.966-20.737-30.881-20.737 c-10.132,0-18.415,5.148-22.724,14.123c-0.199,0.415-0.359,0.847-0.481,1.29c0,0-4.869,17.852-11.125,40.898 c0,0.001,0,0.002-0.001,0.003l-7.879,29.071c-19.345,71.527-19.345,72.449-19.345,73.978c0,12.096,8.537,20.876,20.298,20.876 h61.64v26.441c0,11.26,11.085,19.433,26.357,19.433c15.52,0,26.358-7.991,26.358-19.433v-26.441h5.956 c9.192,0,19.434-10.232,19.434-24.915C512,283.663,503.826,273.063,492.566,273.063z M492.41,307.974h-13.404 c-4.2,0-7.604,3.405-7.604,7.604v34.045c0,1.954-4.872,4.225-11.15,4.225c-6.467,0-11.149-2.523-11.149-4.225v-34.045 c0-4.199-3.404-7.604-7.604-7.604h-69.244c-3.183,0-4.887-1.694-5.073-5.037c0.677-2.966,4.201-16.655,18.801-70.634l7.877-29.064 c5.504-20.276,9.934-36.53,10.916-40.133c1.785-3.288,4.721-4.954,8.735-4.954c5.289,0,14.354,3.338,15.673,5.732l0.001,0.124 c0.001,0.585,0.006,2.09-0.133,2.762c-0.177,0.396-0.32,0.808-0.429,1.23l-28.249,110.79c-0.58,2.275-0.076,4.69,1.365,6.544 c1.44,1.854,3.656,2.938,6.004,2.938H441.5c4.2,0,7.604-3.405,7.604-7.604v-30.294c0-2.528,5.766-4.225,11.149-4.225 c5.481,0,11.15,1.581,11.15,4.225v30.294c0,4.199,3.404,7.604,7.604,7.604h13.56c2.252,0,4.226,4.671,4.226,9.996 C496.792,303.281,493.769,307.437,492.41,307.974z"/></g>
<g><path d="M330.892,206.939c-2.512-3.363-7.279-4.051-10.642-1.536c-3.362,2.515-4.05,7.281-1.535,10.643 c10.168,13.597,15.542,29.786,15.542,46.818c0,43.149-35.104,78.252-78.252,78.252c-43.15,0-78.253-35.104-78.253-78.252 c0-43.149,35.104-78.253,78.253-78.253c17.152,0,33.434,5.444,47.083,15.744c3.353,2.53,8.122,1.863,10.651-1.49 c2.529-3.352,1.862-8.12-1.49-10.65c-16.311-12.307-35.76-18.812-56.245-18.812c-51.534,0-93.461,41.927-93.461,93.461 s41.927,93.46,93.461,93.46c51.534,0,93.46-41.926,93.46-93.46C349.464,242.523,343.042,223.185,330.892,206.939z"/></g>
<g><path d="M296.624,292.726l-29.863-29.863L296.624,233c2.968-2.969,2.968-7.783-0.002-10.753c-2.971-2.97-7.784-2.97-10.754,0 l-29.863,29.863l-29.863-29.863c-2.971-2.97-7.784-2.97-10.754,0c-2.97,2.97-2.97,7.784,0,10.753l29.863,29.863l-29.863,29.863 c-2.97,2.97-2.97,7.784,0,10.753c1.485,1.484,3.432,2.227,5.378,2.227c1.946,0,3.892-0.742,5.377-2.227l29.863-29.863 l29.863,29.863c1.485,1.484,3.432,2.227,5.377,2.227s3.892-0.742,5.378-2.227C299.593,300.51,299.593,295.695,296.624,292.726z"/></g>
</svg>
</div>
<div class="separator"></div>
<div class="e404-description">
Page not found, sorry.
</div>
<v-btn color="primary" @click="$router.go(-1)">Back</v-btn>
</div>
</template>
<script>
export default {
name: "404.vue"
}
</script>
<style scoped lang="less">
.e404 {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.e404-image {
width: 200px;
svg {
fill: #ffffff;
opacity: 0.3;
}
}
.separator {
width: 60px;
height: 3px;
border-radius: 5px;
background-color: #4CAF50;
}
.e404-description {
font-size: 30px;
opacity: 0.9;
margin: 15px 0;
}
}
</style>

View File

@@ -8,7 +8,7 @@
label="Input base"
outlined
type="number"
v-model="inputBase"
v-model.number="inputBase"
ref="inputBase"
hide-details="auto"
:rules="baseRules"
@@ -33,7 +33,7 @@
label="Output base"
outlined
type="number"
v-model="outputBase"
v-model.number="outputBase"
ref="outputBase"
:rules="baseRules"
/>

View File

@@ -11,6 +11,7 @@
hide-inputs
mode="rgba"
v-model="rgbPicker"
@input="(v) => updateColors(v, 'picker')"
/>
</v-col>
<v-col cols="12" sm="6" align="center">
@@ -116,7 +117,7 @@
this.keyword = convert.rgb.keyword(r, g, b);
},
updateColors(value, fromType) {
if (this.$refs[fromType].validate()) {
if (fromType === 'picker' || this.$refs[fromType].validate()) {
if (fromType === 'rgb') {
const [r, g, b] = value.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/).slice(1).map(v => parseInt(v));
this.rgbPicker = {r, g, b}
@@ -150,6 +151,13 @@
} catch (ignored) {
// ignored
}
} else if (fromType === 'picker') {
const {r, g, b} = value;
this.setRGB(r, g, b);
this.setHEX(r, g, b);
this.setHSL(r, g, b);
this.setKeyword(r, g, b);
}
}
}

View File

@@ -0,0 +1,94 @@
<template>
<v-row justify="center" align="center" class="lorem-ipsum-generator">
<v-col cols="12" xl="5" lg="6" md="12">
<v-card>
<v-card-title>Lorem ipsum generator</v-card-title>
<v-card-text>
<v-slider v-model="paragraphs" min="1" max="20" label="Paragraphs" thumb-label/>
<v-range-slider v-model="sentencePerParagraph" min="1" max="50" label="Sentences per paragraph"
thumb-label/>
<v-range-slider v-model="wordPerSentence" min="1" max="50" label="Words per sentence" thumb-label hide-details/>
<v-checkbox v-model="startWithLoremIpsum" label="Start with 'Lorem ipsum ...'" hide-details/>
<v-checkbox v-model="asHTML" label="As HTML" hide-details/>
</v-card-text>
</v-card>
</v-col>
<v-col cols="12" xl="5" lg="6" md="12">
<v-card>
<v-card-text>
<v-textarea outlined readonly hide-details="auto" v-model="loremIpsum" rows="15"
class="text-justify"></v-textarea>
<div class="text-center mt-4">
<v-btn depressed @click="copy()">Copy</v-btn>
</div>
</v-card-text>
</v-card>
</v-col>
</v-row>
</template>
<script>
import {copyToClipboard, randFromArray, randIntFromInterval} from "../../utils/helpers";
const vocabulary = ['a', 'ac', 'accumsan', 'ad', 'adipiscing', 'aenean', 'aliquam', 'aliquet', 'amet', 'ante', 'aptent', 'arcu', 'at', 'auctor', 'bibendum', 'blandit', 'class', 'commodo', 'condimentum', 'congue', 'consectetur', 'consequat', 'conubia', 'convallis', 'cras', 'cubilia', 'cum', 'curabitur', 'curae', 'dapibus', 'diam', 'dictum', 'dictumst', 'dignissim', 'dolor', 'donec', 'dui', 'duis', 'egestas', 'eget', 'eleifend', 'elementum', 'elit', 'enim', 'erat', 'eros', 'est', 'et', 'etiam', 'eu', 'euismod', 'facilisi', 'faucibus', 'felis', 'fermentum', 'feugiat', 'fringilla', 'fusce', 'gravida', 'habitant', 'habitasse', 'hac', 'hendrerit', 'himenaeos', 'iaculis', 'id', 'imperdiet', 'in', 'inceptos', 'integer', 'interdum', 'ipsum', 'justo', 'lacinia', 'lacus', 'laoreet', 'lectus', 'leo', 'ligula', 'litora', 'lobortis', 'lorem', 'luctus', 'maecenas', 'magna', 'magnis', 'malesuada', 'massa', 'mattis', 'mauris', 'metus', 'mi', 'molestie', 'mollis', 'montes', 'morbi', 'mus', 'nam', 'nascetur', 'natoque', 'nec', 'neque', 'netus', 'nisi', 'nisl', 'non', 'nostra', 'nulla', 'nullam', 'nunc', 'odio', 'orci', 'ornare', 'parturient', 'pellentesque', 'penatibus', 'per', 'pharetra', 'phasellus', 'placerat', 'platea', 'porta', 'porttitor', 'posuere', 'potenti', 'praesent', 'pretium', 'primis', 'proin', 'pulvinar', 'purus', 'quam', 'quis', 'quisque', 'rhoncus', 'ridiculus', 'risus', 'rutrum', 'sagittis', 'sapien', 'scelerisque', 'sed', 'sem', 'semper', 'senectus', 'sit', 'sociis', 'sociosqu', 'sodales', 'sollicitudin', 'suscipit', 'suspendisse', 'taciti', 'tellus', 'tempor', 'tempus', 'tincidunt', 'torquent', 'tortor', 'turpis', 'ullamcorper', 'ultrices', 'ultricies', 'urna', 'varius', 'vehicula', 'vel', 'velit', 'venenatis', 'vestibulum', 'vitae', 'vivamus', 'viverra', 'volutpat', 'vulputate'];
const firstSentence = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
const generateSentence = (length) => {
let sentence = Array.from({length}).map(() => randFromArray(vocabulary)).join(' ')
sentence = sentence.charAt(0).toUpperCase() + sentence.slice(1) + '.'
return sentence
}
export default {
name: "LoremIpsumGenerator",
data: () => ({
paragraphs: 1,
sentencePerParagraph: [3, 8],
wordPerSentence: [8, 15],
startWithLoremIpsum: true,
asHTML: false
}),
methods:{
copy(){
copyToClipboard(this.loremIpsum)
this.$toast.success('Copied to clipboard.')
}
},
computed: {
loremIpsum: function () {
const lorem = Array
.from({length: this.paragraphs})
.map(() => {
const length = randIntFromInterval(...this.sentencePerParagraph);
return Array.from({length}).map(() => {
const wordCount = randIntFromInterval(...this.wordPerSentence);
return generateSentence(wordCount);
})
});
if (this.startWithLoremIpsum) {
lorem[0][0] = firstSentence
}
let result;
if(this.asHTML){
result = `<p>${lorem.map(s => s.join(' ')).join('</p>\n\n<p>')}</p>`
}else{
result = lorem.map(s => s.join(' ')).join('\n\n')
}
return result;
}
}
}
</script>
<style scoped lang="less">
::v-deep {
.v-label{
min-width: 200px !important;
}
}
</style>

View File

@@ -0,0 +1,77 @@
<template>
<v-row justify="center" align="center">
<v-col cols="12" xl="5" lg="6" md="12">
<v-card>
<v-card-text>
<v-textarea v-model="markdown" auto-grow outlined label="Markdown editor"/>
<div class="text-center">
<v-btn @click="copy(markdown)">copy markdown</v-btn>
</div>
</v-card-text>
</v-card>
</v-col>
<v-col cols="12" xl="5" lg="6" md="12">
<v-card>
<v-card-text >
<div class="preview" v-html="html"></div>
<div class="text-center">
<v-divider />
<br>
<v-btn @click="copy(html)">copy html</v-btn>
</div>
</v-card-text>
</v-card>
</v-col>
</v-row>
</template>
<script>
// import {debounce} from "../../utils/helpers";
import marked from 'marked'
import DOMPurify from 'dompurify';
import {copyToClipboard} from "../../utils/helpers";
export default {
name: "MarkdownEditor",
data: () => ({
markdown: '# Hello, World!\nLorem ipsum **dolor** sit *amet*, consectetur adipisicing elit. A aspernatur commodi consequuntur distinctio dolore doloribus eaque earum est ipsum nobis numquam pariatur perspiciatis quasi quis, sed, sunt tempore tenetur, veniam!\n',
}),
methods: {
copy(text){
copyToClipboard(text)
this.$toast.success('Copied to clipboard.')
}
},
computed: {
html() {
return DOMPurify.sanitize(marked(this.markdown))
}
}
}
</script>
<style scoped lang="less">
::v-deep {
.preview {
padding: 20px;
h1{
margin-bottom: 15px;
}
code{
background-color: rgba(0, 0, 0, 0.3) !important;
box-shadow: none;
color: #9a9a9a;
font-weight: normal;
}
pre {
width: 100%;
code {
width: 100% !important;
padding: 10px;
}
}
}
}
</style>

View File

@@ -3,27 +3,52 @@
<v-card-title>Uuid v4 generator</v-card-title>
<v-card-text>
<v-text-field outlined v-model="token" class="centered-input"/>
<v-text-field
outlined
v-model.number="quantity"
ref="quantity"
type="number"
label="Quantity"
dense
class="quantity"
:rules="rules.quantity"
/>
<v-textarea outlined v-model="token" class="centered-input" :rows="quantity <= 10 ? quantity : 10"
readonly/>
<div class="text-center">
<v-btn @click="refreshBool = !refreshBool" depressed class="mr-4">Refresh</v-btn>
<v-btn @click="copyToken()" depressed>Copy token</v-btn>
<v-btn @click="copyToken()" depressed>Copy uuid{{ quantity > 1 ? 's' : ''}}</v-btn>
</div>
</v-card-text>
</v-card>
</template>
<script>
import {copyToClipboard} from "../../utils/helpers";
import {copyToClipboard, isInt} from "../../utils/helpers";
const noop = () => {
};
const generateUuid = () => ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16));
export default {
name: "UuidGenerator",
data: () => ({
refreshBool: true
refreshBool: true,
quantity: 1,
rules: {
quantity: [
v => !!v || 'Quantity is required',
v => (v > 0 && v <= 50 ) || 'Quantity should be > 0 and <= 50',
v => isInt(v) || 'Quantity should be an integer'
]
},
isMounted:false
}),
mounted() {
this.isMounted = true;
},
methods: {
copyToken() {
copyToClipboard(this.token);
@@ -32,16 +57,32 @@
},
computed: {
token() {
if (this.refreshBool) noop(); // To force recomputation
if (this.isMounted && this.$refs.quantity.validate()) {
if (this.refreshBool) noop(); // To force recomputation
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16));
return Array.from({length: this.quantity}, generateUuid).join('\n');
} else {
return '';
}
}
}
}
</script>
<style scoped>
::v-deep .centered-input input {
text-align: center
<style scoped lang="less">
.quantity {
width: 100px;
margin: auto;
text-align: center;
::v-deep input {
text-align: center;
}
}
::v-deep .centered-input textarea {
text-align: center;
margin-top: 13px !important;
font-family: Consolas, monospace;
}
</style>

View File

@@ -25,12 +25,28 @@ const formatBytes = (bytes, decimals = 2) => {
}
const isInt = (value) => {
return !isNaN(value) && ((x) => (x | 0) === x)(parseFloat(value))
return Number.isInteger(value);
}
const debounce = (callback, delay = 300) => {
let timer;
return function(...args) {
clearTimeout(timer);
timer = setTimeout(() => callback(...args), delay);
}
}
const randFromArray = (array) => array[Math.floor(Math.random() * array.length)];
const randIntFromInterval = (min, max) => Math.floor(Math.random() * (max - min) + min)
export {
copyToClipboard,
fileIsImage,
formatBytes,
isInt
isInt,
debounce,
randFromArray,
randIntFromInterval
}

View File

@@ -6,6 +6,11 @@ module.exports = {
],
configureWebpack: () => {
return {
module:{
rules: [
{ test: /\.md$/, use: 'raw-loader' }
]
},
plugins: [
new webpack.DefinePlugin({
'process.env': {