</span>
</el-dialog>
+ <el-dialog title="Access Tokens" :visible.sync="accessTokensDialogVisible" width="40%">
+ Access tokens are useful to programmatically deploy assets for example within a CI/CD pipeline.
+ See the [docs](https://cloudron.io/documentation/apps/surfer/) for more information on how to use this token.
+ <br/>
+ <br/>
+ <el-alert title="Tokens are shared between all users." type="warning" show-icon :closable="false"></el-alert>
+ <br/>
+ <div>
+ <div v-for="accessToken in accessTokens">
+ <el-input suffix-icon="el-icon-copy-document" v-model="accessToken" class="access-token-input" @focus="onCopyAccessToken" size="small"></el-input>
+ <el-button icon="el-icon-delete" type="danger" size="small" @click="onDeleteAccessToken(accessToken)"></el-button>
+ </div>
+ </div>
+ <br/>
+ <el-button @click="onCreateAccessToken()" size="small" type="primary">Create Access Token</el-button>
+ </el-dialog>
+
<el-header>
<el-row type="flex" justify="space-between">
<div style="padding: 7px;">
</el-dropdown-item>
<el-dropdown-item disabled divided>WebDAV Endpoint</el-dropdown-item>
<el-dropdown-item><a href="/_webdav/" target="_blank">{{ origin }}/_webdav/</a></el-dropdown-item>
+ <el-dropdown-item command="apiAccess" divided><i class="el-icon-connection"></i> Access Tokens</el-dropdown-item>
<el-dropdown-item command="about" divided><i class="el-icon-info"></i> About</el-dropdown-item>
<el-dropdown-item command="logout" id="logoutButton"><i class="el-icon-circle-close"></i> Logout</el-dropdown-item>
</el-dropdown-menu>
<el-table-column prop="mtime" label="Modified" width="150px" sortable :formatter="prettyDate"></el-table-column>
<el-table-column label="Actions" align="right" width="200px" class-name="list-actions">
<template slot-scope="scope">
- <el-button size="small" icon="el-icon-download" circle v-show="scope.row.isFile" @click.stop="onDownload(scope.row)"></el-button>
<el-button size="small" icon="el-icon-edit" circle v-show="!scope.row.rename" @click.stop="onRename(scope.row, scope)"></el-button>
- <el-button size="small" icon="el-icon-delete" circle @click.stop="onDelete(scope.row)"></el-button>
+ <el-button size="small" icon="el-icon-download" circle v-show="!scope.row.rename && scope.row.isFile" @click.stop="onDownload(scope.row)"></el-button>
+ <el-button size="small" icon="el-icon-delete" circle v-show="!scope.row.rename" @click.stop="onDelete(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>