astrion-website/demo/static/dist/assets/PathAuthorizationDialog.js

2 lines
1.8 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{d as i,b as n,e as d,s as u,c as r,g as t,n as l,t as m,f as v,T as b}from"./runtime-dom.esm-bundler.js";import{_ as p}from"./_plugin-vue_export-helper.js";const c={key:0,class:"overlay-backdrop"},k={class:"overlay-card"},y={class:"overlay-header"},$={class:"mode-switch"},f={class:"hint"},h=["value","placeholder"],C={class:"actions"},g=["disabled"],w=i({__name:"PathAuthorizationDialog",props:{open:{type:Boolean},value:{},mode:{},saving:{type:Boolean}},emits:["close","save","update:value","update:mode"],setup(o){return(a,e)=>(n(),d(b,{name:"path-auth-fade"},{default:u(()=>[o.open?(n(),r("div",c,[t("div",k,[t("div",y,[e[6]||(e[6]=t("h3",null,"路径授权",-1)),t("button",{type:"button",onClick:e[0]||(e[0]=s=>a.$emit("close"))},"×")]),t("div",$,[t("button",{type:"button",class:l(["mode-btn",{active:o.mode==="writable"}]),onClick:e[1]||(e[1]=s=>a.$emit("update:mode","writable"))}," 可读可写 ",2),t("button",{type:"button",class:l(["mode-btn",{active:o.mode==="readable"}]),onClick:e[2]||(e[2]=s=>a.$emit("update:mode","readable"))}," 仅可读 ",2)]),t("p",f,m(o.mode==="writable"?"可读可写路径在 workspace-write 沙箱中可写入,只读沙箱中仅可读。":"仅可读路径在只读沙箱中会被加入允许读取列表;工作区可写沙箱默认已可读。"),1),t("textarea",{class:"path-input",value:o.value,onInput:e[3]||(e[3]=s=>a.$emit("update:value",s.target.value)),placeholder:o.mode==="writable"?"每行一个路径,例如:~/Desktop/agents-export":"每行一个路径,例如:~/Documents/reference"},null,40,h),t("div",C,[t("button",{type:"button",class:"btn",onClick:e[4]||(e[4]=s=>a.$emit("save")),disabled:o.saving},"保存",8,g),t("button",{type:"button",class:"btn btn-muted",onClick:e[5]||(e[5]=s=>a.$emit("close"))},"取消")])])])):v("",!0)]),_:1}))}}),z=p(w,[["__scopeId","data-v-7d5dbd1a"]]);export{z as default};