Skip to content

Commit

Permalink
Merge pull request #21 from 1962247851/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
1962247851 authored May 26, 2023
2 parents b556fd4 + cfa85f2 commit 4083610
Show file tree
Hide file tree
Showing 40 changed files with 357 additions and 770 deletions.
2 changes: 1 addition & 1 deletion ordinaryroad-blog-quarkus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<parent>
<groupId>tech.ordinaryroad.quarkus</groupId>
<artifactId>ordinaryroad-blog</artifactId>
<version>0.0.7</version>
<version>0.0.8</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* MIT License
*
* Copyright (c) 2021 苗锦洲
*
* 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.
*/

package tech.ordinaryroad.blog.quarkus.resource

import cn.hutool.core.util.URLUtil
import org.jboss.resteasy.reactive.RestQuery
import java.net.URI
import javax.validation.Valid
import javax.validation.constraints.Size
import javax.ws.rs.GET
import javax.ws.rs.Path
import javax.ws.rs.core.Response

/**
* 兼容重构前的文件下载
*
* @author mjz
* @date 2023/5/23
*/
@Path("file")
class FileResourceBeforeRefactor {

/**
* 重构前的请求路径:/file/download?uuid=ef2bef5da02e4f898aed8d9bf26e47593f5b&filename=android.jpg
* 重构后的请求路径:/upms/file/download/ordinaryroad-blog/before-refactor/picture/ef2bef5da02e4f898aed8d9bf26e47593f5b/android.jpg
*/
@GET
@Path("download")
fun download(
@Valid @Size(max = 36, message = "uuid长度不能大于36")
@RestQuery uuid: String,
@Valid @Size(max = 500, message = "filename长度不能大于500")
@RestQuery filename: String
): Response {
return Response.status(Response.Status.MOVED_PERMANENTLY)
.location(URI.create(URLUtil.encode("https://api.ordinaryroad.tech/upms/file/download/ordinaryroad-blog/before-refactor/picture/${uuid}/${filename}")))
.build()
}

}
123 changes: 0 additions & 123 deletions ordinaryroad-blog-ui/components/or/Avatar.vue

This file was deleted.

17 changes: 14 additions & 3 deletions ordinaryroad-blog-ui/components/or/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,21 @@

<!-- 国际化 -->
<or-i18n-menu v-if="!$vuetify.breakpoint.smAndDown" />

<!-- 设置 -->
<v-btn icon @click="$store.dispatch('app/toggleRightDrawerModel')">
<v-icon>mdi-dots-horizontal</v-icon>
</v-btn>
<v-tooltip bottom>
<template #activator="{ on, attrs }">
<v-btn
icon
v-bind="attrs"
v-on="on"
@click.stop="$store.dispatch('app/toggleRightDrawerModel')"
>
<v-icon>mdi-dots-horizontal</v-icon>
</v-btn>
</template>
<span>{{ $t('more') }}</span>
</v-tooltip>
</v-app-bar>
</template>

Expand Down
122 changes: 0 additions & 122 deletions ordinaryroad-blog-ui/components/or/InputDialog.vue

This file was deleted.

6 changes: 3 additions & 3 deletions ordinaryroad-blog-ui/components/or/MdVditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,9 @@ export default {
let headString
let headHtml = element.innerHTML
const vditorAnchor = element.getElementsByTagName('a')
if (vditorAnchor && vditorAnchor[0]) {
headString = vditorAnchor[0].getAttribute('id').slice(13)
headHtml = headHtml.replace(vditorAnchor[0].outerHTML, '')
if (vditorAnchor && vditorAnchor[vditorAnchor.length - 1]) {
headString = vditorAnchor[vditorAnchor.length - 1].getAttribute('id').slice(13)
headHtml = headHtml.replace(vditorAnchor[vditorAnchor.length - 1].outerHTML, '')
} else {
headString = element.textContent
}
Expand Down
Loading

0 comments on commit 4083610

Please sign in to comment.