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