This commit is contained in:
Pitu 2020-12-25 20:45:22 +09:00
parent 7190e035b4
commit ec2f9e0d98
29 changed files with 120 additions and 106 deletions

2
.gitignore vendored
View File

@ -3,7 +3,7 @@ node_modules/
dist/ dist/
.nuxt/ .nuxt/
logs/ logs/
# Lolisafe specifics # Chibisafe specifics
database.sqlite database.sqlite
uploads/ uploads/
.env .env

View File

@ -1,12 +1,25 @@
![lolisafe](https://lolisafe.moe/8KFePddY.png) <p align="center">
<img width="234" height="376" src="https://lolisafe.moe/xjoghu.png">
</p>
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/kanadeko/Kuro/master/LICENSE) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/kanadeko/Kuro/master/LICENSE)
[![Chat / Support](https://img.shields.io/badge/Chat%20%2F%20Support-discord-7289DA.svg?style=flat-square)](https://discord.gg/5g6vgwn) [![Chat / Support](https://img.shields.io/badge/Chat%20%2F%20Support-discord-7289DA.svg?style=flat-square)](https://discord.gg/5g6vgwn)
[![Support me](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.herokuapp.com%2Fpitu&style=flat-square)](https://www.patreon.com/pitu) [![Support me](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dpitu%26type%3Dpledges&style=flat-square)](https://www.patreon.com/pitu)
[![Support me](https://img.shields.io/badge/Support-Buy%20me%20a%20coffee-yellow.svg?style=flat-square)](https://www.buymeacoffee.com/kana) [![Support me](https://img.shields.io/badge/Support-Buy%20me%20a%20coffee-yellow.svg?style=flat-square)](https://www.buymeacoffee.com/kana)
### Attention ### Attention
If you are upgrading from v3 to v4 (current release) and you want to keep your files and relations please read the [migration guide](docs/migrating.md). If you are upgrading from v3 to v4 (current release) and you want to keep your files and relations please read the [migration guide](docs/migrating.md).
### What is this?
Chibisafe is a file uploader service written in node that aims to to be easy to use and easy to set up. It's mainly intended for images and videos, but it accepts anything you throw at it.
- You can run it in public or private mode, making it so only people with user accounts can upload files as well as controlling if user signup is enabled or not.
- Out of the box support for ShareX configuration letting you upload screenshots and screencaptures directly to your chibisafe instance.
- Browser extension to be able to right click any image/video and upload it directly to your chibisafe instance.
- Chunk uploads enabled by default to be able to handle big boi files.
- API Key support so you can integrate the service with whatever you desire.
- Albums, tags and Discord-like search function
- User list and control panel
### Pre-requisites ### Pre-requisites
This guide asumes a lot of things, including that you know your way around linux, nginx and internet in general. This guide asumes a lot of things, including that you know your way around linux, nginx and internet in general.
@ -24,18 +37,18 @@ This guide asumes a lot of things, including that you know your way around linux
2. Run `yarn install` 2. Run `yarn install`
3. Run `yarn setup` 3. Run `yarn setup`
Lolisafe is now installed, configured and ready. Now you need to serve it to the public by using a domain name. Chibisafe is now installed, configured and ready. Now you need to serve it to the public by using a domain name.
6. Check the [nginx](docs/nginx.md) file for a sample configuration that has every step to run lolisafe securely on production. 6. Check the [nginx](docs/nginx.md) file for a sample configuration that has every step to run chibisafe securely on production.
After you finish setting up nginx, you need to start lolisafe by using pm2. If you want to use something else like forever, ensure that the process spawned from `npm run start` never dies. After you finish setting up nginx, you need to start chibisafe by using pm2. If you want to use something else like forever, ensure that the process spawned from `npm run start` never dies.
7. Run `pm2 start pm2.json`: 7. Run `pm2 start pm2.json`:
8. Profit 8. Profit
## Author ## Author
**lolisafe** © [Pitu](https://github.com/Pitu), Released under the [MIT](https://github.com/WeebDev/lolisafe/blob/master/LICENSE) License.<br> **Chibisafe** © [Pitu](https://github.com/Pitu), Released under the [MIT](https://github.com/WeebDev/chibisafe/blob/master/LICENSE) License.<br>
Authored and maintained by Pitu. Authored and maintained by Pitu.
> [lolisafe.moe](https://lolisafe.moe) · GitHub [@Pitu](https://github.com/Pitu) > [chibisafe.moe](https://chibisafe.moe) · GitHub [@Pitu](https://github.com/Pitu)

View File

@ -9,9 +9,9 @@ For starters we recommend cloning the new version somewhere else instead of `git
- This will migrate the v3 database to v4 and regenerate every single thumbnail in webp to save bandwidth. - This will migrate the v3 database to v4 and regenerate every single thumbnail in webp to save bandwidth.
- After the migration finishes, the last step is to update your nginx config with the [newly provided script](./nginx.md). - After the migration finishes, the last step is to update your nginx config with the [newly provided script](./nginx.md).
- Restart nginx with `sudo nginx -s reload`. - Restart nginx with `sudo nginx -s reload`.
- And lastly start your lolisafe instance with `pm2 start pm2.json`. - And lastly start your chibisafe instance with `pm2 start pm2.json`.
### Breaking changes ### Breaking changes
- If you are using the lolisafe extension from one of the stores, the new version has been submitted and could take up to a week to get approved. In the meantime you can load the unpacked extension by cloning [this repo](https://github.com/WeebDev/loli-safe-extension). - If you are using the chibisafe extension from one of the stores, the new version has been submitted and could take up to a week to get approved. In the meantime you can load the unpacked extension by cloning [this repo](https://github.com/WeebDev/chibisafe-extension).
- The lolisafe browser extension needs your new token. Instead of pasting your jwt token into it like before, you need to log in to lolisafe, go to your user settings and generate an `API KEY`, which you will use to access the service from 3rd party apps like the browser extension, ShareX, etc. - The chibisafe browser extension needs your new token. Instead of pasting your jwt token into it like before, you need to log in to chibisafe, go to your user settings and generate an `API KEY`, which you will use to access the service from 3rd party apps like the browser extension, ShareX, etc.
- To upload a file to an album directly users used to use the endpoint `/api/upload/${albumId}`. This is no longer the case. To upload directly to an album now it's necessary to pass a header called `albumid` with an integer as the value of the album to which you want to upload the file to. - To upload a file to an album directly users used to use the endpoint `/api/upload/${albumId}`. This is no longer the case. To upload directly to an album now it's necessary to pass a header called `albumid` with an integer as the value of the album to which you want to upload the file to.

View File

@ -1,5 +1,5 @@
{ {
"name": "lolisafe", "name": "chibisafe",
"version": "4.0.0", "version": "4.0.0",
"description": "Blazing fast file uploader and bunker written in node! 🚀", "description": "Blazing fast file uploader and bunker written in node! 🚀",
"license": "MIT", "license": "MIT",
@ -17,14 +17,14 @@
"seed": "yarn knex seed:run", "seed": "yarn knex seed:run",
"api": "node src/api/structures/Server", "api": "node src/api/structures/Server",
"update": "git pull && yarn install && yarn migrate && yarn build && yarn restart", "update": "git pull && yarn install && yarn migrate && yarn build && yarn restart",
"restart": "pm2 restart lolisafe" "restart": "pm2 restart chibisafe"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/WeebDev/lolisafe" "url": "https://github.com/WeebDev/chibisafe"
}, },
"bugs": { "bugs": {
"url": "https://github.com/WeebDev/lolisafe/issues" "url": "https://github.com/WeebDev/chibisafe/issues"
}, },
"engines": { "engines": {
"node": ">=12.0.0" "node": ">=12.0.0"
@ -114,6 +114,7 @@
} }
}, },
"keywords": [ "keywords": [
"chibisafe",
"lolisafe", "lolisafe",
"upload", "upload",
"uploader", "uploader",

View File

@ -1,7 +1,7 @@
{ {
"apps": [ "apps": [
{ {
"name": "lolisafe", "name": "chibisafe",
"script": "npm", "script": "npm",
"args": "run start", "args": "run start",
"env": { "env": {

View File

@ -44,7 +44,7 @@ class albumGET extends Route {
Make sure the file exists just in case, and if not, continue to it's generation. Make sure the file exists just in case, and if not, continue to it's generation.
*/ */
if (exists) { if (exists) {
const fileName = `lolisafe-${identifier}.zip`; const fileName = `chibisafe-${identifier}.zip`;
return res.download(filePath, fileName); return res.download(filePath, fileName);
} }
} }
@ -77,7 +77,7 @@ class albumGET extends Route {
.update('zippedAt', db.fn.now()); .update('zippedAt', db.fn.now());
const filePath = path.join(__dirname, '../../../../', process.env.UPLOAD_FOLDER, 'zips', `${album.userId}-${album.id}.zip`); const filePath = path.join(__dirname, '../../../../', process.env.UPLOAD_FOLDER, 'zips', `${album.userId}-${album.id}.zip`);
const fileName = `lolisafe-${identifier}.zip`; const fileName = `chibisafe-${identifier}.zip`;
return res.download(filePath, fileName); return res.download(filePath, fileName);
} catch (error) { } catch (error) {
log.error(error); log.error(error);

View File

@ -11,7 +11,7 @@ class albumsGET extends Route {
/* /*
Let's fetch the albums. This route will only return a small portion Let's fetch the albums. This route will only return a small portion
of the album files for displaying on the dashboard. It's probably useless of the album files for displaying on the dashboard. It's probably useless
for anyone consuming the API outside of the lolisafe frontend. for anyone consuming the API outside of the chibisafe frontend.
*/ */
const albums = await db const albums = await db
.table('albums') .table('albums')

View File

@ -34,7 +34,7 @@ class loginPOST extends Route {
Create the jwt with some data Create the jwt with some data
*/ */
const jwt = JWT.sign({ const jwt = JWT.sign({
iss: 'lolisafe', iss: 'chibisafe',
sub: user.id, sub: user.id,
iat: moment.utc().valueOf() iat: moment.utc().valueOf()
}, process.env.SECRET, { expiresIn: '30d' }); }, process.env.SECRET, { expiresIn: '30d' });

View File

@ -35,7 +35,7 @@ class Server {
if ((req.url.includes('/api/album/') || req.url.includes('/zip')) && req.method === 'GET') return next(); if ((req.url.includes('/api/album/') || req.url.includes('/zip')) && req.method === 'GET') return next();
// This bypasses the headers.accept if we are accessing the frontend // This bypasses the headers.accept if we are accessing the frontend
if (!req.url.includes('/api/') && req.method === 'GET') return next(); if (!req.url.includes('/api/') && req.method === 'GET') return next();
if (req.headers.accept && req.headers.accept.includes('application/vnd.lolisafe.json')) return next(); if (req.headers.accept && req.headers.accept.includes('application/vnd.chibisafe.json')) return next();
return res.status(405).json({ message: 'Incorrect `Accept` header provided' }); return res.status(405).json({ message: 'Incorrect `Accept` header provided' });
}); });
this.server.use(bodyParser.urlencoded({ extended: true })); this.server.use(bodyParser.urlencoded({ extended: true }));

View File

@ -16,17 +16,17 @@ async function start() {
const wizard = [ const wizard = [
{ {
type: 'input', type: 'input',
query: 'Port to run lolisafe in:', query: 'Port to run chibisafe in:',
handle: 'SERVER_PORT' handle: 'SERVER_PORT'
}, },
{ {
type: 'input', type: 'input',
query: 'Full domain this instance is gonna be running on (Ex: https://lolisafe.moe):', query: 'Full domain this instance is gonna be running on (Ex: https://chibisafe.moe):',
handle: 'DOMAIN' handle: 'DOMAIN'
}, },
{ {
type: 'input', type: 'input',
query: 'Name of the service? (Ex: lolisafe):', query: 'Name of the service? (Ex: chibisafe):',
handle: 'SERVICE_NAME' handle: 'SERVICE_NAME'
}, },
{ {
@ -117,7 +117,7 @@ async function start() {
MAX_LINKS_PER_ALBUM: 5, MAX_LINKS_PER_ALBUM: 5,
META_THEME_COLOR: '#20222b', META_THEME_COLOR: '#20222b',
META_DESCRIPTION: 'Blazing fast file uploader and bunker written in node! 🚀', META_DESCRIPTION: 'Blazing fast file uploader and bunker written in node! 🚀',
META_KEYWORDS: 'lolisafe,upload,uploader,file,vue,images,ssr,file uploader,free', META_KEYWORDS: 'chibisafe,lolisafe,upload,uploader,file,vue,images,ssr,file uploader,free',
META_TWITTER_HANDLE: '@its_pitu' META_TWITTER_HANDLE: '@its_pitu'
}; };

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -3,14 +3,14 @@
@import "../../../node_modules/bulma/sass/utilities/functions"; @import "../../../node_modules/bulma/sass/utilities/functions";
// Setup our custom colors // Setup our custom colors
$lolisafe: #323846; $chibisafe: #323846;
$lolisafe-invert: findColorInvert($lolisafe); $chibisafe-invert: findColorInvert($chibisafe);
// XXX: EXPERIMENTAL, CHECK IF WE NEED ORIGINAL PRIMARY ANYWHERE // XXX: EXPERIMENTAL, CHECK IF WE NEED ORIGINAL PRIMARY ANYWHERE
// $primary: $lolisafe; // $primary: $chibisafe;
// $primary-invert: $lolisafe-invert; // $primary-invert: $chibisafe-invert;
// declare custom colors // declare custom colors
$custom-colors: ( $custom-colors: (
"lolisafe":($lolisafe, $lolisafe-invert) "chibisafe":($chibisafe, $chibisafe-invert)
); );

View File

@ -269,9 +269,9 @@ table.table {
} }
} }
.lolisafe-input input, .chibisafe-input input,
.lolisafe-select select, .chibisafe-select select,
.lolisafe-textarea textarea { .chibisafe-textarea textarea {
border: 2px solid #21252d; border: 2px solid #21252d;
border-radius: 0.3em !important; border-radius: 0.3em !important;
background: rgba(0, 0, 0, 0.15); background: rgba(0, 0, 0, 0.15);
@ -287,7 +287,7 @@ table.table {
} }
} }
.lolisafe-input .icon { .chibisafe-input .icon {
color: #323846 !important; color: #323846 !important;
} }
@ -368,15 +368,15 @@ table.table {
align-items: center; align-items: center;
} }
.lolisafe-on-border.field.is-floating-label .label:before { .chibisafe-on-border.field.is-floating-label .label:before {
background-color: $lolisafe; background-color: $chibisafe;
} }
.is-lolisafe.divider::after, .is-lolisafe.divider::before { .is-chibisafe.divider::after, .is-chibisafe.divider::before {
background-color: #21252d; background-color: #21252d;
} }
.lolisafe.taginput { .chibisafe.taginput {
.taginput-container { .taginput-container {
background-color: #21252d; background-color: #21252d;
border: 2px solid #21252d; border: 2px solid #21252d;

View File

@ -3,7 +3,7 @@
<div class="container"> <div class="container">
<div class="columns"> <div class="columns">
<div class="column is-narrow"> <div class="column is-narrow">
<h4>lolisafe</h4> <h4>chibisafe</h4>
<span>© 2017-{{ getYear }} <span>© 2017-{{ getYear }}
<a <a
href="https://github.com/pitu" href="https://github.com/pitu"
@ -12,7 +12,7 @@
<span>v{{ version }}</span> <span>v{{ version }}</span>
</div> </div>
<div class="column is-narrow bottom-up"> <div class="column is-narrow bottom-up">
<a href="https://github.com/weebdev/lolisafe">GitHub</a> <a href="https://github.com/weebdev/chibisafe">GitHub</a>
<a href="https://patreon.com/pitu">Patreon</a> <a href="https://patreon.com/pitu">Patreon</a>
<a href="https://discord.gg/5g6vgwn">Discord</a> <a href="https://discord.gg/5g6vgwn">Discord</a>
</div> </div>
@ -55,7 +55,7 @@ export default {
"FileFormName": "files[]", "FileFormName": "files[]",
"Headers": { "Headers": {
"authorization": "Bearer ${this.token}", "authorization": "Bearer ${this.token}",
"accept": "application/vnd.lolisafe.json" "accept": "application/vnd.chibisafe.json"
}, },
"ResponseType": "Text", "ResponseType": "Text",
"URL": "$json:url$", "URL": "$json:url$",

View File

@ -1,12 +1,12 @@
<template> <template>
<div class="links"> <div class="links">
<a <a
href="https://github.com/WeebDev/lolisafe" href="https://github.com/WeebDev/chibisafe"
target="_blank" target="_blank"
class="link"> class="link">
<header class="bd-footer-star-header"> <header class="bd-footer-star-header">
<h4 class="bd-footer-title">GitHub</h4> <h4 class="bd-footer-title">GitHub</h4>
<p class="bd-footer-subtitle">Deploy your own lolisafe</p> <p class="bd-footer-subtitle">Deploy your own chibisafe</p>
</header> </header>
</a> </a>
<div <div
@ -64,7 +64,7 @@ export default {
"FileFormName": "files[]", "FileFormName": "files[]",
"Headers": { "Headers": {
"authorization": "Bearer ${this.$store.state.token}", "authorization": "Bearer ${this.$store.state.token}",
"accept": "application/vnd.lolisafe.json" "accept": "application/vnd.chibisafe.json"
}, },
"ResponseType": "Text", "ResponseType": "Text",
"URL": "$json:url$", "URL": "$json:url$",

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="container has-background-lolisafe"> <div class="container has-background-chibisafe">
<div class="columns is-marginless"> <div class="columns is-marginless">
<div class="column image-col has-centered-items"> <div class="column image-col has-centered-items">
<img v-if="!isVideo(file.type)" class="col-img" :src="file.url"> <img v-if="!isVideo(file.type)" class="col-img" :src="file.url">
@ -9,14 +9,14 @@
</div> </div>
<div class="column data-col is-one-third"> <div class="column data-col is-one-third">
<div class="sticky"> <div class="sticky">
<div class="divider is-lolisafe has-text-light"> <div class="divider is-chibisafe has-text-light">
File information File information
</div> </div>
<b-field <b-field
label="ID" label="ID"
label-position="on-border" label-position="on-border"
type="is-lolisafe" type="is-chibisafe"
class="lolisafe-on-border"> class="chibisafe-on-border">
<div class="control"> <div class="control">
<span class="fake-input">{{ file.id }}</span> <span class="fake-input">{{ file.id }}</span>
</div> </div>
@ -24,8 +24,8 @@
<b-field <b-field
label="Name" label="Name"
label-position="on-border" label-position="on-border"
type="is-lolisafe" type="is-chibisafe"
class="lolisafe-on-border"> class="chibisafe-on-border">
<div class="control"> <div class="control">
<span class="fake-input">{{ file.name }}</span> <span class="fake-input">{{ file.name }}</span>
</div> </div>
@ -34,8 +34,8 @@
<b-field <b-field
label="Original Name" label="Original Name"
label-position="on-border" label-position="on-border"
type="is-lolisafe" type="is-chibisafe"
class="lolisafe-on-border"> class="chibisafe-on-border">
<div class="control"> <div class="control">
<span class="fake-input">{{ file.original }}</span> <span class="fake-input">{{ file.original }}</span>
</div> </div>
@ -44,8 +44,8 @@
<b-field <b-field
label="IP" label="IP"
label-position="on-border" label-position="on-border"
type="is-lolisafe" type="is-chibisafe"
class="lolisafe-on-border"> class="chibisafe-on-border">
<div class="control"> <div class="control">
<span class="fake-input">{{ file.ip }}</span> <span class="fake-input">{{ file.ip }}</span>
</div> </div>
@ -54,8 +54,8 @@
<b-field <b-field
label="Link" label="Link"
label-position="on-border" label-position="on-border"
type="is-lolisafe" type="is-chibisafe"
class="lolisafe-on-border"> class="chibisafe-on-border">
<div class="control"> <div class="control">
<a <a
class="fake-input" class="fake-input"
@ -67,8 +67,8 @@
<b-field <b-field
label="Size" label="Size"
label-position="on-border" label-position="on-border"
type="is-lolisafe" type="is-chibisafe"
class="lolisafe-on-border"> class="chibisafe-on-border">
<div class="control"> <div class="control">
<span class="fake-input">{{ formatBytes(file.size) }}</span> <span class="fake-input">{{ formatBytes(file.size) }}</span>
</div> </div>
@ -77,8 +77,8 @@
<b-field <b-field
label="Hash" label="Hash"
label-position="on-border" label-position="on-border"
type="is-lolisafe" type="is-chibisafe"
class="lolisafe-on-border"> class="chibisafe-on-border">
<div class="control"> <div class="control">
<span class="fake-input">{{ file.hash }}</span> <span class="fake-input">{{ file.hash }}</span>
</div> </div>
@ -87,19 +87,19 @@
<b-field <b-field
label="Uploaded" label="Uploaded"
label-position="on-border" label-position="on-border"
type="is-lolisafe" type="is-chibisafe"
class="lolisafe-on-border"> class="chibisafe-on-border">
<div class="control"> <div class="control">
<span class="fake-input"><timeago :since="file.createdAt" /></span> <span class="fake-input"><timeago :since="file.createdAt" /></span>
</div> </div>
</b-field> </b-field>
<div class="divider is-lolisafe has-text-light"> <div class="divider is-chibisafe has-text-light">
Tags Tags
</div> </div>
<Taginfo :image-id="file.id" :image-tags="tags" /> <Taginfo :image-id="file.id" :image-tags="tags" />
<div class="divider is-lolisafe has-text-light"> <div class="divider is-chibisafe has-text-light">
Albums Albums
</div> </div>
<Albuminfo :image-id="file.id" :image-albums="albums" :albums="tinyDetails" /> <Albuminfo :image-id="file.id" :image-albums="albums" :albums="tinyDetails" />
@ -167,7 +167,7 @@ export default {
.fake-input { .fake-input {
font-size: 1rem !important; font-size: 1rem !important;
height: 2.5rem; height: 2.5rem;
border-color: #323846; /* $lolisafe */ border-color: #323846; /* $chibisafe */
max-width: 100%; max-width: 100%;
width: 100%; width: 100%;
border-radius: 4px; border-radius: 4px;

View File

@ -3,7 +3,7 @@
<b-taginput <b-taginput
:value="selectedTags" :value="selectedTags"
:data="filteredTags" :data="filteredTags"
class="lolisafe taginp" class="chibisafe taginp"
ellipsis ellipsis
icon="label" icon="label"
placeholder="Add a tag" placeholder="Add a tag"

View File

@ -8,7 +8,7 @@
:data="filteredHints" :data="filteredHints"
:custom-selector="handleSelect" :custom-selector="handleSelect"
field="name" field="name"
class="lolisafe-input search" class="chibisafe-input search"
placeholder="Search" placeholder="Search"
type="search" type="search"
open-on-focus open-on-focus
@ -22,7 +22,7 @@
</template> </template>
</SearchInput> </SearchInput>
<p class="control"> <p class="control">
<b-button type="is-lolisafe" @click="onSubmit"> <b-button type="is-chibisafe" @click="onSubmit">
Search Search
</b-button> </b-button>
</p> </p>

View File

@ -127,7 +127,7 @@ export default {
maxFilesize: this.config.maxFileSize, maxFilesize: this.config.maxFileSize,
previewTemplate: this.$refs.template.innerHTML, previewTemplate: this.$refs.template.innerHTML,
dictDefaultMessage: 'Drag & Drop your files or click to browse', dictDefaultMessage: 'Drag & Drop your files or click to browse',
headers: { Accept: 'application/vnd.lolisafe.json' } headers: { Accept: 'application/vnd.chibisafe.json' }
}; };
this.showDropzone = true; this.showDropzone = true;
if (this.loggedIn) this.getAlbums(); if (this.loggedIn) this.getAlbums();
@ -152,7 +152,7 @@ export default {
*/ */
updateDropzoneConfig() { updateDropzoneConfig() {
this.$refs.el.setOption('headers', { this.$refs.el.setOption('headers', {
Accept: 'application/vnd.lolisafe.json', Accept: 'application/vnd.chibisafe.json',
Authorization: this.token ? `Bearer ${this.token}` : '', Authorization: this.token ? `Bearer ${this.token}` : '',
albumId: this.selectedAlbum ? this.selectedAlbum : null albumId: this.selectedAlbum ? this.selectedAlbum : null
}); });

View File

@ -109,10 +109,10 @@ export default {
meta: [ meta: [
{ vmid: 'theme-color', name: 'theme-color', content: '#30a9ed' }, { vmid: 'theme-color', name: 'theme-color', content: '#30a9ed' },
{ vmid: 'twitter:card', name: 'twitter:card', content: 'summary' }, { vmid: 'twitter:card', name: 'twitter:card', content: 'summary' },
{ vmid: 'twitter:title', name: 'twitter:title', content: 'lolisafe' }, { vmid: 'twitter:title', name: 'twitter:title', content: 'chibisafe' },
{ vmid: 'twitter:description', name: 'twitter:description', content: 'A modern and self-hosted file upload service that can handle anything you throw at it. Fast uploads, file manager and sharing capabilities all crafted with a beautiful user experience in mind.' }, { vmid: 'twitter:description', name: 'twitter:description', content: 'A modern and self-hosted file upload service that can handle anything you throw at it. Fast uploads, file manager and sharing capabilities all crafted with a beautiful user experience in mind.' },
{ vmid: 'og:url', property: 'og:url', content: `${this.config.URL}/a/${this.$route.params.identifier}` }, { vmid: 'og:url', property: 'og:url', content: `${this.config.URL}/a/${this.$route.params.identifier}` },
{ vmid: 'og:title', property: 'og:title', content: 'lolisafe' }, { vmid: 'og:title', property: 'og:title', content: 'chibisafe' },
{ vmid: 'og:description', property: 'og:description', content: 'A modern and self-hosted file upload service that can handle anything you throw at it. Fast uploads, file manager and sharing capabilities all crafted with a beautiful user experience in mind.' } { vmid: 'og:description', property: 'og:description', content: 'A modern and self-hosted file upload service that can handle anything you throw at it. Fast uploads, file manager and sharing capabilities all crafted with a beautiful user experience in mind.' }
] ]
}; };

View File

@ -16,7 +16,7 @@
message="Nothing to do here" message="Nothing to do here"
horizontal> horizontal>
<b-input <b-input
class="lolisafe-input" class="chibisafe-input"
:value="user.username" :value="user.username"
expanded expanded
disabled /> disabled />
@ -28,7 +28,7 @@
horizontal> horizontal>
<b-input <b-input
v-model="password" v-model="password"
class="lolisafe-input" class="chibisafe-input"
type="password" type="password"
expanded /> expanded />
</b-field> </b-field>
@ -39,7 +39,7 @@
horizontal> horizontal>
<b-input <b-input
v-model="newPassword" v-model="newPassword"
class="lolisafe-input" class="chibisafe-input"
type="password" type="password"
expanded /> expanded />
</b-field> </b-field>
@ -50,14 +50,14 @@
horizontal> horizontal>
<b-input <b-input
v-model="reNewPassword" v-model="reNewPassword"
class="lolisafe-input" class="chibisafe-input"
type="password" type="password"
expanded /> expanded />
</b-field> </b-field>
<div class="mb2 mt2 text-center"> <div class="mb2 mt2 text-center">
<b-button <b-button
type="is-lolisafe" type="is-chibisafe"
@click="changePassword"> @click="changePassword">
Change password Change password
</b-button> </b-button>
@ -69,13 +69,13 @@
horizontal> horizontal>
<b-field expanded> <b-field expanded>
<b-input <b-input
class="lolisafe-input" class="chibisafe-input"
:value="apiKey" :value="apiKey"
expanded expanded
disabled /> disabled />
<p class="control"> <p class="control">
<b-button <b-button
type="is-lolisafe" type="is-chibisafe"
@click="copyKey"> @click="copyKey">
Copy Copy
</b-button> </b-button>
@ -85,7 +85,7 @@
<div class="mb2 mt2 text-center"> <div class="mb2 mt2 text-center">
<b-button <b-button
type="is-lolisafe" type="is-chibisafe"
@click="promptNewAPIKey"> @click="promptNewAPIKey">
Request new API key Request new API key
</b-button> </b-button>

View File

@ -17,7 +17,7 @@
horizontal> horizontal>
<b-input <b-input
v-model="settings.serviceName" v-model="settings.serviceName"
class="lolisafe-input" class="chibisafe-input"
expanded /> expanded />
</b-field> </b-field>
@ -27,7 +27,7 @@
horizontal> horizontal>
<b-input <b-input
v-model="settings.uploadFolder" v-model="settings.uploadFolder"
class="lolisafe-input" class="chibisafe-input"
expanded /> expanded />
</b-field> </b-field>
@ -37,7 +37,7 @@
horizontal> horizontal>
<b-input <b-input
v-model="settings.linksPerAlbum" v-model="settings.linksPerAlbum"
class="lolisafe-input" class="chibisafe-input"
type="number" type="number"
expanded /> expanded />
</b-field> </b-field>
@ -48,7 +48,7 @@
horizontal> horizontal>
<b-input <b-input
v-model="settings.maxUploadSize" v-model="settings.maxUploadSize"
class="lolisafe-input" class="chibisafe-input"
expanded /> expanded />
</b-field> </b-field>
@ -58,7 +58,7 @@
horizontal> horizontal>
<b-input <b-input
v-model="settings.filenameLength" v-model="settings.filenameLength"
class="lolisafe-input" class="chibisafe-input"
expanded /> expanded />
</b-field> </b-field>
@ -68,7 +68,7 @@
horizontal> horizontal>
<b-input <b-input
v-model="settings.albumLinkLength" v-model="settings.albumLinkLength"
class="lolisafe-input" class="chibisafe-input"
expanded /> expanded />
</b-field> </b-field>

View File

@ -16,7 +16,7 @@
<b-field> <b-field>
<b-input <b-input
v-model="newAlbumName" v-model="newAlbumName"
class="lolisafe-input" class="chibisafe-input"
placeholder="Album name..." placeholder="Album name..."
type="text" type="text"
@keyup.enter.native="createAlbum" /> @keyup.enter.native="createAlbum" />

View File

@ -132,13 +132,13 @@
<b-field> <b-field>
<b-input <b-input
v-model="newTagName" v-model="newTagName"
class="lolisafe-input" class="chibisafe-input"
placeholder="Tag name..." placeholder="Tag name..."
type="text" type="text"
@keyup.enter.native="createTag" /> @keyup.enter.native="createTag" />
<p class="control"> <p class="control">
<b-button <b-button
type="is-lolisafe" type="is-chibisafe"
@click="createTag"> @click="createTag">
Create tags Create tags
</b-button> </b-button>

View File

@ -2,20 +2,20 @@
<!-- eslint-disable max-len --> <!-- eslint-disable max-len -->
<div class="container has-text-left"> <div class="container has-text-left">
<h2 class="subtitle"> <h2 class="subtitle">
What is lolisafe? What is chibisafe?
</h2> </h2>
<article class="message"> <article class="message">
<div class="message-body"> <div class="message-body">
lolisafe is an easy to use, open source and completely free file upload service. We accept your files, photos, documents, anything, and give you back a shareable link for you to send to others. chibisafe is an easy to use, open source and completely free file upload service. We accept your files, photos, documents, anything, and give you back a shareable link for you to send to others.
</div> </div>
</article> </article>
<h2 class="subtitle"> <h2 class="subtitle">
Can I run my own lolisafe? Can I run my own chibisafe?
</h2> </h2>
<article class="message"> <article class="message">
<div class="message-body"> <div class="message-body">
Definitely. Head to <a target="_blank" href="https://github.com/WeebDev/lolisafe">our GitHub repo</a> and follow the instructions to clone, build and deploy it by yourself. It's super easy too! Definitely. Head to <a target="_blank" href="https://github.com/WeebDev/chibisafe">our GitHub repo</a> and follow the instructions to clone, build and deploy it by yourself. It's super easy too!
</div> </div>
</article> </article>
@ -33,7 +33,7 @@
</h2> </h2>
<article class="message"> <article class="message">
<div class="message-body"> <div class="message-body">
Albums are a simple way of sorting uploads together. Right now you can create albums through the dashboard and use them only with <a target="_blank" href="https://chrome.google.com/webstore/detail/loli-safe-uploader/enkkmplljfjppcdaancckgilmgoiofnj">our chrome extension</a> which will enable you to <strong>right click -&gt; send to lolisafe</strong> or to a desired album if you have any. Albums are a simple way of sorting uploads together. Right now you can create albums through the dashboard and use them only with <a target="_blank" href="https://chrome.google.com/webstore/detail/lolisafe-uploader/enkkmplljfjppcdaancckgilmgoiofnj">our chrome extension</a> which will enable you to <strong>right click -&gt; send to chibisafe</strong> or to a desired album if you have any.
</div> </div>
</article> </article>
@ -42,7 +42,7 @@
</h2> </h2>
<article class="message"> <article class="message">
<div class="message-body"> <div class="message-body">
There are too many file upload services out there, and a lot of them rely on the foundations of pomf which is ancient. In a desperate and unsuccessful attempt of finding a good file uploader that's easily extendable, lolisafe was born. We give you control over your files, we give you a way to sort your uploads into albums for ease of access and we give you an api to use with ShareX or any other thing that let's you make POST requests. There are too many file upload services out there, and a lot of them rely on the foundations of pomf which is ancient. In a desperate and unsuccessful attempt of finding a good file uploader that's easily extendable, chibisafe was born. We give you control over your files, we give you a way to sort your uploads into albums for ease of access and we give you an api to use with ShareX or any other thing that let's you make POST requests.
</div> </div>
</article> </article>
</div> </div>

View File

@ -12,7 +12,7 @@
<b-field> <b-field>
<b-input <b-input
v-model="username" v-model="username"
class="lolisafe-input" class="chibisafe-input"
type="text" type="text"
placeholder="Username" placeholder="Username"
@keyup.enter.native="login" /> @keyup.enter.native="login" />
@ -20,7 +20,7 @@
<b-field> <b-field>
<b-input <b-input
v-model="password" v-model="password"
class="lolisafe-input" class="chibisafe-input"
type="password" type="password"
placeholder="Password" placeholder="Password"
password-reveal password-reveal
@ -46,7 +46,7 @@
<p class="level-item"> <p class="level-item">
<b-button <b-button
size="is-medium" size="is-medium"
type="is-lolisafe" type="is-chibisafe"
@click="login"> @click="login">
Login Login
</b-button> </b-button>

View File

@ -12,14 +12,14 @@
<b-field> <b-field>
<b-input <b-input
v-model="username" v-model="username"
class="lolisafe-input" class="chibisafe-input"
type="text" type="text"
placeholder="Username" /> placeholder="Username" />
</b-field> </b-field>
<b-field> <b-field>
<b-input <b-input
v-model="password" v-model="password"
class="lolisafe-input" class="chibisafe-input"
type="password" type="password"
placeholder="Password" placeholder="Password"
password-reveal /> password-reveal />
@ -27,7 +27,7 @@
<b-field> <b-field>
<b-input <b-input
v-model="rePassword" v-model="rePassword"
class="lolisafe-input" class="chibisafe-input"
type="password" type="password"
placeholder="Re-type Password" placeholder="Re-type Password"
password-reveal password-reveal
@ -50,7 +50,7 @@
<p class="level-item"> <p class="level-item">
<b-button <b-button
size="is-medium" size="is-medium"
type="is-lolisafe" type="is-chibisafe"
:disabled="isLoading" :disabled="isLoading"
@click="register"> @click="register">
Register Register

View File

@ -1,5 +1,5 @@
export default function({ $axios, store }) { export default function({ $axios, store }) {
$axios.setHeader('accept', 'application/vnd.lolisafe.json'); $axios.setHeader('accept', 'application/vnd.chibisafe.json');
$axios.onRequest(config => { $axios.onRequest(config => {
if (store.state.auth.token) { if (store.state.auth.token) {

View File

@ -1,6 +1,6 @@
{ {
"title": "lolisafe", "title": "chibisafe",
"author_name": "Blazing fast file uploader and bunker written in node! 🚀", "author_name": "Blazing fast file uploader and bunker written in node! 🚀",
"provider_name": "lolisafe", "provider_name": "chibisafe",
"provider_url": "https://lolisafe.moe" "provider_url": "https://chibisafe.moe"
} }