Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: converted components to typescript #556

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ div#wrapper(v-if="loaded")
aw-footer
</template>

<script>
<script lang="ts">
import { useSettingsStore } from '~/stores/settings';
import { useServerStore } from '~/stores/server';

Expand Down
8 changes: 4 additions & 4 deletions src/views/Alerts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ div

<style scoped lang="scss"></style>

<script>
<script lang="ts">
import _ from 'lodash';
import moment from 'moment';
import { canonicalEvents } from '~/queries';
Expand Down Expand Up @@ -108,7 +108,7 @@ export default {
let time = 0;
_.map(Object.entries(this.alert_times), ([c, t]) => {
if (c.startsWith(cat.join(','))) {
time += t;
if (typeof t === 'number') time += t;
}
});
return time;
Expand Down Expand Up @@ -149,8 +149,8 @@ export default {
bid_window: 'aw-watcher-window_' + this.hostname,
bid_afk: 'aw-watcher-afk_' + this.hostname,
filter_afk: this.filter_afk,
classes: useCategoryStore().classes_for_query,
filter_classes: null, // classes.map(c => c[0]),
categories: useCategoryStore().classes_for_query,
filter_categories: null, // classes.map(c => c[0]),
});
query += '; RETURN = events;';

Expand Down
2 changes: 1 addition & 1 deletion src/views/Bucket.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ div
aw-eventlist(:bucket_id="id", @save="updateEvent", :events="events" editable=true)
</template>

<script>
<script lang="ts">
import { useBucketsStore } from '~/stores/buckets';
import { getClient } from '~/util/awclient';

Expand Down
2 changes: 1 addition & 1 deletion src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ div

</template>

<script>
<script lang="ts">
export default {
name: 'Home',
};
Expand Down
2 changes: 1 addition & 1 deletion src/views/NotFound.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ div
| Try navigating back where you came from.
</template>

<script>
<script lang="ts">
export default {
name: 'NotFound',
};
Expand Down
2 changes: 1 addition & 1 deletion src/views/QueryExplorer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ div

<style scoped lang="scss"></style>

<script>
<script lang="ts">
import moment from 'moment';
import _ from 'lodash';
import { useCategoryStore } from '~/stores/categories';
Expand Down
2 changes: 1 addition & 1 deletion src/views/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ div
| Add a week to the search: #[b-button(size="sm" variant="outline-dark" @click="start = start.subtract(1, 'week'); search()") +1 week]
</template>

<script>
<script lang="ts">
import _ from 'lodash';
import moment from 'moment';
import { canonicalEvents } from '~/queries';
Expand Down
2 changes: 1 addition & 1 deletion src/views/Stopwatch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ div
}
</style>

<script>
<script lang="ts">
import _ from 'lodash';
import moment from 'moment';

Expand Down
2 changes: 1 addition & 1 deletion src/views/Timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ div
h1.aw-loading Loading...
</template>

<script>
<script lang="ts">
import _ from 'lodash';
import { useSettingsStore } from '~/stores/settings';
import { useBucketsStore } from '~/stores/buckets';
Expand Down
4 changes: 2 additions & 2 deletions src/views/activity/ActivityView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ div(v-if="view")
span Edit view
</template>

<script>
<script lang="ts">
import 'vue-awesome/icons/save';
import 'vue-awesome/icons/times';
import 'vue-awesome/icons/trash';
Expand All @@ -40,7 +40,7 @@ import 'vue-awesome/icons/undo';
import { mapState } from 'pinia';
import draggable from 'vuedraggable';

import { useViewsStore } from '@/stores/views';
import { useViewsStore } from '~/stores/views';

export default {
name: 'ActivityView',
Expand Down
2 changes: 1 addition & 1 deletion src/views/settings/ActivePatternSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ div

</template>

<script>
<script lang="ts">
import { isRegexBroad, validateRegex } from '~/util/validate';
import { useSettingsStore } from '~/stores/settings';

Expand Down
2 changes: 1 addition & 1 deletion src/views/settings/CategorizationSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ div
b-btn.float-right(@click="saveClasses", variant="success" :disabled="!classes_unsaved_changes")
| Save
</template>
<script>
<script lang="ts">
import { mapState, mapGetters } from 'pinia';
import CategoryEditTree from '~/components/CategoryEditTree.vue';
import CategoryEditModal from '~/components/CategoryEditModal.vue';
Expand Down
2 changes: 1 addition & 1 deletion src/views/settings/ColorSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ div.d-flex.justify-content-between
b-form-checkbox(v-model="useColorFallback", switch)
</template>

<script>
<script lang="ts">
import { useSettingsStore } from '~/stores/settings';

export default {
Expand Down
2 changes: 1 addition & 1 deletion src/views/settings/DaystartSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ div
small
| The weekday which starts a new week.
</template>
<script>
<script lang="ts">
import { useSettingsStore } from '~/stores/settings';

export default {
Expand Down
2 changes: 1 addition & 1 deletion src/views/settings/DeveloperSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ div
| Web UI commit hash: {{ COMMIT_HASH }}
</template>

<script>
<script lang="ts">
import { useSettingsStore } from '~/stores/settings';

export default {
Expand Down
2 changes: 1 addition & 1 deletion src/views/settings/LandingPageSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ div
| The page to open when opening ActivityWatch, or clicking the logo in the top menu.
</template>

<script>
<script lang="ts">
import { useSettingsStore } from '~/stores/settings';
import { useBucketsStore } from '~/stores/buckets';

Expand Down
2 changes: 1 addition & 1 deletion src/views/settings/ReleaseNotificationSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ div
| We will send you a notification if there is a new release available for download, this check will happen at most once per day.
</template>

<script>
<script lang="ts">
import { useSettingsStore } from '~/stores/settings';

export default {
Expand Down
2 changes: 1 addition & 1 deletion src/views/settings/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ div
DeveloperSettings
</template>

<script>
<script lang="ts">
import { useSettingsStore } from '~/stores/settings';

import DaystartSettings from '~/views/settings/DaystartSettings.vue';
Expand Down
2 changes: 1 addition & 1 deletion src/views/settings/Theme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ div
| Change color theme of the application (you need to change categories colors manually to be suitable with dark mode).
</template>

<script>
<script lang="ts">
import { mapState } from 'pinia';
import { useSettingsStore } from '~/stores/settings';

Expand Down
2 changes: 1 addition & 1 deletion src/views/settings/TimelineDurationSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ div
small
| The default duration used for 'show last' in the timeline view.
</template>
<script>
<script lang="ts">
import { useSettingsStore } from '~/stores/settings';

export default {
Expand Down
Loading