Compare commits

..

No commits in common. "9bd958ef24727fdfd7c8f31909e8a6a89459d0ab" and "23b68d9e192c08462cb1fd35dc7a280baf4f6a0d" have entirely different histories.

8 changed files with 13 additions and 110 deletions

View File

@ -3,12 +3,6 @@ name: Release Linux App
on:
release:
types: [ published ]
workflow_dispatch:
inputs:
tag:
description: 'Version tag'
required: true
default: '1.0.0'
jobs:
release:
@ -33,13 +27,8 @@ jobs:
id: normalise_version
shell: bash
run: |
if [ "${{ github.event.release.tag_name }}" == "" ]; then
version=$(echo ${{ github.event.inputs.tag }} | sed -e 's/v//g')
echo "version=$version" >> "$GITHUB_OUTPUT"
else
version=$(echo ${{ github.event.release.tag_name }} | sed -e 's/v//g')
echo "version=$version" >> "$GITHUB_OUTPUT"
fi
- name: Setup Go
uses: actions/setup-go@v4
@ -76,7 +65,7 @@ jobs:
shell: bash
run: |
CGO_ENABLED=1 wails build -platform ${{ matrix.platform }} \
-ldflags "-X main.version=v${{ steps.normalise_version.outputs.version }} -X main.gaMeasurementID=${{ secrets.GA_MEASUREMENT_ID }} -X main.gaSecretKey=${{ secrets.LINUX_GA_SECRET }}" \
-ldflags "-X main.version=${{ github.event.release.tag_name }} -X main.gaMeasurementID=${{ secrets.GA_MEASUREMENT_ID }} -X main.gaSecretKey=${{ secrets.LINUX_GA_SECRET }}" \
-o tiny-rdm
- name: Setup control template
@ -116,6 +105,5 @@ jobs:
- name: Upload release asset
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.normalise_version.outputs.version }}
files: ./build/linux/tiny-rdm_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.deb
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -3,12 +3,6 @@ name: Release macOS App
on:
release:
types: [ published ]
workflow_dispatch:
inputs:
tag:
description: 'Version tag'
required: true
default: '1.0.0'
jobs:
release:
@ -35,13 +29,8 @@ jobs:
id: normalise_version
shell: bash
run: |
if [ "${{ github.event.release.tag_name }}" == "" ]; then
version=$(echo ${{ github.event.inputs.tag }} | sed -e 's/v//g')
echo "version=$version" >> "$GITHUB_OUTPUT"
else
version=$(echo ${{ github.event.release.tag_name }} | sed -e 's/v//g')
echo "version=$version" >> "$GITHUB_OUTPUT"
fi
- name: Setup Go
uses: actions/setup-go@v4
@ -127,6 +116,5 @@ jobs:
- name: Upload release asset (DMG Package)
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.normalise_version.outputs.version }}
files: ./build/bin/TinyRDM_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.dmg
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -3,12 +3,6 @@ name: Release Windows App
on:
release:
types: [ published ]
workflow_dispatch:
inputs:
tag:
description: 'Version tag'
required: true
default: '1.0.0'
jobs:
release:
@ -31,23 +25,16 @@ jobs:
echo "tag=$tag" >> "$GITHUB_OUTPUT"
- name: Normalise platform name
id: normalise_platform_name
id: platform_name
shell: bash
run: |
pname=$(echo ${{ matrix.platform }} | sed -e 's/\//_/g')
echo "pname=$pname" >> "$GITHUB_OUTPUT"
run: tag=$(echo ${{ matrix.platform }} | sed -e 's/\//_/g')
- name: Normalise version tag
id: normalise_version
shell: bash
run: |
if [ "${{ github.event.release.tag_name }}" == "" ]; then
version=$(echo ${{ github.event.inputs.tag }} | sed -e 's/v//g')
echo "version=$version" >> "$GITHUB_OUTPUT"
else
version=$(echo ${{ github.event.release.tag_name }} | sed -e 's/v//g')
echo "version=$version" >> "$GITHUB_OUTPUT"
fi
- name: Setup Go
uses: actions/setup-go@v4
@ -84,7 +71,7 @@ jobs:
run: |
CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} \
-webview2 embed \
-ldflags "-X main.version=v${{ steps.normalise_version.outputs.version }} -X main.gaMeasurementID=${{ secrets.GA_MEASUREMENT_ID }} -X main.gaSecretKey=${{ secrets.WINDOWS_GA_SECRET }}"
-ldflags "-X main.version=${{ github.event.release.tag_name }} -X main.gaMeasurementID=${{ secrets.GA_MEASUREMENT_ID }} -X main.gaSecretKey=${{ secrets.WINDOWS_GA_SECRET }}"
- name: Compress portable binary
working-directory: ./build/bin
@ -93,7 +80,6 @@ jobs:
- name: Upload release asset (Portable)
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.normalise_version.outputs.version }}
files: ./build/bin/TinyRDM_Portable_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.zip
token: ${{ secrets.GITHUB_TOKEN }}
@ -102,7 +88,7 @@ jobs:
run: |
CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} \
-nsis -webview2 embed \
-ldflags "-X main.version=v${{ steps.normalise_version.outputs.version }}"
-ldflags "-X main.version=${{ github.event.release.tag_name }}"
- name: Codesign Windows NSIS installer
working-directory: ./build/bin
@ -112,7 +98,7 @@ jobs:
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}'
certutil -decode certificate\certificate.txt certificate\certificate.pfx
echo "Signing TinyRDM installer"
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' TinyRDM-${{ steps.normalise_platform_name.outputs.pname }}-installer.exe
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' TinyRDM-${{ matrix.platform }}-installer.exe
- name: Rename installer
working-directory: ./build/bin
@ -121,6 +107,5 @@ jobs:
- name: Upload release asset (Installer)
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.normalise_version.outputs.version }}
files: ./build/bin/TinyRDM_Setup_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.exe
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -3,7 +3,6 @@ import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
import * as monaco from 'monaco-editor'
import usePreferencesStore from 'stores/preferences.js'
import { useThemeVars } from 'naive-ui'
import { isEmpty } from 'lodash'
const props = defineProps({
content: {
@ -23,14 +22,6 @@ const props = defineProps({
type: Boolean,
default: false,
},
offsetKey: {
type: String,
default: '',
},
keepOffset: {
type: Boolean,
default: false,
},
})
const emit = defineEmits(['reset', 'input', 'save'])
@ -40,18 +31,6 @@ const themeVars = useThemeVars()
const editorRef = ref(null)
/** @type monaco.editor.IStandaloneCodeEditor */
let editorNode = null
const scrollOffset = { top: 0, left: 0 }
const updateScroll = () => {
if (editorNode != null) {
if (props.keepOffset && !isEmpty(props.offsetKey)) {
editorNode.setScrollPosition({ scrollTop: scrollOffset.top, scrollLeft: scrollOffset.left })
} else {
// reset offset if not needed
editorNode.setScrollPosition({ scrollTop: 0, scrollLeft: 0 })
}
}
}
const destroyEditor = () => {
if (editorNode != null && editorNode.dispose != null) {
@ -109,18 +88,6 @@ onMounted(async () => {
emit('save')
})
editorNode.onDidScrollChange((event) => {
// save scroll offset when changes, ie. content changes
if (props.keepOffset && !event.scrollHeightChanged) {
scrollOffset.top = event.scrollTop
scrollOffset.left = event.scrollLeft
}
})
editorNode.onDidLayoutChange((event) => {
updateScroll()
})
// editorNode.onDidChangeModelLanguageConfiguration(() => {
// editorNode?.getAction('editor.action.formatDocument')?.run()
// })
@ -139,19 +106,6 @@ watch(
if (editorNode != null) {
editorNode.setValue(content)
await nextTick(() => emit('reset', content))
updateScroll()
}
},
)
watch(
() => props.offsetKey,
() => {
// reset scroll offset when key changed
if (editorNode != null) {
scrollOffset.top = 0
scrollOffset.left = 0
editorNode.setScrollPosition({ scrollTop: 0, scrollLeft: 0 })
}
},
)

View File

@ -175,7 +175,6 @@ const onSave = () => {
:border="true"
:content="displayValue"
:language="viewLanguage"
:key-path="viewAs.field"
class="flex-item-expand"
@input="onInput"
@reset="onInput"

View File

@ -149,8 +149,6 @@ defineExpose({
v-show="!props.loading"
:content="displayValue"
:loading="props.loading"
:offset-key="props.keyPath"
keep-offset
class="flex-item-expand"
language="json"
style="height: 100%"

View File

@ -204,8 +204,6 @@ defineExpose({
:content="displayValue"
:language="viewLanguage"
:loading="props.loading"
:offset-key="props.keyPath"
keep-offset
class="flex-item-expand"
style="height: 100%"
@input="onInput"

View File

@ -93,14 +93,7 @@ watchEffect(() => {
const renderTypeLabel = (option) => {
return h(
NSpace,
{
align: 'center',
inline: true,
size: 3,
itemStyle: {
lineHeight: 'var(--n-blank-height)',
},
},
{ align: 'center', inline: true, size: 3 },
{
default: () => [
h('div', {