added persistent search settings and tweaked view
This commit is contained in:
parent
dc27f39393
commit
5ee718b578
@ -257,7 +257,7 @@ var e=t.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_augus
|
|||||||
//! moment.js locale configuration
|
//! moment.js locale configuration
|
||||||
var e={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(t,e,n){return n?e%10===1&&e%100!==11?t[2]:t[3]:e%10===1&&e%100!==11?t[0]:t[1]}function r(t,r,i){return t+" "+n(e[i],t,r)}function i(t,r,i){return n(e[i],t,r)}function a(t,e){return e?"dažas sekundes":"dažām sekundēm"}var o=t.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:a,ss:r,m:i,mm:r,h:i,hh:r,d:i,dd:r,M:i,MM:r,y:i,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o}))},bb71:function(t,e,n){(function(t,e){e(n("c1df"))})(0,(function(t){"use strict";
|
var e={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(t,e,n){return n?e%10===1&&e%100!==11?t[2]:t[3]:e%10===1&&e%100!==11?t[0]:t[1]}function r(t,r,i){return t+" "+n(e[i],t,r)}function i(t,r,i){return n(e[i],t,r)}function a(t,e){return e?"dažas sekundes":"dažām sekundēm"}var o=t.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:a,ss:r,m:i,mm:r,h:i,hh:r,d:i,dd:r,M:i,MM:r,y:i,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o}))},bb71:function(t,e,n){(function(t,e){e(n("c1df"))})(0,(function(t){"use strict";
|
||||||
//! moment.js locale configuration
|
//! moment.js locale configuration
|
||||||
function e(t,e,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[t+" Tage",t+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[t+" Monate",t+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[t+" Jahre",t+" Jahren"]};return e?i[n][0]:i[n][1]}var n=t.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,w:e,ww:"%d Wochen",M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},bc3a:function(t,e,n){t.exports=n("cee4")},bc9a:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n("8c4e"),i=Object(r["a"])("$listeners","bvListeners")},be29:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t&&t.$options._scopeId||e}},c04e:function(t,e,n){var r=n("861d");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},c109:function(t,e,n){(function(t,e){e(n("c1df"))})(0,(function(t){"use strict";
|
function e(t,e,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[t+" Tage",t+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[t+" Monate",t+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[t+" Jahre",t+" Jahren"]};return e?i[n][0]:i[n][1]}var n=t.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,w:e,ww:"%d Wochen",M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},bbf5:function(t,e,n){(function(){var e={expires:"1d",path:"; path=/",domain:"",secure:"",sameSite:"; SameSite=Lax"},n={install:function(t){t.prototype.$cookies=this,t.$cookies=this},config:function(t,n,r,i,a){e.expires=t||"1d",e.path=n?"; path="+n:"; path=/",e.domain=r?"; domain="+r:"",e.secure=i?"; Secure":"",e.sameSite=a?"; SameSite="+a:"; SameSite=Lax"},get:function(t){var e=decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;if(e&&"{"===e.substring(0,1)&&"}"===e.substring(e.length-1,e.length))try{e=JSON.parse(e)}catch(n){return e}return e},set:function(t,n,r,i,a,o,s){if(!t)throw new Error("Cookie name is not find in first argument.");if(/^(?:expires|max\-age|path|domain|secure|SameSite)$/i.test(t))throw new Error('Cookie key name illegality, Cannot be set to ["expires","max-age","path","domain","secure","SameSite"]\t current key name: '+t);n&&n.constructor===Object&&(n=JSON.stringify(n));var c="";if(r=void 0==r?e.expires:r,r&&0!=r)switch(r.constructor){case Number:c=r===1/0||-1===r?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+r;break;case String:if(/^(?:\d+(y|m|d|h|min|s))$/i.test(r)){var u=r.replace(/^(\d+)(?:y|m|d|h|min|s)$/i,"$1");switch(r.replace(/^(?:\d+)(y|m|d|h|min|s)$/i,"$1").toLowerCase()){case"m":c="; max-age="+2592e3*+u;break;case"d":c="; max-age="+86400*+u;break;case"h":c="; max-age="+3600*+u;break;case"min":c="; max-age="+60*+u;break;case"s":c="; max-age="+u;break;case"y":c="; max-age="+31104e3*+u;break;default:new Error('unknown exception of "set operation"')}}else c="; expires="+r;break;case Date:c="; expires="+r.toUTCString();break}return document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(n)+c+(a?"; domain="+a:e.domain)+(i?"; path="+i:e.path)+(void 0==o?e.secure:o?"; Secure":"")+(void 0==s?e.sameSite:s?"; SameSite="+s:""),this},remove:function(t,n,r){return!(!t||!this.isKey(t))&&(document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(r?"; domain="+r:e.domain)+(n?"; path="+n:e.path)+"; SameSite=Lax",this)},isKey:function(t){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){if(!document.cookie)return[];for(var t=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),e=0;e<t.length;e++)t[e]=decodeURIComponent(t[e]);return t}};t.exports=n,"undefined"!==typeof window&&(window.$cookies=n)})()},bc3a:function(t,e,n){t.exports=n("cee4")},bc9a:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n("8c4e"),i=Object(r["a"])("$listeners","bvListeners")},be29:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t&&t.$options._scopeId||e}},c04e:function(t,e,n){var r=n("861d");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},c109:function(t,e,n){(function(t,e){e(n("c1df"))})(0,(function(t){"use strict";
|
||||||
//! moment.js locale configuration
|
//! moment.js locale configuration
|
||||||
var e=t.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}});return e}))},c1df:function(t,e,n){(function(t){var e;//! moment.js
|
var e=t.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}});return e}))},c1df:function(t,e,n){(function(t){var e;//! moment.js
|
||||||
//! version : 2.29.1
|
//! version : 2.29.1
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
16
node_modules/.yarn-integrity
generated
vendored
Normal file
16
node_modules/.yarn-integrity
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"systemParams": "win32-x64-83",
|
||||||
|
"modulesFolders": [
|
||||||
|
"node_modules"
|
||||||
|
],
|
||||||
|
"flags": [],
|
||||||
|
"linkedModules": [],
|
||||||
|
"topLevelPatterns": [
|
||||||
|
"vue-cookies@^1.7.4"
|
||||||
|
],
|
||||||
|
"lockfileEntries": {
|
||||||
|
"vue-cookies@^1.7.4": "https://registry.yarnpkg.com/vue-cookies/-/vue-cookies-1.7.4.tgz#d241d0a0431da0795837651d10b4d73e7c8d3e8d"
|
||||||
|
},
|
||||||
|
"files": [],
|
||||||
|
"artifacts": {}
|
||||||
|
}
|
21
node_modules/vue-cookies/LICENSE
generated
vendored
Normal file
21
node_modules/vue-cookies/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2016
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
223
node_modules/vue-cookies/README.md
generated
vendored
Normal file
223
node_modules/vue-cookies/README.md
generated
vendored
Normal file
@ -0,0 +1,223 @@
|
|||||||
|
# vue-cookies
|
||||||
|
|
||||||
|
A simple Vue.js plugin for handling browser cookies
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Browser
|
||||||
|
```
|
||||||
|
<script src="https://unpkg.com/vue/dist/vue.js"></script>
|
||||||
|
<script src="https://unpkg.com/vue-cookies@1.7.4/vue-cookies.js"></script>
|
||||||
|
```
|
||||||
|
### Package Managers
|
||||||
|
```
|
||||||
|
npm install vue-cookies --save
|
||||||
|
|
||||||
|
// require
|
||||||
|
var Vue = require('vue')
|
||||||
|
Vue.use(require('vue-cookies'))
|
||||||
|
|
||||||
|
// es2015 module
|
||||||
|
import Vue from 'vue'
|
||||||
|
import VueCookies from 'vue-cookies'
|
||||||
|
Vue.use(VueCookies)
|
||||||
|
|
||||||
|
// set default config
|
||||||
|
Vue.$cookies.config('7d')
|
||||||
|
|
||||||
|
// set global cookie
|
||||||
|
Vue.$cookies.set('theme','default');
|
||||||
|
Vue.$cookies.set('hover-time','1s');
|
||||||
|
```
|
||||||
|
|
||||||
|
## Api
|
||||||
|
|
||||||
|
syntax format: **[this | Vue].$cookies.[method]**
|
||||||
|
|
||||||
|
* Set global config
|
||||||
|
```
|
||||||
|
$cookies.config(expireTimes[,path[, domain[, secure[, sameSite]]]) // default: expireTimes = 1d, path = '/', domain = '', secure = '', sameSite = 'Lax'
|
||||||
|
```
|
||||||
|
|
||||||
|
* Set a cookie
|
||||||
|
```
|
||||||
|
$cookies.set(keyName, value[, expireTimes[, path[, domain[, secure[, sameSite]]]]]) //return this
|
||||||
|
```
|
||||||
|
* Get a cookie
|
||||||
|
```
|
||||||
|
$cookies.get(keyName) // return value
|
||||||
|
```
|
||||||
|
* Remove a cookie
|
||||||
|
```
|
||||||
|
$cookies.remove(keyName [, path [, domain]]) // return this
|
||||||
|
```
|
||||||
|
* Exist a `cookie name`
|
||||||
|
```
|
||||||
|
$cookies.isKey(keyName) // return false or true
|
||||||
|
```
|
||||||
|
* Get All `cookie name`
|
||||||
|
```
|
||||||
|
$cookies.keys() // return a array
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
#### set global config
|
||||||
|
```
|
||||||
|
// 30 day after, expire
|
||||||
|
Vue.$cookies.config('30d')
|
||||||
|
|
||||||
|
// set secure, only https works
|
||||||
|
Vue.$cookies.config('7d','','',true)
|
||||||
|
|
||||||
|
// 2019-03-13 expire
|
||||||
|
this.$cookies.config(new Date(2019,03,13).toUTCString())
|
||||||
|
|
||||||
|
// 30 day after, expire, '' current path , browser default
|
||||||
|
this.$cookies.config(60 * 60 * 24 * 30,'');
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### support json object
|
||||||
|
```
|
||||||
|
var user = { id:1, name:'Journal',session:'25j_7Sl6xDq2Kc3ym0fmrSSk2xV2XkUkX' };
|
||||||
|
this.$cookies.set('user',user);
|
||||||
|
// print user name
|
||||||
|
console.log(this.$cookies.get('user').name)
|
||||||
|
```
|
||||||
|
|
||||||
|
#### set expire times
|
||||||
|
**Suppose the current time is : Sat, 11 Mar 2017 12:25:57 GMT**
|
||||||
|
|
||||||
|
**Following equivalence: 1 day after, expire**
|
||||||
|
|
||||||
|
**Support chaining sets together**
|
||||||
|
``` javascript
|
||||||
|
// default expire time: 1 day
|
||||||
|
this.$cookies.set("user_session","25j_7Sl6xDq2Kc3ym0fmrSSk2xV2XkUkX")
|
||||||
|
// number + d , ignore case
|
||||||
|
.set("user_session","25j_7Sl6xDq2Kc3ym0fmrSSk2xV2XkUkX","1d")
|
||||||
|
.set("user_session","25j_7Sl6xDq2Kc3ym0fmrSSk2xV2XkUkX","1D")
|
||||||
|
// Base of second
|
||||||
|
.set("user_session","25j_7Sl6xDq2Kc3ym0fmrSSk2xV2XkUkX",60 * 60 * 24)
|
||||||
|
// input a Date, + 1day
|
||||||
|
.set("user_session","25j_7Sl6xDq2Kc3ym0fmrSSk2xV2XkUkX", new Date(2017, 03, 12))
|
||||||
|
// input a date string, + 1day
|
||||||
|
.set("user_session","25j_7Sl6xDq2Kc3ym0fmrSSk2xV2XkUkX", "Sat, 13 Mar 2017 12:25:57 GMT")
|
||||||
|
```
|
||||||
|
#### set expire times, input number type
|
||||||
|
|
||||||
|
```
|
||||||
|
this.$cookies.set("default_unit_second","input_value",1); // 1 second after, expire
|
||||||
|
this.$cookies.set("default_unit_second","input_value",60 + 30); // 1 minute 30 second after, expire
|
||||||
|
this.$cookies.set("default_unit_second","input_value",60 * 60 * 12); // 12 hour after, expire
|
||||||
|
this.$cookies.set("default_unit_second","input_value",60 * 60 * 24 * 30); // 1 month after, expire
|
||||||
|
```
|
||||||
|
|
||||||
|
#### set expire times - end of browser session
|
||||||
|
|
||||||
|
```
|
||||||
|
this.$cookies.set("default_unit_second","input_value",0); // end of session - use 0 or "0"!
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### set expire times , input string type
|
||||||
|
|
||||||
|
| Unit | full name |
|
||||||
|
| ----------- | ----------- |
|
||||||
|
| y | year |
|
||||||
|
| m | month |
|
||||||
|
| d | day |
|
||||||
|
| h | hour |
|
||||||
|
| min | minute |
|
||||||
|
| s | second |
|
||||||
|
|
||||||
|
**Unit Names Ignore Case**
|
||||||
|
|
||||||
|
**not support the combination**
|
||||||
|
|
||||||
|
**not support the double value**
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
this.$cookies.set("token","GH1.1.1689020474.1484362313","60s"); // 60 second after, expire
|
||||||
|
this.$cookies.set("token","GH1.1.1689020474.1484362313","30MIN"); // 30 minute after, expire, ignore case
|
||||||
|
this.$cookies.set("token","GH1.1.1689020474.1484362313","24d"); // 24 day after, expire
|
||||||
|
this.$cookies.set("token","GH1.1.1689020474.1484362313","4m"); // 4 month after, expire
|
||||||
|
this.$cookies.set("token","GH1.1.1689020474.1484362313","16h"); // 16 hour after, expire
|
||||||
|
this.$cookies.set("token","GH1.1.1689020474.1484362313","3y"); // 3 year after, expire
|
||||||
|
|
||||||
|
// input date string
|
||||||
|
this.$cookies.set('token',"GH1.1.1689020474.1484362313", new Date(2017,3,13).toUTCString());
|
||||||
|
this.$cookies.set("token","GH1.1.1689020474.1484362313", "Sat, 13 Mar 2017 12:25:57 GMT ");
|
||||||
|
```
|
||||||
|
|
||||||
|
#### set expire support date
|
||||||
|
```
|
||||||
|
var date = new Date;
|
||||||
|
date.setDate(date.getDate() + 1);
|
||||||
|
this.$cookies.set("token","GH1.1.1689020474.1484362313", date);
|
||||||
|
```
|
||||||
|
|
||||||
|
#### set never expire
|
||||||
|
```
|
||||||
|
this.$cookies.set("token","GH1.1.1689020474.1484362313", Infinity); // never expire
|
||||||
|
// never expire , only -1,Other negative Numbers are invalid
|
||||||
|
this.$cookies.set("token","GH1.1.1689020474.1484362313", -1);
|
||||||
|
```
|
||||||
|
|
||||||
|
#### remove cookie
|
||||||
|
```
|
||||||
|
this.$cookies.set("token",value); // domain.com and *.doamin.com are readable
|
||||||
|
this.$cookies.remove("token"); // remove token of domain.com and *.doamin.com
|
||||||
|
|
||||||
|
this.$cookies.set("token", value, null, null, "domain.com"); // only domain.com are readable
|
||||||
|
this.$cookies.remove("token", null, "domain.com"); // remove token of domain.com
|
||||||
|
```
|
||||||
|
|
||||||
|
#### set other arguments
|
||||||
|
```
|
||||||
|
// set path
|
||||||
|
this.$cookies.set("use_path_argument","value","1d","/app");
|
||||||
|
|
||||||
|
// set domain
|
||||||
|
this.$cookies.set("use_path_argument","value",null, null, "domain.com"); // default 1 day after,expire
|
||||||
|
|
||||||
|
// set secure
|
||||||
|
this.$cookies.set("use_path_argument","value",null, null, null,true);
|
||||||
|
|
||||||
|
// set sameSite - should be one of `None`, `Strict` or `Lax`. Read more https://web.dev/samesite-cookies-explained/
|
||||||
|
this.$cookies.set("use_path_argument","value",null, null, null, null, "Lax");
|
||||||
|
```
|
||||||
|
|
||||||
|
#### other operation
|
||||||
|
```
|
||||||
|
// check a cookie exist
|
||||||
|
this.$cookies.isKey("token")
|
||||||
|
|
||||||
|
// get a cookie
|
||||||
|
this.$cookies.get("token");
|
||||||
|
|
||||||
|
// remove a cookie
|
||||||
|
this.$cookies.remove("token");
|
||||||
|
|
||||||
|
// get all cookie key names, line shows
|
||||||
|
this.$cookies.keys().join("\n");
|
||||||
|
|
||||||
|
// remove all cookie
|
||||||
|
this.$cookies.keys().forEach(cookie => this.$cookies.remove(cookie))
|
||||||
|
|
||||||
|
// vue-cookies global
|
||||||
|
[this | Vue].$cookies.[method]
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Warning
|
||||||
|
|
||||||
|
**$cookies key names Cannot be set to ['expires','max-age','path','domain','secure','SameSite']**
|
||||||
|
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[MIT](http://opensource.org/licenses/MIT)
|
||||||
|
Copyright (c) 2016-present, cmp-cc
|
29
node_modules/vue-cookies/package.json
generated
vendored
Normal file
29
node_modules/vue-cookies/package.json
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"name": "vue-cookies",
|
||||||
|
"version": "1.7.4",
|
||||||
|
"description": "A simple Vue.js plugin for handling browser cookies",
|
||||||
|
"main": "vue-cookies.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/cmp-cc/vue-cookies.git"
|
||||||
|
},
|
||||||
|
"keywords":[
|
||||||
|
"javascript",
|
||||||
|
"vue",
|
||||||
|
"cookie",
|
||||||
|
"cookies",
|
||||||
|
"vue-cookies",
|
||||||
|
"browser",
|
||||||
|
"session"
|
||||||
|
],
|
||||||
|
"author": "cmp-cc",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/cmp-cc/vue-cookies/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/cmp-cc/vue-cookies#readme",
|
||||||
|
"typings": "types/index.d.ts"
|
||||||
|
}
|
51
node_modules/vue-cookies/sample/welcome.html
generated
vendored
Normal file
51
node_modules/vue-cookies/sample/welcome.html
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<script src="https://unpkg.com/vue/dist/vue.js"></script>
|
||||||
|
<script src="../vue-cookies.js"></script>
|
||||||
|
<title>Welcome Username</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="v-main">
|
||||||
|
|
||||||
|
<p v-if="!welcomeValue">
|
||||||
|
Please enter your name : <input type="text" @keyup.enter="username">
|
||||||
|
</p>
|
||||||
|
<p v-else>
|
||||||
|
Welcome again : {{ welcomeValue }}
|
||||||
|
<button @click="deleteUser">{{deleteUserText}}</button>
|
||||||
|
{{deleteUserState}}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
new Vue({
|
||||||
|
el:'#v-main',
|
||||||
|
data: function() {
|
||||||
|
return {
|
||||||
|
welcomeValue: this.$cookies.get('username'),
|
||||||
|
deleteUserText : 'Delete Cookie',
|
||||||
|
deleteUserState:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
username : function(event){
|
||||||
|
this.welcomeValue = event.target.value;
|
||||||
|
this.$cookies.set('username', this.welcomeValue)
|
||||||
|
},
|
||||||
|
deleteUser: function(){
|
||||||
|
this.$cookies.remove('username');
|
||||||
|
this.deleteUserState = '√'
|
||||||
|
|
||||||
|
setTimeout(function(){
|
||||||
|
location.reload()
|
||||||
|
}, 0.5 * 1000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</html>
|
44
node_modules/vue-cookies/types/index.d.ts
generated
vendored
Normal file
44
node_modules/vue-cookies/types/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import _Vue from 'vue';
|
||||||
|
import './vue';
|
||||||
|
|
||||||
|
export declare function install(Vue: typeof _Vue): void;
|
||||||
|
|
||||||
|
export interface VueCookies {
|
||||||
|
/**
|
||||||
|
* Set global config
|
||||||
|
*/
|
||||||
|
config(expireTimes: string | number | Date, path?: string, domain?: string, secure?: boolean, sameSite?: string): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set a cookie
|
||||||
|
*/
|
||||||
|
set(keyName: string, value: any, expireTimes?: string | number | Date,
|
||||||
|
path?: string, domain?: string, secure?: boolean, sameSite?: string): this;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a cookie
|
||||||
|
*/
|
||||||
|
get(keyName: string): any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a cookie
|
||||||
|
*/
|
||||||
|
remove(keyName: string, path?: string, domain?: string): this;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exist a cookie name
|
||||||
|
*/
|
||||||
|
isKey(keyName: string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get All cookie name
|
||||||
|
*/
|
||||||
|
keys(): string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
declare const _default : {
|
||||||
|
VueCookies: VueCookies;
|
||||||
|
install: typeof install;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default _default;
|
11
node_modules/vue-cookies/types/vue.d.ts
generated
vendored
Normal file
11
node_modules/vue-cookies/types/vue.d.ts
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { VueCookies } from "./index";
|
||||||
|
|
||||||
|
declare module "vue/types/vue" {
|
||||||
|
interface Vue {
|
||||||
|
$cookies: VueCookies;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface VueConstructor {
|
||||||
|
$cookies: VueCookies;
|
||||||
|
}
|
||||||
|
}
|
146
node_modules/vue-cookies/vue-cookies.js
generated
vendored
Normal file
146
node_modules/vue-cookies/vue-cookies.js
generated
vendored
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
/**
|
||||||
|
* Vue Cookies v1.7.4
|
||||||
|
* https://github.com/cmp-cc/vue-cookies
|
||||||
|
*
|
||||||
|
* Copyright 2016, cmp-cc
|
||||||
|
* Released under the MIT license
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
|
||||||
|
var defaultConfig = {
|
||||||
|
expires: '1d',
|
||||||
|
path: '; path=/',
|
||||||
|
domain: '',
|
||||||
|
secure: '',
|
||||||
|
sameSite: '; SameSite=Lax'
|
||||||
|
};
|
||||||
|
|
||||||
|
var VueCookies = {
|
||||||
|
// install of Vue
|
||||||
|
install: function (Vue) {
|
||||||
|
Vue.prototype.$cookies = this;
|
||||||
|
Vue.$cookies = this;
|
||||||
|
},
|
||||||
|
config: function (expireTimes, path, domain, secure, sameSite) {
|
||||||
|
defaultConfig.expires = expireTimes ? expireTimes : '1d';
|
||||||
|
defaultConfig.path = path ? '; path=' + path : '; path=/';
|
||||||
|
defaultConfig.domain = domain ? '; domain=' + domain : '';
|
||||||
|
defaultConfig.secure = secure ? '; Secure' : '';
|
||||||
|
defaultConfig.sameSite = sameSite ? '; SameSite=' + sameSite : '; SameSite=Lax';
|
||||||
|
},
|
||||||
|
get: function (key) {
|
||||||
|
var value = decodeURIComponent(document.cookie.replace(new RegExp('(?:(?:^|.*;)\\s*' + encodeURIComponent(key).replace(/[\-\.\+\*]/g, '\\$&') + '\\s*\\=\\s*([^;]*).*$)|^.*$'), '$1')) || null;
|
||||||
|
|
||||||
|
if (value && value.substring(0, 1) === '{' && value.substring(value.length - 1, value.length) === '}') {
|
||||||
|
try {
|
||||||
|
value = JSON.parse(value);
|
||||||
|
} catch (e) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
set: function (key, value, expireTimes, path, domain, secure, sameSite) {
|
||||||
|
if (!key) {
|
||||||
|
throw new Error('Cookie name is not find in first argument.');
|
||||||
|
} else if (/^(?:expires|max\-age|path|domain|secure|SameSite)$/i.test(key)) {
|
||||||
|
throw new Error('Cookie key name illegality, Cannot be set to ["expires","max-age","path","domain","secure","SameSite"]\t current key name: ' + key);
|
||||||
|
}
|
||||||
|
// support json object
|
||||||
|
if (value && value.constructor === Object) {
|
||||||
|
value = JSON.stringify(value);
|
||||||
|
}
|
||||||
|
var _expires = '';
|
||||||
|
expireTimes = expireTimes == undefined ? defaultConfig.expires : expireTimes;
|
||||||
|
if (expireTimes && expireTimes != 0) {
|
||||||
|
switch (expireTimes.constructor) {
|
||||||
|
case Number:
|
||||||
|
if (expireTimes === Infinity || expireTimes === -1) _expires = '; expires=Fri, 31 Dec 9999 23:59:59 GMT';
|
||||||
|
else _expires = '; max-age=' + expireTimes;
|
||||||
|
break;
|
||||||
|
case String:
|
||||||
|
if (/^(?:\d+(y|m|d|h|min|s))$/i.test(expireTimes)) {
|
||||||
|
// get capture number group
|
||||||
|
var _expireTime = expireTimes.replace(/^(\d+)(?:y|m|d|h|min|s)$/i, '$1');
|
||||||
|
// get capture type group , to lower case
|
||||||
|
switch (expireTimes.replace(/^(?:\d+)(y|m|d|h|min|s)$/i, '$1').toLowerCase()) {
|
||||||
|
// Frequency sorting
|
||||||
|
case 'm':
|
||||||
|
_expires = '; max-age=' + +_expireTime * 2592000;
|
||||||
|
break; // 60 * 60 * 24 * 30
|
||||||
|
case 'd':
|
||||||
|
_expires = '; max-age=' + +_expireTime * 86400;
|
||||||
|
break; // 60 * 60 * 24
|
||||||
|
case 'h':
|
||||||
|
_expires = '; max-age=' + +_expireTime * 3600;
|
||||||
|
break; // 60 * 60
|
||||||
|
case 'min':
|
||||||
|
_expires = '; max-age=' + +_expireTime * 60;
|
||||||
|
break; // 60
|
||||||
|
case 's':
|
||||||
|
_expires = '; max-age=' + _expireTime;
|
||||||
|
break;
|
||||||
|
case 'y':
|
||||||
|
_expires = '; max-age=' + +_expireTime * 31104000;
|
||||||
|
break; // 60 * 60 * 24 * 30 * 12
|
||||||
|
default:
|
||||||
|
new Error('unknown exception of "set operation"');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_expires = '; expires=' + expireTimes;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Date:
|
||||||
|
_expires = '; expires=' + expireTimes.toUTCString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.cookie =
|
||||||
|
encodeURIComponent(key) + '=' + encodeURIComponent(value) +
|
||||||
|
_expires +
|
||||||
|
(domain ? '; domain=' + domain : defaultConfig.domain) +
|
||||||
|
(path ? '; path=' + path : defaultConfig.path) +
|
||||||
|
(secure == undefined ? defaultConfig.secure : secure ? '; Secure' : '') +
|
||||||
|
(sameSite == undefined ? defaultConfig.sameSite : (sameSite ? '; SameSite=' + sameSite : ''));
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
remove: function (key, path, domain) {
|
||||||
|
if (!key || !this.isKey(key)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
document.cookie = encodeURIComponent(key) +
|
||||||
|
'=; expires=Thu, 01 Jan 1970 00:00:00 GMT' +
|
||||||
|
(domain ? '; domain=' + domain : defaultConfig.domain) +
|
||||||
|
(path ? '; path=' + path : defaultConfig.path) +
|
||||||
|
'; SameSite=Lax';
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
isKey: function (key) {
|
||||||
|
return (new RegExp('(?:^|;\\s*)' + encodeURIComponent(key).replace(/[\-\.\+\*]/g, '\\$&') + '\\s*\\=')).test(document.cookie);
|
||||||
|
},
|
||||||
|
keys: function () {
|
||||||
|
if (!document.cookie) return [];
|
||||||
|
var _keys = document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g, '').split(/\s*(?:\=[^;]*)?;\s*/);
|
||||||
|
for (var _index = 0; _index < _keys.length; _index++) {
|
||||||
|
_keys[_index] = decodeURIComponent(_keys[_index]);
|
||||||
|
}
|
||||||
|
return _keys;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (typeof exports == 'object') {
|
||||||
|
module.exports = VueCookies;
|
||||||
|
} else if (typeof define == 'function' && define.amd) {
|
||||||
|
define([], function () {
|
||||||
|
return VueCookies;
|
||||||
|
});
|
||||||
|
} else if (window.Vue) {
|
||||||
|
Vue.use(VueCookies);
|
||||||
|
}
|
||||||
|
// vue-cookies can exist independently,no dependencies library
|
||||||
|
if (typeof window !== 'undefined') {
|
||||||
|
window.$cookies = VueCookies;
|
||||||
|
}
|
||||||
|
|
||||||
|
})();
|
5
package.json
Normal file
5
package.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"vue-cookies": "^1.7.4"
|
||||||
|
}
|
||||||
|
}
|
@ -17,14 +17,14 @@
|
|||||||
v-bind:placeholder="$t('Search')"></b-input>
|
v-bind:placeholder="$t('Search')"></b-input>
|
||||||
<b-input-group-append>
|
<b-input-group-append>
|
||||||
<b-button v-b-toggle.collapse_advanced_search variant="primary" class="shadow-none"><i
|
<b-button v-b-toggle.collapse_advanced_search variant="primary" class="shadow-none"><i
|
||||||
class="fas fa-caret-down" v-if="!advanced_search_visible"></i><i class="fas fa-caret-up"
|
class="fas fa-caret-down" v-if="!settings.advanced_search_visible"></i><i class="fas fa-caret-up"
|
||||||
v-if="advanced_search_visible"></i>
|
v-if="settings.advanced_search_visible"></i>
|
||||||
</b-button>
|
</b-button>
|
||||||
</b-input-group-append>
|
</b-input-group-append>
|
||||||
</b-input-group>
|
</b-input-group>
|
||||||
|
|
||||||
|
|
||||||
<b-collapse id="collapse_advanced_search" class="mt-2" v-model="advanced_search_visible">
|
<b-collapse id="collapse_advanced_search" class="mt-2" v-model="settings.advanced_search_visible">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -66,9 +66,10 @@
|
|||||||
<b-input-group-append>
|
<b-input-group-append>
|
||||||
<b-input-group-text>
|
<b-input-group-text>
|
||||||
|
|
||||||
<b-form-checkbox v-model="search_keywords_or" name="check-button" @change="refreshData"
|
<b-form-checkbox v-model="settings.search_keywords_or" name="check-button"
|
||||||
|
@change="refreshData"
|
||||||
class="shadow-none" switch>
|
class="shadow-none" switch>
|
||||||
<span class="text-uppercase" v-if="search_keywords_or">{{ $t('or') }}</span>
|
<span class="text-uppercase" v-if="settings.search_keywords_or">{{ $t('or') }}</span>
|
||||||
<span class="text-uppercase" v-else>{{ $t('and') }}</span>
|
<span class="text-uppercase" v-else>{{ $t('and') }}</span>
|
||||||
</b-form-checkbox>
|
</b-form-checkbox>
|
||||||
</b-input-group-text>
|
</b-input-group-text>
|
||||||
@ -88,9 +89,10 @@
|
|||||||
v-bind:placeholder="$t('Ingredients')"></generic-multiselect>
|
v-bind:placeholder="$t('Ingredients')"></generic-multiselect>
|
||||||
<b-input-group-append>
|
<b-input-group-append>
|
||||||
<b-input-group-text>
|
<b-input-group-text>
|
||||||
<b-form-checkbox v-model="search_foods_or" name="check-button" @change="refreshData"
|
<b-form-checkbox v-model="settings.search_foods_or" name="check-button"
|
||||||
|
@change="refreshData"
|
||||||
class="shadow-none" switch>
|
class="shadow-none" switch>
|
||||||
<span class="text-uppercase" v-if="search_foods_or">{{ $t('or') }}</span>
|
<span class="text-uppercase" v-if="settings.search_foods_or">{{ $t('or') }}</span>
|
||||||
<span class="text-uppercase" v-else>{{ $t('and') }}</span>
|
<span class="text-uppercase" v-else>{{ $t('and') }}</span>
|
||||||
</b-form-checkbox>
|
</b-form-checkbox>
|
||||||
</b-input-group-text>
|
</b-input-group-text>
|
||||||
@ -112,9 +114,10 @@
|
|||||||
<b-input-group-append>
|
<b-input-group-append>
|
||||||
<b-input-group-text>
|
<b-input-group-text>
|
||||||
|
|
||||||
<b-form-checkbox v-model="search_books_or" name="check-button" @change="refreshData"
|
<b-form-checkbox v-model="settings.search_books_or" name="check-button"
|
||||||
|
@change="refreshData"
|
||||||
class="shadow-none" tyle="width: 100%" switch>
|
class="shadow-none" tyle="width: 100%" switch>
|
||||||
<span class="text-uppercase" v-if="search_books_or">{{ $t('or') }}</span>
|
<span class="text-uppercase" v-if="settings.search_books_or">{{ $t('or') }}</span>
|
||||||
<span class="text-uppercase" v-else>{{ $t('and') }}</span>
|
<span class="text-uppercase" v-else>{{ $t('and') }}</span>
|
||||||
</b-form-checkbox>
|
</b-form-checkbox>
|
||||||
</b-input-group-text>
|
</b-input-group-text>
|
||||||
@ -141,12 +144,14 @@
|
|||||||
<template
|
<template
|
||||||
v-if="search_input === '' && search_keywords.length === 0 && search_foods.length === 0 && search_books.length === 0">
|
v-if="search_input === '' && search_keywords.length === 0 && search_foods.length === 0 && search_books.length === 0">
|
||||||
<recipe-card v-bind:key="`mp_${m.id}`" v-for="m in meal_plans" :recipe="m.recipe"
|
<recipe-card v-bind:key="`mp_${m.id}`" v-for="m in meal_plans" :recipe="m.recipe"
|
||||||
:meal_plan="m" :footer_text="m.meal_type_name" footer_icon="far fa-calendar-alt"></recipe-card>
|
:meal_plan="m" :footer_text="m.meal_type_name"
|
||||||
|
footer_icon="far fa-calendar-alt"></recipe-card>
|
||||||
|
|
||||||
<recipe-card v-for="r in last_viewed_recipes" v-bind:key="`rv_${r.id}`" :recipe="r" v-bind:footer_text="$t('Recently_Viewed')" footer_icon="fas fa-eye"></recipe-card>
|
<recipe-card v-for="r in last_viewed_recipes" v-bind:key="`rv_${r.id}`" :recipe="r"
|
||||||
|
v-bind:footer_text="$t('Recently_Viewed')" footer_icon="fas fa-eye"></recipe-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<recipe-card v-for="r in recipes" v-bind:key="r.id" :recipe="r" ></recipe-card>
|
<recipe-card v-for="r in recipes" v-bind:key="r.id" :recipe="r"></recipe-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -182,6 +187,10 @@ import {BootstrapVue} from 'bootstrap-vue'
|
|||||||
import 'bootstrap-vue/dist/bootstrap-vue.css'
|
import 'bootstrap-vue/dist/bootstrap-vue.css'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
|
||||||
|
import VueCookies from 'vue-cookies'
|
||||||
|
|
||||||
|
Vue.use(VueCookies)
|
||||||
|
|
||||||
import {ResolveUrlMixin} from "@/utils/utils";
|
import {ResolveUrlMixin} from "@/utils/utils";
|
||||||
|
|
||||||
import LoadingSpinner from "@/components/LoadingSpinner";
|
import LoadingSpinner from "@/components/LoadingSpinner";
|
||||||
@ -208,11 +217,12 @@ export default {
|
|||||||
search_foods: [],
|
search_foods: [],
|
||||||
search_books: [],
|
search_books: [],
|
||||||
|
|
||||||
search_keywords_or: true,
|
settings: {
|
||||||
search_foods_or: true,
|
search_keywords_or: true,
|
||||||
search_books_or: true,
|
search_foods_or: true,
|
||||||
|
search_books_or: true,
|
||||||
advanced_search_visible: true,
|
advanced_search_visible: false,
|
||||||
|
},
|
||||||
|
|
||||||
pagination_count: 0,
|
pagination_count: 0,
|
||||||
pagination_page: 1,
|
pagination_page: 1,
|
||||||
@ -220,10 +230,24 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
if (this.$cookies.isKey('search_settings')) {
|
||||||
|
console.log('loaded cookie settings')
|
||||||
|
this.settings = this.$cookies.get("search_settings")
|
||||||
|
}
|
||||||
|
|
||||||
this.refreshData()
|
this.refreshData()
|
||||||
|
|
||||||
this.loadSpecialData()
|
this.loadSpecialData()
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
settings: {
|
||||||
|
handler(val) {
|
||||||
|
console.log('saved cookie settings', val)
|
||||||
|
this.$cookies.set("search_settings", this.settings, -1)
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
refreshData: function () {
|
refreshData: function () {
|
||||||
let apiClient = new ApiApiFactory()
|
let apiClient = new ApiApiFactory()
|
||||||
@ -241,9 +265,9 @@ export default {
|
|||||||
return A["id"];
|
return A["id"];
|
||||||
}),
|
}),
|
||||||
|
|
||||||
keywords_or: this.search_keywords_or,
|
keywords_or: this.settings.search_keywords_or,
|
||||||
foods_or: this.search_foods_or,
|
foods_or: this.settings.search_foods_or,
|
||||||
books_or: this.search_books_or,
|
books_or: this.settings.search_books_or,
|
||||||
|
|
||||||
internal: this.search_internal,
|
internal: this.search_internal,
|
||||||
page: this.pagination_page,
|
page: this.pagination_page,
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<template v-if="recipe !== null">
|
<template v-if="recipe !== null">
|
||||||
{{ recipe.description }}
|
{{ recipe.description }}
|
||||||
<keywords :recipe="recipe" style="margin-top: 4px"></keywords>
|
<keywords :recipe="recipe" style="margin-top: 4px"></keywords>
|
||||||
|
<b-badge pill variant="info" v-if="!recipe.internal">{{ $t('External') }}</b-badge>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>{{ meal_plan.note }}</template>
|
<template v-else>{{ meal_plan.note }}</template>
|
||||||
</b-card-text>
|
</b-card-text>
|
||||||
|
@ -3,14 +3,12 @@
|
|||||||
"all_fields_optional": "All fields are optional and can be left empty.",
|
"all_fields_optional": "All fields are optional and can be left empty.",
|
||||||
"convert_internal": "Convert to internal recipe",
|
"convert_internal": "Convert to internal recipe",
|
||||||
"show_only_internal": "Show only internal recipes",
|
"show_only_internal": "Show only internal recipes",
|
||||||
|
|
||||||
"Log_Recipe_Cooking": "Log Recipe Cooking",
|
"Log_Recipe_Cooking": "Log Recipe Cooking",
|
||||||
"External_Recipe_Image": "External Recipe Image",
|
"External_Recipe_Image": "External Recipe Image",
|
||||||
"Add_to_Book": "Add to Book",
|
"Add_to_Book": "Add to Book",
|
||||||
"Add_to_Shopping": "Add to Shopping",
|
"Add_to_Shopping": "Add to Shopping",
|
||||||
"Add_to_Plan": "Add to Plan",
|
"Add_to_Plan": "Add to Plan",
|
||||||
"Step_start_time": "Step start time",
|
"Step_start_time": "Step start time",
|
||||||
|
|
||||||
"Select_Book": "Select Book",
|
"Select_Book": "Select Book",
|
||||||
"Recipe_Image": "Recipe Image",
|
"Recipe_Image": "Recipe Image",
|
||||||
"Import_finished": "Import finished",
|
"Import_finished": "Import finished",
|
||||||
@ -20,7 +18,6 @@
|
|||||||
"Url_Import": "Url Import",
|
"Url_Import": "Url Import",
|
||||||
"Reset_Search": "Reset Search",
|
"Reset_Search": "Reset Search",
|
||||||
"Recently_Viewed": "Recently Viewed",
|
"Recently_Viewed": "Recently Viewed",
|
||||||
|
|
||||||
"Keywords": "Keywords",
|
"Keywords": "Keywords",
|
||||||
"Books": "Books",
|
"Books": "Books",
|
||||||
"Proteins": "Proteins",
|
"Proteins": "Proteins",
|
||||||
@ -39,6 +36,7 @@
|
|||||||
"Servings": "Servings",
|
"Servings": "Servings",
|
||||||
"Waiting": "Waiting",
|
"Waiting": "Waiting",
|
||||||
"Preparation": "Preparation",
|
"Preparation": "Preparation",
|
||||||
|
"External": "External",
|
||||||
"Edit": "Edit",
|
"Edit": "Edit",
|
||||||
"Open": "Open",
|
"Open": "Open",
|
||||||
"Save": "Save",
|
"Save": "Save",
|
||||||
|
8
yarn.lock
Normal file
8
yarn.lock
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
vue-cookies@^1.7.4:
|
||||||
|
version "1.7.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/vue-cookies/-/vue-cookies-1.7.4.tgz#d241d0a0431da0795837651d10b4d73e7c8d3e8d"
|
||||||
|
integrity sha512-mOS5Btr8V9zvAtkmQ7/TfqJIropOx7etDAgBywPCmHjvfJl2gFbH2XgoMghleLoyyMTi5eaJss0mPN7arMoslA==
|
Loading…
Reference in New Issue
Block a user