Skip to content

Instantly share code, notes, and snippets.

View msheiko's full-sized avatar
🎲

Maksim msheiko

🎲
  • Poland
View GitHub Profile
@msheiko
msheiko / navicat_reset_trial.sh
Created April 3, 2023 06:21
Reset Navicat Premium 15/16 remaining trial days
#!/bin/bash
set -e
file=$(defaults read /Applications/Navicat\ Premium.app/Contents/Info.plist)
regex="CFBundleShortVersionString = \"([^\.]+)"
[[ $file =~ $regex ]]
version=${BASH_REMATCH[1]}
@msheiko
msheiko / menu store
Created July 10, 2024 07:05
simple pinia store
import { defineStore } from "pinia";
import type { Ref } from "vue";
export const useMenuStore = defineStore("menu", () => {
const { $api } = useNuxtApp();
const catalog = ref(null);
const categories: Ref<{ [key: string]: any }> = ref({});
const fetchCatalogMenu = async () => {
const { data } = await useAsyncData("menu-catalog", () => $api.menu.fetchCategoryMenu());
<template>
<div class="input-block" :class="{ 'input-block__error': errorMessage }">
<div v-if="label || errorMessage" class="input-block__head">
<p v-if="label" class="input-block__label">{{ label }}</p>
<p v-if="textError" class="input-block__error--text">{{ textError }}</p>
</div>
<input
v-model="value"
:type="type"
:disabled="disabled"
.m-item {
@import "/components/cart/cart-promocode";
display: grid;
grid-template-columns: 120px 1fr auto 200px;
grid-template-rows: auto auto;
padding: 20px;
border-bottom: 1px solid $success-100;
&:last-child{
border-bottom: none;
}
<template>
<div class="cart-delivery__section delivery">
<div
:class="['delivery__header delivery-title', { 'delivery-title--unavailable': !delivery.available }]"
@click="handleToggleSection"
>
<span class="delivery-title__text">{{ delivery.name }}</span>
<template v-if="delivery.available">
<span v-if="delivery.minPrice === 0" class="delivery-title__price delivery-title__price--green">
Бесплатно
<template>
<div class="cart-delivery__section delivery">
<div
:class="['delivery__header delivery-title', { 'delivery-title--unavailable': !delivery.available }]"
@click="handleToggleSection"
>
<span class="delivery-title__text">{{ delivery.name }}</span>
<template v-if="delivery.available">
<span v-if="delivery.minPrice === 0" class="delivery-title__price delivery-title__price--green">
Бесплатно