Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b253bec9fc | ||
|
|
3bfdf24fff | ||
|
|
0849b8f27d |
@@ -16,18 +16,18 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-docker
|
runs-on: ubuntu-docker
|
||||||
|
container: docker:dind
|
||||||
steps:
|
steps:
|
||||||
- name: install nodejs
|
- name: install nodejs
|
||||||
run: apt update -y && apt install nodejs -y
|
run: apk add --update nodejs npm
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Set image tags
|
- name: Set image tags
|
||||||
id: vars
|
id: vars
|
||||||
shell: bash
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
SHORT_SHA="${GITHUB_SHA::7}"
|
SHORT_SHA=$(printf '%s' "$GITHUB_SHA" | cut -c1-7)
|
||||||
BRANCH="${GITHUB_REF_NAME//\//-}"
|
BRANCH=$(printf '%s' "$GITHUB_REF_NAME" | tr '/' '-')
|
||||||
|
|
||||||
echo "short_sha=${SHORT_SHA}" >> "$GITHUB_OUTPUT"
|
echo "short_sha=${SHORT_SHA}" >> "$GITHUB_OUTPUT"
|
||||||
echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT"
|
echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT"
|
||||||
|
|||||||
@@ -342,10 +342,11 @@ const canManageSpaceSettings = computed(
|
|||||||
authStore.hasSpacePermission(currentSpace.value, "settings.member.view"),
|
authStore.hasSpacePermission(currentSpace.value, "settings.member.view"),
|
||||||
);
|
);
|
||||||
|
|
||||||
const flattenCategories = (items, level = 0) =>
|
const flattenCategories = (items, trail = []) =>
|
||||||
items.flatMap((category) => {
|
items.flatMap((category) => {
|
||||||
const label = `${" ".repeat(level)}${category.name}`;
|
const nextTrail = [...trail, category.name];
|
||||||
return [{ id: category.id, name: category.name, label }, ...(category.subcategories?.length ? flattenCategories(category.subcategories, level + 1) : [])];
|
const label = nextTrail.join("/");
|
||||||
|
return [{ id: category.id, name: category.name, label }, ...(category.subcategories?.length ? flattenCategories(category.subcategories, nextTrail) : [])];
|
||||||
});
|
});
|
||||||
|
|
||||||
const categoryOptions = computed(() => flattenCategories(categoryTree.value));
|
const categoryOptions = computed(() => flattenCategories(categoryTree.value));
|
||||||
|
|||||||
@@ -4,9 +4,6 @@
|
|||||||
<button class="btn btn-sm btn-primary" @click="saveNote">Save</button>
|
<button class="btn btn-sm btn-primary" @click="saveNote">Save</button>
|
||||||
<button v-if="canDelete" class="btn btn-sm btn-danger ms-2" @click="confirmDelete">Delete</button>
|
<button v-if="canDelete" class="btn btn-sm btn-danger ms-2" @click="confirmDelete">Delete</button>
|
||||||
<button class="btn btn-sm btn-outline-secondary ms-2" @click="emit('cancel')">Cancel</button>
|
<button class="btn btn-sm btn-outline-secondary ms-2" @click="emit('cancel')">Cancel</button>
|
||||||
<button class="btn btn-sm btn-secondary ms-2" @click="togglePreview">
|
|
||||||
{{ showPreview ? "Edit" : "Preview" }}
|
|
||||||
</button>
|
|
||||||
<span class="save-status ms-auto" :class="saveState">{{ saveStatusLabel }}</span>
|
<span class="save-status ms-auto" :class="saveState">{{ saveStatusLabel }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -19,11 +16,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div :class="{ 'col-md-6': showPreview, 'col-12': !showPreview }">
|
<div class="col-12 col-md-6">
|
||||||
<textarea v-model="editingNote.content" class="form-control editor-textarea" placeholder="Write your note in markdown..." @input="autoSave"></textarea>
|
<textarea v-model="editingNote.content" class="form-control editor-textarea" placeholder="Write your note in markdown..." @input="autoSave"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="showPreview" class="col-md-6">
|
<div class="col-12 col-md-6 mt-3 mt-md-0">
|
||||||
<div class="preview-pane border rounded p-3">
|
<div class="preview-pane border rounded p-3">
|
||||||
<div v-html="renderedMarkdown"></div>
|
<div v-html="renderedMarkdown"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -101,7 +98,6 @@ const settingsStore = useSettingsStore();
|
|||||||
const publicSharingEnabled = ref(true);
|
const publicSharingEnabled = ref(true);
|
||||||
|
|
||||||
const editingNote = ref({ ...props.note });
|
const editingNote = ref({ ...props.note });
|
||||||
const showPreview = ref(false);
|
|
||||||
const tagsInput = ref(props.note.tags?.join(", ") || "");
|
const tagsInput = ref(props.note.tags?.join(", ") || "");
|
||||||
const passwordAction = ref("keep");
|
const passwordAction = ref("keep");
|
||||||
const notePassword = ref("");
|
const notePassword = ref("");
|
||||||
@@ -201,10 +197,6 @@ const confirmDelete = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const togglePreview = () => {
|
|
||||||
showPreview.value = !showPreview.value;
|
|
||||||
};
|
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
clearTimeout(saveTimeout.value);
|
clearTimeout(saveTimeout.value);
|
||||||
clearTimeout(saveStateTimeout.value);
|
clearTimeout(saveStateTimeout.value);
|
||||||
|
|||||||
Reference in New Issue
Block a user