Login still a bit buggy but working...

This commit is contained in:
Leo Vasanko committed 2023-11-03 21:19:26 +00:00
1 parent 119aba2b3c
commit b759d8324c
8 files changed
+66 -64

No files matched your search

+33 -45
View File
@@ -1,52 +1,38 @@
<template>
<button v-if="store.isUserLogged" @click="logout" class="action-button">
Logout
Logout {{ store.user.username }}
</button>
<ModalDialog v-else title="Login">
<form @submit="login">
<label for="username">Username:</label
><input
id="username"
name="username"
autocomplete="username"
required
v-model="loginForm.username"
/>
<label for="password">Password:</label
><input
id="password"
name="password"
type="password"
autocomplete="current-password"
required
v-model="loginForm.password"
/>
<ModalDialog v-if="store.user.isOpenLoginModal" title="Login">
<form @submit.prevent="login">
<div class="login-container">
<label for="username">Username:</label>
<input
id="username"
name="username"
autocomplete="username"
required
v-model="loginForm.username"
/>
<label for="password">Password:</label>
<input
id="password"
name="password"
type="password"
autocomplete="current-password"
required
v-model="loginForm.password"
/>
</div>
<h3 v-if="loginForm.error.length > 0" class="error-text">
{{ loginForm.error }}
</h3>
<input type="submit" />
<input type="submit" class="button-login" />
</form>
</ModalDialog>
<!--
<a-tooltip title="Login">
<template v-if="DocumentStore.isUserLogged">
<a-button @click="logout" type="text" class="action-button" :icon="h(UserDeleteOutlined)" />
</template>
<template v-else>
<a-button @click="showModal" type="text" class="action-button" :icon="h(UserOutlined)" />
</template>
</a-tooltip>
<a-modal v-model:open="DocumentStore.user.isOpenLoginModal" :confirm-loading="confirmLoading" okText="Login" @ok="login">
<div class="login-container">
</div>
</a-modal>
-->
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { reactive, ref } from 'vue'
import { loginUser, logoutUser } from '@/repositories/User'
import type { ISimpleError } from '@/repositories/Client'
import { useDocumentStore } from '@/stores/documents'
@@ -62,7 +48,7 @@ const logout = async () => {
}
}
const loginForm = ref({
const loginForm = reactive({
username: '',
password: '',
error: ''
@@ -70,16 +56,15 @@ const loginForm = ref({
const login = async () => {
try {
loginForm.value.error = ''
loginForm.error = ''
confirmLoading.value = true
const user = await loginUser(loginForm.value.username, loginForm.value.password)
if (user) {
location.reload()
}
const msg = await loginUser(loginForm.username, loginForm.password)
console.log('Logged in', msg)
store.login(msg.username, !!msg.privileged)
} catch (error) {
const httpError = error as ISimpleError
if (httpError.name) {
loginForm.value.error = httpError.message
loginForm.error = httpError.message
}
} finally {
confirmLoading.value = false
@@ -90,11 +75,14 @@ const login = async () => {
<style scoped>
.login-container {
display: grid;
gap: 1rem;
grid-template-columns: 1fr 2fr;
justify-content: center;
align-items: center;
margin: 1rem 0;
}
.button-login {
margin-left: auto;
background-color: var(--secondary-color);
color: var(--secondary-background);
}
+7 -5
View File
@@ -1,9 +1,6 @@
/* Base domain for all request */
export const baseURL = import.meta.env.VITE_URL_DOCUMENT
class ClientClass {
async post(url: string, data?: Record<string, any>): Promise<any> {
const res = await fetch(`${baseURL}/`, {
const res = await fetch(url, {
method: 'POST',
headers: {
accept: 'application/json',
@@ -11,7 +8,12 @@ class ClientClass {
},
body: data !== undefined ? JSON.stringify(data) : undefined
})
const msg = await res.json()
let msg
try {
msg = await res.json()
} catch (e) {
throw new SimpleError(res.status, `HTTP ${res.status} ${res.statusText}`)
}
if ('error' in msg) throw new SimpleError(msg.error.code, msg.error.message)
return msg
}
+14
View File
@@ -1,5 +1,6 @@
import type { DocumentStore } from '@/stores/documents'
import { useDocumentStore } from '@/stores/documents'
import createWebSocket from './WS'
export type FUID = string
@@ -63,6 +64,19 @@ export class DocumentHandler {
handleWebSocketMessage(event: MessageEvent) {
const msg = JSON.parse(event.data)
if ("error" in msg) {
if (msg.error.code === 401) {
this.store.user.isLoggedIn = false
this.store.user.isOpenLoginModal = true
} else {
this.store.error = msg.error.message
}
// The server closes the websocket after errors, so we need to reopen it
setTimeout(
() => { this.store.wsWatch = createWebSocket(url_document_watch_ws, this.handleWebSocketMessage)},
1000
)
}
switch (true) {
case !!msg.root:
this.handleRootMessage(msg)
+1 -1
View File
@@ -1,5 +1,5 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import ExplorerView from '../views/ExplorerView.vue'
import ExplorerView from '@/views/ExplorerView.vue'
const router = createRouter({
history: createWebHashHistory(import.meta.env.BASE_URL),
+9 -1
View File
@@ -15,6 +15,8 @@ type DirectoryData = {
[filename: string]: FileData
}
type User = {
username: string
privileged: boolean
isOpenLoginModal: boolean
isLoggedIn: boolean
}
@@ -42,7 +44,7 @@ export const useDocumentStore = defineStore({
wsWatch: undefined,
wsUpload: undefined,
error: '' as string,
user: { isLoggedIn: false, isOpenLoginModal: false } as User
user: { username: "", privileged: false, isLoggedIn: false, isOpenLoginModal: false } as User
}),
actions: {
@@ -137,6 +139,12 @@ export const useDocumentStore = defineStore({
for (const d of this.document) {
if ('mtime' in d) d.modified = formatUnixDate(d.mtime)
}
},
login(username: string, privileged: boolean) {
this.user.username = username
this.user.privileged = privileged
this.user.isLoggedIn = true
this.user.isOpenLoginModal = false
}
},
getters: {
-9
View File
@@ -1,9 +0,0 @@
var Fi=Object.defineProperty;var ji=(e,t,n)=>t in e?Fi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ur=(e,t,n)=>(ji(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function Is(e,t){const n=Object.create(null),s=e.split(",");for(let r=0;r<s.length;r++)n[s[r]]=!0;return t?r=>!!n[r.toLowerCase()]:r=>!!n[r]}const ie={},It=[],De=()=>{},Di=()=>!1,Bi=/^on[^a-z]/,$n=e=>Bi.test(e),ks=e=>e.startsWith("onUpdate:"),pe=Object.assign,Ls=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Hi=Object.prototype.hasOwnProperty,Q=(e,t)=>Hi.call(e,t),F=Array.isArray,kt=e=>dn(e)==="[object Map]",Nn=e=>dn(e)==="[object Set]",ar=e=>dn(e)==="[object Date]",K=e=>typeof e=="function",de=e=>typeof e=="string",tn=e=>typeof e=="symbol",re=e=>e!==null&&typeof e=="object",mo=e=>re(e)&&K(e.then)&&K(e.catch),go=Object.prototype.toString,dn=e=>go.call(e),Ui=e=>dn(e).slice(8,-1),_o=e=>dn(e)==="[object Object]",$s=e=>de(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,wn=Is(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Fn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ki=/-(\w)/g,qe=Fn(e=>e.replace(Ki,(t,n)=>n?n.toUpperCase():"")),Wi=/\B([A-Z])/g,St=Fn(e=>e.replace(Wi,"-$1").toLowerCase()),jn=Fn(e=>e.charAt(0).toUpperCase()+e.slice(1)),es=Fn(e=>e?`on${jn(e)}`:""),nn=(e,t)=>!Object.is(e,t),xn=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Rn=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},fs=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Vi=e=>{const t=de(e)?Number(e):NaN;return isNaN(t)?e:t};let fr;const ds=()=>fr||(fr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ns(e){if(F(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=de(s)?Qi(s):Ns(s);if(r)for(const o in r)t[o]=r[o]}return t}else{if(de(e))return e;if(re(e))return e}}const zi=/;(?![^(]*\))/g,qi=/:([^]+)/,Ji=/\/\*[^]*?\*\//g;function Qi(e){const t={};return e.replace(Ji,"").split(zi).forEach(n=>{if(n){const s=n.split(qi);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Et(e){let t="";if(de(e))t=e;else if(F(e))for(let n=0;n<e.length;n++){const s=Et(e[n]);s&&(t+=s+" ")}else if(re(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Yi="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Xi=Is(Yi);function vo(e){return!!e||e===""}function Zi(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Dn(e[s],t[s]);return n}function Dn(e,t){if(e===t)return!0;let n=ar(e),s=ar(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=tn(e),s=tn(t),n||s)return e===t;if(n=F(e),s=F(t),n||s)return n&&s?Zi(e,t):!1;if(n=re(e),s=re(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const i in e){const l=e.hasOwnProperty(i),c=t.hasOwnProperty(i);if(l&&!c||!l&&c||!Dn(e[i],t[i]))return!1}}return String(e)===String(t)}function yo(e,t){return e.findIndex(n=>Dn(n,t))}const Lt=e=>de(e)?e:e==null?"":F(e)||re(e)&&(e.toString===go||!K(e.toString))?JSON.stringify(e,bo,2):String(e),bo=(e,t)=>t&&t.__v_isRef?bo(e,t.value):kt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r])=>(n[`${s} =>`]=r,n),{})}:Nn(t)?{[`Set(${t.size})`]:[...t.values()]}:re(t)&&!F(t)&&!_o(t)?String(t):t;let Ae;class Eo{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Ae,!t&&Ae&&(this.index=(Ae.scopes||(Ae.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Ae;try{return Ae=this,t()}finally{Ae=n}}}on(){Ae=this}off(){Ae=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.scopes)for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function wo(e){return new Eo(e)}function Gi(e,t=Ae){t&&t.active&&t.effects.push(e)}function xo(){return Ae}function el(e){Ae&&Ae.cleanups.push(e)}const Fs=e=>{const t=new Set(e);return t.w=0,t.n=0,t},Co=e=>(e.w&at)>0,So=e=Line truncated
* pinia v2.1.6
* (c) 2023 Eduardo San Martin Morote
* @license MIT
*/let yi;const Xn=e=>yi=e,bi=Symbol();function Rs(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Zt;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Zt||(Zt={}));function Cu(){const e=wo(!0),t=e.run(()=>Me({}));let n=[],s=[];const r=Hn({install(o){Xn(r),r._a=o,o.provide(bi,r),o.config.globalProperties.$pinia=r,s.forEach(i=>n.push(i)),s=[]},use(o){return!this._a&&!xu?s.push(o):n.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const Ei=()=>{};function Yr(e,t,n,s=Ei){e.push(t);const r=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&xo()&&el(r),r}function Tt(e,...t){e.slice().forEach(n=>{n(...t)})}const Su=e=>e();function Ps(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,s)=>e.set(s,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];Rs(r)&&Rs(s)&&e.hasOwnProperty(n)&&!ae(s)&&!ct(s)?e[n]=Ps(r,s):e[n]=s}return e}const Ru=Symbol();function Pu(e){return!Rs(e)||!e.hasOwnProperty(Ru)}const{assign:rt}=Object;function Ou(e){return!!(ae(e)&&e.effect)}function Au(e,t,n,s){const{state:r,actions:o,getters:i}=t,l=n.state.value[e];let c;function u(){l||(n.state.value[e]=r?r():{});const f=Ml(n.state.value[e]);return rt(f,o,Object.keys(i||{}).reduce((h,p)=>(h[p]=Hn(ye(()=>{Xn(n);const _=n._s.get(e);return i[p].call(_,_)})),h),{}))}return c=wi(e,u,t,n,s,!0),c}function wi(e,t,n={},s,r,o){let i;const l=rt({actions:{}},n),c={deep:!0};let u,f,h=[],p=[],_;const b=s.state.value[e];!o&&!b&&(s.state.value[e]={}),Me({});let w;function P(M){let B;u=f=!1,typeof M=="function"?(M(s.state.value[e]),B={type:Zt.patchFunction,storeId:e,events:_}):(Ps(s.state.value[e],M),B={type:Zt.patchObject,payload:M,storeId:e,events:_});const W=w=Symbol();Vs().then(()=>{w===W&&(u=!0)}),f=!0,Tt(h,B,s.state.value[e])}const T=o?function(){const{state:B}=n,W=B?B():{};this.$patch(ne=>{rt(ne,W)})}:Ei;function k(){i.stop(),h=[],p=[],s._s.delete(e)}function H(M,B){return function(){Xn(s);const W=Array.from(arguments),ne=[],I=[];function Y(q){ne.push(q)}function ve(q){I.push(q)}Tt(p,{args:W,name:M,store:V,after:Y,onError:ve});let xe;try{xe=B.apply(this&&this.$id===e?this:V,W)}catch(q){throw Tt(I,q),q}return xe instanceof Promise?xe.then(q=>(Tt(ne,q),q)).catch(q=>(Tt(I,q),Promise.reject(q))):(Tt(ne,xe),xe)}}const $={_p:s,$id:e,$onAction:Yr.bind(null,p),$patch:P,$reset:T,$subscribe(M,B={}){const W=Yr(h,M,B.detached,()=>ne()),ne=i.run(()=>Jt(()=>s.state.value[e],I=>{(B.flush==="sync"?f:u)&&M({storeId:e,type:Zt.direct,events:_},I)},rt({},c,B)));return W},$dispose:k},V=hn($);s._s.set(e,V);const ce=s._a&&s._a.runWithContext||Su,ue=s._e.run(()=>(i=wo(),ce(()=>i.run(t))));for(const M in ue){const B=ue[M];if(ae(B)&&!Ou(B)||ct(B))o||(b&&Pu(B)&&(ae(B)?B.value=b[M]:Ps(B,b[M])),s.state.value[e][M]=B);else if(typeof B=="function"){const W=H(M,B);ue[M]=W,l.actions[M]=B}}return rt(V,ue),rt(J(V),ue),Object.defineProperty(V,"$state",{get:()=>s.state.value[e],set:M=>{P(B=>{rt(B,M)})}}),s._p.forEach(M=>{rt(V,i.run(()=>M({store:V,app:s._a,pinia:s,options:l})))}),b&&o&&n.hydrate&&n.hydrate(V.$state,b),u=!0,f=!0,V}function Tu(e,t,n){let s,r;const o=typeof t=="function";typeof e=="string"?(s=e,r=o?n:t):(r=e,s=e.id);function i(l,c){const u=Ec();return l=l||(u?ze(bi,null):null),l&&Xn(l),l=yi,l._s.has(s)||(o?wi(s,t,r,l):Au(s,r,l)),l._s.get(s)}return i.$id=s,i}/*!
* vue-router v4.2.4
* (c) 2023 Eduardo San Martin Morote
* @license MIT
*/const Mt=typeof window<"u";function Mu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ee=Object.assign;function cs(e,t){const n={};for(const s in t){const r=t[s];n[s]=Be(r)?r.map(e):e(r)}return n}const Gt=()=>{},Be=Array.isArray,Iu=/\/$/,ku=e=>e.replace(Iu,"");function us(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return l<c&&l>=0&&(c=-1),c>-1&&(s=t.slice(0,c),o=t.slice(c+1,l>-1?l:t.length),r=e(o)),l>-1&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=Fu(s??t,n),{fullPath:s+(o&&"?")+o+i,path:s,query:r,hash:i}}function Lu(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Xr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function $u(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&jt(t.matched[s],n.matched[r])&&xi(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function jt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function xi(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Nu(e[n],t[n]))return!1;return!0}function Nu(e,t){return Be(e)?Zr(e,t):Be(t)?Zr(t,e):e===t}function Zr(e,t){return Be(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Fu(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i<s.length;i++)if(l=s[i],l!==".")if(l==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i-(i===s.length?1:0)).join("/")}var an;(function(e){e.pop="pop",e.push="push"})(an||(an={}));var en;(function(e){e.back="back",e.forward="forward",e.unknown=""})(en||(en={}));function ju(e){if(!e)if(Mt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),ku(e)}const Du=/^[^#]+#/;function Bu(e,t){return e.replace(Du,"#")+t}function Hu(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Zn=()=>({left:window.pageXOffset,top:window.pageYOffset});function Uu(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Hu(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Gr(e,t){return(history.state?history.state.position-t:-1)+e}const Os=new Map;function Ku(e,t){Os.set(e,t)}function Wu(e){const t=Os.get(e);return Os.delete(e),t}let Vu=()=>location.protocol+"//"+location.host;function Ci(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let l=r.includes(e.slice(o))?e.slice(o).length:1,c=r.slice(l);return c[0]!=="/"&&(c="/"+c),Xr(c,"")}return Xr(n,e)+s+r}function zu(e,t,n,s){let r=[],o=[],i=null;const l=({state:p})=>{const _=Ci(e,location),b=n.value,w=t.value;let P=0;if(p){if(n.value=_,t.value=p,i&&i===b){i=null;return}P=w?p.position-w.position:0}else s(_);r.forEach(T=>{T(n.value,b,{delta:P,type:an.pop,direction:P?P>0?en.forward:en.back:en.unknown})})};function c(){i=n.value}function u(p){r.push(p);const _=()=>{const b=r.indexOf(p);b>-1&&r.splice(b,1)};return o.push(_),_}function f(){const{history:p}=window;p.state&&p.replaceState(ee({},p.state,{scroll:Zn()}),"")}function h(){for(const p of o)p();o=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",f,{passive:!0}),{pauseListeners:c,listen:u,destroy:h}}function eo(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?Zn():null}}function qu(e){const{history:t,location:n}=window,s={value:Ci(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,u,f){const h=e.indexOf("#"),p=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+c:Vu()+e+c;try{t[f?"replaceState":"pushState"](u,"",p),r.value=u}catch(_){console.error(_),n[f?"replace":"assign"](p)}}function i(c,u){const f=ee({},t.state,eo(r.value.back,c,r.value.forward,!0),u,{position:r.value.position});o(c,f,!0),s.value=c}function l(c,u){const f=ee({},r.value,t.state,{forward:c,scroll:Zn()});o(f.current,f,!0);const h=ee({},eo(s.value,c,null),{position:f.position+1},u);o(c,h,!1),s.value=c}return{location:s,state:r,push:l,replace:i}}function Ju(e){e=ju(e);const t=qu(e),n=zu(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=ee({location:"",base:e,go:s,createHref:Bu.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerLine truncated
-1
View File
@@ -1 +0,0 @@
@charset "UTF-8";:root{--primary-background: #181818;--secondary-background: #ffffff;--font-color: #333;--header-background: #000;--table-background: #535353;--primary-color: #ffffff;--secondary-color: #ccc;--blue-color: #66ffeb;--red-color: #ff4d4f}@media (prefers-color-scheme: dark){:root{--primary-background: #333;--secondary-background: #666;--font-color: #ddd;--table-background: #535353;--primary-color: #ffffff;--secondary-color: #ccc;--blue-color: #66ffeb;--red-color: #ff4d4f}}body{background-color:var(--primary-background);font-family:Roboto,sans-serif;color:var(--font-color);margin:0}a:link,a:visited,a:active,a:hover{color:var(--primary-color);text-decoration:none}table{border-collapse:collapse;border:0;gap:0}#app{height:100%;display:flex;flex-direction:column}body:has(dialog[open]):before{content:"";display:block;position:fixed;top:0;left:0;width:100%;height:100%;background:#0008;-webkit-backdrop-filter:blur(.2em);backdrop-filter:blur(.2em);z-index:1000}dialog[open]{display:block;border:none;border-radius:.5rem;box-shadow:.2rem .2rem 1rem #000;padding:1rem;position:fixed;top:0;left:0;z-index:1001}dialog[open]>h1{background:#00f;color:#fff;font-size:1rem;margin:-1rem -1rem 0;padding:.5rem 1rem}dialog[open]>div{padding:1em 0}.login-container[data-v-453c8d3d]{display:grid;grid-template-columns:1fr 2fr;justify-content:center;align-items:center}.button-login[data-v-453c8d3d]{background-color:var(--secondary-color);color:var(--secondary-background)}.ant-btn-primary[data-v-453c8d3d]:not(:disabled):hover{background-color:var(--blue-color)}.error-text[data-v-453c8d3d]{color:var(--red-color)}.upload-input[data-v-2834b7f8]{display:none}.actions-container,.actions-list{display:flex;flex-wrap:nowrap;gap:15px}.actions-container{justify-content:space-between}.action-button{padding:0;font-size:1.5em;color:var(--secondary-color)}.action-button:hover{color:var(--blue-color)!important}@media only screen and (max-width: 600px){.actions-container,.actions-list{gap:6px}}.margin-input{margin-top:5px}.path{box-shadow:0 0 .5em #00000026;overflow:hidden;white-space:nowrap;width:100%;z-index:1;flex:0 0 1.5rem;order:1;font-size:.9rem;position:relative}:root{--breadcrumb-background-odd: #2d2d2d;--breadcrumb-background-even: #404040;--breadcrumb-color: #ddd;--breadcrumb-hover-color: #fff;--breadcrumb-hover-background-odd: #25a;--breadcrumb-hover-background-even: #812;--breadcrumb-transtime: .3s}.breadcrumb{display:flex;list-style:none;margin:0;padding:0 1em 0 0}.breadcrumb>a{margin:0 -.7rem;max-width:8em;font-size:1.3em;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;height:1em;color:var(--breadcrumb-color);padding:.3em 1.5em;clip-path:polygon(0 0,1em 50%,0 100%,100% 100%,100% 0,0 0);transition:all var(--breadcrumb-transtime)}.breadcrumb a:first-child{margin-left:0;padding-left:0;clip-path:none}.breadcrumb a:last-child{max-width:none;clip-path:polygon(0 0,calc(100% - 1em) 0,100% 50%,calc(100% - 1em) 100%,0 100%,1em 50%,0 0)}.breadcrumb a:only-child{clip-path:polygon(0 0,calc(100% - 1em) 0,100% 50%,calc(100% - 1em) 100%,0 100%,0 0)}.breadcrumb svg{transform:translate(.3rem,-.3rem) scale(.8);fill:var(--breadcrumb-color);transition:fill var(--breadcrumb-transtime)}.breadcrumb a:nth-child(odd){background:var(--breadcrumb-background-odd)}.breadcrumb a:nth-child(2n){background:var(--breadcrumb-background-even)}.breadcrumb a:nth-child(odd):hover{background:var(--breadcrumb-hover-background-odd)}.breadcrumb a:nth-child(2n):hover{background:var(--breadcrumb-hover-background-even)}.breadcrumb a:hover{color:var(--breadcrumb-hover-color)}.breadcrumb a:hover svg{fill:var(--breadcrumb-hover-color)}nav[data-v-f793c45b],span[data-v-f793c45b]{color:var(--primary-color)}span[data-v-f793c45b]:hover,.last[data-v-f793c45b]{color:var(--blue-color)}input#FileRenameInput{color:#8f8;border:0;padding:0;width:90%;outline:none;background:transparent}table{width:100%;table-layout:fixed}table input[type=checkbox]{width:1em;height:1em}table .modified{width:10em}table .size{width:6em}table th,table td{padding:.5em;font-weight:400;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.name{white-space:nowrap;text-overflow:initial;overflow:initial}.name button{visibility:hidden;padding-left:1em}.name:hover button{visibility:visible}.name button{cursor:pointer;border:0;background:transparent}thead tr{border:1px solid #ddd;background:#ddd;color:#000}tbody tr:hover{background:#00f8}.right{text-align:right}.selection{width:2em}.sortcolumn:hover{cursor:pointer}.sortcolumn:hover:after{color:#f80}.sortcolumn{padding-right:1.7em}.sortcolumn:after{content:"▸";color:#888;margin:0 1em 0 .5em;position:absolute;transition:all .2s linear}.sortactive:after{transform:rotate(90deg);color:#000}main{padding:5px;height:100%}.more-action{display:flex;flex-direction:column;justify-content:start}.action-container{display:flex;align-items:center}.edit-action{min-width:5%}.carousel-container{height:inherit}.name a{text-decoration:none}.file .name:beforeLine truncated
+2 -2
View File
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang=en>
<script type="module" crossorigin src="/assets/index-2034a7a8.js"></script>
<link rel="stylesheet" href="/assets/index-c3cea0a2.css">
<script type="module" crossorigin src="/assets/index-eb4428c4.js"></script>
<link rel="stylesheet" href="/assets/index-683ba1dc.css">
<meta charset=UTF-8>
<title>Cista</title>