dskvr
2 years ago
15 changed files with 612 additions and 354 deletions
@ -0,0 +1 @@ |
|||||
|
css.loaderOptions.sass |
@ -1,6 +1,8 @@ |
|||||
module.exports = { |
module.exports = { |
||||
plugins: { |
plugins: [ |
||||
tailwindcss: {}, |
require('postcss-import'), |
||||
autoprefixer: {}, |
require('tailwindcss'), |
||||
} |
require('autoprefixer'), |
||||
|
require('postcss-apply') |
||||
|
] |
||||
} |
} |
@ -0,0 +1,69 @@ |
|||||
|
<template> |
||||
|
<div class="w-full max-w-lg lg:max-w-xs"> |
||||
|
<label for="relay-filter" class="sr-only">Filter Relays</label> |
||||
|
<div class="relative"> |
||||
|
<div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"> |
||||
|
<MagnifyingGlassIcon class="h-5 w-5 text-gray-400" aria-hidden="true" /> |
||||
|
</div> |
||||
|
<input |
||||
|
id="relay-filter" |
||||
|
name="relay-filter" |
||||
|
placeholder="Filter Relays" type="search" |
||||
|
class="block w-full rounded-md border border-gray-300 bg-white py-2 pl-10 pr-3 leading-5 placeholder-gray-500 focus:border-indigo-500 focus:placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-indigo-500 sm:text-sm" |
||||
|
/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
//vue |
||||
|
import { defineComponent } from 'vue' |
||||
|
//pinia |
||||
|
import { setupStore } from '@/store' |
||||
|
//shared methods |
||||
|
import RelaysLib from '@/shared/relays-lib.js' |
||||
|
//theme |
||||
|
import { MagnifyingGlassIcon } from '@heroicons/vue/20/solid' |
||||
|
|
||||
|
const localMethods = { |
||||
|
toggle() { |
||||
|
this.isActive = !this.isActive; |
||||
|
}, |
||||
|
clearData(){ |
||||
|
this.store.relays.clearResults() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
export default defineComponent({ |
||||
|
name: 'ToolFilter', |
||||
|
components: { |
||||
|
MagnifyingGlassIcon |
||||
|
}, |
||||
|
setup(){ |
||||
|
return { |
||||
|
store : setupStore() |
||||
|
} |
||||
|
}, |
||||
|
mounted(){ |
||||
|
// this.preferences = this |
||||
|
}, |
||||
|
updated(){ |
||||
|
// this.setCache('preferences') |
||||
|
}, |
||||
|
computed: {}, |
||||
|
methods: Object.assign(localMethods, RelaysLib), |
||||
|
props: {}, |
||||
|
data() { |
||||
|
return { |
||||
|
storage: null, |
||||
|
refresh: true, |
||||
|
preferences: { |
||||
|
refresh: true, |
||||
|
cacheExpiration: 30*60*1000 |
||||
|
}, |
||||
|
isActive: false, |
||||
|
} |
||||
|
}, |
||||
|
}) |
||||
|
|
||||
|
</script> |
@ -0,0 +1,63 @@ |
|||||
|
// const { VueLoaderPlugin } = require("vue-loader");
|
||||
|
// const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||
|
// const path = require("path");
|
||||
|
// const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
|
// const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
|
||||
|
|
||||
|
// module.exports = {
|
||||
|
// entry: path.join(__dirname, "src/main.js"),
|
||||
|
// devtool: "source-map",
|
||||
|
// module: {
|
||||
|
// rules: [
|
||||
|
// {
|
||||
|
// test: /\.vue$/,
|
||||
|
// loader: "vue-loader",
|
||||
|
// },
|
||||
|
// {
|
||||
|
// test: /\.css$/,
|
||||
|
// use: [
|
||||
|
// "style-loader",
|
||||
|
// {
|
||||
|
// loader: MiniCssExtractPlugin.loader,
|
||||
|
// options: {
|
||||
|
// esModule: false,
|
||||
|
// },
|
||||
|
// },
|
||||
|
// {
|
||||
|
// loader: "css-loader",
|
||||
|
// options: {
|
||||
|
// // 0 => no loaders (default);
|
||||
|
// // 1 => postcss-loader;
|
||||
|
// // 2 => postcss-loader, sass-loader
|
||||
|
// importLoaders: 1,
|
||||
|
// },
|
||||
|
// },
|
||||
|
// "postcss-loader",
|
||||
|
// ],
|
||||
|
// },
|
||||
|
// ],
|
||||
|
// },
|
||||
|
// plugins: [
|
||||
|
// new VueLoaderPlugin(),
|
||||
|
// new HtmlWebpackPlugin({
|
||||
|
// template: path.resolve(__dirname, "public/index.html"),
|
||||
|
// }),
|
||||
|
// new MiniCssExtractPlugin(),
|
||||
|
// ],
|
||||
|
// devServer: {
|
||||
|
// open: true,
|
||||
|
// devMiddleware: {
|
||||
|
// writeToDisk: true,
|
||||
|
// },
|
||||
|
// static: {
|
||||
|
// watch: true,
|
||||
|
// },
|
||||
|
// },
|
||||
|
// optimization: {
|
||||
|
// minimizer: [
|
||||
|
// // For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line
|
||||
|
// "...",
|
||||
|
// new CssMinimizerPlugin(),
|
||||
|
// ],
|
||||
|
// },
|
||||
|
// };
|
Loading…
Reference in new issue