diff --git a/README.md b/README.md index 14af788..3a7b6b9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # LinkyLinky Extension + > The companion extension for LinkyLinky diff --git a/manifest.json b/manifest.json index 384d274..2cd8ca3 100644 --- a/manifest.json +++ b/manifest.json @@ -1,13 +1,11 @@ -{ - "manifest_version": 2, - "name": "LinkyLinky", - "version": "0.0.1", - "description": "A simple url shortener", - "short_name": "LinkyLinky", - "permissions": [ - "activeTab" - ], - "browser_action": { - "default_popup": "build/index.html" - } -} \ No newline at end of file +{ + "manifest_version": 2, + "name": "LinkyLinky", + "version": "0.0.1", + "description": "A simple url shortener", + "short_name": "LinkyLinky", + "permissions": ["activeTab"], + "browser_action": { + "default_popup": "build/index.html" + } +} diff --git a/postcss.config.cjs b/postcss.config.cjs index 530f2fc..1b38954 100644 --- a/postcss.config.cjs +++ b/postcss.config.cjs @@ -1,20 +1,21 @@ -const tailwindcss = require("tailwindcss"); -const autoprefixer = require("autoprefixer"); -const cssnano = require("cssnano"); - -const mode = process.env.NODE_ENV; -const dev = mode === "development"; - -const config = { - plugins: [ - //Some plugins, like postcss-nested, need to run before Tailwind, - tailwindcss(), - //But others, like autoprefixer, need to run after, - autoprefixer(), - !dev && cssnano({ - preset: "default", - }) - ], -}; - -module.exports = config; \ No newline at end of file +const tailwindcss = require('tailwindcss'); +const autoprefixer = require('autoprefixer'); +const cssnano = require('cssnano'); + +const mode = process.env.NODE_ENV; +const dev = mode === 'development'; + +const config = { + plugins: [ + //Some plugins, like postcss-nested, need to run before Tailwind, + tailwindcss(), + //But others, like autoprefixer, need to run after, + autoprefixer(), + !dev && + cssnano({ + preset: 'default' + }) + ] +}; + +module.exports = config; diff --git a/src/app.postcss b/src/app.postcss index dbf6827..e27e67f 100644 --- a/src/app.postcss +++ b/src/app.postcss @@ -1,4 +1,4 @@ @tailwind base; /* Write your global styles here, in PostCSS syntax */ @tailwind components; -@tailwind utilities \ No newline at end of file +@tailwind utilities; diff --git a/src/lib/Apiclient.js b/src/lib/Apiclient.js index f4c7be7..9f1497e 100644 --- a/src/lib/Apiclient.js +++ b/src/lib/Apiclient.js @@ -1,30 +1,38 @@ -import axios from 'axios'; -const config = { - username: "niggl", - password: "niggl" -} -export default class Apiclient { - static async getUrls() { - return (await axios.get("https://kauft.es/api?showVisits=true", { - auth: config - })).data - } - - static async getUrlDetails(shortcode) { - return (await axios.get(`https://kauft.es/api/${shortcode}`, { - auth: config - })).data - } - - static async getUrlVisits(shortcode) { - return (await axios.get(`https://kauft.es/api/${shortcode}/visits`, { - auth: config - })).data - } - - static async deleteUrl(shortcode) { - return (await axios.delete(`https://kauft.es/api/${shortcode}`, { - auth: config - })).status - } -} \ No newline at end of file +import axios from 'axios'; +const config = { + username: 'niggl', + password: '9VEBc596T7tiPB7mNJukfeH9LfGzrrJN' +}; +export default class Apiclient { + static async getUrls() { + return ( + await axios.get('https://kauft.es/api?showVisits=true', { + auth: config + }) + ).data; + } + + static async getUrlDetails(shortcode) { + return ( + await axios.get(`https://kauft.es/api/${shortcode}`, { + auth: config + }) + ).data; + } + + static async getUrlVisits(shortcode) { + return ( + await axios.get(`https://kauft.es/api/${shortcode}/visits`, { + auth: config + }) + ).data; + } + + static async deleteUrl(shortcode) { + return ( + await axios.delete(`https://kauft.es/api/${shortcode}`, { + auth: config + }) + ).status; + } +} diff --git a/src/lib/Sidebar.svelte b/src/lib/Sidebar.svelte index 2f9b5de..4e2960a 100644 --- a/src/lib/Sidebar.svelte +++ b/src/lib/Sidebar.svelte @@ -1,152 +1,152 @@ - - -
{title}
-{count}
-{title}
+{count}
+- Timestamp - | -
---|
- Loading data... - | -
- {visit.timestamp} - | -
+ Timestamp + | +
---|
+ Loading data... + | +
+ {visit.timestamp} + | +
- Shortcode - | -- Target - | -- Visits - | -- Edit - | -
---|---|---|---|
- Loading data... - | -- Loading data... - | -Loading data... | -- - | -
- {url.shortcode} - | -- {url.target} - | -{url.visits} | -- - - Details - - | -
+ Shortcode + | ++ Target + | ++ Visits + | ++ Edit + | +
---|---|---|---|
+ Loading data... + | ++ Loading data... + | +Loading data... | ++ + | +
+ {url.shortcode} + | ++ {url.target} + | +{url.visits} | ++ + + Details + + | +