You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-17 23:27:48 +02:00
Compare commits
9 Commits
server-v2.
...
fix_window
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c7b568b20 | ||
|
|
c3d892615d | ||
|
|
0c5d2b8120 | ||
|
|
80a94f02b9 | ||
|
|
d3763345f0 | ||
|
|
9cf19f4b5c | ||
|
|
da2a61df0a | ||
|
|
da2a00bf1d | ||
|
|
37c712c778 |
2
.github/workflows/github-actions-main.yml
vendored
2
.github/workflows/github-actions-main.yml
vendored
@@ -6,7 +6,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# Removed windows-2016 for now - discontinued by GitHub
|
# Removed windows-2016 for now - discontinued by GitHub
|
||||||
os: [macos-latest, ubuntu-latest]
|
os: [macos-latest, ubuntu-latest, windows-2019]
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
# Silence apt-get update errors (for example when a module doesn't
|
# Silence apt-get update errors (for example when a module doesn't
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { notesSortOrderFieldArray, notesSortOrderNextField, setNotesSortOrder } from './notesSortOrderUtils';
|
import { notesSortOrderFieldArray, notesSortOrderNextField, setNotesSortOrder } from './notesSortOrderUtils';
|
||||||
import Setting from '@joplin/lib/models/Setting';
|
import Setting from '@joplin/lib/models/Setting';
|
||||||
|
// import { setupDatabaseAndSynchronizer, switchClient } from '@joplin/lib/testing/test-utils';
|
||||||
const { shimInit } = require('@joplin/lib/shim-init-node.js');
|
const { shimInit } = require('@joplin/lib/shim-init-node.js');
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
@@ -9,6 +10,12 @@ beforeAll(() => {
|
|||||||
|
|
||||||
describe('notesSortOrderUtils', () => {
|
describe('notesSortOrderUtils', () => {
|
||||||
|
|
||||||
|
// beforeEach(async (done) => {
|
||||||
|
// await setupDatabaseAndSynchronizer(1);
|
||||||
|
// await switchClient(1);
|
||||||
|
// done();
|
||||||
|
// });
|
||||||
|
|
||||||
it('should always provide the same ordered fields', async () => {
|
it('should always provide the same ordered fields', async () => {
|
||||||
const expected = ['user_updated_time', 'user_created_time', 'title', 'order'];
|
const expected = ['user_updated_time', 'user_created_time', 'title', 'order'];
|
||||||
expect(notesSortOrderFieldArray()).toStrictEqual(expected);
|
expect(notesSortOrderFieldArray()).toStrictEqual(expected);
|
||||||
|
|||||||
@@ -23,6 +23,11 @@ const switchToSubProfileSettings = async () => {
|
|||||||
await Setting.load();
|
await Setting.load();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const restoreSettingState = async () => {
|
||||||
|
await setupDatabaseAndSynchronizer(1);
|
||||||
|
await switchClient(1);
|
||||||
|
};
|
||||||
|
|
||||||
describe('models/Setting', function() {
|
describe('models/Setting', function() {
|
||||||
|
|
||||||
beforeEach(async (done) => {
|
beforeEach(async (done) => {
|
||||||
@@ -291,6 +296,8 @@ describe('models/Setting', function() {
|
|||||||
expect((await Setting.loadOne('locale')).value).toBe('fr_FR');
|
expect((await Setting.loadOne('locale')).value).toBe('fr_FR');
|
||||||
expect((await Setting.loadOne('theme')).value).toBe(Setting.THEME_DARK);
|
expect((await Setting.loadOne('theme')).value).toBe(Setting.THEME_DARK);
|
||||||
expect((await Setting.loadOne('sync.target')).value).toBe(undefined);
|
expect((await Setting.loadOne('sync.target')).value).toBe(undefined);
|
||||||
|
|
||||||
|
await restoreSettingState();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should save sub-profile settings', async () => {
|
it('should save sub-profile settings', async () => {
|
||||||
@@ -327,6 +334,8 @@ describe('models/Setting', function() {
|
|||||||
'$schema': 'https://joplinapp.org/schema/settings.json',
|
'$schema': 'https://joplinapp.org/schema/settings.json',
|
||||||
'sync.target': 8,
|
'sync.target': 8,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await restoreSettingState();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('all global settings should be saved to file', async () => {
|
it('all global settings should be saved to file', async () => {
|
||||||
|
|||||||
@@ -1516,7 +1516,7 @@ class Setting extends BaseModel {
|
|||||||
|
|
||||||
this.metadata_ = Object.assign(this.metadata_, this.customMetadata_);
|
this.metadata_ = Object.assign(this.metadata_, this.customMetadata_);
|
||||||
|
|
||||||
if (this.value('env') === Env.Dev) this.validateMetadata(this.metadata_);
|
if (this.constants_.env === Env.Dev) this.validateMetadata(this.metadata_);
|
||||||
|
|
||||||
return this.metadata_;
|
return this.metadata_;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ export default class InteropService_Importer_Md extends InteropService_Importer_
|
|||||||
}
|
}
|
||||||
|
|
||||||
async importDirectory(dirPath: string, parentFolderId: string) {
|
async importDirectory(dirPath: string, parentFolderId: string) {
|
||||||
console.info(`Import: ${dirPath}`);
|
|
||||||
const supportedFileExtension = this.metadata().fileExtensions;
|
const supportedFileExtension = this.metadata().fileExtensions;
|
||||||
const stats = await shim.fsDriver().readDirStats(dirPath);
|
const stats = await shim.fsDriver().readDirStats(dirPath);
|
||||||
for (let i = 0; i < stats.length; i++) {
|
for (let i = 0; i < stats.length; i++) {
|
||||||
@@ -54,7 +53,6 @@ export default class InteropService_Importer_Md extends InteropService_Importer_
|
|||||||
|
|
||||||
if (stat.isDirectory()) {
|
if (stat.isDirectory()) {
|
||||||
if (await this.isDirectoryEmpty(`${dirPath}/${stat.path}`)) {
|
if (await this.isDirectoryEmpty(`${dirPath}/${stat.path}`)) {
|
||||||
console.info(`Ignoring empty directory: ${stat.path}`);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const folderTitle = await Folder.findUniqueItemTitle(basename(stat.path));
|
const folderTitle = await Folder.findUniqueItemTitle(basename(stat.path));
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ const input: Theme = {
|
|||||||
selectedColor2: '#131313',
|
selectedColor2: '#131313',
|
||||||
colorError2: '#ff6c6c',
|
colorError2: '#ff6c6c',
|
||||||
colorWarn2: '#ffcb81',
|
colorWarn2: '#ffcb81',
|
||||||
|
colorWarn3: '#ff7626',
|
||||||
|
|
||||||
// Color scheme "3" is used for the config screens for example/
|
// Color scheme "3" is used for the config screens for example/
|
||||||
// It's dark text over gray background.
|
// It's dark text over gray background.
|
||||||
@@ -76,6 +77,7 @@ const expected = `
|
|||||||
--joplin-selected-color2: #131313;
|
--joplin-selected-color2: #131313;
|
||||||
--joplin-color-error2: #ff6c6c;
|
--joplin-color-error2: #ff6c6c;
|
||||||
--joplin-color-warn2: #ffcb81;
|
--joplin-color-warn2: #ffcb81;
|
||||||
|
--joplin-color-warn3: #ff7626;
|
||||||
--joplin-background-color3: #F4F5F6;
|
--joplin-background-color3: #F4F5F6;
|
||||||
--joplin-background-color-hover3: #CBDAF1;
|
--joplin-background-color-hover3: #CBDAF1;
|
||||||
--joplin-color3: #738598;
|
--joplin-color3: #738598;
|
||||||
|
|||||||
Reference in New Issue
Block a user