Formatting/Linting
This commit is contained in:
parent
c4e1b5e445
commit
08520ac616
|
@ -1,2 +1,3 @@
|
|||
# LinkyLinky Extension
|
||||
|
||||
> The companion extension for LinkyLinky
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
"version": "0.0.1",
|
||||
"description": "A simple url shortener",
|
||||
"short_name": "LinkyLinky",
|
||||
"permissions": [
|
||||
"activeTab"
|
||||
],
|
||||
"permissions": ["activeTab"],
|
||||
"browser_action": {
|
||||
"default_popup": "build/index.html"
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
const tailwindcss = require("tailwindcss");
|
||||
const autoprefixer = require("autoprefixer");
|
||||
const cssnano = require("cssnano");
|
||||
const tailwindcss = require('tailwindcss');
|
||||
const autoprefixer = require('autoprefixer');
|
||||
const cssnano = require('cssnano');
|
||||
|
||||
const mode = process.env.NODE_ENV;
|
||||
const dev = mode === "development";
|
||||
const dev = mode === 'development';
|
||||
|
||||
const config = {
|
||||
plugins: [
|
||||
|
@ -11,10 +11,11 @@ const config = {
|
|||
tailwindcss(),
|
||||
//But others, like autoprefixer, need to run after,
|
||||
autoprefixer(),
|
||||
!dev && cssnano({
|
||||
preset: "default",
|
||||
!dev &&
|
||||
cssnano({
|
||||
preset: 'default'
|
||||
})
|
||||
],
|
||||
]
|
||||
};
|
||||
|
||||
module.exports = config;
|
|
@ -1,4 +1,4 @@
|
|||
@tailwind base;
|
||||
/* Write your global styles here, in PostCSS syntax */
|
||||
@tailwind components;
|
||||
@tailwind utilities
|
||||
@tailwind utilities;
|
||||
|
|
|
@ -1,30 +1,38 @@
|
|||
import axios from 'axios';
|
||||
const config = {
|
||||
username: "niggl",
|
||||
password: "niggl"
|
||||
}
|
||||
username: 'niggl',
|
||||
password: '9VEBc596T7tiPB7mNJukfeH9LfGzrrJN'
|
||||
};
|
||||
export default class Apiclient {
|
||||
static async getUrls() {
|
||||
return (await axios.get("https://kauft.es/api?showVisits=true", {
|
||||
return (
|
||||
await axios.get('https://kauft.es/api?showVisits=true', {
|
||||
auth: config
|
||||
})).data
|
||||
})
|
||||
).data;
|
||||
}
|
||||
|
||||
static async getUrlDetails(shortcode) {
|
||||
return (await axios.get(`https://kauft.es/api/${shortcode}`, {
|
||||
return (
|
||||
await axios.get(`https://kauft.es/api/${shortcode}`, {
|
||||
auth: config
|
||||
})).data
|
||||
})
|
||||
).data;
|
||||
}
|
||||
|
||||
static async getUrlVisits(shortcode) {
|
||||
return (await axios.get(`https://kauft.es/api/${shortcode}/visits`, {
|
||||
return (
|
||||
await axios.get(`https://kauft.es/api/${shortcode}/visits`, {
|
||||
auth: config
|
||||
})).data
|
||||
})
|
||||
).data;
|
||||
}
|
||||
|
||||
static async deleteUrl(shortcode) {
|
||||
return (await axios.delete(`https://kauft.es/api/${shortcode}`, {
|
||||
return (
|
||||
await axios.delete(`https://kauft.es/api/${shortcode}`, {
|
||||
auth: config
|
||||
})).status
|
||||
})
|
||||
).status;
|
||||
}
|
||||
}
|
|
@ -2,11 +2,10 @@
|
|||
export let title = 'Title';
|
||||
export let count = 0;
|
||||
</script>
|
||||
|
||||
<div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-900">
|
||||
<div
|
||||
class="p-3 mr-4 text-red-500 bg-red-100 rounded-full dark:text-red-100 dark:bg-red-500"
|
||||
>
|
||||
<slot></slot>
|
||||
<div class="p-3 mr-4 text-red-500 bg-red-100 rounded-full dark:text-red-100 dark:bg-red-500">
|
||||
<slot />
|
||||
</div>
|
||||
<div>
|
||||
<p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400">{title}</p>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
});
|
||||
|
||||
function deleteUrl(shortcode) {
|
||||
Apiclient.deleteUrl(shortcode).then((res) => {
|
||||
Apiclient.deleteUrl(shortcode).then(() => {
|
||||
urls = urls.filter((url) => url.shortcode != shortcode);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import preprocess from "svelte-preprocess";
|
||||
import preprocess from 'svelte-preprocess';
|
||||
import staticAdapter from '@sveltejs/adapter-static';
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
|
@ -12,9 +12,11 @@ const config = {
|
|||
}
|
||||
},
|
||||
|
||||
preprocess: [preprocess({
|
||||
"postcss": true
|
||||
})]
|
||||
preprocess: [
|
||||
preprocess({
|
||||
postcss: true
|
||||
})
|
||||
]
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
const config = {
|
||||
mode: "jit",
|
||||
mode: 'jit',
|
||||
darkMode: 'media',
|
||||
purge: [
|
||||
"./src/**/*.{html,js,svelte,ts}",
|
||||
],
|
||||
purge: ['./src/**/*.{html,js,svelte,ts}'],
|
||||
theme: {
|
||||
extend: {},
|
||||
extend: {}
|
||||
},
|
||||
plugins: [],
|
||||
plugins: []
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
|
|
Loading…
Reference in New Issue